Skip to content

Commit d3cb263

Browse files
committed
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 <[email protected]>
1 parent cae7cc6 commit d3cb263

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/rcutorture/bin/functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ identify_qemu_args () {
231231
# Returns the number of virtual CPUs available to the aggregate of the
232232
# guest OSes.
233233
identify_qemu_vcpus () {
234-
lscpu | grep '^CPU(s):' | sed -e 's/CPU(s)://'
234+
lscpu | grep '^CPU(s):' | sed -e 's/CPU(s)://' -e 's/[ ]*//g'
235235
}
236236

237237
# print_bug

0 commit comments

Comments
 (0)