Skip to contentSkip to conversation

fstests: filter out fsstress error output

PATCH In review Zorro Lang 4 participants 6 messages Oct 18, 2023 – Oct 21, 2023 Btrfs file system

lore
Share & tools
lore

Zorro Lang

author
#0 lore raw

PATCH 1/1 fstests: filter out fsstress error output

The f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") did lots of changes as below:

-$FSSTRESS_PROG $args >/dev/null 2>&1 &
+$FSSTRESS_PROG $args >>$seqres.full &

Although it's good to replace /dev/null with $seqres.full, but the change also removed the "2>&1", that againsts the original behavior. Some test cases might want to ignore fsstress error output, but now the error output breaks the gardon image. For example:

  FSTYP         -- xfs (non-debug)
  PLATFORM      -- Linux/s390x xxx-xxx-xxx
  MKFS_OPTIONS  -- -f -m crc=1,finobt=1,reflink=1,rmapbt=1,bigtime=1,inobtcount=1 -b size=1024 /dev/loop1

MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 /dev/loop1 /mnt/fstests/SCRATCH_DIR

generic/269 - output mismatch (see /var/lib/xfstests/results//generic/269.out.bad)
--- tests/generic/269.out 2023-10-17 22:32:46.162110249 -0400
+++ /var/lib/xfstests/results//generic/269.out.bad 2023-10-17 23:07:45.752145653 -0400
@@ -3,3 +3,60 @@
Run fsstress

Run dd writers in parallel
+p36: No such file or directory
+p41: No such file or directory
+p42: No such file or directory
+p43: No such file or directory
...

The generic/269 hopes to run fsstress with ENOSPC error, so it redirects stderr to /dev/null. But now it fails.

The f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") only wants to redirect stdout, so we'd better to keep stderr output to /dev/null, if a case hopes to do that.

Fixes f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null")

---

Hi,

This patch only trys to bring "2>&1" back, if case has it at beginning. To make sure we don't break the original behavior of these cases.

If some of below cases really want to remove the "2>&1", better to do that in another patch, and show a proper reason.

Thanks,
Zorro

 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/xfs/051     | 2 +-
 tests/xfs/057     | 2 +-
 tests/xfs/297     | 2 +-
 tests/xfs/305     | 2 +-
 tests/xfs/538     | 2 +-
 31 files changed, 31 insertions(+), 31 deletions(-)
tests/btrfs/028 +1 -1
index d860974e..c4853e06 100755
@@ -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 >>$seqres.full &
+$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 fsstress_pid=$!
 
 echo "Start balance" >>$seqres.full
tests/btrfs/049 +1 -1
index c48e4087..e5f37ccd 100755
@@ -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 >>$seqres.full
+$FSSTRESS_PROG $args >>$seqres.full 2>&1
 
 # Start and pause balance to ensure it will be restored on remount
 echo "Start balance" >>$seqres.full
tests/btrfs/060 +1 -1
index a0184891..5c10fc51 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/061 +1 -1
index c1010413..407066e3 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/062 +1 -1
index 818a0156..dacf56db 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/063 +1 -1
index 2f771baf..88d0ed21 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/064 +1 -1
index e9b46ce6..cad78248 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	# Start both balance and replace in the background.
tests/btrfs/065 +1 -1
index c4b6aafe..d388f1e1 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	# make sure the stop sign is not there
tests/btrfs/066 +1 -1
index a29034bb..ecb35f38 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	# make sure the stop sign is not there
tests/btrfs/067 +1 -1
index 709db155..d9808177 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	# make sure the stop sign is not there
tests/btrfs/068 +1 -1
index 15fd41db..321bb4d2 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	# make sure the stop sign is not there
tests/btrfs/069 +1 -1
index 139dde48..4a65c7e5 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/070 +1 -1
index 54aa275c..b823d95b 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/071 +1 -1
index 6ebbd8cc..ff16d5ac 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/072 +1 -1
index 4b6b6fb5..3eda8dfb 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start scrub worker: " >>$seqres.full
tests/btrfs/073 +1 -1
index b1604f94..d3264f3b 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start scrub worker: " >>$seqres.full
tests/btrfs/074 +1 -1
index 9b22c620..3d08415c 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start defrag worker: " >>$seqres.full
tests/btrfs/136 +1 -1
index 70e836a5..fd637f33 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 	wait $fsstress_pid
 }
tests/btrfs/192 +1 -1
index 00ea1478..0d926635 100755
@@ -140,7 +140,7 @@ pid1=$!
 delete_workload &
 pid2=$!
 
-"$FSSTRESS_PROG" $fsstress_args >> $seqres.full &
+"$FSSTRESS_PROG" $fsstress_args >> $seqres.full 2>&1 &
 sleep $runtime
 
 "$KILLALL_PROG" -q "$FSSTRESS_PROG" &> /dev/null
tests/btrfs/232 +1 -1
index 84c39c07..8ac0ce7c 100755
@@ -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 >> $seqres.full
+		$FSSTRESS_PROG $args >> $seqres.full 2>&1
 	done
 }
 
tests/btrfs/261 +1 -1
index 58fa8e75..9968c694 100755
@@ -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 >> $seqres.full
+	$FSSTRESS_PROG -f setattr=0 -d $SCRATCH_MNT -w -n 3000 >> $seqres.full 2>&1
 	sync
 
 	# Save the fssum of this fs
tests/btrfs/286 +1 -1
index 71f6d4bd..ab4f9b24 100755
@@ -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 >> $seqres.full
+	$FSSTRESS_PROG -p 10 -n 200 -d $SCRATCH_MNT >> $seqres.full 2>&1
 	sync
 
 	# Generate fssum for later verification, here we only care
tests/ext4/057 +1 -1
index 6babedb2..b6d19339 100755
@@ -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 >> $seqres.full &
+$FSSTRESS_PROG $fsstress_args >> $seqres.full 2>&1 &
 fsstress_pid=$!
 
 for n in $(seq 1 20); do
tests/ext4/307 +1 -1
index 8b1cfc9e..75a8bff0 100755
@@ -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 >> $seqres.full
+	$FSSTRESS_PROG $args >> $seqres.full 2>&1
 	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
