linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yi Zhang <yi.zhang@redhat.com>
To: osandov@fb.com
Cc: linux-block@vger.kernel.org
Subject: [PATCH blktests] check: add zoned sysfs node checking in _test_dev_is_zoned
Date: Fri, 22 Mar 2019 16:12:28 +0800	[thread overview]
Message-ID: <20190322081228.21898-1-yi.zhang@redhat.com> (raw)

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


             reply	other threads:[~2019-03-22  8:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22  8:12 Yi Zhang [this message]
2019-03-25 12:26 ` [PATCH blktests] check: add zoned sysfs node checking in _test_dev_is_zoned Shinichiro Kawasaki
2019-03-25 17:41 ` Omar Sandoval

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190322081228.21898-1-yi.zhang@redhat.com \
    --to=yi.zhang@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=osandov@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).