From: Michael Tremer Date: Tue, 11 Jun 2019 01:46:44 +0000 (+0100) Subject: tests: Check if reference counting is working X-Git-Tag: 0.9.28~1285^2~939 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f9411f7f7f6f82885d84dc512d21b0d90f2ee88;p=pakfire.git tests: Check if reference counting is working Signed-off-by: Michael Tremer --- diff --git a/tests/testsuite.c b/tests/testsuite.c index 627f8ef8b..246345f84 100644 --- a/tests/testsuite.c +++ b/tests/testsuite.c @@ -51,7 +51,13 @@ static int test_run(test_t* t) { LOG("Test failed with error code: %d\n", r); // Release pakfire - pakfire_unref(t->pakfire); + t->pakfire = pakfire_unref(t->pakfire); + + // Check if Pakfire was actually released + if (t->pakfire) { + LOG("Error: Pakfire instance was not released\n"); + return 1; + } return r; }