Message ID | 1474273575-9321-1-git-send-email-yangx.jy@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Sep 19, 2016 at 04:26:15PM +0800, Xiao Yang wrote: > I got an error about $TEST_DIR being a directory when xfs/273 ran, because > xfs_io tried to open the directory first before it parsed the -T options. > So fix it by checking this error. Can I suggest that you read the man page and understand how the command is supposed to work before posting patches to change the test? i.e the -T option /requires/ a directory to be supplied to it: -T create a temporary file not linked into the filesystem namespace (O_TMPFILE). The pathname passed must refer to a directory which is treated as virtual parent for the newly created invisible file. Can not be used together with the -r option. IOWs, there is nothing wrong with the test code - if you if you are getting an EISDIR error here then something is broken with the xfs_io binary you are using. And, because I haven't merged fsmap support into xfs_io yet, it's very likely there is a problem in the prototype patchset you are running. Perhaps that's worth reporting to the patchset author.... Cheers, Dave.
On 2016/09/20 6:31, Dave Chinner wrote: > On Mon, Sep 19, 2016 at 04:26:15PM +0800, Xiao Yang wrote: >> I got an error about $TEST_DIR being a directory when xfs/273 ran, because >> xfs_io tried to open the directory first before it parsed the -T options. >> So fix it by checking this error. > Can I suggest that you read the man page and understand how the > command is supposed to work before posting patches to change the > test? i.e the -T option /requires/ a directory to be supplied to it: > > -T create a temporary file not linked into the filesystem > namespace (O_TMPFILE). The pathname passed must refer to a > directory which is treated as virtual parent for the newly > created invisible file. Can not be used together with the > -r option. > > IOWs, there is nothing wrong with the test code - if you if > you are getting an EISDIR error here then something is broken with > the xfs_io binary you are using. > > And, because I haven't merged fsmap support into xfs_io yet, it's > very likely there is a problem in the prototype patchset you are > running. Perhaps that's worth reporting to the patchset author.... > > Cheers, > > Dave. Hi Dave In xfstests/common/rc:2045 "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" ;; I found that someone has met the same error and sent a patch to fix flink check. Please see the following patch: https://git.kernel.org/cgit/fs/xfs/xfstests-dev.git/commit/common/rc?id=0fd4705782c3748b2f83a10ce7cb7f33ffc8ad77 Thanks Xiao Yang -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Sep 20, 2016 at 10:45:17AM +0800, Xiao Yang wrote: > On 2016/09/20 6:31, Dave Chinner wrote: > >On Mon, Sep 19, 2016 at 04:26:15PM +0800, Xiao Yang wrote: > >>I got an error about $TEST_DIR being a directory when xfs/273 ran, because > >>xfs_io tried to open the directory first before it parsed the -T options. > >>So fix it by checking this error. > >Can I suggest that you read the man page and understand how the > >command is supposed to work before posting patches to change the > >test? i.e the -T option /requires/ a directory to be supplied to it: > > > > -T create a temporary file not linked into the filesystem > > namespace (O_TMPFILE). The pathname passed must refer to a > > directory which is treated as virtual parent for the newly > > created invisible file. Can not be used together with the > > -r option. > > > >IOWs, there is nothing wrong with the test code - if you if > >you are getting an EISDIR error here then something is broken with > >the xfs_io binary you are using. > > > >And, because I haven't merged fsmap support into xfs_io yet, it's > >very likely there is a problem in the prototype patchset you are > >running. Perhaps that's worth reporting to the patchset author.... Just get rid of -T, getfsmap doesn't care if it's run against a file or a directory. Yes sorry that was my fault for cut-and-paste coding. :( --D > > > >Cheers, > > > >Dave. > Hi Dave > > In xfstests/common/rc:2045 > "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" > ;; > > I found that someone has met the same error and sent a patch to fix flink > check. > Please see the following patch: > https://git.kernel.org/cgit/fs/xfs/xfstests-dev.git/commit/common/rc?id=0fd4705782c3748b2f83a10ce7cb7f33ffc8ad77 > > Thanks > Xiao Yang > > > -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 2016/09/20 11:03, Darrick J. Wong wrote: > On Tue, Sep 20, 2016 at 10:45:17AM +0800, Xiao Yang wrote: >> On 2016/09/20 6:31, Dave Chinner wrote: >>> On Mon, Sep 19, 2016 at 04:26:15PM +0800, Xiao Yang wrote: >>>> I got an error about $TEST_DIR being a directory when xfs/273 ran, because >>>> xfs_io tried to open the directory first before it parsed the -T options. >>>> So fix it by checking this error. >>> Can I suggest that you read the man page and understand how the >>> command is supposed to work before posting patches to change the >>> test? i.e the -T option /requires/ a directory to be supplied to it: >>> >>> -T create a temporary file not linked into the filesystem >>> namespace (O_TMPFILE). The pathname passed must refer to a >>> directory which is treated as virtual parent for the newly >>> created invisible file. Can not be used together with the >>> -r option. >>> >>> IOWs, there is nothing wrong with the test code - if you if >>> you are getting an EISDIR error here then something is broken with >>> the xfs_io binary you are using. >>> >>> And, because I haven't merged fsmap support into xfs_io yet, it's >>> very likely there is a problem in the prototype patchset you are >>> running. Perhaps that's worth reporting to the patchset author.... > Just get rid of -T, getfsmap doesn't care if it's run against a file > or a directory. > > Yes sorry that was my fault for cut-and-paste coding. :( > > --D > Hi Darrick Thanks for your suggestion, so i will rewrite it. :-) Thanks Xiao Yang >>> Cheers, >>> >>> Dave. >> Hi Dave >> >> In xfstests/common/rc:2045 >> "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" >> ;; >> >> I found that someone has met the same error and sent a patch to fix flink >> check. >> Please see the following patch: >> https://git.kernel.org/cgit/fs/xfs/xfstests-dev.git/commit/common/rc?id=0fd4705782c3748b2f83a10ce7cb7f33ffc8ad77 >> >> Thanks >> Xiao Yang >> >> >> > > . > -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/common/rc b/common/rc index 13afc6a..1be803b 100644 --- a/common/rc +++ b/common/rc @@ -2051,7 +2051,7 @@ _require_xfs_io_command() "fsmap" ) testio=`$XFS_IO_PROG -T -F -c "fsmap" \ $TEST_DIR 2>&1` - echo $testio | egrep -q "Inappropriate ioctl" && \ + echo $testio | egrep -q "Inappropriate ioctl|Is a directory" && \ _notrun "xfs_io $command support is missing" ;; *)
I got an error about $TEST_DIR being a directory when xfs/273 ran, because xfs_io tried to open the directory first before it parsed the -T options. So fix it by checking this error. Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com> --- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)