Skip to content

test: run only the update on the sudo boundary's PATH - #167

Closed
IronsideXXVI wants to merge 1 commit into
omacom:mainfrom
IronsideXXVI:boot-verify-test-boundary-path
Closed

IronsideXXVI wants to merge 1 commit into
omacom:mainfrom
IronsideXXVI:boot-verify-test-boundary-path

Conversation

@IronsideXXVI

Copy link
Copy Markdown
Contributor

test/integration/mac-update-boot-verify-test.sh fails "an update that leaves a coherent boot chain succeeds" on every omarchy runtime from omacom/omarchy 56a910b0e ("Use ordinary sudo", #17000) on. That commit's sudo-boundary fixture puts its stand-ins first on PATH when it is sourced, and cp is one of them, so the Limine Mac fixture copied the kernel with the stand-in and the boot check found no /boot/vmlinuz-linux-aurora.

This keeps the host's PATH for the fixture setup and puts the boundary's PATH on the update alone.

Test results (bash test/integration/mac-update-boot-verify-test.sh):

omarchy runtime main this branch
2fca7fe0 (current pin) pass 4 ok / 0 not ok
56a910b0e (#17000) 0 ok / 1 not ok 4 ok / 0 not ok
3b88cbcee 0 ok / 1 not ok 4 ok / 0 not ok
52d735da5 (omacom/omarchy#18582) 0 ok / 1 not ok 4 ok / 0 not ok

This unblocks #134 and any runtime-pin bump.

From omacom/omarchy 56a910b0e ("Use ordinary sudo", #17000) on, the
runtime's sudo-boundary fixture puts its stand-ins first on PATH when it
is sourced, and cp is one of them. The Limine Mac fixture then copied
the kernel to /boot with the stand-in, so the boot check found no
/boot/vmlinuz-linux-aurora and failed "an update that leaves a coherent
boot chain succeeds" on every runtime from 56a910b0e on, while the
2fca7fe0 pin still passed.

Keep the host's PATH for the fixture setup and switch to the boundary's
PATH only around reset_boundary and omarchy update. The uname copy uses
/usr/bin/cp, as upstream's update-boot-verify test now does. With the
2fca7fe0 runtime both PATHs are the same, so nothing changes there.
@IronsideXXVI

Copy link
Copy Markdown
Contributor Author

Local run of the tests.yml and package-resolution steps on the merge with main (95b0dd9): the four gate scripts, the omarchy-mac-boot and omarchy-mac suites, integration, both acceptance runs, omacom-lane and candidate-set all exit 0, and package resolution passes 53 of 53 checks. Could a maintainer approve the two workflow runs waiting on this PR?

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, this checks out. I reproduced it locally on a merge with main (95b0dd9): on main, mac-update-boot-verify fails "an update that leaves a coherent boot chain succeeds" on 56a910b0e, 3b88cbcee and 52d735da5, and passes on the 2fca7fe0 pin. With this branch it's 4 ok on all four.

The cause is what you said. Since #17000 the sudo-boundary fixture exports its bin dir first on PATH, and cp there is a test-step stub, so limine_mac's kernel copy into /boot was a no-op. Newer omarchy-update also no longer pins its own PATH, so the update does need the boundary's PATH, and keeping it to run_update is the right scope. On 2fca7fe0 sourcing the fixture doesn't touch PATH, so nothing changes on the pin.

A side benefit: mac_boot_package bakes the current PATH into the entrypoint through limine_mac_env, so on newer runtimes the real update-verify was also running with the stub cp. It now gets the host's commands.

I also checked the test still bites. Making update-verify always fail, dropping the missing-UKI check in omarchy-apple-silicon-boot-check, and putting the fixture setup back on the boundary PATH each fail the test as expected.

Full integration on the pin (59 ok) and omarchy-mac/test/all (122 ok) pass on the merge.

One heads-up for #134, not for this PR: on 3b88cbcee, test/integration/all still stops with exit 127 in provision-owner-luks-test.sh, because upstream run_provisioning now calls record_eula and configure_language, which that test doesn't stub. So the pin bump needs that too.

@IronsideXXVI

Copy link
Copy Markdown
Contributor Author

Thanks for checking that the test still fails on those three changes, and for spotting the PATH baked into the entrypoint.

@IronsideXXVI

Copy link
Copy Markdown
Contributor Author

This fix was already landed on main in f562442 ("Keep the boundary stand-ins to the update in the boot-verify test"), so this PR is superseded and can be closed.

@IronsideXXVI

Copy link
Copy Markdown
Contributor Author

Superseded by f562442 on main; closing.

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.

2 participants