[PATCH blktests] check: add zoned sysfs node checking in _test_dev_is_zoned

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

 



Some kernel may not have zoned sysfs node, e.g. RHEL7, checking if
it exists first in _test_dev_is_zoned.

Signed-off-by: Yi Zhang <yi.zhang@xxxxxxxxxx>
---
 check | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/check b/check
index f0ca382..459104d 100755
--- a/check
+++ b/check
@@ -405,7 +405,7 @@ _call_test() {
 }
 
 _test_dev_is_zoned() {
-	if grep -qe "none" "${TEST_DEV_SYSFS}/queue/zoned" ; then
+	if [[ ! -f "${TEST_DEV_SYSFS}/queue/zoned" ]] || grep -qe "none" "${TEST_DEV_SYSFS}/queue/zoned" ; then
 		SKIP_REASON="${TEST_DEV} is not a zoned block device"
 		return 1
 	fi
-- 
2.17.1




[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