]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
generic/270: wait for fsstress processes to be killed
authorLukas Czerner <lczerner@redhat.com>
Mon, 15 Jun 2020 10:52:36 +0000 (12:52 +0200)
committerEryu Guan <guaneryu@gmail.com>
Sun, 21 Jun 2020 16:39:18 +0000 (00:39 +0800)
Currently wait will do nothing, because $pid is empty due to the fact
that the command was ran on the background in a separate shell so we
never got the $! set.

This is causing unexpected test failures especially under low memory
due to the fact that the fsstress is still running when we are
checking and comparing quota usage.

Fix it by using -w argument for killall that will wait for all processes
to actually die before it exits.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/270

index 5092ffa4e42e13128c4822bbcc2156ae11f64223..55779f5e790211b103999cb6ab4b371bb34c1159 100755 (executable)
@@ -38,7 +38,6 @@ _workout()
        $SETCAP_PROG cap_chown=epi  $tmp.fsstress.bin
 
        (su $qa_user -c "$tmp.fsstress.bin $args" &) > /dev/null 2>&1
-       pid=$!
 
        echo "Run dd writers in parallel"
        for ((i=0; i < num_iterations; i++))
@@ -50,8 +49,7 @@ _workout()
                sleep $enospc_time
        done
 
-       $KILLALL_PROG $tmp.fsstress.bin
-       wait $pid
+       $KILLALL_PROG -w $tmp.fsstress.bin
 }
 
 # real QA test starts here