[ostree] tests: Use "bash strict mode"



commit 5ebe43859d284a003e240e0cfe66b5185681e993
Author: Colin Walters <walters verbum org>
Date:   Wed Jan 27 11:44:10 2016 -0500

    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.

 tests/admin-test.sh                             |    2 +-
 tests/archive-test.sh                           |    2 +-
 tests/basic-test.sh                             |    2 +-
 tests/libtest.sh                                |   20 +++++++-------------
 tests/pull-test.sh                              |    2 +-
 tests/test-admin-deploy-2.sh                    |    3 +--
 tests/test-admin-deploy-clean.sh                |    2 +-
 tests/test-admin-deploy-etcmerge-cornercases.sh |    2 +-
 tests/test-admin-deploy-grub2.sh                |    2 +-
 tests/test-admin-deploy-karg.sh                 |    2 +-
 tests/test-admin-deploy-switch.sh               |    2 +-
 tests/test-admin-deploy-syslinux.sh             |    2 +-
 tests/test-admin-deploy-uboot.sh                |    2 +-
 tests/test-admin-instutil-set-kargs.sh          |    2 +-
 tests/test-admin-locking.sh                     |    2 +-
 tests/test-admin-pull-deploy-commit.sh          |    2 +-
 tests/test-admin-upgrade-not-backwards.sh       |    2 +-
 tests/test-admin-upgrade-unconfigured.sh        |    2 +-
 tests/test-archivez.sh                          |    2 +-
 tests/test-auto-summary.sh                      |    2 +-
 tests/test-basic-user.sh                        |    2 +-
 tests/test-basic.sh                             |    2 +-
 tests/test-commit-sign.sh                       |    4 ++--
 tests/test-corruption.sh                        |    2 +-
 tests/test-delta.sh                             |    2 +-
 tests/test-gpg-signed-commit.sh                 |    4 ++--
 tests/test-help.sh                              |    4 ++--
 tests/test-libarchive.sh                        |    4 ++--
 tests/test-local-pull-depth.sh                  |    2 +-
 tests/test-local-pull.sh                        |    2 +-
 tests/test-oldstyle-partial.sh                  |    2 +-
 tests/test-prune.sh                             |    2 +-
 tests/test-pull-archive-z.sh                    |    2 +-
 tests/test-pull-commit-only.sh                  |    2 +-
 tests/test-pull-corruption.sh                   |    4 ++--
 tests/test-pull-depth.sh                        |    2 +-
 tests/test-pull-large-metadata.sh               |    2 +-
 tests/test-pull-metalink.sh                     |    2 +-
 tests/test-pull-mirror-summary.sh               |    2 +-
 tests/test-pull-resume.sh                       |    2 +-
 tests/test-pull-subpath.sh                      |    2 +-
 tests/test-pull-summary-sigs.sh                 |    2 +-
 tests/test-remote-add.sh                        |    2 +-
 tests/test-remote-gpg-import.sh                 |    2 +-
 tests/test-repo-checkout-subpath.sh             |    2 +-
 tests/test-reset-nonlinear.sh                   |    2 +-
 tests/test-setuid.sh                            |    2 +-
 tests/test-xattrs.sh                            |    2 +-
 48 files changed, 59 insertions(+), 66 deletions(-)
---
diff --git a/tests/admin-test.sh b/tests/admin-test.sh
index edbf665..a587d79 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 9d9c0a2..e6f67cf 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 e8f1e9d..d39f32c 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 885c640..bd806f6 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 42979fe..6f0b651 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 d6117de..ef6b595 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 19f71e6..5828310 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 0541a67..4b0d781 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 94c4bc0..8da294d 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 9decec6..a8c1e59 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 7e1e173..4a52000 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 97ee32d..5883f76 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 219db14..c22af6f 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 04f98c0..33b2b74 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 6b43220..5f00f57 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 08c1e6b..e1f7def 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 c42dc24..1b99e25 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 cbc1e75..38df710 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 d5b7fc3..5db973f 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 2452e55..6cb52e8 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 c170525..f53de89 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 3c55756..ae55aab 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 0dfbb76..2db671e 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 9ad6aaf..ef0e94e 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 2dddefe..b31d65e 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 ba361c7..b713da2 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 37d9fa1..ca555b1 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 c875f6b..92e2408 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 4f8988d..e89d091 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 df5342d..a9beb08 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 b7da9a8..220b083 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 28695b8..a1322d9 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 0d20852..6482f6f 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 136cc3b..775b2f7 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 e81e422..1df3194 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 35191cc..7a52f9c 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 f86ce4b..c50d794 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 84ef373..52d2d50 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 958044f..de55b59 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 25ee907..1e7220d 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 f2abbb3..7034832 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 7afca9a..dbcc67a 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 392dda5..2294a06 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 0dc5424..fc83349 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 343b261..bf79218 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 1d0f8de..735f152 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 02aa9f6..5354d1f 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 b95707e..6a83a0b 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]