[1/2] fstests: btrfs/028: Don't pollute golden output for killing already finished process
diff mbox series

Message ID 20190918065626.34902-1-wqu@suse.com
State New
Headers show
Series
  • [1/2] fstests: btrfs/028: Don't pollute golden output for killing already finished process
Related show

Commit Message

Qu WenRuo Sept. 18, 2019, 6:56 a.m. UTC
Sometimes on fast enough test vm, btrfs/028 fails like:

  btrfs/028 31s ... - output mismatch (see /home/adam/xfstests-dev/results//btrfs/028.out.bad)
    --- tests/btrfs/028.out     2019-07-22 14:13:44.646666660 +0800
    +++ /home/adam/xfstests-dev/results//btrfs/028.out.bad      2019-09-18 14:14:45.442131411 +0800
    @@ -1,2 +1,3 @@
     QA output created by 028
    +/home/adam/xfstests-dev/tests/btrfs/028: line 64: kill: (2459) - No such process
     Silence is golden
    ...

It's caused by killing already finished process.
There is no need for kill command to pollute the golden output, so just
redirect all of its stdout and stderr to null.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 tests/btrfs/028 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Anand Jain Sept. 18, 2019, 7:33 a.m. UTC | #1
Reviewed-by: Anand Jain <anand.jain@oracle.com>

Patch
diff mbox series

diff --git a/tests/btrfs/028 b/tests/btrfs/028
index efa87ab3..98b9c8b9 100755
--- a/tests/btrfs/028
+++ b/tests/btrfs/028
@@ -61,7 +61,7 @@  balance_pid=$!
 
 # 30s is enough to trigger bug
 sleep $((30*$TIME_FACTOR))
-kill $fsstress_pid $balance_pid
+kill $fsstress_pid $balance_pid &> /dev/null
 wait
 
 # kill _btrfs_stress_balance can't end balance, so call btrfs balance cancel