* [PATCH] xfstests: exit out if _scratch_mount fails @ 2013-07-09 19:07 Josef Bacik 2013-07-19 20:38 ` Ben Myers 2013-07-26 16:12 ` Ben Myers 0 siblings, 2 replies; 7+ messages in thread From: Josef Bacik @ 2013-07-09 19:07 UTC (permalink / raw) To: xfs, linxu-btrfs 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, Signed-off-by: Josef Bacik <jbacik@fusionio.com> --- common/rc | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/common/rc b/common/rc index 4de1329..f11699f 100644 --- a/common/rc +++ b/common/rc @@ -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() -- 1.7.7.6 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] xfstests: exit out if _scratch_mount fails 2013-07-09 19:07 [PATCH] xfstests: exit out if _scratch_mount fails Josef Bacik @ 2013-07-19 20:38 ` Ben Myers 2013-07-26 16:12 ` Ben Myers 1 sibling, 0 replies; 7+ messages in thread From: Ben Myers @ 2013-07-19 20:38 UTC (permalink / raw) To: Josef Bacik; +Cc: linxu-btrfs, xfs On Tue, Jul 09, 2013 at 03:07:27PM -0400, Josef Bacik wrote: > 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, > > Signed-off-by: Josef Bacik <jbacik@fusionio.com> Reviewed-by: Ben Myers <bpm@sgi.com> Applied. _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xfstests: exit out if _scratch_mount fails 2013-07-09 19:07 [PATCH] xfstests: exit out if _scratch_mount fails Josef Bacik 2013-07-19 20:38 ` Ben Myers @ 2013-07-26 16:12 ` Ben Myers 2013-07-26 16:15 ` Eric Sandeen 1 sibling, 1 reply; 7+ messages in thread From: Ben Myers @ 2013-07-26 16:12 UTC (permalink / raw) To: Josef Bacik; +Cc: linxu-btrfs, xfs Hey Josef, On Tue, Jul 09, 2013 at 03:07:27PM -0400, Josef Bacik wrote: > 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, > > Signed-off-by: Josef Bacik <jbacik@fusionio.com> 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 xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xfstests: exit out if _scratch_mount fails 2013-07-26 16:12 ` Ben Myers @ 2013-07-26 16:15 ` Eric Sandeen 2013-07-26 16:25 ` Josef Bacik 2013-07-26 16:33 ` Ben Myers 0 siblings, 2 replies; 7+ messages in thread From: Eric Sandeen @ 2013-07-26 16:15 UTC (permalink / raw) To: Ben Myers; +Cc: linxu-btrfs, Josef Bacik, xfs On 7/26/13 11:12 AM, Ben Myers wrote: > Hey Josef, > > On Tue, Jul 09, 2013 at 03:07:27PM -0400, Josef Bacik wrote: >> 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, >> >> Signed-off-by: Josef Bacik <jbacik@fusionio.com> > > 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 xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xfstests: exit out if _scratch_mount fails 2013-07-26 16:15 ` Eric Sandeen @ 2013-07-26 16:25 ` Josef Bacik 2013-07-26 16:33 ` Ben Myers 1 sibling, 0 replies; 7+ messages in thread From: Josef Bacik @ 2013-07-26 16:25 UTC (permalink / raw) To: Eric Sandeen; +Cc: linxu-btrfs, Ben Myers, Josef Bacik, xfs On Fri, Jul 26, 2013 at 11:15:13AM -0500, Eric Sandeen wrote: > On 7/26/13 11:12 AM, Ben Myers wrote: > > Hey Josef, > > > > On Tue, Jul 09, 2013 at 03:07:27PM -0400, Josef Bacik wrote: > >> 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, > >> > >> Signed-off-by: Josef Bacik <jbacik@fusionio.com> > > > > 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? 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 xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xfstests: exit out if _scratch_mount fails 2013-07-26 16:15 ` Eric Sandeen 2013-07-26 16:25 ` Josef Bacik @ 2013-07-26 16:33 ` Ben Myers 2013-07-26 16:58 ` Eric Sandeen 1 sibling, 1 reply; 7+ messages in thread From: Ben Myers @ 2013-07-26 16:33 UTC (permalink / raw) To: Eric Sandeen, Josef Bacik; +Cc: linxu-btrfs, xfs Josef, Eric, On Fri, Jul 26, 2013 at 11:15:13AM -0500, Eric Sandeen wrote: > On 7/26/13 11:12 AM, Ben Myers wrote: > > Hey Josef, > > > > On Tue, Jul 09, 2013 at 03:07:27PM -0400, Josef Bacik wrote: > >> 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, > >> > >> Signed-off-by: Josef Bacik <jbacik@fusionio.com> > > > > 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? This still fails like so: xfs/142 [failed, exit status 1] - output mismatch (see /root/xfstests/results/xfs/142.out.bad) --- tests/xfs/142.out 2013-05-17 14:23:16.000000000 -0500 +++ /root/xfstests/results/xfs/142.out.bad 2013-07-26 11:31:00.128200302 -0500 @@ -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 xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xfstests: exit out if _scratch_mount fails 2013-07-26 16:33 ` Ben Myers @ 2013-07-26 16:58 ` Eric Sandeen 0 siblings, 0 replies; 7+ messages in thread From: Eric Sandeen @ 2013-07-26 16:58 UTC (permalink / raw) To: Ben Myers; +Cc: linux-btrfs, Josef Bacik, xfs On 7/26/13 11:33 AM, Ben Myers wrote: > Josef, Eric, > > On Fri, Jul 26, 2013 at 11:15:13AM -0500, Eric Sandeen wrote: >> On 7/26/13 11:12 AM, Ben Myers wrote: >>> Hey Josef, >>> >>> On Tue, Jul 09, 2013 at 03:07:27PM -0400, Josef Bacik wrote: >>>> 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, >>>> >>>> Signed-off-by: Josef Bacik <jbacik@fusionio.com> >>> >>> 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? > > This still fails like so: > > xfs/142 [failed, exit status 1] - output mismatch (see /root/xfstests/results/xfs/142.out.bad) > --- tests/xfs/142.out 2013-05-17 14:23:16.000000000 -0500 > +++ /root/xfstests/results/xfs/142.out.bad 2013-07-26 11:31:00.128200302 -0500 > @@ -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) 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 > Thanks, > Ben > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs > _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-07-26 16:58 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-07-09 19:07 [PATCH] xfstests: exit out if _scratch_mount fails Josef Bacik 2013-07-19 20:38 ` Ben Myers 2013-07-26 16:12 ` Ben Myers 2013-07-26 16:15 ` Eric Sandeen 2013-07-26 16:25 ` Josef Bacik 2013-07-26 16:33 ` Ben Myers 2013-07-26 16:58 ` Eric Sandeen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox