summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2016-01-27 11:44:10 -0500
committerColin Walters <walters@verbum.org>2016-01-27 11:44:10 -0500
commit5ebe43859d284a003e240e0cfe66b5185681e993 (patch)
tree9a50ffcbfc1688f0abeab58cfe8502b30c576d0c
parent3d2322db7a609fb4653ce6bf6c4b96b0c315a5b7 (diff)
downloadostree-5ebe43859d284a003e240e0cfe66b5185681e993.tar.gz
tests: Use "bash strict mode"
I noticed in the static deltas tests, there were some tests that should have been under `-o pipefail` to ensure we properly propagate errors. There were a few places where we were referencing undefined variables. Overall, this is clearly a good idea IMO.
-rwxr-xr-xtests/admin-test.sh2
-rwxr-xr-xtests/archive-test.sh2
-rwxr-xr-xtests/basic-test.sh2
-rw-r--r--tests/libtest.sh20
-rwxr-xr-xtests/pull-test.sh2
-rwxr-xr-xtests/test-admin-deploy-2.sh3
-rw-r--r--tests/test-admin-deploy-clean.sh2
-rw-r--r--tests/test-admin-deploy-etcmerge-cornercases.sh2
-rwxr-xr-xtests/test-admin-deploy-grub2.sh2
-rw-r--r--tests/test-admin-deploy-karg.sh2
-rwxr-xr-xtests/test-admin-deploy-switch.sh2
-rwxr-xr-xtests/test-admin-deploy-syslinux.sh2
-rwxr-xr-xtests/test-admin-deploy-uboot.sh2
-rw-r--r--tests/test-admin-instutil-set-kargs.sh2
-rw-r--r--tests/test-admin-locking.sh2
-rw-r--r--tests/test-admin-pull-deploy-commit.sh2
-rw-r--r--tests/test-admin-upgrade-not-backwards.sh2
-rw-r--r--tests/test-admin-upgrade-unconfigured.sh2
-rwxr-xr-xtests/test-archivez.sh2
-rwxr-xr-xtests/test-auto-summary.sh2
-rwxr-xr-xtests/test-basic-user.sh2
-rwxr-xr-xtests/test-basic.sh2
-rwxr-xr-xtests/test-commit-sign.sh4
-rwxr-xr-xtests/test-corruption.sh2
-rwxr-xr-xtests/test-delta.sh2
-rw-r--r--tests/test-gpg-signed-commit.sh4
-rwxr-xr-xtests/test-help.sh4
-rwxr-xr-xtests/test-libarchive.sh4
-rwxr-xr-xtests/test-local-pull-depth.sh2
-rwxr-xr-xtests/test-local-pull.sh2
-rw-r--r--tests/test-oldstyle-partial.sh2
-rw-r--r--tests/test-prune.sh2
-rwxr-xr-xtests/test-pull-archive-z.sh2
-rwxr-xr-xtests/test-pull-commit-only.sh2
-rwxr-xr-xtests/test-pull-corruption.sh4
-rw-r--r--tests/test-pull-depth.sh2
-rw-r--r--tests/test-pull-large-metadata.sh2
-rwxr-xr-xtests/test-pull-metalink.sh2
-rwxr-xr-xtests/test-pull-mirror-summary.sh2
-rwxr-xr-xtests/test-pull-resume.sh2
-rw-r--r--tests/test-pull-subpath.sh2
-rw-r--r--tests/test-pull-summary-sigs.sh2
-rwxr-xr-xtests/test-remote-add.sh2
-rwxr-xr-xtests/test-remote-gpg-import.sh2
-rwxr-xr-xtests/test-repo-checkout-subpath.sh2
-rwxr-xr-xtests/test-reset-nonlinear.sh2
-rwxr-xr-xtests/test-setuid.sh2
-rwxr-xr-xtests/test-xattrs.sh2
48 files changed, 59 insertions, 66 deletions
diff --git a/tests/admin-test.sh b/tests/admin-test.sh
index edbf6651..a587d79b 100755
--- a/tests/admin-test.sh
+++ b/tests/admin-test.sh
@@ -16,7 +16,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
echo "1..10"
diff --git a/tests/archive-test.sh b/tests/archive-test.sh
index 9d9c0a28..e6f67cf5 100755
--- a/tests/archive-test.sh
+++ b/tests/archive-test.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
$OSTREE checkout test2 checkout-test2
echo "ok checkout"
diff --git a/tests/basic-test.sh b/tests/basic-test.sh
index e8f1e9d2..d39f32cf 100755
--- a/tests/basic-test.sh
+++ b/tests/basic-test.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
echo "1..48"
diff --git a/tests/libtest.sh b/tests/libtest.sh
index 885c6403..bd806f6d 100644
--- a/tests/libtest.sh
+++ b/tests/libtest.sh
@@ -33,11 +33,11 @@ cp -a ${SRCDIR}/gpghome ${test_tmpdir}
export TEST_GPG_KEYHOME=${test_tmpdir}/gpghome
export OSTREE_GPG_HOME=${test_tmpdir}/gpghome/trusted
-if test -n "${OT_TESTS_DEBUG}"; then
+if test -n "${OT_TESTS_DEBUG:-}"; then
set -x
fi
-if test -n "$OT_TESTS_VALGRIND"; then
+if test -n "${OT_TESTS_VALGRIND:-}"; then
CMD_PREFIX="env G_SLICE=always-malloc valgrind -q --leak-check=full --num-callers=30 --suppressions=${SRCDIR}/ostree-valgrind.supp"
else
CMD_PREFIX="env LD_PRELOAD=${SRCDIR}/libreaddir-rand.so"
@@ -139,8 +139,8 @@ setup_test_repository () {
setup_fake_remote_repo1() {
mode=$1
- commit_opts=$2
- args=$3
+ commit_opts=${2:-}
+ args=${3:-}
shift
oldpwd=`pwd`
mkdir ostree-srv
@@ -272,7 +272,7 @@ EOF
mkdir ${test_tmpdir}/httpd
cd httpd
ln -s ${test_tmpdir} ostree
- ${CMD_PREFIX} ostree trivial-httpd --autoexit --daemonize -p ${test_tmpdir}/httpd-port $args
+ ${CMD_PREFIX} ostree trivial-httpd --autoexit --daemonize -p ${test_tmpdir}/httpd-port
port=$(cat ${test_tmpdir}/httpd-port)
echo "http://127.0.0.1:${port}" > ${test_tmpdir}/httpd-address
cd ${oldpwd}
@@ -280,15 +280,9 @@ EOF
os_repository_new_commit ()
{
- boot_checksum_iteration=$1
- content_iteration=$2
+ boot_checksum_iteration=${1:-0}
+ content_iteration=${2:-0}
echo "BOOT ITERATION: $boot_checksum_iteration"
- if test -z "$boot_checksum_iteration"; then
- boot_checksum_iteration=0
- fi
- if test -z "$content_iteration"; then
- content_iteration=0
- fi
cd ${test_tmpdir}/osdata
rm boot/*
echo "new: a kernel ${boot_checksum_iteration}" > boot/vmlinuz-3.6.0
diff --git a/tests/pull-test.sh b/tests/pull-test.sh
index 42979fe9..6f0b651a 100755
--- a/tests/pull-test.sh
+++ b/tests/pull-test.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
function repo_init() {
cd ${test_tmpdir}
diff --git a/tests/test-admin-deploy-2.sh b/tests/test-admin-deploy-2.sh
index d6117de0..ef6b5953 100755
--- a/tests/test-admin-deploy-2.sh
+++ b/tests/test-admin-deploy-2.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
@@ -49,7 +49,6 @@ os_repository_new_commit "1"
bootcsum3=${bootcsum}
${CMD_PREFIX} ostree admin upgrade --os=testos
-rev=${newrev}
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
assert_not_streq ${rev} ${newrev}
assert_not_streq ${bootcsum1} ${bootcsum2}
diff --git a/tests/test-admin-deploy-clean.sh b/tests/test-admin-deploy-clean.sh
index 19f71e61..58283108 100644
--- a/tests/test-admin-deploy-clean.sh
+++ b/tests/test-admin-deploy-clean.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-admin-deploy-etcmerge-cornercases.sh b/tests/test-admin-deploy-etcmerge-cornercases.sh
index 0541a670..4b0d781b 100644
--- a/tests/test-admin-deploy-etcmerge-cornercases.sh
+++ b/tests/test-admin-deploy-etcmerge-cornercases.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-admin-deploy-grub2.sh b/tests/test-admin-deploy-grub2.sh
index 94c4bc03..8da294d7 100755
--- a/tests/test-admin-deploy-grub2.sh
+++ b/tests/test-admin-deploy-grub2.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-admin-deploy-karg.sh b/tests/test-admin-deploy-karg.sh
index 9decec67..a8c1e594 100644
--- a/tests/test-admin-deploy-karg.sh
+++ b/tests/test-admin-deploy-karg.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-admin-deploy-switch.sh b/tests/test-admin-deploy-switch.sh
index 7e1e173a..4a52000c 100755
--- a/tests/test-admin-deploy-switch.sh
+++ b/tests/test-admin-deploy-switch.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-admin-deploy-syslinux.sh b/tests/test-admin-deploy-syslinux.sh
index 97ee32df..5883f76d 100755
--- a/tests/test-admin-deploy-syslinux.sh
+++ b/tests/test-admin-deploy-syslinux.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-admin-deploy-uboot.sh b/tests/test-admin-deploy-uboot.sh
index 219db14b..c22af6f3 100755
--- a/tests/test-admin-deploy-uboot.sh
+++ b/tests/test-admin-deploy-uboot.sh
@@ -18,7 +18,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-admin-instutil-set-kargs.sh b/tests/test-admin-instutil-set-kargs.sh
index 04f98c01..33b2b74e 100644
--- a/tests/test-admin-instutil-set-kargs.sh
+++ b/tests/test-admin-instutil-set-kargs.sh
@@ -18,7 +18,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-admin-locking.sh b/tests/test-admin-locking.sh
index 6b432202..5f00f571 100644
--- a/tests/test-admin-locking.sh
+++ b/tests/test-admin-locking.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-admin-pull-deploy-commit.sh b/tests/test-admin-pull-deploy-commit.sh
index 08c1e6bd..e1f7def6 100644
--- a/tests/test-admin-pull-deploy-commit.sh
+++ b/tests/test-admin-pull-deploy-commit.sh
@@ -19,7 +19,7 @@
# See https://github.com/GNOME/ostree/pull/145
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-admin-upgrade-not-backwards.sh b/tests/test-admin-upgrade-not-backwards.sh
index c42dc242..1b99e25d 100644
--- a/tests/test-admin-upgrade-not-backwards.sh
+++ b/tests/test-admin-upgrade-not-backwards.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-admin-upgrade-unconfigured.sh b/tests/test-admin-upgrade-unconfigured.sh
index cbc1e753..38df710d 100644
--- a/tests/test-admin-upgrade-unconfigured.sh
+++ b/tests/test-admin-upgrade-unconfigured.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-archivez.sh b/tests/test-archivez.sh
index d5b7fc35..5db973ff 100755
--- a/tests/test-archivez.sh
+++ b/tests/test-archivez.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-auto-summary.sh b/tests/test-auto-summary.sh
index 2452e553..6cb52e8c 100755
--- a/tests/test-auto-summary.sh
+++ b/tests/test-auto-summary.sh
@@ -18,7 +18,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
echo "1..1"
diff --git a/tests/test-basic-user.sh b/tests/test-basic-user.sh
index c1705254..f53de89a 100755
--- a/tests/test-basic-user.sh
+++ b/tests/test-basic-user.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
echo "1..1"
diff --git a/tests/test-basic.sh b/tests/test-basic.sh
index 3c55756e..ae55aab2 100755
--- a/tests/test-basic.sh
+++ b/tests/test-basic.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
echo "1..1"
diff --git a/tests/test-commit-sign.sh b/tests/test-commit-sign.sh
index 0dfbb768..2db671ee 100755
--- a/tests/test-commit-sign.sh
+++ b/tests/test-commit-sign.sh
@@ -17,9 +17,9 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
-if ! ${CMD_PREFIX} ostree --version | grep -q -e '\+gpgme'; then
+if ! ostree --version | grep -q -e '\+gpgme'; then
exit 77
fi
diff --git a/tests/test-corruption.sh b/tests/test-corruption.sh
index 9ad6aaf2..ef0e94ef 100755
--- a/tests/test-corruption.sh
+++ b/tests/test-corruption.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
echo "1..2"
diff --git a/tests/test-delta.sh b/tests/test-delta.sh
index 2dddefee..b31d65e9 100755
--- a/tests/test-delta.sh
+++ b/tests/test-delta.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-gpg-signed-commit.sh b/tests/test-gpg-signed-commit.sh
index ba361c7a..b713da2d 100644
--- a/tests/test-gpg-signed-commit.sh
+++ b/tests/test-gpg-signed-commit.sh
@@ -18,9 +18,9 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
-if ! ${CMD_PREFIX} ostree --version | grep -q -e '\+gpgme'; then
+if ! ostree --version | grep -q -e '\+gpgme'; then
exit 77
fi
diff --git a/tests/test-help.sh b/tests/test-help.sh
index 37d9fa1d..ca555b1b 100755
--- a/tests/test-help.sh
+++ b/tests/test-help.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
@@ -45,7 +45,7 @@ test_recursive() {
if [ $? = 0 ] ; then
echo 1>&2 "missing subcommand but 0 exit status"; exit 1
fi
- set -e
+ set -euo pipefail
# error message and usage goes to standard error
assert_file_has_content err "[Uu]sage"
assert_file_has_content err "$cmd"
diff --git a/tests/test-libarchive.sh b/tests/test-libarchive.sh
index c875f6b0..92e24083 100755
--- a/tests/test-libarchive.sh
+++ b/tests/test-libarchive.sh
@@ -17,9 +17,9 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
-if ! ${CMD_PREFIX} ostree --version | grep -q -e '\+libarchive'; then
+if ! ostree --version | grep -q -e '\+libarchive'; then
exit 77
fi
diff --git a/tests/test-local-pull-depth.sh b/tests/test-local-pull-depth.sh
index 4f8988dc..e89d0914 100755
--- a/tests/test-local-pull-depth.sh
+++ b/tests/test-local-pull-depth.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-local-pull.sh b/tests/test-local-pull.sh
index df5342de..a9beb083 100755
--- a/tests/test-local-pull.sh
+++ b/tests/test-local-pull.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
echo "1..1"
diff --git a/tests/test-oldstyle-partial.sh b/tests/test-oldstyle-partial.sh
index b7da9a86..220b0831 100644
--- a/tests/test-oldstyle-partial.sh
+++ b/tests/test-oldstyle-partial.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-prune.sh b/tests/test-prune.sh
index 28695b8f..a1322d90 100644
--- a/tests/test-prune.sh
+++ b/tests/test-prune.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-pull-archive-z.sh b/tests/test-pull-archive-z.sh
index 0d208528..6482f6f9 100755
--- a/tests/test-pull-archive-z.sh
+++ b/tests/test-pull-archive-z.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-pull-commit-only.sh b/tests/test-pull-commit-only.sh
index 136cc3b9..775b2f71 100755
--- a/tests/test-pull-commit-only.sh
+++ b/tests/test-pull-commit-only.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-pull-corruption.sh b/tests/test-pull-corruption.sh
index e81e4229..1df31943 100755
--- a/tests/test-pull-corruption.sh
+++ b/tests/test-pull-corruption.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
@@ -55,4 +55,4 @@ gjs --help >/dev/null 2>&1 || exit 77
gjs $(dirname $0)/corrupt-repo-ref.js ${repopath} main || true
assert_file_has_content corrupted-status.txt 'Changed byte'
do_corrupt_pull_test
-echo "ok corruption $iteration"
+echo "ok corruption"
diff --git a/tests/test-pull-depth.sh b/tests/test-pull-depth.sh
index 35191cc4..7a52f9cb 100644
--- a/tests/test-pull-depth.sh
+++ b/tests/test-pull-depth.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-pull-large-metadata.sh b/tests/test-pull-large-metadata.sh
index f86ce4be..c50d7943 100644
--- a/tests/test-pull-large-metadata.sh
+++ b/tests/test-pull-large-metadata.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-pull-metalink.sh b/tests/test-pull-metalink.sh
index 84ef3739..52d2d503 100755
--- a/tests/test-pull-metalink.sh
+++ b/tests/test-pull-metalink.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-pull-mirror-summary.sh b/tests/test-pull-mirror-summary.sh
index 958044f9..de55b59b 100755
--- a/tests/test-pull-mirror-summary.sh
+++ b/tests/test-pull-mirror-summary.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-pull-resume.sh b/tests/test-pull-resume.sh
index 25ee907e..1e7220d0 100755
--- a/tests/test-pull-resume.sh
+++ b/tests/test-pull-resume.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-pull-subpath.sh b/tests/test-pull-subpath.sh
index f2abbb3b..70348322 100644
--- a/tests/test-pull-subpath.sh
+++ b/tests/test-pull-subpath.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-pull-summary-sigs.sh b/tests/test-pull-summary-sigs.sh
index 7afca9a3..dbcc67a5 100644
--- a/tests/test-pull-summary-sigs.sh
+++ b/tests/test-pull-summary-sigs.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-remote-add.sh b/tests/test-remote-add.sh
index 392dda54..2294a06d 100755
--- a/tests/test-remote-add.sh
+++ b/tests/test-remote-add.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-remote-gpg-import.sh b/tests/test-remote-gpg-import.sh
index 0dc5424e..fc833493 100755
--- a/tests/test-remote-gpg-import.sh
+++ b/tests/test-remote-gpg-import.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-repo-checkout-subpath.sh b/tests/test-repo-checkout-subpath.sh
index 343b2614..bf792184 100755
--- a/tests/test-repo-checkout-subpath.sh
+++ b/tests/test-repo-checkout-subpath.sh
@@ -18,7 +18,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
. $(dirname $0)/libtest.sh
diff --git a/tests/test-reset-nonlinear.sh b/tests/test-reset-nonlinear.sh
index 1d0f8de6..735f1523 100755
--- a/tests/test-reset-nonlinear.sh
+++ b/tests/test-reset-nonlinear.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
echo "1..1"
diff --git a/tests/test-setuid.sh b/tests/test-setuid.sh
index 02aa9f61..5354d1f3 100755
--- a/tests/test-setuid.sh
+++ b/tests/test-setuid.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
echo "1..1"
diff --git a/tests/test-xattrs.sh b/tests/test-xattrs.sh
index b95707e2..6a83a0bc 100755
--- a/tests/test-xattrs.sh
+++ b/tests/test-xattrs.sh
@@ -17,7 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-set -e
+set -euo pipefail
touch test-xattrs
if ! setfattr -n user.testvalue -v somevalue test-xattrs; then