summaryrefslogtreecommitdiffstats
path: root/tests/ts/cal
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/cal
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/cal')
-rwxr-xr-xtests/ts/cal/1m1
-rwxr-xr-xtests/ts/cal/1mw1
-rwxr-xr-xtests/ts/cal/3m1
-rwxr-xr-xtests/ts/cal/3mw2
-rwxr-xr-xtests/ts/cal/bigyear1
-rwxr-xr-xtests/ts/cal/bigyearw1
-rwxr-xr-xtests/ts/cal/color2
-rwxr-xr-xtests/ts/cal/colorw2
-rwxr-xr-xtests/ts/cal/sep17521
-rwxr-xr-xtests/ts/cal/sep1752w1
-rwxr-xr-xtests/ts/cal/weekarg1
-rwxr-xr-xtests/ts/cal/weeknum1
-rwxr-xr-xtests/ts/cal/year1
-rwxr-xr-xtests/ts/cal/yearw1
14 files changed, 0 insertions, 17 deletions
diff --git a/tests/ts/cal/1m b/tests/ts/cal/1m
index 295758aad..9f691e137 100755
--- a/tests/ts/cal/1m
+++ b/tests/ts/cal/1m
@@ -24,7 +24,6 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_CAL"
-set -o pipefail
export TERM=linux
USETERM=$( ts_has_option "useterm" "$*" )
diff --git a/tests/ts/cal/1mw b/tests/ts/cal/1mw
index 66649487a..3234a6adb 100755
--- a/tests/ts/cal/1mw
+++ b/tests/ts/cal/1mw
@@ -24,7 +24,6 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_CAL"
-set -o pipefail
export TERM=linux
USETERM=$( ts_has_option "useterm" "$*" )
diff --git a/tests/ts/cal/3m b/tests/ts/cal/3m
index 50f284ec2..baa9ba314 100755
--- a/tests/ts/cal/3m
+++ b/tests/ts/cal/3m
@@ -23,7 +23,6 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_CAL"
-set -o pipefail
export TERM=linux
USETERM=$( ts_has_option "useterm" "$*" )
diff --git a/tests/ts/cal/3mw b/tests/ts/cal/3mw
index 5ea951e49..cb3905b18 100755
--- a/tests/ts/cal/3mw
+++ b/tests/ts/cal/3mw
@@ -23,8 +23,6 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_CAL"
-set -o pipefail
-
USETERM=$( ts_has_option "useterm" "$*" )
MYTIME="27 09 2006"
diff --git a/tests/ts/cal/bigyear b/tests/ts/cal/bigyear
index b5e415ca1..5dced2a0f 100755
--- a/tests/ts/cal/bigyear
+++ b/tests/ts/cal/bigyear
@@ -20,7 +20,6 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_CAL"
-set -o pipefail
export TERM=linux
USETERM=$( ts_has_option "useterm" "$*" )
diff --git a/tests/ts/cal/bigyearw b/tests/ts/cal/bigyearw
index 75a18ddee..2ce9fc73d 100755
--- a/tests/ts/cal/bigyearw
+++ b/tests/ts/cal/bigyearw
@@ -20,7 +20,6 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_CAL"
-set -o pipefail
export TERM=linux
USETERM=$( ts_has_option "useterm" "$*" )
diff --git a/tests/ts/cal/color b/tests/ts/cal/color
index 44e9381e2..00e9c188a 100755
--- a/tests/ts/cal/color
+++ b/tests/ts/cal/color
@@ -25,8 +25,6 @@ ts_check_test_command "$TS_CMD_CAL"
# --color output depends on terminal type
export TERM=linux
-set -o pipefail
-
USETERM=$( ts_has_option "useterm" "$*" )
[ "$USETERM" == "yes" ] && TS_VERBOSE="yes"
diff --git a/tests/ts/cal/colorw b/tests/ts/cal/colorw
index 0092e133e..8e8ba0139 100755
--- a/tests/ts/cal/colorw
+++ b/tests/ts/cal/colorw
@@ -25,8 +25,6 @@ ts_check_test_command "$TS_CMD_CAL"
# --color output depends on terminal type
export TERM=linux
-set -o pipefail
-
USETERM=$( ts_has_option "useterm" "$*" )
[ "$USETERM" == "yes" ] && TS_VERBOSE="yes"
diff --git a/tests/ts/cal/sep1752 b/tests/ts/cal/sep1752
index fa57b9b8b..8db7e3cac 100755
--- a/tests/ts/cal/sep1752
+++ b/tests/ts/cal/sep1752
@@ -20,7 +20,6 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_CAL"
-set -o pipefail
export TERM=linux
USETERM=$( ts_has_option "useterm" "$*" )
diff --git a/tests/ts/cal/sep1752w b/tests/ts/cal/sep1752w
index b229e8369..d2d0d3166 100755
--- a/tests/ts/cal/sep1752w
+++ b/tests/ts/cal/sep1752w
@@ -20,7 +20,6 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_CAL"
-set -o pipefail
export TERM=linux
USETERM=$( ts_has_option "useterm" "$*" )
diff --git a/tests/ts/cal/weekarg b/tests/ts/cal/weekarg
index a7987051c..55dc327e2 100755
--- a/tests/ts/cal/weekarg
+++ b/tests/ts/cal/weekarg
@@ -23,7 +23,6 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_CAL"
-set -o pipefail
export TERM=linux
USETERM=$( ts_has_option "useterm" "$*" )
diff --git a/tests/ts/cal/weeknum b/tests/ts/cal/weeknum
index 0bea00de1..3a8f376e6 100755
--- a/tests/ts/cal/weeknum
+++ b/tests/ts/cal/weeknum
@@ -23,7 +23,6 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_CAL"
-set -o pipefail
export TERM=linux
USETERM=$( ts_has_option "useterm" "$*" )
diff --git a/tests/ts/cal/year b/tests/ts/cal/year
index 1204b5ffb..77e847e28 100755
--- a/tests/ts/cal/year
+++ b/tests/ts/cal/year
@@ -23,7 +23,6 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_CAL"
-set -o pipefail
export TERM=linux
USETERM=$( ts_has_option "useterm" "$*" )
diff --git a/tests/ts/cal/yearw b/tests/ts/cal/yearw
index c05b1c2b7..2f5d2c40c 100755
--- a/tests/ts/cal/yearw
+++ b/tests/ts/cal/yearw
@@ -23,7 +23,6 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_CAL"
-set -o pipefail
export TERM=linux
USETERM=$( ts_has_option "useterm" "$*" )