fstests: random fixes
v2 cover fstests: random fixes
Hi all,
This series fixes a small problems in generic/561 that was causing intermittent test failures.
v2: update comments per review suggestions
If you're going to start using this mess, you probably ought to just pull from my git trees, which are linked below.
This is an extraordinary way to destroy everything. Enjoy! Comments and questions are, as always, welcome.
--D
kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=random-fixes
xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=random-fixes
fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=random-fixes
--- tests/generic/561 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
PATCH v2 1/1 generic/561: hide assertions when duperemove is killed
From: Darrick J. Wong <[email protected]>
Use some bash redirection trickery to capture in $seqres.full all of bash's warnings about duperemove being killed due to assertions triggering.
--- tests/generic/561 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
tests/generic/561 +7 -2
@@ -62,8 +62,13 @@ dupe_run=$TEST_DIR/${seq}-running touch $dupe_run for ((i = 0; i < $((2 * LOAD_FACTOR)); i++)); do while [ -e $dupe_run ]; do - $DUPEREMOVE_PROG -dr --dedupe-options=same $testdir \ - >>$seqres.full 2>&1 + # Run cmd in a subshell so that the golden output does not + # capture assertions that trigger when killall shoots down + # dupremove processes in an arbitrary order, which leaves the + # memory in an inconsistent state long enough for the assert + # to trip. + cmd="$DUPEREMOVE_PROG -dr --dedupe-options=same $testdir" + bash -c "$cmd" >> $seqres.full 2>&1 done 2>&1 | sed -e '/Terminated/d' & dedup_pids="$! $dedup_pids" done
Re: [PATCH 1/1] generic/561: hide assertions when duperemove is killed
Quoted 5 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
Use some bash redirection trickery to capture in $seqres.full all of bash's warnings about duperemove being killed due to assertions triggering.
Looks good,