Skip to content

Fix presenter timezone tests on hosts with stale /tmp fixtures - #77

Merged
viniciusferrao merged 1 commit into
masterfrom
cc/laughing-wescoff-c30811
Aug 14, 2026
Merged

viniciusferrao merged 1 commit into
masterfrom
cc/laughing-wescoff-c30811

Conversation

@viniciusferrao

Copy link
Copy Markdown
Member

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:

  • Add Timezone::ScopedTestZone1970Tab (BUILD_TESTING only) to inject zone1970.tab lines in-process; an empty override still exercises the timedatectl fallback.
  • Remove the env var and temp-file fixture; production discovery always reads /usr/share/zoneinfo/zone1970.tab, with no test backdoor.
  • initializePresenterTestEnvironment returns the RAII guard; all call sites bind it.

Validation:

  • almalinux:10 container preflight: 1213/1213 assertions.
  • Bare EL10 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.
  • CI on this branch: Jenkins green; Self-Hosted CI "Fast Tests" green (3/3).

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
viniciusferrao force-pushed the cc/laughing-wescoff-c30811 branch from 1012794 to 1fea365 Compare August 14, 2026 18:41

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/services/ansible/roles/network.cpp Outdated
@viniciusferrao
viniciusferrao merged commit 154465e into master Aug 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant