]> git.ipfire.org Git - thirdparty/util-linux.git/commit
tests: never use -o pipefail
authorRuediger Meier <ruediger.meier@ga-group.nl>
Tue, 21 Apr 2015 08:41:01 +0000 (10:41 +0200)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Tue, 21 Apr 2015 12:58:30 +0000 (14:58 +0200)
commitfffe5f7c72121c054645c60c0bb49f653bb7142e
treeffe8d9702ce1cc879d2a1d79ec08cc52e40d93f5
parentf1849be96a2f3baff3a7c3776be2d02af20bea81
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>
48 files changed:
tests/ts/blkdiscard/offsets
tests/ts/blkid/md-raid0-whole
tests/ts/blkid/md-raid1-whole
tests/ts/cal/1m
tests/ts/cal/1mw
tests/ts/cal/3m
tests/ts/cal/3mw
tests/ts/cal/bigyear
tests/ts/cal/bigyearw
tests/ts/cal/color
tests/ts/cal/colorw
tests/ts/cal/sep1752
tests/ts/cal/sep1752w
tests/ts/cal/weekarg
tests/ts/cal/weeknum
tests/ts/cal/year
tests/ts/cal/yearw
tests/ts/cramfs/doubles
tests/ts/cramfs/fsck-endianness
tests/ts/cramfs/mkfs
tests/ts/cramfs/mkfs-endianness
tests/ts/fsck/ismounted
tests/ts/minix/fsck
tests/ts/minix/mkfs
tests/ts/mount/devname
tests/ts/mount/fslists
tests/ts/mount/fstab-broken
tests/ts/mount/fstab-devname
tests/ts/mount/fstab-devname2label
tests/ts/mount/fstab-devname2uuid
tests/ts/mount/fstab-label
tests/ts/mount/fstab-label2devname
tests/ts/mount/fstab-label2uuid
tests/ts/mount/fstab-none
tests/ts/mount/fstab-symlink
tests/ts/mount/fstab-uuid
tests/ts/mount/fstab-uuid2devname
tests/ts/mount/fstab-uuid2label
tests/ts/mount/label
tests/ts/mount/regfile
tests/ts/mount/rlimit
tests/ts/mount/uuid
tests/ts/script/race
tests/ts/swapon/devname
tests/ts/swapon/fixpgsz
tests/ts/swapon/fixsig
tests/ts/swapon/label
tests/ts/swapon/uuid