]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Configure the system-wide TCP connection timeout on OpenBSD
authorOndřej Surý <ondrej@sury.org>
Thu, 3 Dec 2020 10:24:57 +0000 (11:24 +0100)
committerOndřej Surý <ondrej@isc.org>
Thu, 3 Dec 2020 13:02:36 +0000 (13:02 +0000)
As there's no TCP connection timeout socket option that we can use, we
need to configure the TCP connection timeout system-wide in the CI, so
the netmgr unit tests doesn't cause assertion failure when there stuck
outgoing TCP connection waiting for 150 second timeout.

.gitlab-ci.yml

index 1441105b415098c6f00135eeb241bd3fe14666de..54a9a2d4a439779c1a5a517d2093f9a124b78206 100644 (file)
@@ -383,6 +383,7 @@ stages:
   <<: *default_triggering_rules
   stage: unit
   before_script:
+    - if [ -n "$TCP_CONNECTIONTIMEOUT" ]; then sudo sysctl 'net.inet.tcp.keepinittime=1'; fi
     - *setup_softhsm
   script:
     - make -j${TEST_PARALLEL_JOBS:-1} -k unit V=1
@@ -1216,6 +1217,8 @@ unit:clang:openbsd:amd64:
   <<: *unit_test_job
   variables:
     USER: gitlab-runner
+    # There's no socket option on OpenBSD, so we need to set this globally
+    TCP_CONNECTIONTIMEOUT: 1
   needs:
     - job: clang:openbsd:amd64
       artifacts: true