* [PATCH blktests] check: add zoned sysfs node checking in _test_dev_is_zoned
@ 2019-03-22 8:12 Yi Zhang
2019-03-25 12:26 ` Shinichiro Kawasaki
2019-03-25 17:41 ` Omar Sandoval
0 siblings, 2 replies; 3+ messages in thread
From: Yi Zhang @ 2019-03-22 8:12 UTC (permalink / raw)
To: osandov; +Cc: linux-block
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@redhat.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH blktests] check: add zoned sysfs node checking in _test_dev_is_zoned
2019-03-22 8:12 [PATCH blktests] check: add zoned sysfs node checking in _test_dev_is_zoned Yi Zhang
@ 2019-03-25 12:26 ` Shinichiro Kawasaki
2019-03-25 17:41 ` Omar Sandoval
1 sibling, 0 replies; 3+ messages in thread
From: Shinichiro Kawasaki @ 2019-03-25 12:26 UTC (permalink / raw)
To: Yi Zhang, osandov; +Cc: linux-block
On 3/22/19 5:12 PM, Yi Zhang wrote:
> 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@redhat.com>
> ---
> 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
Hi Yi Zhang. This patch looks good for me.
I have prepared Debian oldstable environment with kernel 3.16, which does not
support "zoned" sysfs attribute. With this kernel, test cases that has
test_devices() function and does not have CAN_BE_ZONED=1 flag are skipped. This
skip is not expected, and the patch avoids it.
--
Best Regards,
Shin'ichiro Kawasaki
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH blktests] check: add zoned sysfs node checking in _test_dev_is_zoned
2019-03-22 8:12 [PATCH blktests] check: add zoned sysfs node checking in _test_dev_is_zoned Yi Zhang
2019-03-25 12:26 ` Shinichiro Kawasaki
@ 2019-03-25 17:41 ` Omar Sandoval
1 sibling, 0 replies; 3+ messages in thread
From: Omar Sandoval @ 2019-03-25 17:41 UTC (permalink / raw)
To: Yi Zhang; +Cc: osandov, linux-block
On Fri, Mar 22, 2019 at 04:12:28PM +0800, Yi Zhang wrote:
> 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@redhat.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-25 17:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22 8:12 [PATCH blktests] check: add zoned sysfs node checking in _test_dev_is_zoned Yi Zhang
2019-03-25 12:26 ` Shinichiro Kawasaki
2019-03-25 17:41 ` Omar Sandoval
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).