From e934bfb5d802737879ea0f22f0f96cf1e5644b6c Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sat, 12 Dec 2015 12:56:23 +0100 Subject: [PATCH] tests: don't assert for initialized tests in g_test_assert_expected_messages() We call _nmtst_exit() atexit(), which in turn calls g_test_assert_expected_messages(). We must not assert there against initialized tests. $ ./src/platform/tests/monitor -h Usage: ./src/platform/tests/monitor [OPTION...] ** NetworkManager:ERROR:monitor.c:11:_nmtst_exit: assertion failed: (nmtst_initialized ()) Aborted (core dumped) --- include/nm-test-utils.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/nm-test-utils.h b/include/nm-test-utils.h index 43d5604cab..28ae56fee7 100644 --- a/include/nm-test-utils.h +++ b/include/nm-test-utils.h @@ -639,7 +639,6 @@ nmtst_test_quick (void) const char *_func = (func); \ int _line = (line); \ \ - g_assert (nmtst_initialized ()); \ if (__nmtst_internal.assert_logging && __nmtst_internal.no_expect_message) \ g_debug ("nmtst: assert-logging: g_test_assert_expected_messages(%s, %s:%d, %s)", _domain?:"", _file?:"", _line, _func?:""); \ \