Skip to content

Reset run_qml_fixture config dir between calls to avoid mutating shell/ - #21993

Open
isaquegozzi wants to merge 4 commits into
omacom:quattrofrom
isaquegozzi:fix/run-qml-fixture-repeat-symlinks
Open

isaquegozzi wants to merge 4 commits into
omacom:quattrofrom
isaquegozzi:fix/run-qml-fixture-repeat-symlinks

Conversation

@isaquegozzi

Copy link
Copy Markdown

Calling run_qml_fixture more than once with the same fixture name in a single test file (for example, running a parameterized fixture across several environment scenarios) reuses $QML_FIXTURE_TMP/$fixture without clearing it first.

On the second call, ln -s "$ROOT/shell/$link" "$config_dir/$link" follows the existing directory symlink and writes a self-referential symlink directly into the git working tree (shell/<dir>/<dir> -> .../shell/<dir>). On a third call, ln -s fails with File exists. Switching to a second fixture in the same file also only signaled $QML_FIXTURE_PID instead of stopping its child process tree like qml_fixture_cleanup does.

Changes

  • Extract qml_fixture_stop_process in test/shell.d/base-test.sh and call it from both qml_fixture_cleanup and run_qml_fixture so child processes from a prior fixture run are stopped before the next run starts.
  • Clear $config_dir (rm -rf "$result" "$config_dir") before recreating it in run_qml_fixture, and link with ln -sfn.
  • Add a regression test in test/shell.d/test-runner-test.sh calling run_qml_fixture three times on the same fixture name and asserting that $ROOT/shell/ stays untouched and prior fixture child processes are terminated between runs.

Verification

  • The new regression case in test/shell.d/test-runner-test.sh fails on quattro (shell/Commons/Commons created + File exists on run 3) and passes with this fix.
  • ./test/all passes (test/cli + 315/315 shell test files, 0 failures).

Filed by Gemini via Antigravity.

@greptile-apps

greptile-apps Bot commented Dec 6, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Low impact] The PR appears safe to merge.

Summary

Makes repeated run_qml_fixture calls safe:

  • Repeated QML fixture runs stop old processes and rebuild their config.

The previous zombie-process finding is fixed. No new actionable issues were found.

Reviews (3) · Last reviewed commit: "Avoid replacing existing fixture entries..." · Reviewed by Greptile

Comment thread test/shell.d/test-runner-test.sh Resolved
@omarchybot omarchybot added the bug Something isn't working label Dec 6, 2026
omarchybot and others added 3 commits December 6, 2026 03:52
A killed child remains visible to kill -0 if its adopted parent has not reaped it. Poll the process state so the regression still fails for live children and passes once they exit.

Co-Authored-By: Codex High <noreply@openai.com>
Rebuilding a config for a fixture named home or bin would delete the scratch state or executable stubs that the caller prepared for the test.

Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>

Co-Authored-By: Codex High <noreply@openai.com>
Treat the link destination as a filename so it cannot redirect the link into another directory or overwrite a copied fixture file. Let the regression report surviving children without signaling a PID that could have been reused.

Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>

Co-Authored-By: Codex High <noreply@openai.com>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Dec 6, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Recommend: Hold — the GitHub test run needs maintainer approval, and the worker suite and merge-readiness check still block ready.

On an Omarchy ISO worker, repeated fixture runs wrote into shell/ on quattro and with the fix reverted. All three runs passed on 19b0c668. The pushed commits keep fixture configs separate from scratch HOME and bin, use ln -sT, and distinguish exited children from live ones. CLI and focused tests passed. Three shell failures also occurred on quattro, and the panel timing test failed intermittently. The fixture cleanup overlaps with the watcher fix in #14545.

Checked by Codex High, Opus 5.5 High, and muse-wonder via pi, thinking high. The reviewers agreed and may have shared context.

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

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants