FS/XFS testing framework
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org, guaneryu@gmail.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me
Subject: [PATCH 3/8] shared/298: fix random deletion when filenames contain spaces
Date: Tue, 06 Jul 2021 17:21:23 -0700	[thread overview]
Message-ID: <162561728342.543423.12599584091972556414.stgit@locust> (raw)
In-Reply-To: <162561726690.543423.15033740972304281407.stgit@locust>

From: Darrick J. Wong <djwong@kernel.org>

Correct the deletion loop in this test to work properly when there are
files in $here that have spaces in their name.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 tests/shared/298 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/tests/shared/298 b/tests/shared/298
index 981a4dfc..bd52b6a0 100755
--- a/tests/shared/298
+++ b/tests/shared/298
@@ -163,7 +163,7 @@ get_holes $img_file > $fiemap_ref
 
 # Delete some files
 find $loop_mnt -type f -print | $AWK_PROG \
-	'BEGIN {srand()}; {if(rand() > 0.7) print $1;}' | xargs rm
+	'BEGIN {srand()}; {if(rand() > 0.7) printf("%s\0", $0);}' | xargs -0 rm
 echo "done."
 
 echo -n "Running fstrim..."


  parent reply	other threads:[~2021-07-07  0:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07  0:21 [PATCHSET 0/8] fstests: random fixes Darrick J. Wong
2021-07-07  0:21 ` [PATCH 1/8] xfs/172: disable test when file writes don't use delayed allocation Darrick J. Wong
2021-07-09 23:38   ` Allison Henderson
2021-07-07  0:21 ` [PATCH 2/8] generic/561: hide assertions when duperemove is killed Darrick J. Wong
2021-07-09 23:38   ` Allison Henderson
2021-07-10  1:25     ` Darrick J. Wong
2021-07-07  0:21 ` Darrick J. Wong [this message]
2021-07-09 23:39   ` [PATCH 3/8] shared/298: fix random deletion when filenames contain spaces Allison Henderson
2021-07-07  0:21 ` [PATCH 4/8] dmthin: erase the metadata device properly before starting Darrick J. Wong
2021-07-09 23:39   ` Allison Henderson
2021-07-18 14:20   ` Eryu Guan
2021-07-18 14:32   ` Eryu Guan
2021-07-07  0:21 ` [PATCH 5/8] check: run _check_filesystems in an OOM-happy subshell Darrick J. Wong
2021-07-07  0:21 ` [PATCH 6/8] xfs/084: fix test program status collection and processing Darrick J. Wong
2021-07-07  0:21 ` [PATCH 7/8] generic/371: disable speculative preallocation regressions on XFS Darrick J. Wong
2021-07-09 23:50   ` Allison Henderson
2021-07-07  0:21 ` [PATCH 8/8] generic/019: don't dump cores when fio/fsstress hit io errors Darrick J. Wong
2021-07-09 23:39   ` Allison Henderson
2021-07-18 14:35 ` [PATCHSET 0/8] fstests: random fixes Eryu Guan

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=162561728342.543423.12599584091972556414.stgit@locust \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=guan@eryu.me \
    --cc=guaneryu@gmail.com \
    --cc=linux-xfs@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