]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
check: set failure status before exit
authorEryu Guan <eguan@redhat.com>
Thu, 14 May 2015 10:27:54 +0000 (20:27 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 14 May 2015 10:27:54 +0000 (20:27 +1000)
commita276c261c9c943e1b50cc5ebbfcb900df6ba081f
treef1d03460b08fabd8b0d199789c0809408ef850c4
parent32d2a17f47087839602b7f1a2505615a88849695
check: set failure status before exit

check has trapped 'exit 1' and exit with $status, but check always
returns 0 on error because status never gets updated. This causes
problems while running some tests in a loop until it fails, e.g.

while ./check generic/081; do : ; done

Just set status to 1 before exit, as what we do in the tests.

Also remove an unused $flag while we're at it.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
check