Correct failing test
Prevent failures of netmgr_test. Enable unit tests again, since issue with kyua seems to be fixed. Resolves: rhbz#2088125
This commit is contained in:
parent
bb1dcf68da
commit
bb9452718a
66
bind-9.16-rhbz2088125.patch
Normal file
66
bind-9.16-rhbz2088125.patch
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
From 1feb389f80f7595d2f873c3ff8678b52cd2db828 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
||||||
|
Date: Tue, 24 May 2022 19:42:41 +0200
|
||||||
|
Subject: [PATCH] Fix failures in isc netmgr_test on big endian machines
|
||||||
|
|
||||||
|
Typing from libuv structure to isc_region_t is not possible, because
|
||||||
|
their sizes differ on 64 bit architectures. Little endian machines seems
|
||||||
|
to be lucky and still result in test passed. But big endian machine such
|
||||||
|
as s390x fails the test reliably.
|
||||||
|
|
||||||
|
Fix by directly creating the buffer as isc_region_t and skipping the
|
||||||
|
type conversion. More readable and still more correct.
|
||||||
|
|
||||||
|
(cherry picked from commit 057438cb45f2f02615dc309e3822f23c0ca70a0a)
|
||||||
|
---
|
||||||
|
lib/isc/tests/netmgr_test.c | 18 ++++++++----------
|
||||||
|
1 file changed, 8 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/isc/tests/netmgr_test.c b/lib/isc/tests/netmgr_test.c
|
||||||
|
index c2d7fffb32..9fa0d47e5b 100644
|
||||||
|
--- a/lib/isc/tests/netmgr_test.c
|
||||||
|
+++ b/lib/isc/tests/netmgr_test.c
|
||||||
|
@@ -62,11 +62,11 @@ static isc_sockaddr_t tcp_connect_addr;
|
||||||
|
static uint64_t send_magic = 0;
|
||||||
|
static uint64_t stop_magic = 0;
|
||||||
|
|
||||||
|
-static uv_buf_t send_msg = { .base = (char *)&send_magic,
|
||||||
|
- .len = sizeof(send_magic) };
|
||||||
|
+static isc_region_t send_msg = { .base = (unsigned char *)&send_magic,
|
||||||
|
+ .length = sizeof(send_magic) };
|
||||||
|
|
||||||
|
-static uv_buf_t stop_msg = { .base = (char *)&stop_magic,
|
||||||
|
- .len = sizeof(stop_magic) };
|
||||||
|
+static isc_region_t stop_msg = { .base = (unsigned char *)&stop_magic,
|
||||||
|
+ .length = sizeof(stop_magic) };
|
||||||
|
|
||||||
|
static atomic_bool do_send = false;
|
||||||
|
static unsigned int workers = 0;
|
||||||
|
@@ -420,11 +420,9 @@ connect_send(isc_nmhandle_t *handle) {
|
||||||
|
isc_nmhandle_attach(handle, &sendhandle);
|
||||||
|
isc_nmhandle_setwritetimeout(handle, T_IDLE);
|
||||||
|
if (atomic_fetch_sub(&nsends, 1) > 1) {
|
||||||
|
- isc_nm_send(sendhandle, (isc_region_t *)&send_msg,
|
||||||
|
- connect_send_cb, NULL);
|
||||||
|
+ isc_nm_send(sendhandle, &send_msg, connect_send_cb, NULL);
|
||||||
|
} else {
|
||||||
|
- isc_nm_send(sendhandle, (isc_region_t *)&stop_msg,
|
||||||
|
- connect_send_cb, NULL);
|
||||||
|
+ isc_nm_send(sendhandle, &stop_msg, connect_send_cb, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -531,8 +529,8 @@ listen_read_cb(isc_nmhandle_t *handle, isc_result_t eresult,
|
||||||
|
isc_nmhandle_attach(handle, &sendhandle);
|
||||||
|
isc_refcount_increment0(&active_ssends);
|
||||||
|
isc_nmhandle_setwritetimeout(sendhandle, T_IDLE);
|
||||||
|
- isc_nm_send(sendhandle, (isc_region_t *)&send_msg,
|
||||||
|
- listen_send_cb, cbarg);
|
||||||
|
+ isc_nm_send(sendhandle, &send_msg, listen_send_cb,
|
||||||
|
+ cbarg);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.34.3
|
||||||
|
|
@ -107,6 +107,8 @@ Patch26: bind-9.16-locked-isc-queue.patch
|
|||||||
# https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/5273
|
# https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/5273
|
||||||
Patch27: bind-9.16-resolv.conf-options-timeout.patch
|
Patch27: bind-9.16-resolv.conf-options-timeout.patch
|
||||||
Patch28: bind-9.16-resolv.conf-options-timeout-test.patch
|
Patch28: bind-9.16-resolv.conf-options-timeout-test.patch
|
||||||
|
# https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/6352
|
||||||
|
Patch29: bind-9.16-rhbz2088125.patch
|
||||||
|
|
||||||
%{?systemd_ordering}
|
%{?systemd_ordering}
|
||||||
Requires: coreutils
|
Requires: coreutils
|
||||||
@ -1119,6 +1121,7 @@ fi;
|
|||||||
%changelog
|
%changelog
|
||||||
* Thu May 26 2022 Petr Menšík <pemensik@redhat.com> - 32:9.16.29-1
|
* Thu May 26 2022 Petr Menšík <pemensik@redhat.com> - 32:9.16.29-1
|
||||||
- Update to 9.16.29 (#2087920)
|
- Update to 9.16.29 (#2087920)
|
||||||
|
- Fix netmgr_test fails on s390x (#2088125)
|
||||||
|
|
||||||
* Tue May 17 2022 Petr Menšík <pemensik@redhat.com> - 32:9.16.28-2
|
* Tue May 17 2022 Petr Menšík <pemensik@redhat.com> - 32:9.16.28-2
|
||||||
- Parse again timeout and attempts from resolv.conf (#2087156)
|
- Parse again timeout and attempts from resolv.conf (#2087156)
|
||||||
|
Loading…
Reference in New Issue
Block a user