Skip to content

Commit 88032c1

Browse files
committed
Make the server timeout wrap Linux-only
timeout(1) is GNU coreutils and is not installed on macOS, so the "make check macos" job failed with "timeout: command not found" for every wrapped server. Add a small shim to each affected test: when timeout is unavailable (e.g. macOS) run the server unbounded, restoring the prior macOS behavior. The flaky hang the timeout guards against is on the Linux-only trackmemory job, so macOS does not need the bound.
1 parent 5c5cbd3 commit 88032c1

9 files changed

Lines changed: 63 additions & 0 deletions

scripts/crl-revoked.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/usr/bin/env bash
22

3+
# timeout(1) is GNU coreutils and absent on macOS; where it's missing, run the
4+
# command unbounded (the flaky hang this guards against is Linux-only CI).
5+
if ! command -v timeout >/dev/null 2>&1; then
6+
timeout() { while [ "${1:-}" = "-s" ] || [ "${1:-}" = "-k" ]; do shift 2; done; shift; "$@"; }
7+
fi
8+
9+
310
[ ! -x ./examples/client/client ] && printf '\n\n%s\n' "Client doesn't exist" \
411
&& exit 1
512

scripts/dtlscid.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/usr/bin/env bash
22

3+
# timeout(1) is GNU coreutils and absent on macOS; where it's missing, run the
4+
# command unbounded (the flaky hang this guards against is Linux-only CI).
5+
if ! command -v timeout >/dev/null 2>&1; then
6+
timeout() { while [ "${1:-}" = "-s" ] || [ "${1:-}" = "-k" ]; do shift 2; done; shift; "$@"; }
7+
fi
8+
9+
310
# dtlscid.test
411
# Copyright wolfSSL 2022-2024
512

scripts/ocsp-stapling-with-wolfssl-responder.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/usr/bin/env bash
22

3+
# timeout(1) is GNU coreutils and absent on macOS; where it's missing, run the
4+
# command unbounded (the flaky hang this guards against is Linux-only CI).
5+
if ! command -v timeout >/dev/null 2>&1; then
6+
timeout() { while [ "${1:-}" = "-s" ] || [ "${1:-}" = "-k" ]; do shift 2; done; shift; "$@"; }
7+
fi
8+
9+
310
# ocsp-stapling-with-wolfssl-responder.test
411
# Tests OCSP stapling using wolfSSL's own ocsp_responder example
512
# instead of the OpenSSL ocsp utility.

scripts/ocsp-stapling.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/usr/bin/env bash
22

3+
# timeout(1) is GNU coreutils and absent on macOS; where it's missing, run the
4+
# command unbounded (the flaky hang this guards against is Linux-only CI).
5+
if ! command -v timeout >/dev/null 2>&1; then
6+
timeout() { while [ "${1:-}" = "-s" ] || [ "${1:-}" = "-k" ]; do shift 2; done; shift; "$@"; }
7+
fi
8+
9+
310
# ocsp-stapling.test
411
# Test requires HAVE_OCSP and HAVE_CERTIFICATE_STATUS_REQUEST
512

scripts/ocsp-stapling2.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/usr/bin/env bash
22

3+
# timeout(1) is GNU coreutils and absent on macOS; where it's missing, run the
4+
# command unbounded (the flaky hang this guards against is Linux-only CI).
5+
if ! command -v timeout >/dev/null 2>&1; then
6+
timeout() { while [ "${1:-}" = "-s" ] || [ "${1:-}" = "-k" ]; do shift 2; done; shift; "$@"; }
7+
fi
8+
9+
310
# ocsp-stapling2.test
411
# Test requires HAVE_OCSP and HAVE_CERTIFICATE_STATUS_REQUEST_V2
512

scripts/ocsp-stapling_tls13multi.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/bin/bash
22

3+
# timeout(1) is GNU coreutils and absent on macOS; where it's missing, run the
4+
# command unbounded (the flaky hang this guards against is Linux-only CI).
5+
if ! command -v timeout >/dev/null 2>&1; then
6+
timeout() { while [ "${1:-}" = "-s" ] || [ "${1:-}" = "-k" ]; do shift 2; done; shift; "$@"; }
7+
fi
8+
9+
310
# ocsp-stapling_tls13multi.test
411
# Test requires HAVE_OCSP and HAVE_CERTIFICATE_STATUS_REQUEST_V2
512

scripts/pkcallbacks.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/usr/bin/env bash
22

3+
# timeout(1) is GNU coreutils and absent on macOS; where it's missing, run the
4+
# command unbounded (the flaky hang this guards against is Linux-only CI).
5+
if ! command -v timeout >/dev/null 2>&1; then
6+
timeout() { while [ "${1:-}" = "-s" ] || [ "${1:-}" = "-k" ]; do shift 2; done; shift; "$@"; }
7+
fi
8+
9+
310
#pkcallbacks.test
411

512
[ ! -x ./examples/client/client ] && printf '\n\n%s\n' "Client doesn't exist" \

scripts/resume.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/usr/bin/env bash
22

3+
# timeout(1) is GNU coreutils and absent on macOS; where it's missing, run the
4+
# command unbounded (the flaky hang this guards against is Linux-only CI).
5+
if ! command -v timeout >/dev/null 2>&1; then
6+
timeout() { while [ "${1:-}" = "-s" ] || [ "${1:-}" = "-k" ]; do shift 2; done; shift; "$@"; }
7+
fi
8+
9+
310
#resume.test
411

512
# if we can, isolate the network namespace to eliminate port collisions.

scripts/tls13.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/usr/bin/env bash
22

3+
# timeout(1) is GNU coreutils and absent on macOS; where it's missing, run the
4+
# command unbounded (the flaky hang this guards against is Linux-only CI).
5+
if ! command -v timeout >/dev/null 2>&1; then
6+
timeout() { while [ "${1:-}" = "-s" ] || [ "${1:-}" = "-k" ]; do shift 2; done; shift; "$@"; }
7+
fi
8+
9+
310
# tls13.test
411
# Copyright wolfSSL 2016-2021
512

0 commit comments

Comments
 (0)