From 880471f3dac78268f3c1a305884a39fe4b990bd2 Mon Sep 17 00:00:00 2001 From: fassl Date: Sat, 11 Sep 2021 22:01:34 +0200 Subject: [PATCH] IPv6: #259 #253 - fix missing SLIRP_CONFIG_VERSION_MAX in test scripts --- tests/test-slirp4netns-hostfwd4.sh | 2 ++ tests/test-slirp4netns-hostfwd6.sh | 2 ++ tests/test-slirp4netns-ipv6.sh | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tests/test-slirp4netns-hostfwd4.sh b/tests/test-slirp4netns-hostfwd4.sh index 791c436..99e9f1b 100755 --- a/tests/test-slirp4netns-hostfwd4.sh +++ b/tests/test-slirp4netns-hostfwd4.sh @@ -3,6 +3,8 @@ set -xeuo pipefail . $(dirname $0)/common.sh +SLIRP_CONFIG_VERSION_MAX=$(slirp4netns -v | grep "SLIRP_CONFIG_VERSION_MAX: " | sed 's#SLIRP_CONFIG_VERSION_MAX: \(\)##') + if [ "${SLIRP_CONFIG_VERSION_MAX:-0}" -lt 3 ]; then printf "forwarding test requires SLIRP_CONFIG_VERSION_MAX 3 or newer. Test skipped..." exit "$TEST_EXIT_CODE_SKIP" diff --git a/tests/test-slirp4netns-hostfwd6.sh b/tests/test-slirp4netns-hostfwd6.sh index 283949c..4a0795b 100755 --- a/tests/test-slirp4netns-hostfwd6.sh +++ b/tests/test-slirp4netns-hostfwd6.sh @@ -3,6 +3,8 @@ set -xeuo pipefail . $(dirname $0)/common.sh +SLIRP_CONFIG_VERSION_MAX=$(slirp4netns -v | grep "SLIRP_CONFIG_VERSION_MAX: " | sed 's#SLIRP_CONFIG_VERSION_MAX: \(\)##') + if [ "${SLIRP_CONFIG_VERSION_MAX:-0}" -lt 3 ]; then printf "forwarding test requires SLIRP_CONFIG_VERSION_MAX 3 or newer. Test skipped..." exit "$TEST_EXIT_CODE_SKIP" diff --git a/tests/test-slirp4netns-ipv6.sh b/tests/test-slirp4netns-ipv6.sh index 8fc2e9d..135c94d 100755 --- a/tests/test-slirp4netns-ipv6.sh +++ b/tests/test-slirp4netns-ipv6.sh @@ -3,6 +3,8 @@ set -xeuo pipefail . $(dirname $0)/common.sh +SLIRP_CONFIG_VERSION_MAX=$(slirp4netns -v | grep "SLIRP_CONFIG_VERSION_MAX: " | sed 's#SLIRP_CONFIG_VERSION_MAX: \(\)##') + if [ "${SLIRP_CONFIG_VERSION_MAX:-0}" -lt 3 ]; then printf "ipv6 test requires SLIRP_CONFIG_VERSION_MAX 3 or newer. Test skipped..." exit "$TEST_EXIT_CODE_SKIP"