Skip to content

urtest: macOS bash is handling set -u differently - #13884

Merged
zwoop merged 1 commit into
apache:masterfrom
zwoop:URTestMacos
Oct 22, 2026
Merged

zwoop merged 1 commit into
apache:masterfrom
zwoop:URTestMacos

Conversation

@zwoop

@zwoop zwoop commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Without this, urtest will not run with the bash that ships with macOS.

leif@hel ~/BUILDS/ats-autest/tests » ./urtest.sh --no-run-in-container -k 'cripts'
./urtest.sh: line 29: curl_uds_argument[@]: unbound variable

@zwoop zwoop added this to the 11.0.0 milestone Oct 21, 2026
@zwoop
zwoop requested review from bneradt and a balanced review from Copilot October 21, 2026 22:58

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

1 open issue
What changed in this PR

Adjusts urtest argument expansion so the script runs under the older Bash shipped with macOS when set -u is enabled.

Changes:

  • Replaces direct "${curl_uds_argument[@]}" expansion with a set -u-safe ${var[@]+...} conditional expansion.
File Description
tests/​urtest.sh.in Updates array argument expansion to avoid set -u failures on macOS Bash.

Review effort: Lite

Comment thread tests/urtest.sh.in Resolved
@zwoop
zwoop merged commit 78f859b into apache:master Oct 22, 2026
14 checks passed
@zwoop
zwoop deleted the URTestMacos branch October 22, 2026 03:22
bneradt pushed a commit to bneradt/trafficserver that referenced this pull request Oct 22, 2026
The supported 10.2.x branch still relies on AuTest while master uses
pytest, making test maintenance and CI behavior diverge between releases.

This patch backports the Uranium framework and converted tests from
apache#13545, preserving the branch-specific coverage and configuration
formats. It includes the Bash 3 compatibility fix from apache#13884 and adapts
the build, documentation, and test helpers for the release branch.

The migration also includes the outbound connection-accounting fix
carried by apache#13545. Pending connections retain their tracker reservation
until the resulting session takes ownership, preserving per-origin
connection counts and limits when transactions share a connection attempt.
The converted connection-limit tests exercise this production behavior.

Co-authored-by: GPT-6 Astra Medium
bneradt pushed a commit to bneradt/trafficserver that referenced this pull request Oct 22, 2026
The supported 10.2.x branch still relies on AuTest while master uses
pytest, making test maintenance and CI behavior diverge between releases.

This patch backports the Uranium framework and converted tests from
apache#13545, preserving the branch-specific coverage and configuration
formats. It includes the Bash 3 compatibility fix from apache#13884 and adapts
the build, documentation, and test helpers for the release branch.

The migration also includes the outbound connection-accounting fix
carried by apache#13545. Pending connections retain their tracker reservation
until the resulting session takes ownership, preserving per-origin
connection counts and limits when transactions share a connection attempt.
The converted connection-limit tests exercise this production behavior.

Co-authored-by: GPT-6 Astra Medium
bneradt pushed a commit to bneradt/trafficserver that referenced this pull request Oct 25, 2026
The supported 10.2.x branch still relies on AuTest while master uses
pytest, making test maintenance and CI behavior diverge between releases.

This patch backports the Uranium framework and converted tests from
formats. It includes the Bash 3 compatibility fix from apache#13884 and adapts
the build, documentation, and test helpers for the release branch.

The migration also includes the outbound connection-accounting fix
carried by apache#13545. Pending connections retain their tracker reservation
until the resulting session takes ownership, preserving per-origin
connection counts and limits when transactions share a connection attempt.

Co-authored-by: GPT-6 Astra Medium
bneradt pushed a commit to bneradt/trafficserver that referenced this pull request Oct 25, 2026
The supported 9.2 branch still depends on AuTest after master moved to
pytest-based Uranium. Maintaining separate test frameworks makes new
regressions harder to backport and leaves branch-specific coverage
dependent on the old runner.

