From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 4/4] generic: inconsistent initial state for test_generic_punch
Date: Mon, 3 Feb 2014 10:56:05 +1100 [thread overview]
Message-ID: <1391385365-12790-5-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1391385365-12790-1-git-send-email-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
The first test may start with the file from the previous test, and
that is in an unknown state. Hence always remove the test file
before the first test so that it doesn't have extents inside the
test range as it is supposed to be testing into a hole.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
common/punch | 7 ++++---
tests/generic/255.out | 8 ++------
tests/generic/316.out | 8 ++------
tests/xfs/252.out | 8 ++------
4 files changed, 10 insertions(+), 21 deletions(-)
diff --git a/common/punch b/common/punch
index 4ed8406..49715a7 100644
--- a/common/punch
+++ b/common/punch
@@ -318,10 +318,11 @@ _test_generic_punch()
filter_cmd=$5
testfile=$6
+ # initial test state must be defined, otherwise the first test can fail
+ # due ot stale file state left from previous tests.
+ rm -f $testfile
+
echo " 1. into a hole"
- if [ "$remove_testfile" ]; then
- rm -f $testfile
- fi
$XFS_IO_PROG -f -c "truncate 20k" \
-c "$zero_cmd 4k 8k" \
-c "$map_cmd -v" $testfile | $filter_cmd
diff --git a/tests/generic/255.out b/tests/generic/255.out
index cb9fdca..217ef3e 100644
--- a/tests/generic/255.out
+++ b/tests/generic/255.out
@@ -158,9 +158,7 @@ eecb7aa303d121835de05028751d301c
0000400 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
*
1. into a hole
-0: [0..7]: extent
-1: [8..39]: hole
-5a58e46082be047d0f13bee7974015b9
+daa100df6e6711906b61c9ab5aa16032
2. into allocated space
0: [0..7]: extent
1: [8..23]: hole
@@ -242,9 +240,7 @@ eecb7aa303d121835de05028751d301c
0000400 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
*
1. into a hole
-0: [0..7]: extent
-1: [8..39]: hole
-5a58e46082be047d0f13bee7974015b9
+daa100df6e6711906b61c9ab5aa16032
2. into allocated space
0: [0..7]: extent
1: [8..23]: hole
diff --git a/tests/generic/316.out b/tests/generic/316.out
index 222e601..383f0d1 100644
--- a/tests/generic/316.out
+++ b/tests/generic/316.out
@@ -86,9 +86,7 @@ eecb7aa303d121835de05028751d301c
0000400 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
*
1. into a hole
-0: [0..7]: extent
-1: [8..39]: hole
-5a58e46082be047d0f13bee7974015b9
+daa100df6e6711906b61c9ab5aa16032
2. into allocated space
0: [0..7]: extent
1: [8..23]: hole
@@ -135,9 +133,7 @@ eecb7aa303d121835de05028751d301c
0000400 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
*
1. into a hole
-0: [0..7]: extent
-1: [8..39]: hole
-5a58e46082be047d0f13bee7974015b9
+daa100df6e6711906b61c9ab5aa16032
2. into allocated space
0: [0..7]: extent
1: [8..23]: hole
diff --git a/tests/xfs/252.out b/tests/xfs/252.out
index 539c8a4..47d9a4c 100644
--- a/tests/xfs/252.out
+++ b/tests/xfs/252.out
@@ -158,9 +158,7 @@ eecb7aa303d121835de05028751d301c
0000400 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
*
1. into a hole
-0: [0..7]: data
-1: [8..39]: hole
-5a58e46082be047d0f13bee7974015b9
+daa100df6e6711906b61c9ab5aa16032
2. into allocated space
0: [0..7]: data
1: [8..23]: hole
@@ -242,9 +240,7 @@ eecb7aa303d121835de05028751d301c
0000400 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
*
1. into a hole
-0: [0..7]: data
-1: [8..39]: hole
-5a58e46082be047d0f13bee7974015b9
+daa100df6e6711906b61c9ab5aa16032
2. into allocated space
0: [0..7]: data
1: [8..23]: hole
--
1.8.4.rc3
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-02-02 23:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-02 23:56 [PATCH 0/4] xfstests: xfs and hole punch test fixes Dave Chinner
2014-02-02 23:56 ` [PATCH 1/4] xfs/199: enforce v4 superblock format for test Dave Chinner
2014-02-03 7:38 ` Christoph Hellwig
2014-02-02 23:56 ` [PATCH 2/4] xfs/291: fix spurious ENOSPC errors Dave Chinner
2014-02-03 7:38 ` Christoph Hellwig
2014-02-02 23:56 ` [PATCH 3/4] generic: _test_generic_punch not blocksize clean Dave Chinner
2014-02-03 7:39 ` Christoph Hellwig
2014-02-02 23:56 ` Dave Chinner [this message]
2014-02-03 7:40 ` [PATCH 4/4] generic: inconsistent initial state for test_generic_punch Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1391385365-12790-5-git-send-email-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox