Commit Graph

3 Commits

Author SHA1 Message Date
Vadim Yanitskiy 58c4bc68c8 tests: make both Valgrind and LeakSanitizer happy
The talloc_enable_null_tracking() actually allocates a new talloc
context, which makes both Valgrind and LeakSanitizer angry. This
context should be freed by the talloc_disable_null_tracking().

Change-Id: Ia660d2fdac720f685c0186720d0a476d7e9468be
2018-07-03 15:27:47 +00:00
Vadim Yanitskiy 6f34c8f301 procqueue: introduce and use shared cat_name definitions
Let's use the common string representation for item category
names, defined in the shared header, instead of defining
them in every file.

Change-Id: Ie0c449d77fa383cad27f67b8ce902bd071342dbb
2018-01-15 00:25:44 +06:00
Vadim Yanitskiy 1fe6a9b9ed tests: add procqueue test
This test is intended to validate the processing queue
management API. Moreover, the talloc debugging API is
used to ensure that there are no memory leaks.

First, four processing queues are being allocated. One
of them is empty, while others have different count of
items. Then the human-readable description is being
generated for all of them. And finally, the processing
and exit cllback are being tested.

During the test execution, the talloc NULL-context
tracking feature is enabled, allowing to observe every
memory allocation within the libosmogapk, and to detect
memory leaks.
2017-12-31 12:21:00 +01:00