diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2020-05-05 02:40:53 +0300 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2020-06-29 22:01:44 +0300 |
commit | d3cb26312ecfdb4ee8dedf931e24e60df1d7fbc9 (patch) | |
tree | 3ee70e57954ab38e0441bcde8168896eca1f6976 | |
parent | cae7cc6ba5bad320c2055ac54f73affd051e76ca (diff) | |
download | linux-d3cb26312ecfdb4ee8dedf931e24e60df1d7fbc9.tar.xz |
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>
-rw-r--r-- | tools/testing/selftests/rcutorture/bin/functions.sh | 2 |
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 |