Skip to content

autest: skip tls_engine_abort test when plugin is absent - #13494

Merged
maskit merged 1 commit into
apache:masterfrom
maskit:fix-tls-engine-abort-skip
Aug 5, 2026
Merged

autest: skip tls_engine_abort test when plugin is absent#13494
maskit merged 1 commit into
apache:masterfrom
maskit:fix-tls-engine-abort-skip

Conversation

@maskit

@maskit maskit commented Aug 4, 2026

Copy link
Copy Markdown
Member

Description

tls_engine_abort.test.py calls Test.PrepareTestPlugin(async_handshake, ts, '-delay-ms=2000')
unconditionally. On non-OpenSSL builds (e.g. BoringSSL) async_handshake.so is
never built, so this raises ValueError: PrepareTestPlugin: file does not exist: ... and the test errors out instead of skipping cleanly.

Test.SkipUnless(...) only registers skip conditions for the framework to
check later — it does not halt execution of the rest of the test script. So
even though the file already guards on:

Test.SkipUnless(
    Condition.HasOpenSSLVersion('1.1.1'),
    Condition.IsOpenSSL(),
    Condition(lambda: os.path.isfile(async_handshake), async_handshake + " not found."),
)

the Test.PrepareTestPlugin(...) call still runs at load time regardless.

This is the same gap #13372 fixed in tls_async_handshake.test.py.
tls_engine_abort.test.py was added afterward from that file as a template
but didn't carry the guard over. This PR applies the same fix: guard the call
on file existence so the test skips cleanly on non-OpenSSL builds.

Test plan

  • Ran the autest on a non-OpenSSL (BoringSSL) build; test now skips instead
    of erroring.
  • Ran the autest on an OpenSSL build; test still runs and passes as before.

Same gap caf9c87 fixed in tls_async_handshake.test.py: SkipUnless
only registers conditions for later, it doesn't stop the script from
running, so PrepareTestPlugin still ran at load time and raised a
ValueError on non-OpenSSL builds where async_handshake.so is never
built. tls_engine_abort.test.py was added afterward from the same
template but didn't carry the guard over. Guard the call on file
existence so it skips cleanly.
@maskit maskit added this to the 11.0.0 milestone Aug 4, 2026
@maskit maskit self-assigned this Aug 4, 2026
Copilot AI lite review requested due to automatic review settings August 4, 2026 23:26
@maskit maskit added the AuTest label Aug 4, 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.

Pull request overview

This PR fixes an AuTest execution-time failure in tls_engine_abort.test.py when the async_handshake.so test plugin is not built (e.g., non-OpenSSL builds such as BoringSSL). It ensures the test script does not raise at import/load time and instead allows the framework to skip the test cleanly.

Changes:

  • Guard Test.PrepareTestPlugin(async_handshake, ...) behind os.path.isfile(async_handshake) so it is only executed when the plugin exists.

@cmcfarlen cmcfarlen 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.

LGTM. Same gap and same fix as #13372 (caf9c87), which applied the identical if os.path.isfile(async_handshake): guard to tls_async_handshake.test.py; this file was derived from that one before the guard landed.

The reasoning about Test.SkipUnless is right: it only registers conditions the framework evaluates later, so the Condition(lambda: os.path.isfile(async_handshake), ...) already in the file does nothing to stop PrepareTestPlugin from running at load time and raising ValueError. Guarding the call keeps the existing skip condition as the thing that actually reports the skip.

@maskit
maskit merged commit f00122e into apache:master Aug 5, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this to For v10.2.0 in ATS v10.2.x Aug 5, 2026
cmcfarlen pushed a commit that referenced this pull request Aug 6, 2026
Same gap caf9c87 fixed in tls_async_handshake.test.py: SkipUnless
only registers conditions for later, it doesn't stop the script from
running, so PrepareTestPlugin still ran at load time and raised a
ValueError on non-OpenSSL builds where async_handshake.so is never
built. tls_engine_abort.test.py was added afterward from the same
template but didn't carry the guard over. Guard the call on file
existence so it skips cleanly.

(cherry picked from commit f00122e)
@cmcfarlen cmcfarlen moved this from For v10.2.0 to Picked v10.2.0 in ATS v10.2.x Aug 6, 2026
@cmcfarlen cmcfarlen modified the milestones: 11.0.0, 10.2.0 Aug 6, 2026
@cmcfarlen

Copy link
Copy Markdown
Contributor

Cherry-picked to the 10.2.x branch as 6fb80a1 for the 10.2.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Picked v10.2.0

Development

Successfully merging this pull request may close these issues.

3 participants