Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1675317

[PATCHv2 2/5] selftests: check hot-pluggagble memory for memory-hotplug test

From Po-Hsu Lin <po-hsu.lin@canonical.com>
Newsgroups linux.kernel
Subject [PATCHv2 2/5] selftests: check hot-pluggagble memory for memory-hotplug test
Date 2017-06-27 08:20 +0200
Message-ID <tWS0W-4W7-7@gated-at.bofh.it> (permalink)
References <tWS0V-4W7-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Check for hot-pluggable memory availability in prerequisite() of the
memory-hotplug test.

Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
---
 .../selftests/memory-hotplug/mem-on-off-test.sh    |    5 +++++
 1 file changed, 5 insertions(+)

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 a8d8587..993ff2b 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
 }
 
 #
-- 
1.7.9.5

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCHv2 2/5] selftests: check hot-pluggagble memory for memory-hotplug test Po-Hsu Lin <po-hsu.lin@canonical.com> - 2017-06-27 08:20 +0200

csiph-web