[PATCH blktests v2 3/9] nvme: relocate _require_test_dev_is_nvme

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Relocate helper _require_test_dev_is_nvme into common/nvme so that it may
be used for md tests.

Signed-off-by: John Garry <john.g.garry@xxxxxxxxxx>
---
 common/nvme   | 8 ++++++++
 tests/nvme/rc | 8 --------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/common/nvme b/common/nvme
index 26b3b97..c3e0df1 100644
--- a/common/nvme
+++ b/common/nvme
@@ -1174,3 +1174,11 @@ _nvme_requires() {
 
 	return 0
 }
+
+_require_test_dev_is_nvme() {
+	if ! readlink -f "$TEST_DEV_SYSFS/device" | grep -q nvme; then
+		SKIP_REASONS+=("$TEST_DEV is not a NVMe device")
+		return 1
+	fi
+	return 0
+}
diff --git a/tests/nvme/rc b/tests/nvme/rc
index 33055ef..b16418c 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -71,14 +71,6 @@ group_device_requires() {
 	_require_test_dev_is_nvme
 }
 
-_require_test_dev_is_nvme() {
-	if ! readlink -f "$TEST_DEV_SYSFS/device" | grep -q nvme; then
-		SKIP_REASONS+=("$TEST_DEV is not a NVMe device")
-		return 1
-	fi
-	return 0
-}
-
 _require_test_dev_is_nvme_pci() {
 	if [[ ! "$(readlink -f "$TEST_DEV_SYSFS/device")" =~ devices/pci ]]; then
 		SKIP_REASONS+=("$TEST_DEV is not a PCI NVMe device")
-- 
2.43.5





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux