Tests, profiling and debug framework for Nautilus
Nautilus is mostly lacking in test, profiling and debug capabilities. This project would be to ensure we have proper tests, a good code coverage and a good framework for debugging and profiling together with our GitLab CI.
Current problems
- We don't know if Nautilus has performance issues.
- We don't know when we break something, we have found 1 year old breaks.
- We don't know where a memory leak is located.
Goals & use cases
- Easily test basic critical functions.
- Prevent regressions between commits and releases.
- Gather data about performance and prevent performance regressions.
- Improve debug of memory leaks.
Requirements
- Have to run in GitLab CI.
- Integrated with Flatpak.
- Available to end users for providing logs.
- Ability to test sections (Search, operations, cache...).
Relevant art
- Gcov
- Perf & Sysprof
Intern requirements
- Good knowledge of C
- Basic knowledge of gcov
- Basic knowledge of glib testing framework
- Other profiling and testing tools knowledge is a plus.
Tasks
Testing
Most probably with glib testing framework, but further exploration of other tools will be necessary. There are tests already present in the test folder.
-
Make unit tests and integration tests of most critical functions of the most critical components -
Search -
Operations -
NautilusFile & NautilusDirectory -
Cache of files in NautilusFile and NautilusDirectory (To be decided if we can do this one) -
nautilus-file-utilities.h -
Loading of files in views -
Network connections -
Batch renaming -
Directory deep counting -
gnome-shell search functionality
-
-
Both unit tests and integration tests should display basic profiling (read more in the next section). -
Testing should be split between those that doesn't require gtk and those who do, trying to avoid gtk+ most of the times. -
Set up properly a coverity tool for unit tests, for example 'gcov'. Further exploration on what tools we can use should be done.
Profiling
-
Make profile tests for most critical components -
Basic operations like move, copy/paste, etc. Basically most in nautilus-operations file -
Search -
Loading of local directories -
Loading of network directories
-
-
Test should be able to be easily plugable with an external profile tool like 'perf' or Sysprof.
Debug
-
Explore what options are there for memory leaks, apart of 'valgrind' -
Have proper debug messages in the most critical components -
Include reference count in debug messages. See the Gtk Inspector statistics tab to have an example.
Time estimate: 2 weeks -
Update or remove the NAUTILUS_DEBUG framework #1220 (closed)