summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2019-02-11 08:01:50 +0100
committerIngo Molnar <mingo@kernel.org>2019-02-11 08:01:50 +0100
commitc9ba7560c550fe6c1f4a8f0666bea41d2a349d1d (patch)
treeb15d53e69f73b160b4625e91187cd436c5a3e683 /tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
parentf6783319737f28e4436a69611853a5a098cbe974 (diff)
parentd13937116f1e82bf508a6325111b322c30c85eb9 (diff)
Merge tag 'v5.0-rc6' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh')
-rwxr-xr-xtools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
index bab13dd025a6..0d26b5e3f966 100755
--- a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
+++ b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
@@ -37,6 +37,10 @@ prerequisite()
exit $ksft_skip
fi
+ present_cpus=`cat $SYSFS/devices/system/cpu/present`
+ present_max=${present_cpus##*-}
+ echo "present_cpus = $present_cpus present_max = $present_max"
+
echo -e "\t Cpus in online state: $online_cpus"
offline_cpus=`cat $SYSFS/devices/system/cpu/offline`
@@ -151,6 +155,8 @@ online_cpus=0
online_max=0
offline_cpus=0
offline_max=0
+present_cpus=0
+present_max=0
while getopts e:ahp: opt; do
case $opt in
@@ -190,9 +196,10 @@ if [ $allcpus -eq 0 ]; then
online_cpu_expect_success $online_max
if [[ $offline_cpus -gt 0 ]]; then
- echo -e "\t offline to online to offline: cpu $offline_max"
- online_cpu_expect_success $offline_max
- offline_cpu_expect_success $offline_max
+ echo -e "\t offline to online to offline: cpu $present_max"
+ online_cpu_expect_success $present_max
+ offline_cpu_expect_success $present_max
+ online_cpu $present_max
fi
exit 0
else