From fffe5f7c72121c054645c60c0bb49f653bb7142e Mon Sep 17 00:00:00 2001 From: Ruediger Meier Date: Tue, 21 Apr 2015 10:41:01 +0200 Subject: tests: never use -o pipefail It was hard to find out that pipefail was the reason why our test-suite could have random failures for aribtrary tests, for example the ones which are using ts_device_has_uuid() or ts_mount(). Bash's pipefall option is evil! It may return error for such a simple line like this one $ echo -e "xxx\nyyy" | grep -q "xxx" because the left echo command will get SIGPIPE when grep exits after the first match. So the command line above could return an error eventhough it does exactly what we want. This patch removes any pipefail from our tests. The funny thing is that I couldn't find any case where we relied on this feature anyway. Signed-off-by: Ruediger Meier --- tests/ts/mount/fstab-symlink | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests/ts/mount/fstab-symlink') diff --git a/tests/ts/mount/fstab-symlink b/tests/ts/mount/fstab-symlink index 2579c85af..bf00e1355 100755 --- a/tests/ts/mount/fstab-symlink +++ b/tests/ts/mount/fstab-symlink @@ -29,8 +29,6 @@ ts_check_prog "mkfs.ext3" ts_skip_nonroot ts_check_losetup -set -o pipefail - LINKNAME="$TS_OUTDIR/${TS_TESTNAME}_lnk" ts_device_init -- cgit v1.2.3-55-g7522