diff options
author | Po-Hsu Lin <po-hsu.lin@canonical.com> | 2017-06-27 08:17:12 +0200 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2017-06-30 18:06:22 +0200 |
commit | a34b28c92ec8c92938de03c18c5fab32efd2e29a (patch) | |
tree | 3d3e2c6f2b328499e924936106251321e623a3d9 /tools/testing/selftests | |
parent | selftests: typo correction for memory-hotplug test (diff) | |
download | linux-a34b28c92ec8c92938de03c18c5fab32efd2e29a.tar.xz linux-a34b28c92ec8c92938de03c18c5fab32efd2e29a.zip |
selftests: check hot-pluggagble memory for memory-hotplug test
Check for hot-pluggable memory availability in prerequisite() of the
memory-hotplug test.
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing/selftests')
-rwxr-xr-x | tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh index a8d858767102..993ff2bcfc7b 100755 --- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh +++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh @@ -22,6 +22,11 @@ prerequisite() echo $msg memory hotplug is not supported >&2 exit 0 fi + + if ! grep -q 1 $SYSFS/devices/system/memory/memory*/removable; then + echo $msg no hot-pluggable memory >&2 + exit 0 + fi } # |