public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: fstests@vger.kernel.org
Subject: [PATCH 2/4] xfs/148: make test debuggable
Date: Mon, 16 May 2022 18:59:20 +1000	[thread overview]
Message-ID: <20220516085922.1306879-3-david@fromorbit.com> (raw)
In-Reply-To: <20220516085922.1306879-1-david@fromorbit.com>

From: Dave Chinner <dchinner@redhat.com>

Don't clean up image files - leave them laying around on the test
device so that when the test fails there's a corpse left behind to
post-mortem....

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 tests/xfs/148 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/xfs/148 b/tests/xfs/148
index 9427aff0..8d50a642 100755
--- a/tests/xfs/148
+++ b/tests/xfs/148
@@ -16,7 +16,7 @@ _cleanup()
 	cd /
 	$UMOUNT_PROG $mntpt > /dev/null 2>&1
 	test -n "$loopdev" && _destroy_loop_device $loopdev > /dev/null 2>&1
-	rm -r -f $imgfile $mntpt $tmp.*
+	rm -r -f $tmp.*
 }
 
 # Import common functions.
@@ -38,6 +38,8 @@ nullstr="too_many_beans"
 slashstr="are_bad_for_you"
 test_names=("something" "$nullstr" "$slashstr" "another")
 
+rm -f $imgfile $imgfile.old
+
 # Format image file w/o crcs so we can sed the image file
 $XFS_IO_PROG -f -c 'truncate 40m' $imgfile
 loopdev=$(_create_loop_device $imgfile)
@@ -91,7 +93,6 @@ sed -b \
 	-i $imgfile
 test "$(md5sum < $imgfile)" != "$(md5sum < $imgfile.old)" ||
 	_fail "sed failed to change the image file?"
-rm -f $imgfile.old
 loopdev=$(_create_loop_device $imgfile)
 _mount $loopdev $mntpt
 
-- 
2.35.1


  parent reply	other threads:[~2022-05-16  8:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16  8:59 [PATCH 0/3] fstests: more fixes Dave Chinner
2022-05-16  8:59 ` [PATCH 1/4] fstests: fix group list generation for whacky test names Dave Chinner
2022-05-16 16:20   ` Darrick J. Wong
2022-05-16 21:35     ` Dave Chinner
2022-05-16 22:26       ` Darrick J. Wong
2022-05-17  4:36         ` Dave Chinner
2022-05-18  0:10           ` Eric Sandeen
2022-05-20  1:58           ` Darrick J. Wong
2022-05-18  2:23         ` Zorro Lang
2022-05-16  8:59 ` Dave Chinner [this message]
2022-05-16  8:59 ` [PATCH 3/4] xfs/148: fix failure from bad shortform size assumptions Dave Chinner
2022-05-16 15:37   ` Darrick J. Wong
2022-05-16 21:40     ` Dave Chinner
2022-05-16  8:59 ` [PATCH 4/4] generic/081: don't run on DAX capable devices Dave Chinner

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=20220516085922.1306879-3-david@fromorbit.com \
    --to=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    /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