Skip to content

AuTest timing improvements - #13540

Merged
bneradt merged 1 commit into
apache:masterfrom
bneradt:autest-timing-improvements
Sep 14, 2026
Merged

bneradt merged 1 commit into
apache:masterfrom
bneradt:autest-timing-improvements

Conversation

@bneradt

@bneradt bneradt commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Parallel AuTest runs were repeating similarly named tests, while timing
collection reset shared port allocation by starting a process per test.
Several tests also waited on client defaults, retries, and log buffering
rather than behavior under verification.

Exact test selection

The runner now anchors worker filters to test paths. This avoids suffix
collisions, duplicate runs, and parallel execution of serial tests.

Batch timing collection

The runner now measures completions from persistent worker batches. This
preserves shared port allocation and removes per-test process startup.

Rate-limit expiration

The rate-limit test bounds the queued client wait and requires the ATS
expiration diagnostic, retaining queue-expiration coverage.

Server-abort timeouts

The server-abort test disables retries and shortens connection and
inactivity timeouts that are unrelated to the expected abort.

JAX fingerprint log flushing

The JAX fingerprint test flushes log buffers once per second so its
existing log assertions do not wait on production buffering defaults.

Stale-response log flushing

The stale-response test similarly flushes logs once per second while
retaining its existing traffic and log assertions.

Local timing results

In the asfats5 container with a Debug build, an instrumented full-suite
autest.sh -j8 -v invocation decreased from 18m43s (1122.8 seconds) to
15m09s (908.8 seconds). This saved 3m34s of wall-clock time, or 19%.

Test Before After
rate_limit_sni 308.2s 11.4s
server_abort 127.4s 6.1s
jax_fingerprint 169.3s 102.6s
stale_response 113.4s 81.3s

Copilot AI lite review requested due to automatic review settings August 12, 2026 22:13
@bneradt bneradt added this to the 11.0.0 milestone Aug 12, 2026
@bneradt bneradt self-assigned this Aug 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@moonchen moonchen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two blocking issues in the batch timing path.

Comment thread tests/autest-parallel.py.in Resolved
Comment thread tests/autest-parallel.py.in Resolved
Copilot AI review requested due to automatic review settings September 1, 2026 20:10
@bneradt
bneradt force-pushed the autest-timing-improvements branch from 6500aeb to 483ffc8 Compare September 1, 2026 20:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (2)

tests/autest-parallel.py.in:265

  • parse_test_start() only matches "Running Test :" and will not capture the "Running Test: " start lines that parse_autest_output() already handles. This can prevent pending_test tracking from working, which in turn can break detached status parsing and timing collection.
def parse_test_start(line: str) -> Optional[str]:
    """Extract the test name from an autest progress line."""
    clean = strip_ansi(line)
    matches = re.findall(r'Running Test ([^:\s]+):', clean)
    return matches[-1] if matches else None

tests/autest-parallel.py.in:594

  • Worker batch filters are built as f'/{test}', which can still match multiple tests when names share prefixes. Anchoring the pattern makes filter selection deterministic and helps avoid suffix/prefix collisions.
        '--filters',
    ]
    cmd.extend(f'/{test}' for test in tests)
  • Files reviewed: 6/6 changed files
  • Comments generated: 3
  • Review effort level: Lite

Comment thread tests/autest-parallel.py.in Resolved
Comment thread tests/autest-parallel.py.in Resolved
Comment thread tests/autest-parallel.py.in Resolved
Copilot AI review requested due to automatic review settings September 1, 2026 21:06
@bneradt
bneradt force-pushed the autest-timing-improvements branch from 483ffc8 to b23670b Compare September 1, 2026 21:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread tests/autest-parallel.py.in Resolved
Parallel AuTest runs repeated similarly named tests, reset shared port
allocation during timing collection, and sometimes waited on unrelated
client or log-buffering defaults. Batch timing also needed to recognize
every terminal status without losing its per-test timeout.

This patch anchors worker filters to test paths and measures
completions from persistent batches with all AuTest statuses and
nonblocking timeout enforcement. It retains shared port allocation
while bounding each test completion wait.

The affected rate-limit, server-abort, JAX, and stale-response tests
now bound unrelated waits and flush logs promptly while preserving
their behavioral assertions.
@bneradt
bneradt force-pushed the autest-timing-improvements branch from b23670b to 4ee4b62 Compare September 1, 2026 23:02
Copilot AI review requested due to automatic review settings September 1, 2026 23:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are consistent with existing records/test patterns in the repo and improve performance while retaining (and in places strengthening) the test assertions tied to the intended behaviors.

Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@bneradt

bneradt commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

[approve ci autest]

@moonchen moonchen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, both blocking issues are fixed. Verified the six-status parsing and that a wedged child is now bounded -- the same harness hangs on the base commit. LGTM.

@bneradt
bneradt merged commit 0738659 into apache:master Sep 14, 2026
15 checks passed
@bneradt
bneradt deleted the autest-timing-improvements branch September 14, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants