summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/common.sh1
-rw-r--r--lib/libktest.sh3
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/common.sh b/lib/common.sh
index 11de1c5..cd943b3 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -2,6 +2,7 @@
set -o nounset
set -o errtrace
set -o errtrace
+set -o pipefail
trap 'echo "Error $? from: $BASH_COMMAND, exiting" >&2' ERR
diff --git a/lib/libktest.sh b/lib/libktest.sh
index ecdbd22..86073e0 100644
--- a/lib/libktest.sh
+++ b/lib/libktest.sh
@@ -248,6 +248,9 @@ save_env()
get_unused_port()
{
+ # This probably shouldn't be needed, but I was unable to determine which
+ # part of the pipeline was returning an error:
+ set +o pipefail
comm -23 --nocheck-order \
<(seq 10000 65535) \
<(ss -tan | awk '{print $4}' | cut -d':' -f2 | grep '[0-9]\{1,5\}' | sort -n | uniq) \