diff options
author | Frederic Weisbecker <frederic@kernel.org> | 2021-04-01 16:26:02 +0300 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2021-05-11 02:05:06 +0300 |
commit | f8c8484dbda78e09912a391a8c87414920bbdfee (patch) | |
tree | bb97d4fc437cecbe2a11c7ab5078f599a90e63ba /tools/testing/selftests/rcutorture/bin/kvm-remote.sh | |
parent | ea6d962e80b61996aeacb443661cc3adcb605315 (diff) | |
download | linux-f8c8484dbda78e09912a391a8c87414920bbdfee.tar.xz |
torture: Correctly fetch number of CPUs for non-English languages
Grepping for "CPU" on lscpu output isn't always successful, depending
on the local language setting. As a result, the build can be aborted
early with:
"make: the '-j' option requires a positive integer argument"
This commit therefore uses the human-language-independent approach
available via the getconf command, both in kvm-build.sh and in
kvm-remote.sh.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/testing/selftests/rcutorture/bin/kvm-remote.sh')
-rwxr-xr-x | tools/testing/selftests/rcutorture/bin/kvm-remote.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-remote.sh b/tools/testing/selftests/rcutorture/bin/kvm-remote.sh index c4859fca87b2..f08d415d4f99 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-remote.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-remote.sh @@ -136,7 +136,7 @@ chmod +x $T/bin/kvm-remote-*.sh # Check first to avoid the need for cleanup for system-name typos for i in $systems do - ncpus="`ssh $i lscpu | grep '^CPU(' | awk '{ print $2 }'`" + ncpus="`ssh $i getconf _NPROCESSORS_ONLN 2> /dev/null`" echo $i: $ncpus CPUs " " `date` | tee -a "$oldrun/remote-log" ret=$? if test "$ret" -ne 0 |