]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix regression in dnstap_test with native pkcs11
authorPetr Menšík <pemensik@redhat.com>
Thu, 14 Mar 2019 12:40:14 +0000 (13:40 +0100)
committerMark Andrews <marka@isc.org>
Fri, 15 Mar 2019 05:03:53 +0000 (01:03 -0400)
Change to cmocka broken initialization of TZ environment. This time,
commit 1cf12540515e4a3fc93ace02b81815209f1e709e is not soon enough. Has
to be moved more forward, before any other tests. It library is not full
reinitialized on each test.

lib/dns/tests/dnstap_test.c

index c5dc0cddf8b51ef1638de42948cd0f4dc8b98aff..5ba5520cfd3224905aa4e9a27827331a1e60b386 100644 (file)
@@ -310,9 +310,6 @@ totext_test(void **state) {
 
        UNUSED(state);
 
-       /* make sure text conversion gets the right local time */
-       setenv("TZ", "PST8", 1);
-
        result = dns_dt_open(TAPSAVED, dns_dtmode_file, mctx, &handle);
        assert_int_equal(result, ISC_R_SUCCESS);
 
@@ -379,6 +376,9 @@ main(void) {
                cmocka_unit_test_setup_teardown(totext_test, _setup, _teardown),
        };
 
+       /* make sure text conversion gets the right local time */
+       setenv("TZ", "PST8", 1);
+
        return (cmocka_run_group_tests(tests, NULL, NULL));
 #else
        print_message("1..0 # Skip dnstap not enabled\n");