index af527fee..b2967d13 100755
@@ -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 >>$seqres.full
+      $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full 2>&1
     done
 
     rm -r $STRESS_DIR/*
tests/generic/269 +1 -1
index b852f6bf..eddca10d 100755
@@ -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 >> $seqres.full &
+	$FSSTRESS_PROG $args >> $seqres.full 2>&1 &
 	pid=$!
 	echo "Run dd writers in parallel"
 	for ((i=0; i < num_iterations; i++))
tests/xfs/051 +1 -1
index 1c670964..eca67bb8 100755
@@ -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 >> $seqres.full &
+$FSSTRESS_PROG -n 9999 -p 2 -w -d $SCRATCH_MNT >> $seqres.full 2>&1 &
 sleep 5
 _scratch_shutdown -f
 $KILLALL_PROG -q $FSSTRESS_PROG
tests/xfs/057 +1 -1
index 6af14c80..9b52da79 100755
@@ -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 >> $seqres.full
+$FSSTRESS_PROG -d $SCRATCH_MNT -z -fcreat=1 -p 4 -n 100000 >> $seqres.full 2>&1
 _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
index 1d101876..cd7bccb2 100755
@@ -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 >>$seqres.full &
+$FSSTRESS_PROG -d $STRESS_DIR -n 100 -p 1000 $FSSTRESS_AVOID >>$seqres.full 2>&1 &
 
 # Freeze/unfreeze file system randomly
 echo "Start freeze/unfreeze randomly" | tee -a $seqres.full
tests/xfs/305 +1 -1
index d8a6712e..a93576bc 100755
@@ -36,7 +36,7 @@ _exercise()
 	_qmount
 	mkdir -p $QUOTA_DIR
 
-	$FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >>$seqres.full &
+	$FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >>$seqres.full 2>&1 &
 	sleep 10
 	$XFS_QUOTA_PROG -x -c "disable -$type" $SCRATCH_DEV
 	sleep 5
tests/xfs/538 +1 -1
index 0b5772a1..d36673a9 100755
@@ -63,7 +63,7 @@ $FSSTRESS_PROG -d $SCRATCH_MNT \
 		-f readv=0 \
 		-f stat=0 \
 		-f aread=0 \
-		-f dread=0 >> $seqres.full
+		-f dread=0 >> $seqres.full 2>&1
 
 # success, all done
 status=0
Signature · 1 line
2.41.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Zorro Lang

The f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") did lots of changes as below:

Instead of "The f55.." use "Commit f55..."

Quoted 6 lines

-$FSSTRESS_PROG $args >/dev/null 2>&1 &
+$FSSTRESS_PROG $args >>$seqres.full &

Although it's good to replace /dev/null with $seqres.full, but the change also removed the "2>&1", that againsts the original behavior.

againsts -> against

Quoted 2 lines

Some test cases might want to ignore fsstress error output, but now the error output breaks the gardon image. For example:

gardon image -> golden output?

Quoted 19 lines
  FSTYP         -- xfs (non-debug)
  PLATFORM      -- Linux/s390x xxx-xxx-xxx
  MKFS_OPTIONS  -- -f -m crc=1,finobt=1,reflink=1,rmapbt=1,bigtime=1,inobtcount=1 -b size=1024 /dev/loop1

MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 /dev/loop1 /mnt/fstests/SCRATCH_DIR

generic/269 - output mismatch (see /var/lib/xfstests/results//generic/269.out.bad)
--- tests/generic/269.out 2023-10-17 22:32:46.162110249 -0400
+++ /var/lib/xfstests/results//generic/269.out.bad 2023-10-17 23:07:45.752145653 -0400
@@ -3,3 +3,60 @@
Run fsstress

Run dd writers in parallel
+p36: No such file or directory
+p41: No such file or directory
+p42: No such file or directory
+p43: No such file or directory
...

Quoted 2 lines

The generic/269 hopes to run fsstress with ENOSPC error, so it redirects stderr to /dev/null. But now it fails.

Ok, for tests that exercise ENOSPC that's what we want to do (though I haven't run into such failures
maybe because of my somewhat large scratch/test devices).

However, for many tests we don't want to ignore errors from fsstress - ignoring such errors might
just hide real bugs and regressions - it's useful to fail if fsstress fails for some reason. In fact once, long ago, we had
such a bug in a generic test: fsstress was being called incorrectly so it did nothing, but it was not caught
because stderr was unncessarily being redirected to /dev/null or the .full file.

Quoted 4 lines

The f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") only wants to redirect stdout, so we'd better to keep stderr output to /dev/null, if a case hopes to do that.

Here it says this change redirects stderr to /dev/null but it's redirecting it to the .full file (which is actually more useful).

Quoted 5 lines
Fixes f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null")

---

Quoted 7 lines

Hi,

This patch only trys to bring "2>&1" back, if case has it at beginning. To make sure we don't break the original behavior of these cases.

If some of below cases really want to remove the "2>&1", better to do that in another patch, and show a proper reason.

Sounds reasonable.

Thanks.

Quoted 443 lines

Thanks,
Zorro

 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/xfs/051     | 2 +-
 tests/xfs/057     | 2 +-
 tests/xfs/297     | 2 +-
 tests/xfs/305     | 2 +-
 tests/xfs/538     | 2 +-
 31 files changed, 31 insertions(+), 31 deletions(-)
tests/btrfs/028 +1 -1
index d860974e..c4853e06 100755
@@ -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 >>$seqres.full &
+$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 fsstress_pid=$!
 
 echo "Start balance" >>$seqres.full
tests/btrfs/049 +1 -1
index c48e4087..e5f37ccd 100755
@@ -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 >>$seqres.full
+$FSSTRESS_PROG $args >>$seqres.full 2>&1
 
 # Start and pause balance to ensure it will be restored on remount
 echo "Start balance" >>$seqres.full
tests/btrfs/060 +1 -1
index a0184891..5c10fc51 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
 
        echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/061 +1 -1
index c1010413..407066e3 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
 
        echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/062 +1 -1
index 818a0156..dacf56db 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
 
        echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/063 +1 -1
index 2f771baf..88d0ed21 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
 
        echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/064 +1 -1
index e9b46ce6..cad78248 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
 
        # Start both balance and replace in the background.
tests/btrfs/065 +1 -1
index c4b6aafe..d388f1e1 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
 
        # make sure the stop sign is not there
tests/btrfs/066 +1 -1
index a29034bb..ecb35f38 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
 
        # make sure the stop sign is not there
tests/btrfs/067 +1 -1
index 709db155..d9808177 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
 
        # make sure the stop sign is not there
tests/btrfs/068 +1 -1
index 15fd41db..321bb4d2 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
 
        # make sure the stop sign is not there
tests/btrfs/069 +1 -1
index 139dde48..4a65c7e5 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
 
        echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/070 +1 -1
index 54aa275c..b823d95b 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
 
        echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/071 +1 -1
index 6ebbd8cc..ff16d5ac 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
 
        echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/072 +1 -1
index 4b6b6fb5..3eda8dfb 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
 
        echo -n "Start scrub worker: " >>$seqres.full
tests/btrfs/073 +1 -1
index b1604f94..d3264f3b 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
 
        echo -n "Start scrub worker: " >>$seqres.full
tests/btrfs/074 +1 -1
index 9b22c620..3d08415c 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
 
        echo -n "Start defrag worker: " >>$seqres.full
tests/btrfs/136 +1 -1
index 70e836a5..fd637f33 100755
@@ -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 >>$seqres.full &
+       $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
        fsstress_pid=$!
        wait $fsstress_pid
 }
tests/btrfs/192 +1 -1
index 00ea1478..0d926635 100755
@@ -140,7 +140,7 @@ pid1=$!
 delete_workload &
 pid2=$!
 
-"$FSSTRESS_PROG" $fsstress_args >> $seqres.full &
+"$FSSTRESS_PROG" $fsstress_args >> $seqres.full 2>&1 &
 sleep $runtime
 
 "$KILLALL_PROG" -q "$FSSTRESS_PROG" &> /dev/null
tests/btrfs/232 +1 -1
index 84c39c07..8ac0ce7c 100755
@@ -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 >> $seqres.full
+               $FSSTRESS_PROG $args >> $seqres.full 2>&1
        done
 }
 
tests/btrfs/261 +1 -1
index 58fa8e75..9968c694 100755
@@ -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 >> $seqres.full
+       $FSSTRESS_PROG -f setattr=0 -d $SCRATCH_MNT -w -n 3000 >> $seqres.full 2>&1
        sync
 
        # Save the fssum of this fs
tests/btrfs/286 +1 -1
index 71f6d4bd..ab4f9b24 100755
@@ -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 >> $seqres.full
+       $FSSTRESS_PROG -p 10 -n 200 -d $SCRATCH_MNT >> $seqres.full 2>&1
        sync
 
        # Generate fssum for later verification, here we only care
tests/ext4/057 +1 -1
index 6babedb2..b6d19339 100755
@@ -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 >> $seqres.full &
+$FSSTRESS_PROG $fsstress_args >> $seqres.full 2>&1 &
 fsstress_pid=$!
 
 for n in $(seq 1 20); do
tests/ext4/307 +1 -1
index 8b1cfc9e..75a8bff0 100755
@@ -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 >> $seqres.full
+       $FSSTRESS_PROG $args >> $seqres.full 2>&1
        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
index af527fee..b2967d13 100755
@@ -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 >>$seqres.full
+      $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full 2>&1
     done
 
     rm -r $STRESS_DIR/*
tests/generic/269 +1 -1
index b852f6bf..eddca10d 100755
@@ -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 >> $seqres.full &
+       $FSSTRESS_PROG $args >> $seqres.full 2>&1 &
        pid=$!
        echo "Run dd writers in parallel"
        for ((i=0; i < num_iterations; i++))
tests/xfs/051 +1 -1
index 1c670964..eca67bb8 100755
@@ -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 >> $seqres.full &
+$FSSTRESS_PROG -n 9999 -p 2 -w -d $SCRATCH_MNT >> $seqres.full 2>&1 &
 sleep 5
 _scratch_shutdown -f
 $KILLALL_PROG -q $FSSTRESS_PROG
tests/xfs/057 +1 -1
index 6af14c80..9b52da79 100755
@@ -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 >> $seqres.full
+$FSSTRESS_PROG -d $SCRATCH_MNT -z -fcreat=1 -p 4 -n 100000 >> $seqres.full 2>&1
 _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
index 1d101876..cd7bccb2 100755
@@ -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 >>$seqres.full &
+$FSSTRESS_PROG -d $STRESS_DIR -n 100 -p 1000 $FSSTRESS_AVOID >>$seqres.full 2>&1 &
 
 # Freeze/unfreeze file system randomly
 echo "Start freeze/unfreeze randomly" | tee -a $seqres.full
tests/xfs/305 +1 -1
index d8a6712e..a93576bc 100755
@@ -36,7 +36,7 @@ _exercise()
        _qmount
        mkdir -p $QUOTA_DIR
 
-       $FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >>$seqres.full &
+       $FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >>$seqres.full 2>&1 &
        sleep 10
        $XFS_QUOTA_PROG -x -c "disable -$type" $SCRATCH_DEV
        sleep 5
tests/xfs/538 +1 -2
index 0b5772a1..d36673a9 100755
@@ -63,7 +63,7 @@ $FSSTRESS_PROG -d $SCRATCH_MNT \
                -f readv=0 \
                -f stat=0 \
                -f aread=0 \
-               -f dread=0 >> $seqres.full
+               -f dread=0 >> $seqres.full 2>&1
 
 # success, all done
 status=0
--

2.41.0

#2 lore raw
In reply to Zorro Lang
Quoted 70 lines · Zorro Lang

The f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") did lots of changes as below:

-$FSSTRESS_PROG $args >/dev/null 2>&1 &
+$FSSTRESS_PROG $args >>$seqres.full &

Although it's good to replace /dev/null with $seqres.full, but the change also removed the "2>&1", that againsts the original behavior. Some test cases might want to ignore fsstress error output, but now the error output breaks the gardon image. For example:

  FSTYP         -- xfs (non-debug)
  PLATFORM      -- Linux/s390x xxx-xxx-xxx
  MKFS_OPTIONS  -- -f -m crc=1,finobt=1,reflink=1,rmapbt=1,bigtime=1,inobtcount=1 -b size=1024 /dev/loop1

MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 /dev/loop1 /mnt/fstests/SCRATCH_DIR

generic/269 - output mismatch (see /var/lib/xfstests/results//generic/269.out.bad)
--- tests/generic/269.out 2023-10-17 22:32:46.162110249 -0400
+++ /var/lib/xfstests/results//generic/269.out.bad 2023-10-17 23:07:45.752145653 -0400
@@ -3,3 +3,60 @@
Run fsstress

Run dd writers in parallel
+p36: No such file or directory
+p41: No such file or directory
+p42: No such file or directory
+p43: No such file or directory
...

The generic/269 hopes to run fsstress with ENOSPC error, so it redirects stderr to /dev/null. But now it fails.

The f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") only wants to redirect stdout, so we'd better to keep stderr output to /dev/null, if a case hopes to do that.

Fixes f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null")

---

Hi,

This patch only trys to bring "2>&1" back, if case has it at beginning. To make sure we don't break the original behavior of these cases.

If some of below cases really want to remove the "2>&1", better to do that in another patch, and show a proper reason.

Thanks,
Zorro

 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 +-
Quoted 8 lines
 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/xfs/051     | 2 +-

These two changes (269, 051) duplicates
https://lore.kernel.org/fstests/169687550821.3948976.6892161616008393594.stgit@frogsfrogsfrogs/T/#m613d9379a026fcae5357650af09d5d0725d324f5

AFAICT the other generic and xfs tests aren't setting up fsstress to hit errors, so we should be dumping them to the golden output because that's a sign that something has gone very wrong.

I suppose prior to f55e46d629 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") we'd discard the error messages.

OTOH I've now run the generic and xfs tests with stderr going to the .out file and none of them complain, so I'd prefer to see those tests stay the way they are now.

--D

Quoted 412 lines
 tests/xfs/057     | 2 +-
 tests/xfs/297     | 2 +-
 tests/xfs/305     | 2 +-
 tests/xfs/538     | 2 +-
 31 files changed, 31 insertions(+), 31 deletions(-)
tests/btrfs/028 +1 -1
index d860974e..c4853e06 100755
@@ -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 >>$seqres.full &
+$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 fsstress_pid=$!
 
 echo "Start balance" >>$seqres.full
tests/btrfs/049 +1 -1
index c48e4087..e5f37ccd 100755
@@ -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 >>$seqres.full
+$FSSTRESS_PROG $args >>$seqres.full 2>&1
 
 # Start and pause balance to ensure it will be restored on remount
 echo "Start balance" >>$seqres.full
tests/btrfs/060 +1 -1
index a0184891..5c10fc51 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/061 +1 -1
index c1010413..407066e3 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/062 +1 -1
index 818a0156..dacf56db 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/063 +1 -1
index 2f771baf..88d0ed21 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/064 +1 -1
index e9b46ce6..cad78248 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	# Start both balance and replace in the background.
tests/btrfs/065 +1 -1
index c4b6aafe..d388f1e1 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	# make sure the stop sign is not there
tests/btrfs/066 +1 -1
index a29034bb..ecb35f38 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	# make sure the stop sign is not there
tests/btrfs/067 +1 -1
index 709db155..d9808177 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	# make sure the stop sign is not there
tests/btrfs/068 +1 -1
index 15fd41db..321bb4d2 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	# make sure the stop sign is not there
tests/btrfs/069 +1 -1
index 139dde48..4a65c7e5 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/070 +1 -1
index 54aa275c..b823d95b 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/071 +1 -1
index 6ebbd8cc..ff16d5ac 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/072 +1 -1
index 4b6b6fb5..3eda8dfb 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start scrub worker: " >>$seqres.full
tests/btrfs/073 +1 -1
index b1604f94..d3264f3b 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start scrub worker: " >>$seqres.full
tests/btrfs/074 +1 -1
index 9b22c620..3d08415c 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start defrag worker: " >>$seqres.full
tests/btrfs/136 +1 -1
index 70e836a5..fd637f33 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 	wait $fsstress_pid
 }
tests/btrfs/192 +1 -1
index 00ea1478..0d926635 100755
@@ -140,7 +140,7 @@ pid1=$!
 delete_workload &
 pid2=$!
 
-"$FSSTRESS_PROG" $fsstress_args >> $seqres.full &
+"$FSSTRESS_PROG" $fsstress_args >> $seqres.full 2>&1 &
 sleep $runtime
 
 "$KILLALL_PROG" -q "$FSSTRESS_PROG" &> /dev/null
tests/btrfs/232 +1 -1
index 84c39c07..8ac0ce7c 100755
@@ -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 >> $seqres.full
+		$FSSTRESS_PROG $args >> $seqres.full 2>&1
 	done
 }
 
tests/btrfs/261 +1 -1
index 58fa8e75..9968c694 100755
@@ -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 >> $seqres.full
+	$FSSTRESS_PROG -f setattr=0 -d $SCRATCH_MNT -w -n 3000 >> $seqres.full 2>&1
 	sync
 
 	# Save the fssum of this fs
tests/btrfs/286 +1 -1
index 71f6d4bd..ab4f9b24 100755
@@ -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 >> $seqres.full
+	$FSSTRESS_PROG -p 10 -n 200 -d $SCRATCH_MNT >> $seqres.full 2>&1
 	sync
 
 	# Generate fssum for later verification, here we only care
tests/ext4/057 +1 -1
index 6babedb2..b6d19339 100755
@@ -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 >> $seqres.full &
+$FSSTRESS_PROG $fsstress_args >> $seqres.full 2>&1 &
 fsstress_pid=$!
 
 for n in $(seq 1 20); do
tests/ext4/307 +1 -1
index 8b1cfc9e..75a8bff0 100755
@@ -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 >> $seqres.full
+	$FSSTRESS_PROG $args >> $seqres.full 2>&1
 	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
index af527fee..b2967d13 100755
@@ -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 >>$seqres.full
+      $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full 2>&1
     done
 
     rm -r $STRESS_DIR/*
tests/generic/269 +1 -1
index b852f6bf..eddca10d 100755
@@ -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 >> $seqres.full &
+	$FSSTRESS_PROG $args >> $seqres.full 2>&1 &
 	pid=$!
 	echo "Run dd writers in parallel"
 	for ((i=0; i < num_iterations; i++))
tests/xfs/051 +1 -1
index 1c670964..eca67bb8 100755
@@ -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 >> $seqres.full &
+$FSSTRESS_PROG -n 9999 -p 2 -w -d $SCRATCH_MNT >> $seqres.full 2>&1 &
 sleep 5
 _scratch_shutdown -f
 $KILLALL_PROG -q $FSSTRESS_PROG
tests/xfs/057 +1 -1
index 6af14c80..9b52da79 100755
@@ -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 >> $seqres.full
+$FSSTRESS_PROG -d $SCRATCH_MNT -z -fcreat=1 -p 4 -n 100000 >> $seqres.full 2>&1
 _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
index 1d101876..cd7bccb2 100755
@@ -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 >>$seqres.full &
+$FSSTRESS_PROG -d $STRESS_DIR -n 100 -p 1000 $FSSTRESS_AVOID >>$seqres.full 2>&1 &
 
 # Freeze/unfreeze file system randomly
 echo "Start freeze/unfreeze randomly" | tee -a $seqres.full
tests/xfs/305 +1 -1
index d8a6712e..a93576bc 100755
@@ -36,7 +36,7 @@ _exercise()
 	_qmount
 	mkdir -p $QUOTA_DIR
 
-	$FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >>$seqres.full &
+	$FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >>$seqres.full 2>&1 &
 	sleep 10
 	$XFS_QUOTA_PROG -x -c "disable -$type" $SCRATCH_DEV
 	sleep 5
tests/xfs/538 +1 -1
index 0b5772a1..d36673a9 100755
@@ -63,7 +63,7 @@ $FSSTRESS_PROG -d $SCRATCH_MNT \
 		-f readv=0 \
 		-f stat=0 \
 		-f aread=0 \
-		-f dread=0 >> $seqres.full
+		-f dread=0 >> $seqres.full 2>&1
 
 # success, all done
 status=0
Signature · 1 line
2.41.0
#3 lore raw
Quoted 80 lines · Darrick J. Wong
Quoted 70 lines · Zorro Lang

The f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") did lots of changes as below:

-$FSSTRESS_PROG $args >/dev/null 2>&1 &
+$FSSTRESS_PROG $args >>$seqres.full &

Although it's good to replace /dev/null with $seqres.full, but the change also removed the "2>&1", that againsts the original behavior. Some test cases might want to ignore fsstress error output, but now the error output breaks the gardon image. For example:

  FSTYP         -- xfs (non-debug)
  PLATFORM      -- Linux/s390x xxx-xxx-xxx
  MKFS_OPTIONS  -- -f -m crc=1,finobt=1,reflink=1,rmapbt=1,bigtime=1,inobtcount=1 -b size=1024 /dev/loop1

MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 /dev/loop1 /mnt/fstests/SCRATCH_DIR

generic/269 - output mismatch (see /var/lib/xfstests/results//generic/269.out.bad)
--- tests/generic/269.out 2023-10-17 22:32:46.162110249 -0400
+++ /var/lib/xfstests/results//generic/269.out.bad 2023-10-17 23:07:45.752145653 -0400
@@ -3,3 +3,60 @@
Run fsstress

Run dd writers in parallel
+p36: No such file or directory
+p41: No such file or directory
+p42: No such file or directory
+p43: No such file or directory
...

The generic/269 hopes to run fsstress with ENOSPC error, so it redirects stderr to /dev/null. But now it fails.

The f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") only wants to redirect stdout, so we'd better to keep stderr output to /dev/null, if a case hopes to do that.

Fixes f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null")

---

Hi,

This patch only trys to bring "2>&1" back, if case has it at beginning. To make sure we don't break the original behavior of these cases.

If some of below cases really want to remove the "2>&1", better to do that in another patch, and show a proper reason.

Thanks,
Zorro

 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 +-
Quoted 8 lines
 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/xfs/051     | 2 +-
Quoted 2 lines

These two changes (269, 051) duplicates
https://lore.kernel.org/fstests/169687550821.3948976.6892161616008393594.stgit@frogsfrogsfrogs/T/#m613d9379a026fcae5357650af09d5d0725d324f5

Thanks for fixing it.

Quoted 11 lines

AFAICT the other generic and xfs tests aren't setting up fsstress to hit errors, so we should be dumping them to the golden output because that's a sign that something has gone very wrong.

I suppose prior to f55e46d629 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") we'd discard the error messages.

OTOH I've now run the generic and xfs tests with stderr going to the .out file and none of them complain, so I'd prefer to see those tests stay the way they are now.

OK, due to that commit affects btrfs specific cases more, besides btrfs part there're only below 5 cases removed the "2>&1":

ext4/057
ext4/307
generic/068
generic/269
xfs/051

As we've reviewed generic and xfs part, and will fix generic/269 and xfs/051, and those two ext4 cases look good without the "2>&1". So *if btrfs list feels good without the stderr filter*, I can drop this patch.

Thanks,
Zorro

Quoted 416 lines

--D

Quoted 412 lines
 tests/xfs/057     | 2 +-
 tests/xfs/297     | 2 +-
 tests/xfs/305     | 2 +-
 tests/xfs/538     | 2 +-
 31 files changed, 31 insertions(+), 31 deletions(-)
tests/btrfs/028 +1 -1
index d860974e..c4853e06 100755
@@ -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 >>$seqres.full &
+$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 fsstress_pid=$!
 
 echo "Start balance" >>$seqres.full
tests/btrfs/049 +1 -1
index c48e4087..e5f37ccd 100755
@@ -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 >>$seqres.full
+$FSSTRESS_PROG $args >>$seqres.full 2>&1
 
 # Start and pause balance to ensure it will be restored on remount
 echo "Start balance" >>$seqres.full
tests/btrfs/060 +1 -1
index a0184891..5c10fc51 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/061 +1 -1
index c1010413..407066e3 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/062 +1 -1
index 818a0156..dacf56db 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/063 +1 -1
index 2f771baf..88d0ed21 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/064 +1 -1
index e9b46ce6..cad78248 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	# Start both balance and replace in the background.
tests/btrfs/065 +1 -1
index c4b6aafe..d388f1e1 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	# make sure the stop sign is not there
tests/btrfs/066 +1 -1
index a29034bb..ecb35f38 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	# make sure the stop sign is not there
tests/btrfs/067 +1 -1
index 709db155..d9808177 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	# make sure the stop sign is not there
tests/btrfs/068 +1 -1
index 15fd41db..321bb4d2 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	# make sure the stop sign is not there
tests/btrfs/069 +1 -1
index 139dde48..4a65c7e5 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/070 +1 -1
index 54aa275c..b823d95b 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/071 +1 -1
index 6ebbd8cc..ff16d5ac 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/072 +1 -1
index 4b6b6fb5..3eda8dfb 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start scrub worker: " >>$seqres.full
tests/btrfs/073 +1 -1
index b1604f94..d3264f3b 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start scrub worker: " >>$seqres.full
tests/btrfs/074 +1 -1
index 9b22c620..3d08415c 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 
 	echo -n "Start defrag worker: " >>$seqres.full
tests/btrfs/136 +1 -1
index 70e836a5..fd637f33 100755
@@ -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 >>$seqres.full &
+	$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 	fsstress_pid=$!
 	wait $fsstress_pid
 }
tests/btrfs/192 +1 -1
index 00ea1478..0d926635 100755
@@ -140,7 +140,7 @@ pid1=$!
 delete_workload &
 pid2=$!
 
-"$FSSTRESS_PROG" $fsstress_args >> $seqres.full &
+"$FSSTRESS_PROG" $fsstress_args >> $seqres.full 2>&1 &
 sleep $runtime
 
 "$KILLALL_PROG" -q "$FSSTRESS_PROG" &> /dev/null
tests/btrfs/232 +1 -1
index 84c39c07..8ac0ce7c 100755
@@ -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 >> $seqres.full
+		$FSSTRESS_PROG $args >> $seqres.full 2>&1
 	done
 }
 
tests/btrfs/261 +1 -1
index 58fa8e75..9968c694 100755
@@ -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 >> $seqres.full
+	$FSSTRESS_PROG -f setattr=0 -d $SCRATCH_MNT -w -n 3000 >> $seqres.full 2>&1
 	sync
 
 	# Save the fssum of this fs
tests/btrfs/286 +1 -1
index 71f6d4bd..ab4f9b24 100755
@@ -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 >> $seqres.full
+	$FSSTRESS_PROG -p 10 -n 200 -d $SCRATCH_MNT >> $seqres.full 2>&1
 	sync
 
 	# Generate fssum for later verification, here we only care
tests/ext4/057 +1 -1
index 6babedb2..b6d19339 100755
@@ -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 >> $seqres.full &
+$FSSTRESS_PROG $fsstress_args >> $seqres.full 2>&1 &
 fsstress_pid=$!
 
 for n in $(seq 1 20); do
tests/ext4/307 +1 -1
index 8b1cfc9e..75a8bff0 100755
@@ -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 >> $seqres.full
+	$FSSTRESS_PROG $args >> $seqres.full 2>&1
 	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
index af527fee..b2967d13 100755
@@ -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 >>$seqres.full
+      $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full 2>&1
     done
 
     rm -r $STRESS_DIR/*
tests/generic/269 +1 -1
index b852f6bf..eddca10d 100755
@@ -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 >> $seqres.full &
+	$FSSTRESS_PROG $args >> $seqres.full 2>&1 &
 	pid=$!
 	echo "Run dd writers in parallel"
 	for ((i=0; i < num_iterations; i++))
tests/xfs/051 +1 -1
index 1c670964..eca67bb8 100755
@@ -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 >> $seqres.full &
+$FSSTRESS_PROG -n 9999 -p 2 -w -d $SCRATCH_MNT >> $seqres.full 2>&1 &
 sleep 5
 _scratch_shutdown -f
 $KILLALL_PROG -q $FSSTRESS_PROG
tests/xfs/057 +1 -1
index 6af14c80..9b52da79 100755
@@ -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 >> $seqres.full
+$FSSTRESS_PROG -d $SCRATCH_MNT -z -fcreat=1 -p 4 -n 100000 >> $seqres.full 2>&1
 _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
index 1d101876..cd7bccb2 100755
@@ -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 >>$seqres.full &
+$FSSTRESS_PROG -d $STRESS_DIR -n 100 -p 1000 $FSSTRESS_AVOID >>$seqres.full 2>&1 &
 
 # Freeze/unfreeze file system randomly
 echo "Start freeze/unfreeze randomly" | tee -a $seqres.full
tests/xfs/305 +1 -1
index d8a6712e..a93576bc 100755
@@ -36,7 +36,7 @@ _exercise()
 	_qmount
 	mkdir -p $QUOTA_DIR
 
-	$FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >>$seqres.full &
+	$FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >>$seqres.full 2>&1 &
 	sleep 10
 	$XFS_QUOTA_PROG -x -c "disable -$type" $SCRATCH_DEV
 	sleep 5
tests/xfs/538 +1 -1
index 0b5772a1..d36673a9 100755
@@ -63,7 +63,7 @@ $FSSTRESS_PROG -d $SCRATCH_MNT \
 		-f readv=0 \
 		-f stat=0 \
 		-f aread=0 \
-		-f dread=0 >> $seqres.full
+		-f dread=0 >> $seqres.full 2>&1
 
 # success, all done
 status=0
Signature · 1 line
2.41.0
#4 lore raw
Quoted 108 lines · Zorro Lang
Quoted 80 lines · Darrick J. Wong
Quoted 70 lines · Zorro Lang

The f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") did lots of changes as below:

-$FSSTRESS_PROG $args >/dev/null 2>&1 &
+$FSSTRESS_PROG $args >>$seqres.full &

Although it's good to replace /dev/null with $seqres.full, but the change also removed the "2>&1", that againsts the original behavior. Some test cases might want to ignore fsstress error output, but now the error output breaks the gardon image. For example:

  FSTYP         -- xfs (non-debug)
  PLATFORM      -- Linux/s390x xxx-xxx-xxx
  MKFS_OPTIONS  -- -f -m crc=1,finobt=1,reflink=1,rmapbt=1,bigtime=1,inobtcount=1 -b size=1024 /dev/loop1

MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 /dev/loop1 /mnt/fstests/SCRATCH_DIR

generic/269 - output mismatch (see /var/lib/xfstests/results//generic/269.out.bad)
--- tests/generic/269.out 2023-10-17 22:32:46.162110249 -0400
+++ /var/lib/xfstests/results//generic/269.out.bad 2023-10-17 23:07:45.752145653 -0400
@@ -3,3 +3,60 @@
Run fsstress

Run dd writers in parallel
+p36: No such file or directory
+p41: No such file or directory
+p42: No such file or directory
+p43: No such file or directory
...

The generic/269 hopes to run fsstress with ENOSPC error, so it redirects stderr to /dev/null. But now it fails.

The f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") only wants to redirect stdout, so we'd better to keep stderr output to /dev/null, if a case hopes to do that.

Fixes f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null")

---

Hi,

This patch only trys to bring "2>&1" back, if case has it at beginning. To make sure we don't break the original behavior of these cases.

If some of below cases really want to remove the "2>&1", better to do that in another patch, and show a proper reason.

Thanks,
Zorro

 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 +-
Quoted 8 lines
 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/xfs/051     | 2 +-
Quoted 2 lines

These two changes (269, 051) duplicates
https://lore.kernel.org/fstests/169687550821.3948976.6892161616008393594.stgit@frogsfrogsfrogs/T/#m613d9379a026fcae5357650af09d5d0725d324f5

Thanks for fixing it.

Quoted 11 lines

AFAICT the other generic and xfs tests aren't setting up fsstress to hit errors, so we should be dumping them to the golden output because that's a sign that something has gone very wrong.

I suppose prior to f55e46d629 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") we'd discard the error messages.

OTOH I've now run the generic and xfs tests with stderr going to the .out file and none of them complain, so I'd prefer to see those tests stay the way they are now.

OK, due to that commit affects btrfs specific cases more, besides btrfs part there're only below 5 cases removed the "2>&1":

ext4/057
ext4/307
generic/068
generic/269
xfs/051

Quoted 3 lines

As we've reviewed generic and xfs part, and will fix generic/269 and xfs/051, and those two ext4 cases look good without the "2>&1". So *if btrfs list feels good without the stderr filter*, I can drop this patch.

The stderr filter is not needed for the btrfs tests. None of them expects errors from fsstress, so we want the tests to fail in case fsstress faisl.

Thanks.

Quoted 421 lines

Thanks,
Zorro

Quoted 416 lines

--D

Quoted 412 lines
 tests/xfs/057     | 2 +-
 tests/xfs/297     | 2 +-
 tests/xfs/305     | 2 +-
 tests/xfs/538     | 2 +-
 31 files changed, 31 insertions(+), 31 deletions(-)
tests/btrfs/028 +1 -1
index d860974e..c4853e06 100755
@@ -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 >>$seqres.full &
+$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 fsstress_pid=$!
 
 echo "Start balance" >>$seqres.full
tests/btrfs/049 +1 -1
index c48e4087..e5f37ccd 100755
@@ -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 >>$seqres.full
+$FSSTRESS_PROG $args >>$seqres.full 2>&1
 
 # Start and pause balance to ensure it will be restored on remount
 echo "Start balance" >>$seqres.full
tests/btrfs/060 +1 -1
index a0184891..5c10fc51 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/061 +1 -1
index c1010413..407066e3 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/062 +1 -1
index 818a0156..dacf56db 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/063 +1 -1
index 2f771baf..88d0ed21 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/064 +1 -1
index e9b46ce6..cad78248 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    # Start both balance and replace in the background.
tests/btrfs/065 +1 -1
index c4b6aafe..d388f1e1 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    # make sure the stop sign is not there
tests/btrfs/066 +1 -1
index a29034bb..ecb35f38 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    # make sure the stop sign is not there
tests/btrfs/067 +1 -1
index 709db155..d9808177 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    # make sure the stop sign is not there
tests/btrfs/068 +1 -1
index 15fd41db..321bb4d2 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    # make sure the stop sign is not there
tests/btrfs/069 +1 -1
index 139dde48..4a65c7e5 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/070 +1 -1
index 54aa275c..b823d95b 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/071 +1 -1
index 6ebbd8cc..ff16d5ac 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/072 +1 -1
index 4b6b6fb5..3eda8dfb 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start scrub worker: " >>$seqres.full
tests/btrfs/073 +1 -1
index b1604f94..d3264f3b 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start scrub worker: " >>$seqres.full
tests/btrfs/074 +1 -1
index 9b22c620..3d08415c 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start defrag worker: " >>$seqres.full
tests/btrfs/136 +1 -1
index 70e836a5..fd637f33 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
    wait $fsstress_pid
 }
tests/btrfs/192 +1 -1
index 00ea1478..0d926635 100755
@@ -140,7 +140,7 @@ pid1=$!
 delete_workload &
 pid2=$!
 
-"$FSSTRESS_PROG" $fsstress_args >> $seqres.full &
+"$FSSTRESS_PROG" $fsstress_args >> $seqres.full 2>&1 &
 sleep $runtime
 
 "$KILLALL_PROG" -q "$FSSTRESS_PROG" &> /dev/null
tests/btrfs/232 +1 -1
index 84c39c07..8ac0ce7c 100755
@@ -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 >> $seqres.full
+           $FSSTRESS_PROG $args >> $seqres.full 2>&1
    done
 }
 
tests/btrfs/261 +1 -1
index 58fa8e75..9968c694 100755
@@ -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 >> $seqres.full
+   $FSSTRESS_PROG -f setattr=0 -d $SCRATCH_MNT -w -n 3000 >> $seqres.full 2>&1
    sync
 
    # Save the fssum of this fs
tests/btrfs/286 +1 -1
index 71f6d4bd..ab4f9b24 100755
@@ -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 >> $seqres.full
+   $FSSTRESS_PROG -p 10 -n 200 -d $SCRATCH_MNT >> $seqres.full 2>&1
    sync
 
    # Generate fssum for later verification, here we only care
tests/ext4/057 +1 -1
index 6babedb2..b6d19339 100755
@@ -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 >> $seqres.full &
+$FSSTRESS_PROG $fsstress_args >> $seqres.full 2>&1 &
 fsstress_pid=$!
 
 for n in $(seq 1 20); do
tests/ext4/307 +1 -1
index 8b1cfc9e..75a8bff0 100755
@@ -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 >> $seqres.full
+   $FSSTRESS_PROG $args >> $seqres.full 2>&1
    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
index af527fee..b2967d13 100755
@@ -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 >>$seqres.full
+      $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full 2>&1
     done
 
     rm -r $STRESS_DIR/*
tests/generic/269 +1 -1
index b852f6bf..eddca10d 100755
@@ -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 >> $seqres.full &
+   $FSSTRESS_PROG $args >> $seqres.full 2>&1 &
    pid=$!
    echo "Run dd writers in parallel"
    for ((i=0; i < num_iterations; i++))
tests/xfs/051 +1 -1
index 1c670964..eca67bb8 100755
@@ -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 >> $seqres.full &
+$FSSTRESS_PROG -n 9999 -p 2 -w -d $SCRATCH_MNT >> $seqres.full 2>&1 &
 sleep 5
 _scratch_shutdown -f
 $KILLALL_PROG -q $FSSTRESS_PROG
tests/xfs/057 +1 -1
index 6af14c80..9b52da79 100755
@@ -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 >> $seqres.full
+$FSSTRESS_PROG -d $SCRATCH_MNT -z -fcreat=1 -p 4 -n 100000 >> $seqres.full 2>&1
 _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
index 1d101876..cd7bccb2 100755
@@ -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 >>$seqres.full &
+$FSSTRESS_PROG -d $STRESS_DIR -n 100 -p 1000 $FSSTRESS_AVOID >>$seqres.full 2>&1 &
 
 # Freeze/unfreeze file system randomly
 echo "Start freeze/unfreeze randomly" | tee -a $seqres.full
tests/xfs/305 +1 -1
index d8a6712e..a93576bc 100755
@@ -36,7 +36,7 @@ _exercise()
    _qmount
    mkdir -p $QUOTA_DIR
 
-   $FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >>$seqres.full &
+   $FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >>$seqres.full 2>&1 &
    sleep 10
    $XFS_QUOTA_PROG -x -c "disable -$type" $SCRATCH_DEV
    sleep 5
tests/xfs/538 +1 -2
index 0b5772a1..d36673a9 100755
@@ -63,7 +63,7 @@ $FSSTRESS_PROG -d $SCRATCH_MNT \
            -f readv=0 \
            -f stat=0 \
            -f aread=0 \
-           -f dread=0 >> $seqres.full
+           -f dread=0 >> $seqres.full 2>&1
 
 # success, all done
 status=0
--

2.41.0

#5 lore raw
Quoted 109 lines · Filipe Manana
Quoted 108 lines · Zorro Lang
Quoted 80 lines · Darrick J. Wong
Quoted 70 lines · Zorro Lang

The f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") did lots of changes as below:

-$FSSTRESS_PROG $args >/dev/null 2>&1 &
+$FSSTRESS_PROG $args >>$seqres.full &

Although it's good to replace /dev/null with $seqres.full, but the change also removed the "2>&1", that againsts the original behavior. Some test cases might want to ignore fsstress error output, but now the error output breaks the gardon image. For example:

  FSTYP         -- xfs (non-debug)
  PLATFORM      -- Linux/s390x xxx-xxx-xxx
  MKFS_OPTIONS  -- -f -m crc=1,finobt=1,reflink=1,rmapbt=1,bigtime=1,inobtcount=1 -b size=1024 /dev/loop1

MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 /dev/loop1 /mnt/fstests/SCRATCH_DIR

generic/269 - output mismatch (see /var/lib/xfstests/results//generic/269.out.bad)
--- tests/generic/269.out 2023-10-17 22:32:46.162110249 -0400
+++ /var/lib/xfstests/results//generic/269.out.bad 2023-10-17 23:07:45.752145653 -0400
@@ -3,3 +3,60 @@
Run fsstress

Run dd writers in parallel
+p36: No such file or directory
+p41: No such file or directory
+p42: No such file or directory
+p43: No such file or directory
...

The generic/269 hopes to run fsstress with ENOSPC error, so it redirects stderr to /dev/null. But now it fails.

The f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") only wants to redirect stdout, so we'd better to keep stderr output to /dev/null, if a case hopes to do that.

Fixes f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null")

---

Hi,

This patch only trys to bring "2>&1" back, if case has it at beginning. To make sure we don't break the original behavior of these cases.

If some of below cases really want to remove the "2>&1", better to do that in another patch, and show a proper reason.

Thanks,
Zorro

 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 +-
Quoted 8 lines
 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/xfs/051     | 2 +-
Quoted 2 lines

These two changes (269, 051) duplicates
https://lore.kernel.org/fstests/169687550821.3948976.6892161616008393594.stgit@frogsfrogsfrogs/T/#m613d9379a026fcae5357650af09d5d0725d324f5

Thanks for fixing it.

Quoted 11 lines

AFAICT the other generic and xfs tests aren't setting up fsstress to hit errors, so we should be dumping them to the golden output because that's a sign that something has gone very wrong.

I suppose prior to f55e46d629 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null") we'd discard the error messages.

OTOH I've now run the generic and xfs tests with stderr going to the .out file and none of them complain, so I'd prefer to see those tests stay the way they are now.

OK, due to that commit affects btrfs specific cases more, besides btrfs part there're only below 5 cases removed the "2>&1":

ext4/057
ext4/307
generic/068
generic/269
xfs/051

Quoted 7 lines
Quoted 3 lines

As we've reviewed generic and xfs part, and will fix generic/269 and xfs/051, and those two ext4 cases look good without the "2>&1". So *if btrfs list feels good without the stderr filter*, I can drop this patch.

The stderr filter is not needed for the btrfs tests. None of them expects errors from fsstress, so we want the tests to fail in case fsstress faisl.

Thanks for this feedback, so I'll drop this patch and turn to merge:
https://lore.kernel.org/fstests/169687550821.3948976.6892161616008393594.stgit@frogsfrogsfrogs/T/#m613d9379a026fcae5357650af09d5d0725d324f5

Thanks,
Zorro

Quoted 425 lines

Thanks.

Quoted 421 lines

Thanks,
Zorro

Quoted 416 lines

--D

Quoted 412 lines
 tests/xfs/057     | 2 +-
 tests/xfs/297     | 2 +-
 tests/xfs/305     | 2 +-
 tests/xfs/538     | 2 +-
 31 files changed, 31 insertions(+), 31 deletions(-)
tests/btrfs/028 +1 -1
index d860974e..c4853e06 100755
@@ -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 >>$seqres.full &
+$FSSTRESS_PROG $args >>$seqres.full 2>&1 &
 fsstress_pid=$!
 
 echo "Start balance" >>$seqres.full
tests/btrfs/049 +1 -1
index c48e4087..e5f37ccd 100755
@@ -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 >>$seqres.full
+$FSSTRESS_PROG $args >>$seqres.full 2>&1
 
 # Start and pause balance to ensure it will be restored on remount
 echo "Start balance" >>$seqres.full
tests/btrfs/060 +1 -1
index a0184891..5c10fc51 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/061 +1 -1
index c1010413..407066e3 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/062 +1 -1
index 818a0156..dacf56db 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/063 +1 -1
index 2f771baf..88d0ed21 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start balance worker: " >>$seqres.full
tests/btrfs/064 +1 -1
index e9b46ce6..cad78248 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    # Start both balance and replace in the background.
tests/btrfs/065 +1 -1
index c4b6aafe..d388f1e1 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    # make sure the stop sign is not there
tests/btrfs/066 +1 -1
index a29034bb..ecb35f38 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    # make sure the stop sign is not there
tests/btrfs/067 +1 -1
index 709db155..d9808177 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    # make sure the stop sign is not there
tests/btrfs/068 +1 -1
index 15fd41db..321bb4d2 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    # make sure the stop sign is not there
tests/btrfs/069 +1 -1
index 139dde48..4a65c7e5 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/070 +1 -1
index 54aa275c..b823d95b 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/071 +1 -1
index 6ebbd8cc..ff16d5ac 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start replace worker: " >>$seqres.full
tests/btrfs/072 +1 -1
index 4b6b6fb5..3eda8dfb 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start scrub worker: " >>$seqres.full
tests/btrfs/073 +1 -1
index b1604f94..d3264f3b 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start scrub worker: " >>$seqres.full
tests/btrfs/074 +1 -1
index 9b22c620..3d08415c 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
 
    echo -n "Start defrag worker: " >>$seqres.full
tests/btrfs/136 +1 -1
index 70e836a5..fd637f33 100755
@@ -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 >>$seqres.full &
+   $FSSTRESS_PROG $args >>$seqres.full 2>&1 &
    fsstress_pid=$!
    wait $fsstress_pid
 }
tests/btrfs/192 +1 -1
index 00ea1478..0d926635 100755
@@ -140,7 +140,7 @@ pid1=$!
 delete_workload &
 pid2=$!
 
-"$FSSTRESS_PROG" $fsstress_args >> $seqres.full &
+"$FSSTRESS_PROG" $fsstress_args >> $seqres.full 2>&1 &
 sleep $runtime
 
 "$KILLALL_PROG" -q "$FSSTRESS_PROG" &> /dev/null
tests/btrfs/232 +1 -1
index 84c39c07..8ac0ce7c 100755
@@ -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 >> $seqres.full
+           $FSSTRESS_PROG $args >> $seqres.full 2>&1
    done
 }
 
tests/btrfs/261 +1 -1
index 58fa8e75..9968c694 100755
@@ -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 >> $seqres.full
+   $FSSTRESS_PROG -f setattr=0 -d $SCRATCH_MNT -w -n 3000 >> $seqres.full 2>&1
    sync
 
    # Save the fssum of this fs
tests/btrfs/286 +1 -1
index 71f6d4bd..ab4f9b24 100755
@@ -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 >> $seqres.full
+   $FSSTRESS_PROG -p 10 -n 200 -d $SCRATCH_MNT >> $seqres.full 2>&1
    sync
 
    # Generate fssum for later verification, here we only care
tests/ext4/057 +1 -1
index 6babedb2..b6d19339 100755
@@ -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 >> $seqres.full &
+$FSSTRESS_PROG $fsstress_args >> $seqres.full 2>&1 &
 fsstress_pid=$!
 
 for n in $(seq 1 20); do
tests/ext4/307 +1 -1
index 8b1cfc9e..75a8bff0 100755
@@ -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 >> $seqres.full
+   $FSSTRESS_PROG $args >> $seqres.full 2>&1
    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
index af527fee..b2967d13 100755
@@ -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 >>$seqres.full
+      $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full 2>&1
     done
 
     rm -r $STRESS_DIR/*
tests/generic/269 +1 -1
index b852f6bf..eddca10d 100755
@@ -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 >> $seqres.full &
+   $FSSTRESS_PROG $args >> $seqres.full 2>&1 &
    pid=$!
    echo "Run dd writers in parallel"
    for ((i=0; i < num_iterations; i++))
tests/xfs/051 +1 -1
index 1c670964..eca67bb8 100755
@@ -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 >> $seqres.full &
+$FSSTRESS_PROG -n 9999 -p 2 -w -d $SCRATCH_MNT >> $seqres.full 2>&1 &
 sleep 5
 _scratch_shutdown -f
 $KILLALL_PROG -q $FSSTRESS_PROG
tests/xfs/057 +1 -1
index 6af14c80..9b52da79 100755
@@ -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 >> $seqres.full
+$FSSTRESS_PROG -d $SCRATCH_MNT -z -fcreat=1 -p 4 -n 100000 >> $seqres.full 2>&1
 _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
index 1d101876..cd7bccb2 100755
@@ -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 >>$seqres.full &
+$FSSTRESS_PROG -d $STRESS_DIR -n 100 -p 1000 $FSSTRESS_AVOID >>$seqres.full 2>&1 &
 
 # Freeze/unfreeze file system randomly
 echo "Start freeze/unfreeze randomly" | tee -a $seqres.full
tests/xfs/305 +1 -1
index d8a6712e..a93576bc 100755
@@ -36,7 +36,7 @@ _exercise()
    _qmount
    mkdir -p $QUOTA_DIR
 
-   $FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >>$seqres.full &
+   $FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >>$seqres.full 2>&1 &
    sleep 10
    $XFS_QUOTA_PROG -x -c "disable -$type" $SCRATCH_DEV
    sleep 5
tests/xfs/538 +1 -2
index 0b5772a1..d36673a9 100755
@@ -63,7 +63,7 @@ $FSSTRESS_PROG -d $SCRATCH_MNT \
            -f readv=0 \
            -f stat=0 \
            -f aread=0 \
-           -f dread=0 >> $seqres.full
+           -f dread=0 >> $seqres.full 2>&1
 
 # success, all done
 status=0
--

2.41.0