* [PATCH] xfs/297: fail test if _scratch_mount fails
@ 2017-07-06 18:06 Brian Foster
2017-07-06 20:32 ` Bill O'Donnell
0 siblings, 1 reply; 2+ messages in thread
From: Brian Foster @ 2017-07-06 18:06 UTC (permalink / raw)
To: fstests
xfs/297 formats the scratch device with test specific mkfs options
that limit the use of certain mount options (i.e., if logbsize !=
256k). If an incompatible mount option is set, the mount fails but
the test proceeds to run against the root filesystem.
Update xfs/297 to fail if the mount of the scratch device fails for
whatever reason.
Signed-off-by: Brian Foster <bfoster@redhat.com>
---
A couple other options here are to exclude the use of logbsize
(effectively _notrun the test) or to hardcode the mount with '-o
logbsize=256k' in the test. I didn't like the former because it
excludes even when a valid logbsize is set. The latter requires us to
use _require_scratch_nocheck, otherwise the post-test remount fails.
This configuration is rare enough that this seemed like the least bad
option.
Brian
tests/xfs/297 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/xfs/297 b/tests/xfs/297
index fe92441..9accffd 100755
--- a/tests/xfs/297
+++ b/tests/xfs/297
@@ -52,7 +52,7 @@ _require_command "$KILLALL_PROG" killall
rm -f $seqres.full
_scratch_mkfs_xfs -d agcount=16,su=256k,sw=12 -l su=256k,size=5120b >/dev/null 2>&1
-_scratch_mount >/dev/null 2>&1
+_scratch_mount >>$seqres.full 2>&1 || _fail "mount failed"
STRESS_DIR="$SCRATCH_MNT/testdir"
mkdir -p $STRESS_DIR
--
2.9.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xfs/297: fail test if _scratch_mount fails
2017-07-06 18:06 [PATCH] xfs/297: fail test if _scratch_mount fails Brian Foster
@ 2017-07-06 20:32 ` Bill O'Donnell
0 siblings, 0 replies; 2+ messages in thread
From: Bill O'Donnell @ 2017-07-06 20:32 UTC (permalink / raw)
To: Brian Foster; +Cc: fstests
On Thu, Jul 06, 2017 at 02:06:20PM -0400, Brian Foster wrote:
> xfs/297 formats the scratch device with test specific mkfs options
> that limit the use of certain mount options (i.e., if logbsize !=
> 256k). If an incompatible mount option is set, the mount fails but
> the test proceeds to run against the root filesystem.
>
> Update xfs/297 to fail if the mount of the scratch device fails for
> whatever reason.
>
> Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
> ---
>
> A couple other options here are to exclude the use of logbsize
> (effectively _notrun the test) or to hardcode the mount with '-o
> logbsize=256k' in the test. I didn't like the former because it
> excludes even when a valid logbsize is set. The latter requires us to
> use _require_scratch_nocheck, otherwise the post-test remount fails.
> This configuration is rare enough that this seemed like the least bad
> option.
>
> Brian
>
> tests/xfs/297 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/xfs/297 b/tests/xfs/297
> index fe92441..9accffd 100755
> --- a/tests/xfs/297
> +++ b/tests/xfs/297
> @@ -52,7 +52,7 @@ _require_command "$KILLALL_PROG" killall
>
> rm -f $seqres.full
> _scratch_mkfs_xfs -d agcount=16,su=256k,sw=12 -l su=256k,size=5120b >/dev/null 2>&1
> -_scratch_mount >/dev/null 2>&1
> +_scratch_mount >>$seqres.full 2>&1 || _fail "mount failed"
>
> STRESS_DIR="$SCRATCH_MNT/testdir"
> mkdir -p $STRESS_DIR
> --
> 2.9.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-06 20:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-06 18:06 [PATCH] xfs/297: fail test if _scratch_mount fails Brian Foster
2017-07-06 20:32 ` Bill O'Donnell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox