From a7fb84e783837e5c5c2bc18f3aceb4397109d96b Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 29 Oct 2018 16:15:52 +1100 Subject: [PATCH] Initalize TZ environment variable before calling dns_test_begin in dnstap_test. (cherry picked from commit 1cf12540515e4a3fc93ace02b81815209f1e709e) --- CHANGES | 3 +++ lib/dns/tests/dnstap_test.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 9c295e40f35..1ae808de9ac 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +5064. [test] Initalize TZ environment variable before calling + dns_test_begin in dnstap_test. [GL #624] + 5061. [protocol] Add support for EID and NIMLOC. [GL #626] 5060. [bug] GID, UID and UINFO could not be loaded using unknown diff --git a/lib/dns/tests/dnstap_test.c b/lib/dns/tests/dnstap_test.c index 56e3da443ee..1f31542ea9a 100644 --- a/lib/dns/tests/dnstap_test.c +++ b/lib/dns/tests/dnstap_test.c @@ -297,6 +297,9 @@ ATF_TC_BODY(totext, tc) { UNUSED(tc); + /* make sure text conversion gets the right local time */ + setenv("TZ", "PST8", 1); + result = dns_test_begin(NULL, true); ATF_REQUIRE(result == ISC_R_SUCCESS); @@ -306,9 +309,6 @@ ATF_TC_BODY(totext, tc) { result = isc_stdio_open(TAPTEXT, "r", &fp); ATF_REQUIRE_EQ(result, ISC_R_SUCCESS); - /* make sure text conversion gets the right local time */ - setenv("TZ", "PST8", 1); - while (dns_dt_getframe(handle, &data, &dsize) == ISC_R_SUCCESS) { dns_dtdata_t *dtdata = NULL; isc_buffer_t *b = NULL; -- GitLab