[PATCH 3/6] torture: Avoid duplicate identify_qemu_vcpus calls in torture.sh
From: Paul E. McKenney
Date: Mon Nov 16 2026 - 12:26:39 EST
The torture.sh script assigns the return from the identify_qemu_vcpus()
bash function to TORTURE_ALLOTED_CPUS, but then invokes this same function
*again* to assign to compress_concurrency. Save a call by copying the
value of TORTURE_ALLOTED_CPUS to compress_concurrency.
Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
---
tools/testing/selftests/rcutorture/bin/torture.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh
index cd023272137a0..0be8bb08c5ca0 100755
--- a/tools/testing/selftests/rcutorture/bin/torture.sh
+++ b/tools/testing/selftests/rcutorture/bin/torture.sh
@@ -47,7 +47,7 @@ configs_hazptr=
kcsan_kmake_args=
# Default compression, duration, and apportionment.
-compress_concurrency="`identify_qemu_vcpus`"
+compress_concurrency="${TORTURE_ALLOTED_CPUS}"
duration_base=10
duration_rcutorture_frac=7
duration_locktorture_frac=1
--
2.40.1