diff options
author | Dan Williams <dan.j.williams@intel.com> | 2019-03-11 20:37:55 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2019-03-11 20:37:55 +0100 |
commit | 4083014e32699af04a8e6eaa4855b08dba36a47a (patch) | |
tree | fa37f9f9691fe64ca8a3c0cdc0315dc12462e6e4 /tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh | |
parent | Merge branch 'for-5.1/libnvdimm-start-pad' into libnvdimm-for-next (diff) | |
parent | nfit/ars: Avoid stale ARS results (diff) | |
download | linux-4083014e32699af04a8e6eaa4855b08dba36a47a.tar.xz linux-4083014e32699af04a8e6eaa4855b08dba36a47a.zip |
Merge branch 'for-5.1/nfit/ars' into libnvdimm-for-next
Merge several updates to the ARS implementation. Highlights include:
* Support retrieval of short-ARS results if the ARS state is "requires
continuation", and even if the "no_init_ars" module parameter is
specified.
* Allow busy-polling of the kernel ARS state by allowing root to reset
the exponential back-off timer.
* Filter potentially stale ARS results by tracking query-ARS relative to
the previous start-ARS.
Diffstat (limited to 'tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh')
-rwxr-xr-x | tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh | 13 |
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 |