Add memory-leaking tests for common operations
Submitted by Travis Reitter
Link to original bug (#640842)
Description
As we saw in bug 640551 and bug 640554, small memory leaks over time can be more serious problems for users who switch networks frequently and rarely reboot.
I didn't notice this since it doesn't fit my usage profile.
Valgrind ships with libraries to track memory leaks. We should wrap this with some convenient Vala functions and make tests to track 'definitely lost' memory for common operations such as:
- account(s) going online -> offline -> online repeatedly (Tp backend)
- Personas getting linked together (general Folks)
- Personas getting anti-linked/split (general Folks)
- avatars changing (general Folks and Tp backend)
We could extend this list even farther, but these seem like some good major cases.
If at all possible, these tests should be part of the regular 'make check' and require that memory 'definitely lost' be zero bytes.
Version: git master