Skip to content

Merge duplicate tests into shared and table-driven files - #16337

Merged
ryanrhughes merged 35 commits into
quattrofrom
t3/merge-duplicate-tests
Oct 27, 2026
Merged

ryanrhughes merged 35 commits into
quattrofrom
t3/merge-duplicate-tests

Conversation

@ryanrhughes

@ryanrhughes ryanrhughes commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Folds duplicated test files together and turns per-item files into tables, and makes several checks able to fail that couldn't.

Merges:

  • audio-pactl replaces the three pactl tests.
  • shell-ipc collects the omarchy-shell IPC tests. Its trailing-newline case goes: $() strips trailing newlines whatever the client prints.
  • keybindings-menu merges the three keybindings tests.
  • dev-link and dev-unlink share one file, and the mise node and python dev-env tests become one table.
  • Smaller folds: menu-guards-parallel into menu-guards, migrate-wrapper into migrate-scope (which now stubs the dismiss so it doesn't close a real toast), mkinitcpio-apple-drop-ins into mkinitcpio-hooks, factory-reset-limine-hashes into factory-reset-limine, hw-external-monitors into hw-display, the two session-lock files into one, screenrecording-stale-audio into screenrecording, and hook-state-name-guard into one loop.

Tables:

  • sudoers-test replaces timezone, dns-sudoers and browser-policy-sudoers, plus the rule half of locale-sudoers.
    • Every drop-in must carry its exact expected rule and pass visudo -cf; the timezone regex runs through permit/refuse rows.
    • The root halves of omarchy-dns, locale-generate and browser-policy run as root in a user and mount namespace behind a poisoned PATH, instead of having their source grepped. The locale probe uses a code the packaged registry knows, so a root half that honoured OMARCHY_LOCALE_GEN goes red.
    • The stub sudo ignores SIGPIPE. grep -q closes the pipe at its first match, and under the parallel runner's load 41 of 300 elevation probes fell back to pkexec; none do now. The locale-gen probe skips when the test itself runs as root, where the namespace would map to real root.
  • hardware-quirks-test replaces seven per-quirk files. It runs each leaf against a fake machine (no-op on a non-match, install on a match, plus SKU and failure rows), including n1x.sh, whose next step after its gate drops every kernel but linux-omarchy. It also runs the real config, hardware and user dispatchers and requires every setup script to be reached, with platform setup last; a comment or message naming a leaf doesn't count as reaching it.
  • chromium-extensions-test computes each bundled extension's id from its key, pins the ids that shipped, and holds each native host to exactly the extensions whose scripts message it. It runs the real install/user/chromium.sh into a scratch home.
  • Network panel: the captive-portal and OWE QML fixtures share one harness.

Checks that could never fail now can:

  • Keybindings stale cache: it seeded v13 while the code reads a newer key. It now builds a real cache first, and goes red with the key-names file left out of the cache key.
  • migrate-notify foreign lock: it would have passed against the shared /tmp lock. It now holds that lock inside a private mount namespace, and goes red against a notifier reverted to the shared lock.
  • Browser theme setter: the folded sudoers test was the only check that the setter hands its writer bare hex. theme-set-browser-test now asserts the argument.

Dropped on purpose: the exact migrate toast copy, the --force rejection from migrate-wrapper, the exact mise call log (now per line), the WhatsApp run_at value and the copy-url permission list. They're output strings, an unknown-option branch or manifest values.

Quattro rebuilt the Kimi tests, so the agent-usage-kimi fold is gone. Its version sits on agent-usage-helpers.sh (#14040) against the current collector contract. Now based on quattro, with quattro merged in; all 23 changed test files pass on their own.

Migrations run once per machine and are frozen once they ship, so their tests
stop guarding anything. Drop the migration test files and the migration blocks
inside other tests, and update the testing docs to say migrations get no suite
test.
omarchy-dns reads it through grep -q under pipefail; a second write after
grep stopped reading died of SIGPIPE under load and sent the helper to
polkit.
@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The changes since the previous review appear safe to merge.

Summary

The PR combines duplicate tests into shared files and tables. The latest changes tighten hardware setup checks and make the sudo tests safer and less prone to false failures.

  • Sudoers checks cover each rule and its root-only helpers.
  • Hardware checks cover device quirks and setup dispatch.
  • Chromium extension checks connect bundled IDs to native hosts.
  • Keybindings checks cover menu names, cache refreshes, and Lua scans.
  • Audio tests share one suite for pactl parsing and device cases.
  • Shell IPC checks cover socket calls, display requests, and restart behavior together.
  • Menu guard checks cover parallel answers and reader output together.
  • Development environment checks use shared tables and link tests.
  • Network panel fixtures share a harness for two QML scenarios.
  • Migration tests combine runner and notifier cases.
  • Mkinitcpio checks include Apple boot drop-ins in the shared hook suite.
  • Screen recording checks include stale audio cleanup in the main suite.
  • Session lock checks share one suite for lock state and stranded locks.
  • Limine reset checks cover direct kernel and initramfs hashes.
  • Hook and state name checks run together over safe and escaping names.

Review was based on code inspection; the test suites were not run.

Reviews (3) · Last reviewed commit: "Accept either quote style in the native ..." · Reviewed by Greptile

Comment thread test/shell.d/sudoers-test.sh Resolved
@omarchybot omarchybot added the enhancement New feature or request label Oct 22, 2026

@chessing234 chessing234 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.

all good

Quattro rebuilt the Kimi tests on agent-usage-helpers.sh against the current collector contract, which the fold here predates. The keybindings menu keeps this branch's loop over the script's own pairings in place of quattro's restated list.
… keep the shipped ids

Set membership passed with the copy-url and yt-dlp grants swapped, and a regenerated key, which orphans an extension's settings, passed too.
A user namespace maps root to real root, so locale-gen would rebuild this machine's locale archive from the scratch locale.gen.
nvidia.sh names hardware/n1x.sh in a comment and a message, so n1x.sh passed as reached with its all.sh line removed.
@ryanrhughes
ryanrhughes merged commit 25c4066 into quattro Oct 27, 2026
2 checks passed
rdoupe added a commit to omarchy-asus/omarchy-asus that referenced this pull request Oct 28, 2026
… Omarchy 4.5.0rc2 (#376)

* omarchy 4.5.0rc2-1.101: rebase onto Omarchy 4.5.0rc2

Our patches are now on fork branch asus/v4-5-0-rc2. Most of the
adaptations follow upstream's test cleanup: it dropped tests that only
read source text (omacom/omarchy#16334), so our edits to them go
(0003, 0017, 0026, general-0004), and it merged the stranded-lock test
into hyprland-session-lock-test.sh (omacom/omarchy#16337), where 0024's
and 0027's cases are ported. 0016 now sits on top of
omacom/omarchy#7623, which rc2 ships: the IPN-bus watch replaces its
light closed-panel poll, and opening the panel fetches every peer.
general-0001's timer stub moves beside upstream's new plugin stub.

No carried fix is in rc2, so nothing drops.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* omarchy-settings 4.5.0rc2-1.101: rebase onto Omarchy 4.5.0rc2

The same patches as omarchy, from fork branch asus/v4-5-0-rc2; upstream
now installs Omarchy's timesyncd drop-in.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: rdoupe <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
omarchybot added a commit to vovarbv/omarchy that referenced this pull request Nov 1, 2026
quattro folded test/shell.d/migrate-wrapper-test.sh into migrate-scope-test.sh (omacom#16337), so the locked-run case moves there, written against that file's run_migrate and its own HOME so the earlier cases' markers do not hide the pending migrations.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
omarchybot added a commit to ReneXiong/omarchy that referenced this pull request Nov 1, 2026
Quattro's test consolidation (omacom#16337) conflicted with this branch's tests at the end of screenrecording-test.sh; both blocks are kept, the stale-audio tests first, because this branch's block replaces the recorder-process stub they rely on.

Quattro's omacom#15073 added a stop branch for a recording with no file to finalize, which relied on the indicator refresh this branch moves out of the common path. It now refreshes there too, with an assertion that a stop with no recording to finalize clears the indicator.
omarchybot added a commit to Faisal-Fayaz/omarchy that referenced this pull request Nov 1, 2026
quattro folded browser-policy-sudoers-test.sh into sudoers-test.sh (omacom#16337) and dropped its grep checks on the helper's source in favour of running it, so the deletion stands and this branch's added grep bans go with it. The rename's behaviour stays covered by browser-policy-dir-test.sh.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
omarchybot added a commit to baseman70/omarchy that referenced this pull request Nov 1, 2026
quattro's omacom#16337 and the worktree-shell restart work both appended tests to the end of test/shell.d/restart-shell-test.sh, so the slow lock IPC cases and the worktree shell case now sit one after the other. bin/omarchy-restart-shell merged without conflict.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
omarchybot added a commit that referenced this pull request Nov 1, 2026
quattro folded hyprland-session-lock-stranded-test.sh into hyprland-session-lock-test.sh (#16337), so the voxtype cases move there, against the real omarchy-hyprland-session-locked, with the overlapping hyprlock and data-directory cases folded together.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
omarchybot added a commit to hanscnelson/omarchy that referenced this pull request Nov 2, 2026
quattro folded hw-external-monitors-test.sh into hw-display-test.sh (omacom#16337), so the Touch Bar cases move there. Three of the eight are dropped as covered by the rest: the standalone and T1 interface-bound Touch Bar cases exercise the same interface lookup as the T2 case, and a disconnected Touch Bar beside HDMI was already ignored by the status check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
namespaceMarcello added a commit to namespaceMarcello/omarchy that referenced this pull request Nov 2, 2026
omacom#16337 folded menu-guards-parallel-test.sh into menu-guards-test.sh, in
the same order and with its menu_js helper. Move this branch's block
there too, after the captured-reader case, as it stood in the old file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants