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.
This commit is contained in:
Omar Polo 2024-05-29 09:05:06 +00:00
parent b5dd7091ad
commit 7c723cf05f
3 changed files with 14 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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))