!103 同步2203解决测试用例超时补丁
From: @jiangheng12 Reviewed-by: @wangxp006 Signed-off-by: @wangxp006
This commit is contained in:
commit
686e556e5a
11
bind.spec
11
bind.spec
@ -30,7 +30,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
|
||||
Name: bind
|
||||
License: MPLv2.0
|
||||
Version: 9.16.23
|
||||
Release: 4
|
||||
Release: 5
|
||||
Epoch: 32
|
||||
Url: https://www.isc.org/downloads/bind/
|
||||
#
|
||||
@ -81,6 +81,7 @@ Patch164:bind-9.11-rh1666814.patch
|
||||
|
||||
Patch6000: CVE-2022-0396.patch
|
||||
Patch6001: CVE-2021-25220.patch
|
||||
Patch9000: bugfix-limit-numbers-of-test-threads.patch
|
||||
|
||||
%{?systemd_ordering}
|
||||
Requires: coreutils
|
||||
@ -374,6 +375,7 @@ in HTML and PDF format.
|
||||
|
||||
%patch6000 -p1
|
||||
%patch6001 -p1
|
||||
%patch9000 -p1
|
||||
|
||||
%if %{with PKCS11}
|
||||
%patch135 -p1 -b .config-pkcs11
|
||||
@ -540,6 +542,7 @@ export TSAN_OPTIONS="log_exe_name=true log_path=ThreadSanitizer exitcode=0"
|
||||
ORIGFILES=$(ulimit -n)
|
||||
ulimit -n 4096 || : # Requires on some machines with many cores
|
||||
fi
|
||||
export ISC_TASK_WORKERS=8
|
||||
make unit
|
||||
e=$?
|
||||
if [ "$e" -ne 0 ]; then
|
||||
@ -1096,6 +1099,12 @@ fi;
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Jun 13 2022 jiangheng<jiangheng14@huawei.com> - 9.16.23-5
|
||||
- Type:bugfix
|
||||
- CVE:
|
||||
- SUG:NA
|
||||
- DESC:fix test cases timeout
|
||||
|
||||
* Thu Mar 31 2022 jiangheng<jiangheng12@huawei.com> - 9.16.23-4
|
||||
- Type:bugfix
|
||||
- CVE:
|
||||
|
||||
39
bugfix-limit-numbers-of-test-threads.patch
Normal file
39
bugfix-limit-numbers-of-test-threads.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 1d9843b58800b51e1366fba5e0bdef5f0336efaf Mon Sep 17 00:00:00 2001
|
||||
From: jiangheng <jiangheng12@huawei.com>
|
||||
Date: Wed, 9 Feb 2022 16:21:10 +0800
|
||||
Subject: [PATCH] limit numbers of test threads to reduce execution time
|
||||
|
||||
---
|
||||
lib/dns/tests/dnstest.c | 2 +-
|
||||
lib/ns/tests/nstest.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/dns/tests/dnstest.c b/lib/dns/tests/dnstest.c
|
||||
index 465ce9f..263b0d6 100644
|
||||
--- a/lib/dns/tests/dnstest.c
|
||||
+++ b/lib/dns/tests/dnstest.c
|
||||
@@ -114,7 +114,7 @@ cleanup_managers(void) {
|
||||
static isc_result_t
|
||||
create_managers(void) {
|
||||
isc_result_t result;
|
||||
- ncpus = isc_os_ncpus();
|
||||
+ ncpus = ISC_MIN(isc_os_ncpus(), 8);
|
||||
|
||||
CHECK(isc_managers_create(dt_mctx, ncpus, 0, &netmgr, &taskmgr));
|
||||
CHECK(isc_timermgr_create(dt_mctx, &timermgr));
|
||||
diff --git a/lib/ns/tests/nstest.c b/lib/ns/tests/nstest.c
|
||||
index 238450d..b5fa00c 100644
|
||||
--- a/lib/ns/tests/nstest.c
|
||||
+++ b/lib/ns/tests/nstest.c
|
||||
@@ -243,7 +243,7 @@ create_managers(void) {
|
||||
in_port_t port = 5300 + isc_random8();
|
||||
ns_listenlist_t *listenon = NULL;
|
||||
isc_event_t *event = NULL;
|
||||
- ncpus = isc_os_ncpus();
|
||||
+ ncpus = ISC_MIN(isc_os_ncpus(), 8);
|
||||
|
||||
CHECK(isc_managers_create(mctx, ncpus, 0, &netmgr, &taskmgr));
|
||||
CHECK(isc_task_create_bound(taskmgr, 0, &maintask, 0));
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user