This patch migrates the existing scenarios to self-contained replay
tests and fixture-driven pytest functions while preserving 9.2 behavior.
The shared harness supports Autotools, records.config, and managed
configuration reloads, with API documentation and source-distribution
assets. The configured wrapper also includes the Bash 3 empty-array fix
from apache#13884.

Two separate production prerequisites fix defects exposed by the tests.
The socket-close ordering fix from apache#9366 prevents HTTP/2 network events
from reaching a pending session-close hook and aborting the proxy. The
client-certificate update fix from apache#13576 corrects context lookup and
replacement; the old AuTest's unregistered output assertions had hidden
its failure. These fixes let the converted tests retain their intended
coverage rather than skipping or accepting the broken behavior.

Co-authored-by: GPT-6 Astra Medium
bneradt pushed a commit to bneradt/trafficserver that referenced this pull request Oct 26, 2026
The supported 9.2 branch still depends on AuTest after master moved to
pytest-based Uranium. Maintaining separate test frameworks makes new
regressions harder to backport and leaves branch-specific coverage
dependent on the old runner.

This patch migrates the existing scenarios to self-contained replay
tests and fixture-driven pytest functions while preserving 9.2 behavior.
The shared harness supports Autotools, records.config, and managed
configuration reloads, with API documentation and source-distribution
assets. The configured wrapper also includes the Bash 3 empty-array fix
from apache#13884.

Two separate production prerequisites fix defects exposed by the tests.
The socket-close ordering fix from apache#9366 prevents HTTP/2 network events
from reaching a pending session-close hook and aborting the proxy. The
client-certificate update fix from apache#13576 corrects context lookup and
replacement; the old AuTest's unregistered output assertions had hidden
its failure. These fixes let the converted tests retain their intended
coverage rather than skipping or accepting the broken behavior.

Co-authored-by: GPT-6 Astra Medium
bneradt pushed a commit to bneradt/trafficserver that referenced this pull request Oct 26, 2026
The supported 10.2.x branch still relies on AuTest while master uses
pytest, making test maintenance and CI behavior diverge between releases.

This patch backports the Uranium framework and converted tests from
apache#13545, preserving branch-specific coverage and configuration formats.
It includes the Bash 3 compatibility fix from apache#13884 and adapts the
build, documentation, and test helpers for the release branch. Explicit
replay comparisons and native checks preserve the original assertions.

The migration also includes the outbound connection-accounting fix
carried by apache#13545. Pending connections retain their tracker reservation
until the resulting session takes ownership, preserving per-origin
connection counts and limits when transactions share a connection attempt.

HTTP/2 closes its network connection before session-close hooks run.
This patch preserves the peer, effective client, and local endpoints so
those hooks can still inspect valid addresses, including PROXY protocol
addresses. Regression checks exercise ordinary and PROXY HTTP/2 sessions.

Co-authored-by: GPT-6 Astra Medium
bneradt added a commit that referenced this pull request Oct 27, 2026
* Close HTTP/2 sockets before session hooks

HTTP/2 peer shutdown can deliver VC_EVENT_EOS while a session-close
hook waits for its mutex. The API callback handler rejects that network
event and aborts the proxy. Running the converted Uranium lifecycle
test repeatedly exposed this pre-existing 9.2 production race.

