Skip to content

Fedora 44 test fixes#13198

Open
bneradt wants to merge 3 commits into
apache:masterfrom
bneradt:address-fedora-44-issues
Open

Fedora 44 test fixes#13198
bneradt wants to merge 3 commits into
apache:masterfrom
bneradt:address-fedora-44-issues

Conversation

@bneradt
Copy link
Copy Markdown
Contributor

@bneradt bneradt commented May 23, 2026

This collects the remaining Fedora 44 test compatibility fixes after the build-only changes were split out.

  • Probe legacy TLS handshakes in tests: Fedora 44 crypto policy can accept OpenSSL TLS version flags while still rejecting real TLS 1.0 and 1.1 handshakes. The AuTest condition now probes an actual local OpenSSL handshake before enabling legacy TLS tests, so the tests only run when the environment can complete the requested protocol.
  • Update cert select curl expectation: newer curl/OpenSSL still returns the same certificate verification failure code for the bad CA case, but the output includes the presented certificate and uses different verification text. The test now checks the stable verification failure and confirms that the selected certificate is for bar.com.
  • Use temp socket path in JSONRPC test: Fedora 44 container bind mounts can reject Unix-domain socket connects even after the socket inode exists. The JSONRPC Catch test now places its server socket and lock in the local temporary directory so it works in the Fedora 44 container while remaining compatible with earlier environments.

Copilot AI review requested due to automatic review settings May 23, 2026 23:44
@bneradt bneradt added this to the 11.0.0 milestone May 23, 2026
@bneradt bneradt self-assigned this May 23, 2026
@bneradt bneradt added Tests AuTest TLS JSONRPC JSONRPC 2.0 related work. labels May 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates ATS test harnesses and unit tests to remain compatible with newer Fedora 44 container/crypto-policy behavior, focusing on TLS legacy-protocol detection, curl output expectations, and JSONRPC Unix-domain socket placement.

Changes:

  • Update TLS legacy protocol test gating to probe real OpenSSL handshakes instead of relying on flag acceptance / closed-port behavior.
  • Adjust TLS cert-select gold test expectations to match newer curl/OpenSSL verification output.
  • Move JSONRPC unit test socket/lock paths into a per-run temporary directory to avoid bind-mount UDS issues.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
tests/gold_tests/tls/tls_check_cert_select_plugin.test.py Updates curl failure-output matching for the bad-CA cert selection scenario.
tests/gold_tests/autest-site/conditions.test.ext Adds an OpenSSL s_server-based probe to gate legacy TLS tests on actual handshake capability.
src/mgmt/rpc/server/unit_tests/test_rpcserver.cc Uses a temp directory for JSONRPC socket/lock files and cleans it up at test-run end.

Comment thread tests/gold_tests/tls/tls_check_cert_select_plugin.test.py
Comment thread tests/gold_tests/autest-site/conditions.test.ext
Comment thread src/mgmt/rpc/server/unit_tests/test_rpcserver.cc Outdated
Comment thread src/mgmt/rpc/server/unit_tests/test_rpcserver.cc Outdated
@bneradt bneradt force-pushed the address-fedora-44-issues branch from 2256b3c to 55ad6ca Compare May 24, 2026 01:08
@bneradt bneradt changed the title Use temp socket path in JSONRPC test Fedora 44 test fixes May 24, 2026
Copilot AI review requested due to automatic review settings May 24, 2026 01:41
@bneradt bneradt force-pushed the address-fedora-44-issues branch from 55ad6ca to 33cb73b Compare May 24, 2026 01:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread tests/gold_tests/autest-site/conditions.test.ext Outdated
Comment thread src/mgmt/rpc/server/unit_tests/test_rpcserver.cc
@bneradt bneradt force-pushed the address-fedora-44-issues branch from 33cb73b to c88d9ac Compare May 24, 2026 02:55
Copilot AI review requested due to automatic review settings May 24, 2026 03:08
@bneradt bneradt force-pushed the address-fedora-44-issues branch from c88d9ac to 72f4576 Compare May 24, 2026 03:08
bneradt added 3 commits May 23, 2026 22:10
Fedora 44 crypto policy can accept legacy TLS command-line flags
while rejecting real TLS 1.0 and 1.1 handshakes. Closed-port probes
therefore let legacy TLS AuTests run in environments where the protocol
cannot actually negotiate.

This uses the AuTest port allocator to start a local OpenSSL server and
probe a real handshake before enabling those tests. The same helper also
gates curl TLS-version checks so both probes reflect runtime policy
rather than option parsing.
Newer curl and OpenSSL versions still return 60 for the bad-CA case,
but their verbose output includes the presented certificate and uses
different verification text. The old expectation made the cert-selection
AuTest depend on wording that varies by toolchain.

This keeps the assertion on the stable certificate-verification failure
and checks that the selected certificate is for bar.com, while still
rejecting the foo.com certificate in that failure path.
Docker bind mounts can reject Unix-domain socket connects even after the
socket inode is created. The JSONRPC Catch test hit that behavior in the
Fedora 44 container when its socket was under the bind-mounted tree.

This moves the socket and lock into a per-run temporary directory and
defers setup to Catch startup so failures are reported by the test
framework. This also falls back to a short /tmp path when the temp path
would exceed Unix socket limits.
@bneradt bneradt force-pushed the address-fedora-44-issues branch from 72f4576 to 2ceab59 Compare May 24, 2026 03:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment on lines +266 to +275
Get a port number from the same allocator used by get_port().

This is useful for helper code that needs a temporary listening port but
does not have an AuTest object with Setup hooks for recycling it.

Returns:
A port value.
"""
port, _ = _reserve_port()
return port
Comment on lines +94 to +99

port = get_port_number()
server = subprocess.Popen(
[
"openssl",
"s_server",
Comment on lines +43 to +44
process.kill()
process.wait(timeout=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AuTest JSONRPC JSONRPC 2.0 related work. Tests TLS

Projects

Status: No status
Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants