From f28cda4d79d88ccecfc26e4d36bd23d897f452f7 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 26 Mar 2015 12:10:32 +0100 Subject: [PATCH] route-manager/test: fix usage of g_assert_expect_message() Tests that use g_assert_expect_message() must initialize with nmtst_init_assert_logging(). Otherwise, the caller can change the logging level via NMTST_DEBUG=log-level=DEBUG,log-domains=DEFAULT which breaks the assertions. nmtst_init_assert_logging() allows the caller to turn of checking of assertions via NMTST_DEBUG=log-level=DEBUG,log-domains=DEFAULT,no-expect-message Also, don't use g_message() in platform tests otherwise the test fail because nmtst now sets g_log_set_always_fatal(). (cherry picked from commit 5fd3827e49af9ce7e1ebac35a9471aaca04b2bc0) --- src/tests/test-route-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/test-route-manager.c b/src/tests/test-route-manager.c index cb159b538e..08ee865cf4 100644 --- a/src/tests/test-route-manager.c +++ b/src/tests/test-route-manager.c @@ -692,7 +692,7 @@ fixture_teardown (test_fixture *fixture, gconstpointer user_data) void init_tests (int *argc, char ***argv) { - nmtst_init_with_logging (argc, argv, NULL, "ALL"); + nmtst_init_assert_logging (argc, argv, "WARN", "ALL"); } void