This patch applies the socket close ordering already used by master
(#9366), closing network I/O before invoking session-close hooks. It
caches both socket endpoints first so close-hook address APIs retain
valid addresses and ports after the connection is released. The
converted lifecycle tests check hook ordering and endpoint preservation.

Co-authored-by: GPT-6 Astra Medium

* Backport client certificate context updates

The converted cert_update test exposes an existing 9.2 production bug:
TSSslClientCertUpdate searches with a certificate-and-key pair although
the context map uses the certificate path. The original AuTest reported
false success because its lowercase Streams.all assignments registered
no assertions, so certificate replacement failures went unnoticed.

This patch backports the fix from #13576, updating every matching CA
bucket, invalidating cached certificate data, preserving live contexts
on replacement failure, and releasing the acquired SSL configuration.
The separate Uranium migration verifies certificate subjects before and
after replacement and retains the working context after an invalid PEM.
This production prerequisite lets that coverage run without hiding the
defect behind a skip or an expected failure.

Co-authored-by: GPT-6 Astra Medium

* Backport Uranium tests to 9.2.x

The supported 9.2 branch still depends on AuTest after master moved to
pytest-based Uranium. Maintaining separate test frameworks makes new
regressions harder to backport and leaves branch-specific coverage
dependent on the old runner.

This patch migrates the existing scenarios to self-contained replay
tests and fixture-driven pytest functions while preserving 9.2 behavior.
The shared harness supports Autotools, records.config, and managed
configuration reloads, with API documentation and source-distribution
assets. The configured wrapper also includes the Bash 3 empty-array fix
from #13884.

Two separate production prerequisites fix defects exposed by the tests.
The socket-close ordering fix from #9366 prevents HTTP/2 network events
from reaching a pending session-close hook and aborting the proxy. The
client-certificate update fix from #13576 corrects context lookup and
replacement; the old AuTest's unregistered output assertions had hidden
its failure. These fixes let the converted tests retain their intended
coverage rather than skipping or accepting the broken behavior.

Co-authored-by: GPT-6 Astra Medium

* Fix Uranium in-source build checks

In-source configuration overwrote the tracked Uranium launcher, causing
CI's formatting clean-tree check to fail. RAT also treated the generated
Python dependency lockfile as an unlicensed source file.

This patch preserves the source launcher and delegates configured runs
to a separate generated wrapper, with regression coverage for argument
forwarding. It also includes the launcher in source distributions and
excludes the generated lockfile from license scanning.

Co-authored-by: GPT-6 Astra Medium

* Isolate nested Uranium test sandboxes

An exported sandbox path makes the collision-diagnostic self-test reuse
the enclosing pytest session's locked sandbox, preventing the intended
collection diagnostic from running.

This patch gives the child session an explicit private sandbox and
exercises both serial and parallel collection with an inherited, locked
parent sandbox. The shared-sandbox safety lock remains unchanged.

Co-authored-by: GPT-6 Astra Medium

* Synchronize HTTP/2 validation requests

Malformed HTTP/2 requests can race connection shutdown before the
client finishes writing. On 9.2, rejecting negative Content-Length
headers can also legitimately close a stream before queued DATA arrives.

This patch brings in the client synchronization from #13914 and isolates
validation cases so the expected closed-stream diagnostic is allowed
only for the negative-length rejection. Valid requests still reject all
error diagnostics, and malformed cases retain their rejection checks.

Co-authored-by: GPT-6 Astra Medium

---------
cmcfarlen pushed a commit that referenced this pull request Oct 28, 2026
* Backport Uranium tests to 10.2.x

The supported 10.2.x branch still relies on AuTest while master uses
pytest, making test maintenance and CI behavior diverge between releases.

This patch backports the Uranium framework and converted tests from
#13545, preserving branch-specific coverage and configuration formats.
It includes the Bash 3 compatibility fix from #13884 and adapts the
build, documentation, and test helpers for the release branch. Explicit
replay comparisons and native checks preserve the original assertions.

The migration also includes the outbound connection-accounting fix
carried by #13545. Pending connections retain their tracker reservation
until the resulting session takes ownership, preserving per-origin
connection counts and limits when transactions share a connection attempt.

HTTP/2 closes its network connection before session-close hooks run.
This patch preserves the peer, effective client, and local endpoints so
those hooks can still inspect valid addresses, including PROXY protocol
addresses. Regression checks exercise ordinary and PROXY HTTP/2 sessions.

Co-authored-by: GPT-6 Astra Medium

* Isolate nested Uranium test sandboxes

An exported sandbox path makes the collision-diagnostic self-test reuse
the enclosing pytest session's locked sandbox, preventing the intended
collection diagnostic from running.

This patch gives the child session an explicit private sandbox and
exercises both serial and parallel collection with an inherited, locked
parent sandbox. The shared-sandbox safety lock remains unchanged.

Co-authored-by: GPT-6 Astra Medium

---------

Co-authored-by: bneradt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants