diff options
author | Thomas Haller <thaller@redhat.com> | 2019-09-21 20:35:18 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-09-21 22:01:29 +0200 |
commit | d19a403faa480b20f9ca6c9ce9e66a015b16cf46 (patch) | |
tree | a0e74971e6fb81619cc744ad152798aa719a8eb5 /src/nm-audit-manager.h | |
parent | bf8118b8290d498f71068d9b77628cf7cb668400 (diff) | |
download | NetworkManager-d19a403faa480b20f9ca6c9ce9e66a015b16cf46.tar.gz |
libnm/test: add unit test with consistency checks about NMSetting type info
Add test for checking the meta data for expected consistency.
This is also useful if you want to check something about the meta data
programatically.
For example, if you have the question which (if any) properties
are GObject based but also implement a to_dbus_fcn() function. Then you
can extend this code with some simple printf debugging to get a list of
those.
Or, if you want to find how many NMSettInfoProperty instances are in
static data (e.g. to determine how much memory is used). You can easily
modify this code to count them (and find 447 properties). Out of these,
326 are plain GObject based properties. Meaning, we could refactor the
code to create smaller NMSettInfoProperty instances for those, saving
thus (326 * 4 * sizeof (gpointer)) bytes (10K).
Such questions are interesting when refactoring the code.
Diffstat (limited to 'src/nm-audit-manager.h')
0 files changed, 0 insertions, 0 deletions