From: Paul E. McKenney Date: Mon, 4 May 2020 23:40:53 +0000 (-0700) Subject: torture: Remove whitespace from identify_qemu_vcpus output X-Git-Tag: howlett/maple_spf/20210104~1405^2^2^7~14 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d3cb26312ecfdb4ee8dedf931e24e60df1d7fbc9;p=users%2Fjedix%2Flinux-maple.git 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 --- diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh index 436b1542cf279..51f3464b96d3b 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