lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 12 Mar 2019 17:58:45 +0800
From:   Po-Hsu Lin <po-hsu.lin@...onical.com>
To:     shuah@...nel.org, linux-kselftest@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] selftests: cpu-hotplug: check hotplug dir for the CONFIG_HOTPLUG_CPU

When the CONFIG_HOTPLUG_CPU is not set, there won't be a "hotplug"
directory in /sys/devices/system/cpu/. Make use of this fact to check
if we need to skip this test.

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

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 0d26b5e..27275a1 100755
--- a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
+++ b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
@@ -23,6 +23,11 @@ prerequisite()
 		exit $ksft_skip
 	fi
 
+	if [ ! -d $SYSFS/devices/system/cpu/hotplug/ ]; then
+		echo $msg CONFIG_HOTPLUG_CPU needs to be enabled >&2
+		exit $ksft_skip
+	fi
+
 	if ! ls $SYSFS/devices/system/cpu/cpu* > /dev/null 2>&1; then
 		echo $msg cpu hotplug is not supported >&2
 		exit $ksft_skip
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