Fix dnstap unit test issue with pkcs11
This commit is contained in:
parent
395fbedb17
commit
812f6fb336
38
bind-9.11-unit-dnstap-pkcs11.patch
Normal file
38
bind-9.11-unit-dnstap-pkcs11.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From dca9eea70cb33062905aefc389266da931e9d0d6 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Mensik <pemensik@redhat.com>
|
||||
Date: Thu, 14 Mar 2019 15:48:37 +0100
|
||||
Subject: [PATCH] Set TZ again before dns library is initialized
|
||||
|
||||
PKCS11 uses it, initializes TZ offset from dst init. Setting environment
|
||||
in test is too late since use of cmocka.
|
||||
---
|
||||
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 22d6dc3..5a60b12 100644
|
||||
--- a/lib/dns/tests/dnstap_test.c
|
||||
+++ b/lib/dns/tests/dnstap_test.c
|
||||
@@ -309,9 +309,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);
|
||||
|
||||
@@ -378,6 +375,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, dns_test_init, dns_test_final));
|
||||
#else
|
||||
print_message("1..0 # Skip dnstap not enabled\n");
|
||||
--
|
||||
2.20.1
|
||||
|
@ -53,7 +53,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
|
||||
Name: bind
|
||||
License: MPLv2.0
|
||||
Version: 9.11.6
|
||||
Release: 1%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
|
||||
Release: 2%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
|
||||
Epoch: 32
|
||||
Url: https://www.isc.org/downloads/bind/
|
||||
#
|
||||
@ -139,6 +139,7 @@ Patch169:bind-9.11-feature-test-dlz.patch
|
||||
Patch170:bind-9.11-feature-test-named.patch
|
||||
Patch171:bind-9.11-tests-variants.patch
|
||||
Patch172:bind-9.11-tests-pkcs11.patch
|
||||
Patch173: bind-9.11-unit-dnstap-pkcs11.patch
|
||||
|
||||
# SDB patches
|
||||
Patch11: bind-9.3.2b2-sdbsrc.patch
|
||||
@ -518,6 +519,7 @@ are used for building ISC DHCP.
|
||||
%patch170 -p1 -b .featuretest-named
|
||||
%patch171 -p1 -b .test-variant
|
||||
%patch172 -p1 -b .test-pkcs11
|
||||
%patch173 -p1 -b .unit-dnstap
|
||||
|
||||
mkdir lib/dns/tests/testdata/dstrandom
|
||||
cp -a %{SOURCE50} lib/dns/tests/testdata/dstrandom/random.data
|
||||
@ -1500,6 +1502,9 @@ fi;
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Mar 14 2019 Petr Menšík <pemensik@redhat.com> - 32:9.11.6-2
|
||||
- Fix dnstap issue in unit test once again
|
||||
|
||||
* Tue Mar 05 2019 Petr Menšík <pemensik@redhat.com> - 32:9.11.6-1
|
||||
- Update to 9.11.6
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user