]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
xfstests: fsync-tester: fix pwrite() return check and disable direct for test 19
authorJosef Bacik <jbacik@fusionio.com>
Wed, 12 Jun 2013 01:13:03 +0000 (21:13 -0400)
committerBen Myers <bpm@sgi.com>
Tue, 25 Jun 2013 20:46:48 +0000 (15:46 -0500)
commitd897c0db687f5b4dfe305ddaec50e374bd4f22e8
treeb05e364af67a1720b7f4714494a0bd50e70b62f5
parent0c91141c65c534b0dc45f9c9511c6bedbcc7eac8
xfstests: fsync-tester: fix pwrite() return check and disable direct for test 19

Test 19 in direct mode was failing on xfs because it was not actually doing the
write because the writes were not sectorsize aligned.  This test is to test
btrfs's inline extent fsync()ing so the writes won't be sectorsize aligned, and
inline extents will fall back to buffered anyway so direct mode is meaningless
for this test.  So just check if we are test 19 and disable direct mode so we
don't have to change the golden output.  Also change test_five() to compare
against a ssize_t instead of a size_t since apparently comparing against size_t
makes it cast the return value of pwrite() to size_t which screws up the error
case, so instead of seeing the pwrite() error on xfs which would have explained
this all it appeared as if it was succeeding and screwing up the fsync(), which
unfortunately wasted a bit of Daves time.  This patch should fix all this up.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
src/fsync-tester.c