xfs
[Top] [All Lists]

[PATCH] xfstests 249: use -F option for xfs_io

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: [PATCH] xfstests 249: use -F option for xfs_io
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Wed, 23 Mar 2011 10:53:57 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
Test 249 was appearing to pass on ext4, but it wasn't really
exercising the test due to lack of "-F" in the xfs_io arguments.

Without -F the files were created (oddly enough); neither pwrite
nor sendfile were executed, and the diff of the two (empty)
files passed, resulting in a passed test without testing anything.

So add the -F, capture the output, and test the result of each
xfs_io invocation.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

diff --git a/249 b/249
index 6fc972e..3b3a64d
--- a/249
+++ b/249
@@ -52,9 +52,12 @@ echo "Feel the serenity."
 
 SRC=$TEST_DIR/$seq.src
 DST=$TEST_DIR/$seq.dst
+rm -f $seq.full
 
-$XFS_IO_PROG -f -c "pwrite -S 0xa5a55a5a 0 32768k" -c fsync $SRC > /dev/null 
2>&1
-$XFS_IO_PROG -f -c "sendfile -i $SRC 0 32768k" -c fsync $DST > /dev/null 2>&1
+$XFS_IO_PROG -F -f -c "pwrite -S 0xa5a55a5a 0 32768k" -c fsync $SRC >> 
$seq.full 2>&1
+[ $? -ne 0 ] && _fail "xfs_io pwrite failed"
+$XFS_IO_PROG -F -f -c "sendfile -i $SRC 0 32768k" -c fsync $DST >> $seq.full 
2>&1
+[ $? -ne 0 ] && _fail "xfs_io sendfile failed"
 
 diff $SRC $DST
 

<Prev in Thread] Current Thread [Next in Thread>