]> 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)
committerKarel Zak <kzak@redhat.com>
Wed, 29 Apr 2015 10:40:03 +0000 (12:40 +0200)
commitb8ccd16ff43a75716074b31ed3cc9b58f5766723
treed09d3585711abcd13f0442f84f202f6cc6df7eb0
parent2d8b57dcbd589628697f9a4d18f6d796652ca5cc
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