fstests: redirect stderr to stdout in generic/269 and xfs/051
PATCH 1/1 fstests: redirect stderr to stdout in generic/269 and xfs/051
From: Pankaj Raghav <[email protected]>
A recent commit redirected the stdout from /dev/null to $seqres.full. That commit missed redirection of stderr to stdout which was present before.
This leads to test failures as the stderr is going to the output:
fsstress: check_cwd stat64() returned -1 with errno: 5 (Input/output error)
fsstress: check_cwd stat64() returned -1 with errno: 5 (Input/output error)
fsstress: check_cwd failure
fsstress: check_cwd failure
Redirection of stderr to stdout is still needed because fsstress can still return errors in generic/269 and xfs/051 as we inject enospc and shutdown the fs respectively. These tests only care about the fs consistency at the end.
Add the removed 2>&1 back in these two tests.
---
There could be more tests that might be affected by this regression but I came across only these two when I ran the test for xfs.
tests/generic/269 | 2 +- tests/xfs/051 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tests/generic/269 +1 -1
@@ -23,7 +23,7 @@ _workout() out=$SCRATCH_MNT/fsstress.$$ args=`_scale_fsstress_args -p128 -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out` echo "fsstress $args" >> $seqres.full - $FSSTRESS_PROG $args >> $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
@@ -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
Signature · 1 line
2.40.1
Quoted 14 lines · Pankaj Raghav
From: Pankaj Raghav <[email protected]>
A recent commit redirected the stdout from
/dev/nullto $seqres.full. That commit missed redirection of stderr to stdout which was present before.This leads to test failures as the stderr is going to the output:
fsstress:
check_cwdstat64()returned -1 with errno: 5 (Input/output error)
fsstress:check_cwdstat64()returned -1 with errno: 5 (Input/output error)
fsstress:check_cwdfailure
fsstress:check_cwdfailure
Quoted 6 lines
Redirection of stderr to stdout is still needed because fsstress can still return errors in generic/269 and xfs/051 as we inject enospc and shutdown the fs respectively. These tests only care about the fs consistency at the end.
Add the removed 2>&1 back in these two tests.
Wasn't this already fixed in the for-next branch?
Quoted 41 lines
Fixes f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null")Signed-off-by Pankaj Raghav <[email protected]>---
There could be more tests that might be affected by this regression but I came across only these two when I ran the test for xfs.tests/generic/269 | 2 +- tests/xfs/051 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)tests/generic/269 +1
-1@@ -23,7 +23,7 @@ _workout() out=$SCRATCH_MNT/fsstress.$$ args=`_scale_fsstress_args -p128 -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out` echo "fsstress $args" >> $seqres.full - $FSSTRESS_PROG $args >> $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
-2@@ -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 --2.40.1
Quoted 6 lines
Quoted 1 line
Add the removed 2>&1 back in these two tests.
Wasn't this already fixed in the for-next branch?
Ah, you are right. I am not too familiar with xfstests workflow, so I just pulled the latest master and these changes were not there.
Thanks for the commit info. I will use for-next branch for now.
Quoted 4 lines
Quoted 4 lines
Fixes f55e46d6 ("fstests: redirect fsstress' stdout to $seqres.full instead of /dev/null")Signed-off-by Pankaj Raghav <[email protected]>---