Message ID | 20190109013542.23686-3-damien.lemoal@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Implement zoned block device support | expand |
On 09/01/2019 02:35, Damien Le Moal wrote: > From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> > +_test_dev_is_zoned() { > + local zoned_file="${TEST_DEV_SYSFS}/queue/zoned" > + if grep -q -e "none" "${zoned_file}" ; then Nit: I think we can leave the zoned_file variable out if grep -qe "none" "${TEST_DEV_SYSFS}/queue/zoned"; then [...] works as well and is a bit more descriptive
diff --git a/common/rc b/common/rc index 153a323..999590d 100644 --- a/common/rc +++ b/common/rc @@ -214,3 +214,12 @@ _test_dev_in_hotplug_slot() { _filter_xfs_io_error() { sed -e 's/^\(.*\)64\(: .*$\)/\1\2/' } + +_test_dev_is_zoned() { + local zoned_file="${TEST_DEV_SYSFS}/queue/zoned" + if grep -q -e "none" "${zoned_file}" ; then + SKIP_REASON="${TEST_DEV} is not a zoned block device" + return 1 + fi + return 0 +}