xfstests: exit out if _scratch_mount fails
PATCH 1/1 xfstests: exit out if _scratch_mount fails
I test some of the different mkfs options for btrfs, one set doesn't work properly with small file systems, so the fs won't mount. This is fine from a btrfs point of view, but tests that fail to mount the scratch fs will run anyway, so if it's a "fill the fs" sort of test this will wreak havoc. To fix this just error out of _scratch_mount fails. Thanks,
--- common/rc | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
common/rc +4 -0
@@ -276,6 +276,10 @@ _scratch_mount_options() _scratch_mount() { _mount -t $FSTYP `_scratch_mount_options $*` + if [ $? -ne 0 ]; then + echo "mount failed" + exit 1 + fi } _scratch_unmount()
Signature · 6 lines
1.7.7.6 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 7 lines · Josef Bacik
I test some of the different mkfs options for btrfs, one set doesn't work properly with small file systems, so the fs won't mount. This is fine from a btrfs point of view, but tests that fail to mount the scratch fs will run anyway, so if it's a "fill the fs" sort of test this will wreak havoc. To fix this just error out of
_scratch_mountfails. Thanks,Signed-off-by Josef Bacik <[email protected]>
Applied.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Hey Josef,
Quoted 7 lines · Josef Bacik
I test some of the different mkfs options for btrfs, one set doesn't work properly with small file systems, so the fs won't mount. This is fine from a btrfs point of view, but tests that fail to mount the scratch fs will run anyway, so if it's a "fill the fs" sort of test this will wreak havoc. To fix this just error out of
_scratch_mountfails. Thanks,Signed-off-by Josef Bacik <[email protected]>
I noticed that this change causes dmapi tests to try to be run on systems that don't have dmapi supported, and they fail. Have you seen this?
Thanks,
Ben
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 9 lines · Ben Myers
Hey Josef,
Quoted 6 lines · Josef Bacik
I test some of the different mkfs options for btrfs, one set doesn't work properly with small file systems, so the fs won't mount. This is fine from a btrfs point of view, but tests that fail to mount the scratch fs will run anyway, so if it's a "fill the fs" sort of test this will wreak havoc. To fix this just error out of
_scratch_mountfails. Thanks,
Quoted 7 lines
Quoted 1 line
Signed-off-by Josef Bacik <[email protected]>I noticed that this change causes dmapi tests to try to be run on systems that don't have dmapi supported, and they fail. Have you seen this?
Thanks,
Ben
I haven't tested either way, but does:
_mount -t $FSTYP `_scratch_mount_options $*` || _fail "Scratch mount failed"
work any better?
-Eric
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 15 lines · Eric Sandeen
Quoted 14 lines · Ben Myers
Hey Josef,
Quoted 7 lines · Josef Bacik
I test some of the different mkfs options for btrfs, one set doesn't work properly with small file systems, so the fs won't mount. This is fine from a btrfs point of view, but tests that fail to mount the scratch fs will run anyway, so if it's a "fill the fs" sort of test this will wreak havoc. To fix this just error out of
_scratch_mountfails. Thanks,Signed-off-by Josef Bacik <[email protected]>I noticed that this change causes dmapi tests to try to be run on systems that don't have dmapi supported, and they fail. Have you seen this?
Quoted 8 lines
Quoted 2 lines
Thanks,
BenI haven't tested either way, but does:
_mount -t $FSTYP `_scratch_mount_options $*` || _fail "Scratch mount failed"work any better?
Well thats cleaner but I'm not sure why this patch is making that happen. I don't have dmapi on my main box (at least afaik) and I've not had that sort of issue running with this patch. Thanks,
Josef
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Josef, Eric,
Quoted 15 lines · Eric Sandeen
Quoted 14 lines · Ben Myers
Hey Josef,
Quoted 7 lines · Josef Bacik
I test some of the different mkfs options for btrfs, one set doesn't work properly with small file systems, so the fs won't mount. This is fine from a btrfs point of view, but tests that fail to mount the scratch fs will run anyway, so if it's a "fill the fs" sort of test this will wreak havoc. To fix this just error out of
_scratch_mountfails. Thanks,Signed-off-by Josef Bacik <[email protected]>I noticed that this change causes dmapi tests to try to be run on systems that don't have dmapi supported, and they fail. Have you seen this?
Quoted 8 lines
Quoted 2 lines
Thanks,
BenI haven't tested either way, but does:
_mount -t $FSTYP `_scratch_mount_options $*` || _fail "Scratch mount failed"work any better?
This still fails like so:
xfs/142 [failed, exit status 1] - output mismatch (see /root/xfstests/results/xfs/142.out.bad)
root/xfstests/results/xfs/142.out.bad 2013-07-26 11:31:00.128200302 -0500 renamed from xfs/142.out 2013-05-17 14:23:16.000000000 -0500 +0 -0
@@ -1,232 +1,8 @@
QA output created by 142
-Attribute tests beginning...
-Report: success with set #0.
-Report: success with set #1.
-Report: success with set #2.
-Report: success with set #3.
-Report: success with set #4.
...
(Run 'diff -u tests/xfs/142.out /root/xfstests/results/xfs/142.out.bad' to see the entire diff)
Thanks,
Ben
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 41 lines · Ben Myers
Josef, Eric,
Quoted 15 lines · Eric Sandeen
Quoted 14 lines · Ben Myers
Hey Josef,
Quoted 7 lines · Josef Bacik
I test some of the different mkfs options for btrfs, one set doesn't work properly with small file systems, so the fs won't mount. This is fine from a btrfs point of view, but tests that fail to mount the scratch fs will run anyway, so if it's a "fill the fs" sort of test this will wreak havoc. To fix this just error out of
_scratch_mountfails. Thanks,Signed-off-by Josef Bacik <[email protected]>I noticed that this change causes dmapi tests to try to be run on systems that don't have dmapi supported, and they fail. Have you seen this?
Quoted 8 lines
Quoted 2 lines
Thanks,
BenI haven't tested either way, but does:
_mount -t $FSTYP `_scratch_mount_options $*` || _fail "Scratch mount failed"work any better?
This still fails like so:
xfs/142 [failed, exit status 1] - output mismatch (see
/root/xfstests/results/xfs/142.out.bad)root/xfstests/results/xfs/142.out.bad 2013-07-26 11:31:00.128200302 -0500 renamed from xfs/142.out 2013-05-17 14:23:16.000000000 -0500 +0
-0@@ -1,232 +1,8 @@QA output created by 142
root/xfstests/results/xfs/142.out.bad 2013-07-26 11:31:00.128200302 -0500 renamed from xfs/142.out 2013-05-17 14:23:16.000000000 -0500 +0
-6-Attribute tests beginning... -Report: success with set #0. -Report: success with set #1. -Report: success with set #2. -Report: success with set #3. -Report: success with set #4.
Quoted 1 line
(Run 'diff -u tests/xfs/142.out
/root/xfstests/results/xfs/142.out.bad' to see the entire diff)
Hm, well, _dmapi_scratch_mount tries a mount, and then does a _notrun if that fails.
Josef's patch calls a _fail (or an exit) if mount fails, and it never gets to "notrun" in _dmapi_scratch_mount.
So for this test it's an expected mount failure, which changes things a bit.
Still, not quite sure why the test continues after either exit 1 or _fail.
But my bash is rusty...
-Eric
Quoted 8 lines
Thanks,
Ben_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs