testing: add boringtun throughput benchmark and iperf ref-compare harness

New testing/boringtun/ harness runs two Cloudflare BoringTun userspace
WireGuard containers with iperf3 between them, giving a single-hop
userspace tunnel baseline for comparison against FIPS throughput
numbers. Local WG key generation runs through the harness image so the
host needs no wireguard-tools.

New testing/static/scripts/iperf-compare-refs.sh builds two git refs
into separate fips-test:* images via git worktree and runs the same
static iperf topology against both, with RUNS-based repetition and
aggregate avg/min/max reporting.

testing/static/scripts/iperf-test.sh gains DURATION, PARALLEL,
SETTLE_SECONDS, IPERF_TIMEOUT env knobs and a per-path iperf timeout.
testing/static/docker-compose.yml selects the image under test via
FIPS_TEST_IMAGE; testing/scripts/build.sh respects CARGO_TARGET_DIR.

Author benchmark on aarch64 Docker Desktop:
  boringtun bob -> alice : 1000.13 Mbits/sec
This commit is contained in:
Martti Malmi
2026-05-15 18:03:42 +00:00
committed by Johnathan Corgan
parent 09eb5ad6bf
commit b05c80e5f5
12 changed files with 470 additions and 10 deletions
+4 -2
View File
@@ -40,6 +40,8 @@ done
UNAME_S=$(uname -s)
CARGO_TARGET="x86_64-unknown-linux-musl"
TARGET_ROOT="${CARGO_TARGET_DIR:-$PROJECT_ROOT/target}"
if [ "$UNAME_S" = "Darwin" ]; then
echo "Detected macOS host — using cross-compilation for Linux..."
@@ -57,12 +59,12 @@ if [ "$UNAME_S" = "Darwin" ]; then
echo "Building FIPS for Linux (release) using cargo-zigbuild..."
cargo zigbuild --release --target "$CARGO_TARGET" --manifest-path="$PROJECT_ROOT/Cargo.toml" "${CARGO_BUILD_ARGS[@]}"
TARGET_DIR="$PROJECT_ROOT/target/$CARGO_TARGET/release"
TARGET_DIR="$TARGET_ROOT/$CARGO_TARGET/release"
else
echo "Building FIPS (release)..."
cargo build --release --manifest-path="$PROJECT_ROOT/Cargo.toml" "${CARGO_BUILD_ARGS[@]}"
TARGET_DIR="$PROJECT_ROOT/target/release"
TARGET_DIR="$TARGET_ROOT/release"
fi
echo "Copying binaries to $DOCKER_DIR/"