fstests: make some tests that use fsstress easier to debug
cover fstests: make some tests that use fsstress easier to debug
From: Filipe Manana <[email protected]>
Some tests that use fsstress are harder to debug than necessary because they redirect fsstress' stdout to /dev/null instead of $seqres.full. This means we have no way of knowing the seed used by fsstress which often helps to trigger a bug/failure. More details on the change logs of each patch.
Filipe Manana (2):
fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null btrfs/192: use append operator to output log replay results to $seqres.full
tests/btrfs/028 | 2 +- tests/btrfs/049 | 2 +- tests/btrfs/060 | 2 +- tests/btrfs/061 | 2 +- tests/btrfs/062 | 2 +- tests/btrfs/063 | 2 +- tests/btrfs/064 | 2 +- tests/btrfs/065 | 2 +- tests/btrfs/066 | 2 +- tests/btrfs/067 | 2 +- tests/btrfs/068 | 2 +- tests/btrfs/069 | 2 +- tests/btrfs/070 | 2 +- tests/btrfs/071 | 2 +- tests/btrfs/072 | 2 +- tests/btrfs/073 | 2 +- tests/btrfs/074 | 2 +- tests/btrfs/136 | 2 +- tests/btrfs/192 | 4 ++-- tests/btrfs/232 | 2 +- tests/btrfs/261 | 2 +- tests/btrfs/286 | 2 +- tests/ext4/057 | 2 +- tests/ext4/307 | 2 +- tests/generic/068 | 2 +- tests/generic/269 | 2 +- tests/generic/409 | 2 +- tests/generic/410 | 2 +- tests/generic/411 | 2 +- tests/generic/589 | 2 +- tests/xfs/051 | 2 +- tests/xfs/057 | 2 +- tests/xfs/297 | 2 +- tests/xfs/305 | 2 +- tests/xfs/538 | 2 +- 35 files changed, 36 insertions(+), 36 deletions(-)
Signature · 1 line
2.40.1
PATCH 1/2 fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null
From: Filipe Manana <[email protected]>
Several tests are redirecting the output of fsstress to /dev/null and this makes it harder to debug a test failure because we have no way of knowing what was the seed used by fsstress, as fsstress outputs the seed it uses to stdout. Very often when such a test fails, I have to go modify to redirect stdout to the $seqres.full file and then run it in a loop until I find a seed that causes a failure.
So modify all tests that redirect fsstress' output to /dev/null to instead redirect it to the $seqres.full file. Note that for some tests I've added the style ">> $seqres.full" (with a space after >>) while for others I did ">>$seqres.full" (no space) - the reason for this was to keep style consistency within each test case.
--- tests/btrfs/028 | 2 +- tests/btrfs/049 | 2 +- tests/btrfs/060 | 2 +- tests/btrfs/061 | 2 +- tests/btrfs/062 | 2 +- tests/btrfs/063 | 2 +- tests/btrfs/064 | 2 +- tests/btrfs/065 | 2 +- tests/btrfs/066 | 2 +- tests/btrfs/067 | 2 +- tests/btrfs/068 | 2 +- tests/btrfs/069 | 2 +- tests/btrfs/070 | 2 +- tests/btrfs/071 | 2 +- tests/btrfs/072 | 2 +- tests/btrfs/073 | 2 +- tests/btrfs/074 | 2 +- tests/btrfs/136 | 2 +- tests/btrfs/192 | 2 +- tests/btrfs/232 | 2 +- tests/btrfs/261 | 2 +- tests/btrfs/286 | 2 +- tests/ext4/057 | 2 +- tests/ext4/307 | 2 +- tests/generic/068 | 2 +- tests/generic/269 | 2 +- tests/generic/409 | 2 +- tests/generic/410 | 2 +- tests/generic/411 | 2 +- tests/generic/589 | 2 +- tests/xfs/051 | 2 +- tests/xfs/057 | 2 +- tests/xfs/297 | 2 +- tests/xfs/305 | 2 +- tests/xfs/538 | 2 +- 35 files changed, 35 insertions(+), 35 deletions(-)
tests/btrfs/028 +1 -1
@@ -35,7 +35,7 @@ args=`_scale_fsstress_args -z \ -f fsync=10 -n 100000 -p 2 \ -d $SCRATCH_MNT/stress_dir` echo "Run fsstress $args" >>$seqres.full -$FSSTRESS_PROG $args >/dev/null 2>&1 & +$FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo "Start balance" >>$seqres.full
tests/btrfs/049 +1 -1
@@ -42,7 +42,7 @@ args=`_scale_fsstress_args -z \ -f write=10 -f creat=10 \ -n 1000 -p 2 -d $SCRATCH_MNT/stress_dir` echo "Run fsstress $args" >>$seqres.full -$FSSTRESS_PROG $args >/dev/null 2>&1 +$FSSTRESS_PROG $args >>$seqres.full # Start and pause balance to ensure it will be restored on remount echo "Start balance" >>$seqres.full
tests/btrfs/060 +1 -1
@@ -38,7 +38,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/061 +1 -1
@@ -36,7 +36,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/062 +1 -1
@@ -37,7 +37,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/063 +1 -1
@@ -36,7 +36,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/064 +1 -1
@@ -46,7 +46,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! # Start both balance and replace in the background.
tests/btrfs/065 +1 -1
@@ -46,7 +46,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! # make sure the stop sign is not there
tests/btrfs/066 +1 -1
@@ -38,7 +38,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! # make sure the stop sign is not there
tests/btrfs/067 +1 -1
@@ -39,7 +39,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! # make sure the stop sign is not there
tests/btrfs/068 +1 -1
@@ -39,7 +39,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! # make sure the stop sign is not there
tests/btrfs/069 +1 -1
@@ -44,7 +44,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/070 +1 -1
@@ -45,7 +45,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/071 +1 -1
@@ -44,7 +44,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/072 +1 -1
@@ -37,7 +37,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start scrub worker: " >>$seqres.full
tests/btrfs/073 +1 -1
@@ -36,7 +36,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start scrub worker: " >>$seqres.full
tests/btrfs/074 +1 -1
@@ -37,7 +37,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start defrag worker: " >>$seqres.full
tests/btrfs/136 +1 -1
@@ -39,7 +39,7 @@ populate_data(){ mkdir -p $data_path args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $data_path` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! wait $fsstress_pid }
tests/btrfs/192 +1 -1
@@ -140,7 +140,7 @@ pid1=$! delete_workload & pid2=$! -"$FSSTRESS_PROG" $fsstress_args > /dev/null & +"$FSSTRESS_PROG" $fsstress_args >> $seqres.full & sleep $runtime "$KILLALL_PROG" -q "$FSSTRESS_PROG" &> /dev/null
tests/btrfs/232 +1 -1
@@ -25,7 +25,7 @@ writer() while true; do args=`_scale_fsstress_args -p 20 -n 1000 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` - $FSSTRESS_PROG $args >/dev/null 2>&1 + $FSSTRESS_PROG $args >> $seqres.full done }
tests/btrfs/261 +1 -1
@@ -36,7 +36,7 @@ prepare_fs() # Then use fsstress to generate some extra contents. # Disable setattr related operations, as it may set NODATACOW which will # not allow us to use btrfs checksum to verify the content. - $FSSTRESS_PROG -f setattr=0 -d $SCRATCH_MNT -w -n 3000 > /dev/null 2>&1 + $FSSTRESS_PROG -f setattr=0 -d $SCRATCH_MNT -w -n 3000 >> $seqres.full sync # Save the fssum of this fs
tests/btrfs/286 +1 -1
@@ -36,7 +36,7 @@ workload() # Use nodatasum mount option, so all data won't have checksum. _scratch_mount -o nodatasum - $FSSTRESS_PROG -p 10 -n 200 -d $SCRATCH_MNT > /dev/null 2>&1 + $FSSTRESS_PROG -p 10 -n 200 -d $SCRATCH_MNT >> $seqres.full sync # Generate fssum for later verification, here we only care
tests/ext4/057 +1 -1
@@ -42,7 +42,7 @@ _scratch_mount # Begin fsstress while modifying UUID fsstress_args=$(_scale_fsstress_args -d $SCRATCH_MNT -p 15 -n 999999) -$FSSTRESS_PROG $fsstress_args > /dev/null 2>&1 & +$FSSTRESS_PROG $fsstress_args >> $seqres.full & fsstress_pid=$! for n in $(seq 1 20); do
tests/ext4/307 +1 -1
@@ -21,7 +21,7 @@ _workout() out=$SCRATCH_MNT/fsstress.$$ args=`_scale_fsstress_args -p4 -n999 -f setattr=1 $FSSTRESS_AVOID -d $out` echo "fsstress $args" >> $seqres.full - $FSSTRESS_PROG $args > /dev/null 2>&1 + $FSSTRESS_PROG $args >> $seqres.full find $out -type f > $out.list cat $out.list | xargs md5sum > $out.md5sum usage=`du -sch $out | tail -n1 | gawk '{ print $1 }'`
tests/generic/068 +1 -1
@@ -57,7 +57,7 @@ touch $tmp.running # We do both read & write IO - not only is this more realistic, # but it also potentially tests atime updates FSSTRESS_ARGS=`_scale_fsstress_args -d $STRESS_DIR -p $procs -n $nops $FSSTRESS_AVOID` - $FSSTRESS_PROG $FSSTRESS_ARGS > /dev/null 2>&1 + $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full done rm -r $STRESS_DIR/*
tests/generic/269 +1 -1
@@ -23,7 +23,7 @@ _workout() out=$SCRATCH_MNT/fsstress.$$ args=`_scale_fsstress_args -p128 -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out` echo "fsstress $args" >> $seqres.full - $FSSTRESS_PROG $args > /dev/null 2>&1 & + $FSSTRESS_PROG $args >> $seqres.full & pid=$! echo "Run dd writers in parallel" for ((i=0; i < num_iterations; i++))
tests/generic/409 +1 -1
@@ -58,7 +58,7 @@ fs_stress() -f chown=1 \ -f getdents=1 \ -f fiemap=1 \ - -d $target >/dev/null + -d $target >>$seqres.full sync }
tests/generic/410 +1 -1
@@ -66,7 +66,7 @@ fs_stress() -f chown=1 \ -f getdents=1 \ -f fiemap=1 \ - -d $target >/dev/null + -d $target >>$seqres.full sync }
tests/generic/411 +1 -1
@@ -49,7 +49,7 @@ fs_stress() -f chown=1 \ -f getdents=1 \ -f fiemap=1 \ - -d $target >/dev/null + -d $target >>$seqres.full sync }
tests/generic/589 +1 -1
@@ -48,7 +48,7 @@ fs_stress() { local target=$1 - $FSSTRESS_PROG -n 50 -p 3 -d $target >/dev/null + $FSSTRESS_PROG -n 50 -p 3 -d $target >>$seqres.full sync }
tests/xfs/051 +1 -1
@@ -38,7 +38,7 @@ _scratch_mount # Start a workload and shutdown the fs. The subsequent mount will require log # recovery. -$FSSTRESS_PROG -n 9999 -p 2 -w -d $SCRATCH_MNT > /dev/null 2>&1 & +$FSSTRESS_PROG -n 9999 -p 2 -w -d $SCRATCH_MNT >> $seqres.full & sleep 5 _scratch_shutdown -f $KILLALL_PROG -q $FSSTRESS_PROG
tests/xfs/057 +1 -1
@@ -56,7 +56,7 @@ _scratch_mkfs_sized $((1024 * 1024 * 500)) >> $seqres.full 2>&1 || _scratch_mount # populate the fs with some data and cycle the mount to reset the log head/tail -$FSSTRESS_PROG -d $SCRATCH_MNT -z -fcreat=1 -p 4 -n 100000 > /dev/null 2>&1 +$FSSTRESS_PROG -d $SCRATCH_MNT -z -fcreat=1 -p 4 -n 100000 >> $seqres.full _scratch_cycle_mount || _fail "cycle mount failed" # Pin the tail and start a file removal workload. File removal tends to
tests/xfs/297 +1 -1
@@ -39,7 +39,7 @@ _scratch_mount STRESS_DIR="$SCRATCH_MNT/testdir" mkdir -p $STRESS_DIR -$FSSTRESS_PROG -d $STRESS_DIR -n 100 -p 1000 $FSSTRESS_AVOID >/dev/null 2>&1 & +$FSSTRESS_PROG -d $STRESS_DIR -n 100 -p 1000 $FSSTRESS_AVOID >>$seqres.full & # Freeze/unfreeze file system randomly echo "Start freeze/unfreeze randomly" | tee -a $seqres.full
tests/xfs/305 +1 -1
@@ -36,7 +36,7 @@ _exercise() _qmount mkdir -p $QUOTA_DIR - $FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >/dev/null 2>&1 & + $FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >>$seqres.full & sleep 10 $XFS_QUOTA_PROG -x -c "disable -$type" $SCRATCH_DEV sleep 5
tests/xfs/538 +1 -1
@@ -63,7 +63,7 @@ $FSSTRESS_PROG -d $SCRATCH_MNT \ -f readv=0 \ -f stat=0 \ -f aread=0 \ - -f dread=0 > /dev/null 2>&1 + -f dread=0 >> $seqres.full # success, all done status=0
Signature · 1 line
2.40.1
Re: [PATCH 1/2] fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null
Quoted 44 lines · On Tue, Oct 03, 2023 at 12:57:44PM +0100, [email protected] wrote:
From: Filipe Manana <[email protected]>
Several tests are redirecting the output of fsstress to
/dev/nulland this makes it harder to debug a test failure because we have no way of knowing what was the seed used by fsstress, as fsstress outputs the seed it uses to stdout. Very often when such a test fails, I have to go modify to redirect stdout to the $seqres.full file and then run it in a loop until I find a seed that causes a failure.So modify all tests that redirect fsstress' output to
/dev/nullto instead redirect it to the $seqres.full file. Note that for some tests I've added the style ">> $seqres.full" (with a space after >>) while for others I did ">>$seqres.full" (no space) - the reason for this was to keep style consistency within each test case.Signed-off-by Filipe Manana <[email protected]>--- tests/btrfs/028 | 2 +- tests/btrfs/049 | 2 +- tests/btrfs/060 | 2 +- tests/btrfs/061 | 2 +- tests/btrfs/062 | 2 +- tests/btrfs/063 | 2 +- tests/btrfs/064 | 2 +- tests/btrfs/065 | 2 +- tests/btrfs/066 | 2 +- tests/btrfs/067 | 2 +- tests/btrfs/068 | 2 +- tests/btrfs/069 | 2 +- tests/btrfs/070 | 2 +- tests/btrfs/071 | 2 +- tests/btrfs/072 | 2 +- tests/btrfs/073 | 2 +- tests/btrfs/074 | 2 +- tests/btrfs/136 | 2 +- tests/btrfs/192 | 2 +- tests/btrfs/232 | 2 +- tests/btrfs/261 | 2 +- tests/btrfs/286 | 2 +- tests/ext4/057 | 2 +- tests/ext4/307 | 2 +- tests/generic/068 | 2 +- tests/generic/269 | 2 +- tests/generic/409 | 2 +-
Quoted 8 lines
tests/generic/410 | 2 +- tests/generic/411 | 2 +- tests/generic/589 | 2 +- tests/xfs/051 | 2 +- tests/xfs/057 | 2 +- tests/xfs/297 | 2 +- tests/xfs/305 | 2 +- tests/xfs/538 | 2 +-
For the generic & xfs parts,
(The rest are also probably ok but I'm much less familiar with the btrfs-specific tests.)
--D
Quoted 460 lines
35 files changed, 35 insertions(+), 35 deletions(-)tests/btrfs/028 +1
-1@@ -35,7 +35,7 @@ args=`_scale_fsstress_args -z \ -f fsync=10 -n 100000 -p 2 \ -d $SCRATCH_MNT/stress_dir` echo "Run fsstress $args" >>$seqres.full -$FSSTRESS_PROG $args >/dev/null 2>&1 & +$FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo "Start balance" >>$seqres.fulltests/btrfs/049 +1
-1@@ -42,7 +42,7 @@ args=`_scale_fsstress_args -z \ -f write=10 -f creat=10 \ -n 1000 -p 2 -d $SCRATCH_MNT/stress_dir` echo "Run fsstress $args" >>$seqres.full -$FSSTRESS_PROG $args >/dev/null 2>&1 +$FSSTRESS_PROG $args >>$seqres.full # Start and pause balance to ensure it will be restored on remount echo "Start balance" >>$seqres.fulltests/btrfs/060 +1
-1@@ -38,7 +38,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start balance worker: " >>$seqres.fulltests/btrfs/061 +1
-1@@ -36,7 +36,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start balance worker: " >>$seqres.fulltests/btrfs/062 +1
-1@@ -37,7 +37,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start balance worker: " >>$seqres.fulltests/btrfs/063 +1
-1@@ -36,7 +36,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start balance worker: " >>$seqres.fulltests/btrfs/064 +1
-1@@ -46,7 +46,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! # Start both balance and replace in the background.tests/btrfs/065 +1
-1@@ -46,7 +46,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! # make sure the stop sign is not theretests/btrfs/066 +1
-1@@ -38,7 +38,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! # make sure the stop sign is not theretests/btrfs/067 +1
-1@@ -39,7 +39,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! # make sure the stop sign is not theretests/btrfs/068 +1
-1@@ -39,7 +39,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! # make sure the stop sign is not theretests/btrfs/069 +1
-1@@ -44,7 +44,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start replace worker: " >>$seqres.fulltests/btrfs/070 +1
-1@@ -45,7 +45,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start replace worker: " >>$seqres.fulltests/btrfs/071 +1
-1@@ -44,7 +44,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start replace worker: " >>$seqres.fulltests/btrfs/072 +1
-1@@ -37,7 +37,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start scrub worker: " >>$seqres.fulltests/btrfs/073 +1
-1@@ -36,7 +36,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start scrub worker: " >>$seqres.fulltests/btrfs/074 +1
-1@@ -37,7 +37,7 @@ run_test() args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! echo -n "Start defrag worker: " >>$seqres.fulltests/btrfs/136 +1
-1@@ -39,7 +39,7 @@ populate_data(){ mkdir -p $data_path args=`_scale_fsstress_args -p 20 -n 100 $FSSTRESS_AVOID -d $data_path` echo "Run fsstress $args" >>$seqres.full - $FSSTRESS_PROG $args >/dev/null 2>&1 & + $FSSTRESS_PROG $args >>$seqres.full & fsstress_pid=$! wait $fsstress_pid }tests/btrfs/192 +1
-1@@ -140,7 +140,7 @@ pid1=$! delete_workload & pid2=$! -"$FSSTRESS_PROG" $fsstress_args > /dev/null & +"$FSSTRESS_PROG" $fsstress_args >> $seqres.full & sleep $runtime "$KILLALL_PROG" -q "$FSSTRESS_PROG" &> /dev/nulltests/btrfs/232 +1
-1@@ -25,7 +25,7 @@ writer() while true; do args=`_scale_fsstress_args -p 20 -n 1000 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir` - $FSSTRESS_PROG $args >/dev/null 2>&1 + $FSSTRESS_PROG $args >> $seqres.full done }tests/btrfs/261 +1
-1@@ -36,7 +36,7 @@ prepare_fs() # Then use fsstress to generate some extra contents. # Disable setattr related operations, as it may set NODATACOW which will # not allow us to use btrfs checksum to verify the content. - $FSSTRESS_PROG -f setattr=0 -d $SCRATCH_MNT -w -n 3000 > /dev/null 2>&1 + $FSSTRESS_PROG -f setattr=0 -d $SCRATCH_MNT -w -n 3000 >> $seqres.full sync # Save the fssum of this fstests/btrfs/286 +1
-1@@ -36,7 +36,7 @@ workload() # Use nodatasum mount option, so all data won't have checksum. _scratch_mount -o nodatasum - $FSSTRESS_PROG -p 10 -n 200 -d $SCRATCH_MNT > /dev/null 2>&1 + $FSSTRESS_PROG -p 10 -n 200 -d $SCRATCH_MNT >> $seqres.full sync # Generate fssum for later verification, here we only caretests/ext4/057 +1
-1@@ -42,7 +42,7 @@ _scratch_mount # Begin fsstress while modifying UUID fsstress_args=$(_scale_fsstress_args -d $SCRATCH_MNT -p 15 -n 999999) -$FSSTRESS_PROG $fsstress_args > /dev/null 2>&1 & +$FSSTRESS_PROG $fsstress_args >> $seqres.full & fsstress_pid=$! for n in $(seq 1 20); dotests/ext4/307 +1
-1@@ -21,7 +21,7 @@ _workout() out=$SCRATCH_MNT/fsstress.$$ args=`_scale_fsstress_args -p4 -n999 -f setattr=1 $FSSTRESS_AVOID -d $out` echo "fsstress $args" >> $seqres.full - $FSSTRESS_PROG $args > /dev/null 2>&1 + $FSSTRESS_PROG $args >> $seqres.full find $out -type f > $out.list cat $out.list | xargs md5sum > $out.md5sum usage=`du -sch $out | tail -n1 | gawk '{ print $1 }'`tests/generic/068 +1
-1@@ -57,7 +57,7 @@ touch $tmp.running # We do both read & write IO - not only is this more realistic, # but it also potentially tests atime updates FSSTRESS_ARGS=`_scale_fsstress_args -d $STRESS_DIR -p $procs -n $nops $FSSTRESS_AVOID` - $FSSTRESS_PROG $FSSTRESS_ARGS > /dev/null 2>&1 + $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full done rm -r $STRESS_DIR/*tests/generic/269 +1
-1@@ -23,7 +23,7 @@ _workout() out=$SCRATCH_MNT/fsstress.$$ args=`_scale_fsstress_args -p128 -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out` echo "fsstress $args" >> $seqres.full - $FSSTRESS_PROG $args > /dev/null 2>&1 & + $FSSTRESS_PROG $args >> $seqres.full & pid=$! echo "Run dd writers in parallel" for ((i=0; i < num_iterations; i++))tests/generic/409 +1
-1@@ -58,7 +58,7 @@ fs_stress() -f chown=1 \ -f getdents=1 \ -f fiemap=1 \ - -d $target >/dev/null + -d $target >>$seqres.full sync }tests/generic/410 +1
-1@@ -66,7 +66,7 @@ fs_stress() -f chown=1 \ -f getdents=1 \ -f fiemap=1 \ - -d $target >/dev/null + -d $target >>$seqres.full sync }tests/generic/411 +1
-1@@ -49,7 +49,7 @@ fs_stress() -f chown=1 \ -f getdents=1 \ -f fiemap=1 \ - -d $target >/dev/null + -d $target >>$seqres.full sync }tests/generic/589 +1
-1@@ -48,7 +48,7 @@ fs_stress() { local target=$1 - $FSSTRESS_PROG -n 50 -p 3 -d $target >/dev/null + $FSSTRESS_PROG -n 50 -p 3 -d $target >>$seqres.full sync }tests/xfs/051 +1
-1@@ -38,7 +38,7 @@ _scratch_mount # Start a workload and shutdown the fs. The subsequent mount will require log # recovery. -$FSSTRESS_PROG -n 9999 -p 2 -w -d $SCRATCH_MNT > /dev/null 2>&1 & +$FSSTRESS_PROG -n 9999 -p 2 -w -d $SCRATCH_MNT >> $seqres.full & sleep 5 _scratch_shutdown -f $KILLALL_PROG -q $FSSTRESS_PROGtests/xfs/057 +1
-1@@ -56,7 +56,7 @@ _scratch_mkfs_sized $((1024 * 1024 * 500)) >> $seqres.full 2>&1 || _scratch_mount # populate the fs with some data and cycle the mount to reset the log head/tail -$FSSTRESS_PROG -d $SCRATCH_MNT -z -fcreat=1 -p 4 -n 100000 > /dev/null 2>&1 +$FSSTRESS_PROG -d $SCRATCH_MNT -z -fcreat=1 -p 4 -n 100000 >> $seqres.full _scratch_cycle_mount || _fail "cycle mount failed" # Pin the tail and start a file removal workload. File removal tends totests/xfs/297 +1
-1@@ -39,7 +39,7 @@ _scratch_mount STRESS_DIR="$SCRATCH_MNT/testdir" mkdir -p $STRESS_DIR -$FSSTRESS_PROG -d $STRESS_DIR -n 100 -p 1000 $FSSTRESS_AVOID >/dev/null 2>&1 & +$FSSTRESS_PROG -d $STRESS_DIR -n 100 -p 1000 $FSSTRESS_AVOID >>$seqres.full & # Freeze/unfreeze file system randomly echo "Start freeze/unfreeze randomly" | tee -a $seqres.fulltests/xfs/305 +1
-1@@ -36,7 +36,7 @@ _exercise() _qmount mkdir -p $QUOTA_DIR - $FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >/dev/null 2>&1 & + $FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >>$seqres.full & sleep 10 $XFS_QUOTA_PROG -x -c "disable -$type" $SCRATCH_DEV sleep 5tests/xfs/538 +1
-1@@ -63,7 +63,7 @@ $FSSTRESS_PROG -d $SCRATCH_MNT \ -f readv=0 \ -f stat=0 \ -f aread=0 \ - -f dread=0 > /dev/null 2>&1 + -f dread=0 >> $seqres.full # success, all done status=0Signature · 1 line
2.40.1
PATCH 2/2 btrfs/192: use append operator to output log replay results to $seqres.full
In reply to [email protected]From: Filipe Manana <[email protected]>
After doing log replay, btrfs/192 is overwriting the $seqres.full file because it uses the plain ">" redirect operator, instead of an append ">>" redirect operator. As a consequence it is overriding the file and eliminating any previous output that may be useful to debug a test failure (such as the fsstress seed or mkfs results). So use >> instead of >.
--- tests/btrfs/192 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/btrfs/192 +1 -1
@@ -121,7 +121,7 @@ log_writes_fast_replay_check() --replay $blkdev --check $check_point --fsck "$fsck_command" \ &> $tmp.full_fsck ret=$? - tail -n 150 $tmp.full_fsck > $seqres.full + tail -n 150 $tmp.full_fsck >> $seqres.full [ $ret -ne 0 ] && _fail "fsck failed during replay" }
Signature · 1 line
2.40.1
Re: [PATCH 2/2] btrfs/192: use append operator to output log replay results to $seqres.full
Quoted 10 lines · On 03/10/2023 19:57, [email protected] wrote:
From: Filipe Manana <[email protected]>
After doing log replay, btrfs/192 is overwriting the $seqres.full file because it uses the plain ">" redirect operator, instead of an append ">>" redirect operator. As a consequence it is overriding the file and eliminating any previous output that may be useful to debug a test failure (such as the fsstress seed or mkfs results). So use >> instead of >.
Signed-off-by Filipe Manana <[email protected]>
Quoted 17 lines
--- tests/btrfs/192 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/btrfs/192 +1
-1@@ -121,7 +121,7 @@ log_writes_fast_replay_check() --replay $blkdev --check $check_point --fsck "$fsck_command" \ &> $tmp.full_fsck ret=$? - tail -n 150 $tmp.full_fsck > $seqres.full + tail -n 150 $tmp.full_fsck >> $seqres.full [ $ret -ne 0 ] && _fail "fsck failed during replay" }
Quoted 6 lines · On 2023/10/3 22:27, [email protected] wrote:
From: Filipe Manana <[email protected]>
Some tests that use fsstress are harder to debug than necessary because they redirect fsstress' stdout to
/dev/nullinstead of $seqres.full. This means we have no way of knowing the seed used by fsstress which often helps to trigger a bug/failure. More details on the change logs of each patch.
Thanks,
Qu
Quoted 42 lines
Filipe Manana (2):
fstests: redirect fsstress' stdout to $seqres.full instead of/dev/nullbtrfs/192: use append operator to output log replay results to $seqres.fulltests/btrfs/028 | 2 +- tests/btrfs/049 | 2 +- tests/btrfs/060 | 2 +- tests/btrfs/061 | 2 +- tests/btrfs/062 | 2 +- tests/btrfs/063 | 2 +- tests/btrfs/064 | 2 +- tests/btrfs/065 | 2 +- tests/btrfs/066 | 2 +- tests/btrfs/067 | 2 +- tests/btrfs/068 | 2 +- tests/btrfs/069 | 2 +- tests/btrfs/070 | 2 +- tests/btrfs/071 | 2 +- tests/btrfs/072 | 2 +- tests/btrfs/073 | 2 +- tests/btrfs/074 | 2 +- tests/btrfs/136 | 2 +- tests/btrfs/192 | 4 ++-- tests/btrfs/232 | 2 +- tests/btrfs/261 | 2 +- tests/btrfs/286 | 2 +- tests/ext4/057 | 2 +- tests/ext4/307 | 2 +- tests/generic/068 | 2 +- tests/generic/269 | 2 +- tests/generic/409 | 2 +- tests/generic/410 | 2 +- tests/generic/411 | 2 +- tests/generic/589 | 2 +- tests/xfs/051 | 2 +- tests/xfs/057 | 2 +- tests/xfs/297 | 2 +- tests/xfs/305 | 2 +- tests/xfs/538 | 2 +- 35 files changed, 36 insertions(+), 36 deletions(-)