public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* xfstests test case 032 fails for wrong reason
@ 2011-06-16  0:54 Chandra Seetharaman
  2011-06-16  1:01 ` Eric Sandeen
  0 siblings, 1 reply; 4+ messages in thread
From: Chandra Seetharaman @ 2011-06-16  0:54 UTC (permalink / raw)
  To: XFS Mailing List; +Cc: Eric Sandeen

Hello All,

xfstests test case 032 creates different filesystems on the scratch
partition and tries mkfs.xfs on the same filesystem expecting it to
fail.

In my system, for whatever reason, mkfs of btrfs fails which leads to
the test case failure like this:
----------------
FSTYP         -- xfs (non-debug)
PLATFORM      -- Linux/x86_64 elm3c201 2.6.39-rc4-xfs.git.p2+
MKFS_OPTIONS  -- -f -bsize=4096 /dev/sdd2
MOUNT_OPTIONS -- -o
context=system_u:object_r:nfs_t:s0 /dev/sdd2 /mnt/xfsScratchMntPt

032 20s ... - output mismatch (see 032.out.bad)
--- 032.out	2011-06-10 17:25:22.000000000 -0700
+++ 032.out.bad	2011-06-15 17:47:23.000000000 -0700
@@ -1,2 +1,3 @@
 QA output created by 032
 Silence is golden.
+Failed - overwrote fs type btrfs!
Ran: 032
Failures: 032
Failed 1 of 1 tests
---------------------

which is incorrect. I am thinking of submitting the following change (to
run mkfs.xfs only if the preceding mkfs.$fs succeeds). Anybody has any
opinions or better suggestions ?

---------------
diff --git a/032 b/032
index 839b913..4261ca2 100755
--- a/032
+++ b/032
@@ -75,11 +75,15 @@ do
        echo "    ( $preop mkfs -t $fs $preargs $SCRATCH_DEV $postargs )" >>$seq.full
        eval $preop mkfs -t $fs $preargs $SCRATCH_DEV $postargs >>$seq.full 2>&1
 
-       # next, ensure we don't overwrite it
-       echo "=== Attempting XFS overwrite of $fs..." >>$seq.full
-       /sbin/mkfs.xfs $SCRATCH_DEV >>$seq.full 2>&1
+       if [ $? -eq 0 ] ; then
+               # next, ensure we don't overwrite it
+               echo "=== Attempting XFS overwrite of $fs..." >>$seq.full
+               /sbin/mkfs.xfs $SCRATCH_DEV >>$seq.full 2>&1
 
-       [ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!"
+               [ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!"
+       else
+               echo "mkfs of type ${fs} failed" >>$seq.full
+       fi
------------------

regards,

chandra

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-16 16:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-16  0:54 xfstests test case 032 fails for wrong reason Chandra Seetharaman
2011-06-16  1:01 ` Eric Sandeen
2011-06-16 16:31   ` Chandra Seetharaman
2011-06-16 16:32     ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox