diff options
author | Ruediger Meier | 2015-04-21 10:41:01 +0200 |
---|---|---|
committer | Ruediger Meier | 2015-04-21 14:58:30 +0200 |
commit | fffe5f7c72121c054645c60c0bb49f653bb7142e (patch) | |
tree | ffe8d9702ce1cc879d2a1d79ec08cc52e40d93f5 /tests/ts/cramfs | |
parent | tests: loop tests, don't call ts_die() with DEVICE parameter (diff) | |
download | kernel-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/cramfs')
-rwxr-xr-x | tests/ts/cramfs/doubles | 2 | ||||
-rwxr-xr-x | tests/ts/cramfs/fsck-endianness | 2 | ||||
-rwxr-xr-x | tests/ts/cramfs/mkfs | 2 | ||||
-rwxr-xr-x | tests/ts/cramfs/mkfs-endianness | 2 |
4 files changed, 0 insertions, 8 deletions
diff --git a/tests/ts/cramfs/doubles b/tests/ts/cramfs/doubles index 43fc60330..c815b2750 100755 --- a/tests/ts/cramfs/doubles +++ b/tests/ts/cramfs/doubles @@ -28,8 +28,6 @@ ts_check_test_command "$TS_CMD_UMOUNT" ts_skip_nonroot ts_check_losetup -set -o pipefail - ORIGPWD=$(pwd) IMAGE_NAME="${TS_TESTNAME}.img" IMAGE_PATH="$TS_OUTDIR/$IMAGE_NAME" diff --git a/tests/ts/cramfs/fsck-endianness b/tests/ts/cramfs/fsck-endianness index 87addef76..1ea8f5123 100755 --- a/tests/ts/cramfs/fsck-endianness +++ b/tests/ts/cramfs/fsck-endianness @@ -26,8 +26,6 @@ ts_check_test_command "$TS_CMD_FSCKCRAMFS" ts_skip_nonroot -set -o pipefail - IMAGE_LITTLE="$TS_SELF/cramfs-little.img" #Known good little endian image IMAGE_BIG="$TS_SELF/cramfs-big.img" #Known good big endian image diff --git a/tests/ts/cramfs/mkfs b/tests/ts/cramfs/mkfs index eff9d455c..c4abb7977 100755 --- a/tests/ts/cramfs/mkfs +++ b/tests/ts/cramfs/mkfs @@ -28,8 +28,6 @@ ts_check_test_command "$TS_CMD_UMOUNT" ts_skip_nonroot ts_check_losetup -set -o pipefail - ORIGPWD=$(pwd) IMAGE_NAME="${TS_TESTNAME}-loop.img" IMAGE_PATH="$TS_OUTDIR/$IMAGE_NAME" diff --git a/tests/ts/cramfs/mkfs-endianness b/tests/ts/cramfs/mkfs-endianness index 34d6bbfcc..e6707ca66 100755 --- a/tests/ts/cramfs/mkfs-endianness +++ b/tests/ts/cramfs/mkfs-endianness @@ -25,8 +25,6 @@ ts_check_test_command "$TS_CMD_MKCRAMFS" ts_skip_nonroot -set -o pipefail - IMAGE_DATA="$TS_OUTDIR/${TS_TESTNAME}-data" IMAGE_CREATED="$TS_OUTDIR/${TS_TESTNAME}-cramfs.img" #Image created during the test and compared against the known images. |