aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-05-29 09:05:06 +0000
committerOmar Polo <op@omarpolo.com>2024-05-29 09:05:06 +0000
commit7c723cf05f1a284906063a475d0c39b45bd7f730 (patch)
treede2b908cf18dc5ca6a7dacbdb40d324d3f4331b7
parentb5dd7091ad9dc5216a54e4af50fbd26decb96d34 (diff)
regress: add a knob to disable test_ipv6_addr
at least on the CI is failing with "can't connect to ::1:10965: Address not available" which suggests IPv6 is broken there.
-rw-r--r--.cirrus.yml9
-rw-r--r--regress/Makefile5
-rw-r--r--regress/lib.sh5
3 files changed, 14 insertions, 5 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 510c120..c901406 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -1,6 +1,9 @@
# gcc' -Werror=use-after-free gets tripped by vis.c: it sees a use
# after free where it's not possible and breaks the CI.
+# seems that inside the CI it's not currently possible to bind to ::1
+# so set HAVE_IPV6=no.
+
linux_amd64_task:
container:
image: alpine:latest
@@ -8,7 +11,7 @@ linux_amd64_task:
- apk add alpine-sdk linux-headers bison libretls-dev libevent-dev
- ./configure CFLAGS='-O2 -pipe -Wno-deprecated-declarations -Wno-use-after-free' -Werror
- make
- - make regress REGRESS_HOST="*"
+ - make regress REGRESS_HOST="*" HAVE_IPV6=no
linux_arm_task:
arm_container:
@@ -17,7 +20,7 @@ linux_arm_task:
- apk add alpine-sdk linux-headers bison libretls-dev libevent-dev
- ./configure CFLAGS='-O2 -pipe -Wno-deprecated-declarations -Wno-use-after-free' -Werror
- make
- - make regress REGRESS_HOST="*"
+ - make regress REGRESS_HOST="*" HAVE_IPV6=no
freebsd_14_task:
freebsd_instance:
@@ -26,7 +29,7 @@ freebsd_14_task:
script:
- ./configure CFLAGS='-O2 -pipe -Wno-deprecated-declarations' -Werror
- make
- - make regress
+ - make regress HAVE_IPV6=no
#
# There are some issues with imsg fd passing on macos at the moment that
diff --git a/regress/Makefile b/regress/Makefile
index 1aa4741..ad676bc 100644
--- a/regress/Makefile
+++ b/regress/Makefile
@@ -7,6 +7,9 @@ GENCERT_FLAGS=
# host to bind to during regress
REGRESS_HOST = localhost
+# set to no if don't have IPv6 working (need to listen on ::1)
+HAVE_IPV6 = yes
+
DISTFILES = Makefile \
env \
err \
@@ -39,7 +42,7 @@ IRI_OBJS = ${IRI_SRCS:.c=.o} ${REG_COMPATS}
.PHONY: all data clean dist
all: data puny-test iri_test fcgi-test
- env REGRESS_HOST="${REGRESS_HOST}" ./regress ${TESTS}
+ env HAVE_IPV6="${HAVE_IPV6}" REGRESS_HOST="${REGRESS_HOST}" ./regress ${TESTS}
data: testdata localhost.pem testca.pem valid.crt invalid.pem
diff --git a/regress/lib.sh b/regress/lib.sh
index 8cd41d1..f9d5d3d 100644
--- a/regress/lib.sh
+++ b/regress/lib.sh
@@ -26,7 +26,10 @@ run_test() {
rm -f reg.conf
- if ! $1; then
+ if [ "$2" = "need_ipv6" -a "$HAVE_IPV6" != "yes" ]; then
+ echo "$1 skipped (needs HAVE_IPV6='yes')"
+ return
+ elif ! $1; then
echo "$1 failed"
failed="$failed $1"
failed_no=$((failed_no + 1))