aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rcutorture/bin/functions.sh
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2020-05-04 16:40:53 -0700
committerPaul E. McKenney <paulmck@kernel.org>2020-06-29 12:01:44 -0700
commitd3cb26312ecfdb4ee8dedf931e24e60df1d7fbc9 (patch)
tree3ee70e57954ab38e0441bcde8168896eca1f6976 /tools/testing/selftests/rcutorture/bin/functions.sh
parentrcutorture: NULL rcu_torture_current earlier in cleanup code (diff)
downloadlinux-dev-d3cb26312ecfdb4ee8dedf931e24e60df1d7fbc9.tar.xz
linux-dev-d3cb26312ecfdb4ee8dedf931e24e60df1d7fbc9.zip
torture: Remove whitespace from identify_qemu_vcpus output
The identify_qemu_vcpus bash function can return numbers including whitespace characters, which can be a bit annoying in some bash dollar-sign substitutions. This commit therefore strips all spaces and tabs from the value that identify_qemu_vcpus outputs. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/testing/selftests/rcutorture/bin/functions.sh')
-rw-r--r--tools/testing/selftests/rcutorture/bin/functions.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh
index 436b1542cf27..51f3464b96d3 100644
--- a/tools/testing/selftests/rcutorture/bin/functions.sh
+++ b/tools/testing/selftests/rcutorture/bin/functions.sh
@@ -231,7 +231,7 @@ identify_qemu_args () {
# Returns the number of virtual CPUs available to the aggregate of the
# guest OSes.
identify_qemu_vcpus () {
- lscpu | grep '^CPU(s):' | sed -e 's/CPU(s)://'
+ lscpu | grep '^CPU(s):' | sed -e 's/CPU(s)://' -e 's/[ ]*//g'
}
# print_bug