All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: <linux-btrfs@vger.kernel.org>, <xfs@oss.sgi.com>, <sandeen@redhat.com>
Subject: [PATCH] xfstests: fix flink test V2
Date: Thu, 8 May 2014 14:38:30 -0400	[thread overview]
Message-ID: <1399574310-13718-1-git-send-email-jbacik@fb.com> (raw)

I don't have flink support in my xfsprogs, but it doesn't fail with "command not
found" or whatever, it fails because I don't have the -T option, whereas Eric
gets an error about $TEST_DIR being a directory because his xfs_io tries to open
the directory first before it parses the options.  So fix this by checking flink
with these two cases and don't run if we hit either of them.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
---
V1->V2: check for "Is a directory" errors that Eric mentioned, move test up into
the flink specific case.

 common/rc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/rc b/common/rc
index 5c13db5..f37b310 100644
--- a/common/rc
+++ b/common/rc
@@ -1248,6 +1248,8 @@ _require_xfs_io_command()
 	"flink" )
 		testio=`$XFS_IO_PROG -T -F -c "flink $testfile" \
 			$TEST_DIR 2>&1`
+		echo $testio | egrep -q "invalid option|Is a directory" && \
+			_notrun "xfs_io $command support is missing"
 		;;
 	*)
 		testio=`$XFS_IO_PROG -c "$command help" 2>&1`
-- 
1.8.3.1


WARNING: multiple messages have this Message-ID (diff)
From: Josef Bacik <jbacik@fb.com>
To: linux-btrfs@vger.kernel.org, xfs@oss.sgi.com, sandeen@redhat.com
Subject: [PATCH] xfstests: fix flink test V2
Date: Thu, 8 May 2014 14:38:30 -0400	[thread overview]
Message-ID: <1399574310-13718-1-git-send-email-jbacik@fb.com> (raw)

I don't have flink support in my xfsprogs, but it doesn't fail with "command not
found" or whatever, it fails because I don't have the -T option, whereas Eric
gets an error about $TEST_DIR being a directory because his xfs_io tries to open
the directory first before it parses the options.  So fix this by checking flink
with these two cases and don't run if we hit either of them.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
---
V1->V2: check for "Is a directory" errors that Eric mentioned, move test up into
the flink specific case.

 common/rc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/rc b/common/rc
index 5c13db5..f37b310 100644
--- a/common/rc
+++ b/common/rc
@@ -1248,6 +1248,8 @@ _require_xfs_io_command()
 	"flink" )
 		testio=`$XFS_IO_PROG -T -F -c "flink $testfile" \
 			$TEST_DIR 2>&1`
+		echo $testio | egrep -q "invalid option|Is a directory" && \
+			_notrun "xfs_io $command support is missing"
 		;;
 	*)
 		testio=`$XFS_IO_PROG -c "$command help" 2>&1`
-- 
1.8.3.1

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2014-05-08 18:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08 18:38 Josef Bacik [this message]
2014-05-08 18:38 ` [PATCH] xfstests: fix flink test V2 Josef Bacik
2014-05-08 18:41 ` Eric Sandeen
2014-05-08 18:41   ` Eric Sandeen
2014-05-09  7:24 ` Christoph Hellwig
2014-05-09  7:24   ` Christoph Hellwig

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=1399574310-13718-1-git-send-email-jbacik@fb.com \
    --to=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=xfs@oss.sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.