]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Do not expect fail in cpu test default configuration
authorPetr Menšík <pemensik@redhat.com>
Tue, 24 Jun 2025 15:12:35 +0000 (17:12 +0200)
committerPetr Špaček <pspacek@isc.org>
Wed, 25 Jun 2025 11:36:35 +0000 (11:36 +0000)
Previous CPU test relied on either missing default named.conf or the
missing permissions to write into its default directory. In short that
default configuration would be unusable with current user. It would hang
indefinitely at cpu test if the named user could write into directory
specified in default configuration.

Change it instead to explicitly try non-existent configuration file.
It will still fail immediately, but will not rely on running user or
presence of file at default configuration file path.

(cherry picked from commit 8e789ea62f882cc3f1308de16dd3ca22ef0f8f04)

bin/tests/system/cpu/tests.sh

index a521b4f29cf9b555c0cead828e7070faf5c5e657..f92843e9967d21a3c488dd5ec5c08c9d9ccc9382 100755 (executable)
@@ -54,7 +54,8 @@ ret=0
 for cpu in $(cpulist); do
   n=$((n + 1))
   echo_i "testing that limiting CPU sets to 0-${cpu} works ($n)"
-  cpulimit 0 "$cpu" "$NAMED" -g >named.run.$n 2>&1 || true
+  # intentionally fail running the named, but print number of detected cpus during it
+  cpulimit 0 "$cpu" "$NAMED" -g -c missing.conf >named.run.$n 2>&1 || true
   ncpus=$(sed -ne 's/.*found \([0-9]*\) CPU.*\([0-9]*\) worker thread.*/\1/p' named.run.$n)
   [ "$ncpus" -eq "$((cpu + 1))" ] || ret=1
 done