Skip to content

Commit

Permalink
regress: add a knob to disable test_ipv6_addr
Browse files Browse the repository at this point in the history
at least on the CI is failing with "can't connect to ::1:10965:
Address not available" which suggests IPv6 is broken there.
  • Loading branch information
omar-polo committed May 29, 2024
1 parent b5dd709 commit 7c723cf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# 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
test_script:
- 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:
Expand All @@ -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:
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion regress/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion regress/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 7c723cf

Please sign in to comment.