From 7885bbff9982d33de4dddc81afcbc9ccbf7e8cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Thu, 14 Mar 2019 13:40:14 +0100 Subject: [PATCH 1/2] Fix regression in dnstap_test with native pkcs11 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. (cherry picked from commit 71c4fad59227a3b879071c6babc5c18099be01c0) --- lib/dns/tests/dnstap_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dns/tests/dnstap_test.c b/lib/dns/tests/dnstap_test.c index 4fb42be0e7..916bd72856 100644 --- a/lib/dns/tests/dnstap_test.c +++ b/lib/dns/tests/dnstap_test.c @@ -312,9 +312,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); @@ -381,6 +378,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"); From b1c658b8509bb5e29732dffbc31fd812d40b7323 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 15 Mar 2019 16:08:03 +1100 Subject: [PATCH 2/2] add CHANGES (cherry picked from commit 788f7841911331510bff83989ad01a306ed2cc92) --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index c230e593d0..f2f5d91a1c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +5187. [test] Set time zone before running any tests in dnstap_test. + [GL #940] + 5186. [cleanup] More dnssec-keygen manual tidying. [GL !1678] 5184. [bug] Missing unlocks in sdlz.c. [GL #936]