summaryrefslogtreecommitdiffstats
path: root/tests/ts/blkid
diff options
context:
space:
mode:
authorRuediger Meier2015-04-21 10:41:01 +0200
committerRuediger Meier2015-04-21 14:58:30 +0200
commitfffe5f7c72121c054645c60c0bb49f653bb7142e (patch)
treeffe8d9702ce1cc879d2a1d79ec08cc52e40d93f5 /tests/ts/blkid
parenttests: loop tests, don't call ts_die() with DEVICE parameter (diff)
downloadkernel-qcow2-util-linux-fffe5f7c72121c054645c60c0bb49f653bb7142e.tar.gz
kernel-qcow2-util-linux-fffe5f7c72121c054645c60c0bb49f653bb7142e.tar.xz
kernel-qcow2-util-linux-fffe5f7c72121c054645c60c0bb49f653bb7142e.zip
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 <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts/blkid')
-rwxr-xr-xtests/ts/blkid/md-raid0-whole2
-rwxr-xr-xtests/ts/blkid/md-raid1-whole2
2 files changed, 0 insertions, 4 deletions
diff --git a/tests/ts/blkid/md-raid0-whole b/tests/ts/blkid/md-raid0-whole
index e8b92320e..cbfb1eb7c 100755
--- a/tests/ts/blkid/md-raid0-whole
+++ b/tests/ts/blkid/md-raid0-whole
@@ -29,8 +29,6 @@ ts_skip_nonroot
ts_check_losetup
ts_check_prog "mdadm"
-set -o pipefail
-
ts_log "Initialize devices"
IMGNAME="${TS_OUTDIR}/${TS_TESTNAME}"
diff --git a/tests/ts/blkid/md-raid1-whole b/tests/ts/blkid/md-raid1-whole
index bd5f628a9..76ff8f838 100755
--- a/tests/ts/blkid/md-raid1-whole
+++ b/tests/ts/blkid/md-raid1-whole
@@ -29,8 +29,6 @@ ts_skip_nonroot
ts_check_losetup
ts_check_prog "mdadm"
-set -o pipefail
-
ts_log "Initialize devices"
IMGNAME="${TS_OUTDIR}/${TS_TESTNAME}"