Skip to content

CI: reduce flakiness in the libssh2, trackmemory, and socat jobs#10969

Merged
SparkiDev merged 3 commits into
wolfSSL:masterfrom
Frauschi:ci_flakyness_fixes
Jul 24, 2026
Merged

CI: reduce flakiness in the libssh2, trackmemory, and socat jobs#10969
SparkiDev merged 3 commits into
wolfSSL:masterfrom
Frauschi:ci_flakyness_fixes

Conversation

@Frauschi

@Frauschi Frauschi commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Three independent CI reliability fixes.

1. libssh2: retry the Docker tests with make recheck

The libssh2 integration tests start a fresh OpenSSH-server container per test with docker run -d -p 22 and then immediately open the SSH connection. Docker maps the host port as soon as the container starts, so the TCP connect succeeds before sshd inside the container is ready to send its banner, and the handshake fails with Failed getting banner (-43). This surfaces as an intermittent failure of a single test, most often test_read, on unrelated pull requests.

Fall back to make recheck when make check fails. Automake's parallel test harness re-runs only the tests that did not pass, so a transient container-readiness race no longer fails the job while a genuine failure still does.

2. trackmemory: correct stale make-check scheduling weights

parallel-make-check.py schedules configs longest-first by their minutes weight, but five of the seven trackmemory configs were weighted well below their real runtime, which the run summary flags every run (ran X min but minutes says Y (>50% off)). The underweighted set includes the two wolfEntropy jitter configs, whose runtime already varies severalfold with runner contention. Scheduling them last on stale short weights is what lets a contended run drift into the 40-minute timeout.

Update the five flagged weights to the durations reported by the run summary and re-sort the list descending, so the slowest and most variable configs start in the first scheduling wave and get the full time budget. Config coverage is unchanged; this touches scheduling metadata only.

3. socat: tolerate timing-flaky non-TLS tests

A few socat tests intermittently fail the interop job with diff or timeout mismatches: 23 DUALSYSTEMFDSFLUSH on 1.8.0.3, and 205 TCP4ENDCLOSE and 227 EXECPTYKILL on 1.8.0.0. They exercise socat's own system(), socket, and exec-pty plumbing rather than the wolfSSL backend, and race under the deliberate CPU oversubscription of the parallel shard scheduling. With parallel-make-check.py running fail-fast, one such flake in any shard aborts the whole job.

Add the observed tests to socat test.sh's per-version --expect-fail list. test.sh keys its exit status only on unexpected failures, so a listed test that later passes is reported as OK unexpected and does not fail the job. The numbers come from each version's own test output, so they match that version's numbering.

Frauschi added 2 commits July 22, 2026 15:07
The libssh2 integration tests start a fresh OpenSSH-server container per
test with "docker run -d -p 22" and then immediately open the SSH
connection. Docker maps the port as soon as the container starts, so the
TCP connect succeeds before sshd inside the container is ready to send its
banner, and the handshake fails with "Failed getting banner" (-43). This
shows up as an intermittent failure of a single test, most often
test_read, on unrelated pull requests.

Fall back to "make recheck" when "make check" fails. The automake parallel
test harness re-runs only the tests that did not pass, so a transient
container-readiness race no longer fails the job while a genuine failure
still does.
parallel-make-check.py schedules configs longest-first by their "minutes"
weight, but five of the seven trackmemory configs were weighted well below
their real runtime, which the run summary flags every time ("ran X min but
minutes says Y (>50% off)"). The underweighted configs include the two
wolfEntropy jitter configs, whose runtime already varies severalfold with
runner contention. Scheduling them last, on stale short weights, is what
lets a contended run drift into the 40-minute timeout.

Update the five flagged weights to the durations reported by the run
summary and re-sort the list descending so the slowest, most variable
configs start in the first scheduling wave and get the full time budget.
Config coverage is unchanged.
@Frauschi Frauschi self-assigned this Jul 22, 2026
A few socat core tests intermittently fail the interop job with diff or
timeout mismatches. They exercise socat's own system()/socket/exec-pty
plumbing, not the wolfSSL backend, and race under the deliberate CPU
oversubscription of the parallel shard scheduling. With parallel-make-check
running fail-fast, one such flake in any shard aborts the whole job.

Add the observed offenders to the per-version socat test.sh --expect-fail
list: 23 (DUALSYSTEMFDSFLUSH) on 1.8.0.3, and 205 (TCP4ENDCLOSE) and 227
(EXECPTYKILL) on 1.8.0.0. test.sh keys its exit status only on unexpected
failures, so a listed test that later passes is reported as "OK unexpected"
and does not fail the job. Numbers come from each version's own test output,
so they match that version's numbering.
@Frauschi Frauschi changed the title CI: reduce flakiness in the libssh2 and trackmemory jobs CI: reduce flakiness and dependency-install timeouts across several jobs Jul 22, 2026
@Frauschi
Frauschi force-pushed the ci_flakyness_fixes branch 3 times, most recently from 20b1a09 to adb0da7 Compare July 23, 2026 06:15
@Frauschi Frauschi changed the title CI: reduce flakiness and dependency-install timeouts across several jobs CI: reduce flakiness in the libssh2, trackmemory, and socat jobs Jul 23, 2026
@Frauschi Frauschi assigned wolfSSL-Bot and unassigned Frauschi Jul 23, 2026
@SparkiDev
SparkiDev merged commit 00c9405 into wolfSSL:master Jul 24, 2026
330 checks passed
@SparkiDev SparkiDev self-assigned this Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants