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.
- 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.
- Have to run in GitLab CI.
- Integrated with Flatpak.
- Available to end users for providing logs.
- Ability to test sections (Search, operations, cache...).
- Good knowledge of C
- Basic knowledge of gcov
- Basic knowledge of perf
- Basic knowledge of glib testing framework
- Other profiling and testing tools knowledge is a plus.
Proposal & plan
Make unit tests and integration tests of most critical functions of the most critical components
Time estimate: 1.5 months
Possible stretch goals:
- NautilusFile & NautilusDirectory
- Cache of files in NautilusFile and NautilusDirectory (To be decided if we can do this one)
- NautilusFile utilities
- The ones written above
- Loading of files in views
- Network connections
- 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.
Time estimate: 1 week
Total time estimate: 7 weeks
Make profile tests for most critical components
- Basic operations like move, copy/paste, etc. Basically most in nautilus-operations file
- Loading of local directories
- Loading of network directories
Test should be able to be easily plugable with an external profile tool like 'perf'
Total time estimate: 2 weeks
- 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
Time estimate: 1/2 a week
Total time estimate: 2 and a 1/2 weeks