mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
selftests/cpu-hotplug: Skip test when there is only one online cpu
For only one online cpu case, 'make run_tests' try to offline the cpu0 that will always fail since the host can't offline this unique online cpu. this patch will skip the test to avoid this failure. Signed-off-by: Li Zhijian <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
This commit is contained in:
parent
8fe6e53a8e
commit
86db9a11f3
1 changed files with 6 additions and 0 deletions
|
|
@ -28,6 +28,12 @@ prerequisite()
|
|||
echo "CPU online/offline summary:"
|
||||
online_cpus=`cat $SYSFS/devices/system/cpu/online`
|
||||
online_max=${online_cpus##*-}
|
||||
|
||||
if [[ "$online_cpus" = "$online_max" ]]; then
|
||||
echo "$msg: since there is only one cpu: $online_cpus"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo -e "\t Cpus in online state: $online_cpus"
|
||||
|
||||
offline_cpus=`cat $SYSFS/devices/system/cpu/offline`
|
||||
|
|
|
|||
Loading…
Reference in a new issue