torture: Remove whitespace from identify_qemu_vcpus output
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 4 May 2020 23:40:53 +0000 (16:40 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 29 Jun 2020 19:01:44 +0000 (12:01 -0700)
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>
tools/testing/selftests/rcutorture/bin/functions.sh

index 436b154..51f3464 100644 (file)
@@ -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