Repository navigation
Fix presenter timezone tests on hosts with stale /tmp fixtures - #77
Merged
Merged
Conversation
The presenter time/locale tests injected synthetic zone1970.tab data by writing a fixed shared path (/tmp/opencattus-test-zone1970.tab) and pointing production code at it through the OPENCATTUS_ZONE1970_TAB env var. On self-hosted runners littered with root-owned files from previous sudo podman jobs, the fixture's unchecked std::ofstream write silently failed and the tests read whatever stale content was left behind, failing three test cases with menus that did not match the scripted selections (run 31017554351). Follow the Connection::ScopedTestInterfaces pattern from 34faf4d: - Add Timezone::ScopedTestZone1970Tab (BUILD_TESTING only) so tests inject zone1970.tab lines in-process; an empty override still exercises the timedatectl fallback through the runner singleton. - Drop the OPENCATTUS_ZONE1970_TAB env var and temp-file fixture; production timezone discovery now always reads /usr/share/zoneinfo/zone1970.tab with no test backdoor. - initializePresenterTestEnvironment returns the RAII guard and all call sites bind it, so no filesystem or env state leaks across tests. Validated: almalinux:10 container preflight (1213/1213 assertions); bare RHEL 10.2 host with a stale root-owned immutable fixture file planted (274/274 test cases, 1235/1235 assertions; pre-fix code reproduces the exact three CI failures under the same conditions); AlmaLinux 10.1 + Confluent libvirt e2e lab (installer success, timezone applied, sinfo/NFS/MPI smoke green).
viniciusferrao
force-pushed
the
cc/laughing-wescoff-c30811
branch
from
August 14, 2026 18:41
1012794 to
1fea365
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 10127942bd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The presenter time/locale tests injected synthetic zone1970.tab data through a fixed shared path (/tmp/opencattus-test-zone1970.tab) plus the OPENCATTUS_ZONE1970_TAB env var. On self-hosted runners carrying root-owned litter from previous sudo podman jobs, the fixture's unchecked ofstream write silently failed and three test cases read stale content (run 31017554351).
Following the Connection::ScopedTestInterfaces pattern from 34faf4d:
Timezone::ScopedTestZone1970Tab(BUILD_TESTING only) to inject zone1970.tab lines in-process; an empty override still exercises the timedatectl fallback.initializePresenterTestEnvironmentreturns the RAII guard; all call sites bind it.Validation: