Commit 6992c502 authored by Petr Menšík's avatar Petr Menšík Committed by Mark Andrews
Browse files

Fix regression in dnstap_test with native pkcs11

Change to cmocka broken initialization of TZ environment. This time,
commit 1cf12540 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 71c4fad5)
parent 49358c76
...@@ -309,9 +309,6 @@ totext_test(void **state) { ...@@ -309,9 +309,6 @@ totext_test(void **state) {
UNUSED(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); result = dns_dt_open(TAPSAVED, dns_dtmode_file, mctx, &handle);
assert_int_equal(result, ISC_R_SUCCESS); assert_int_equal(result, ISC_R_SUCCESS);
...@@ -378,6 +375,9 @@ main(void) { ...@@ -378,6 +375,9 @@ main(void) {
cmocka_unit_test_setup_teardown(totext_test, _setup, _teardown), 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, dns_test_init, dns_test_final)); return (cmocka_run_group_tests(tests, dns_test_init, dns_test_final));
#else #else
print_message("1..0 # Skip dnstap not enabled\n"); print_message("1..0 # Skip dnstap not enabled\n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment