From: Darrick J. Wong Date: Wed, 7 Jul 2021 00:21:23 +0000 (-0700) Subject: shared/298: fix random deletion when filenames contain spaces X-Git-Tag: v2022.05.01~338 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=75c9b616fc844bf034e6220f3917779e9cb19462;p=xfstests-dev.git shared/298: fix random deletion when filenames contain spaces 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 Reviewed-by: Allison Henderson Signed-off-by: Eryu Guan --- 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..."