Keep YT6801 fallback through hardware reruns
This commit is contained in:
1 parent
efa476114b
commit
824be4b524
2 files changed
+11
-31
No files matched your search
@@ -1,9 +1,4 @@
|
|||||||
# Use the upstream driver for the Motorcomm YT6801 adapter used by the Slimbook Executive.
|
# Fresh installs use the kernel's upstream dwmac-motorcomm driver and do not
|
||||||
if ! yt6801_devices=$(lspci -Dn -d 1f0a:6801); then
|
# install yt6801-dkms. Existing systems retire that fallback in migration
|
||||||
echo "Unable to discover YT6801 adapters." >&2
|
# 1788279117 only after proving the running kernel alias and every live binding;
|
||||||
return 1
|
# a manual hardware-setup rerun must not remove it ahead of that cutover.
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n $yt6801_devices ]]; then
|
|
||||||
omarchy-pkg-drop yt6801-dkms
|
|
||||||
fi
|
|
||||||
@@ -320,30 +320,15 @@ run_migration
|
|||||||
assert_no_privileges "an unaffected machine must need no privileges"
|
assert_no_privileges "an unaffected machine must need no privileges"
|
||||||
pass "an unaffected machine is a successful no-op"
|
pass "an unaffected machine is a successful no-op"
|
||||||
|
|
||||||
# Setup leaves are sourced, and must not inspect/load the live ISO kernel.
|
# Setup leaves are sourced. A manual rerun on an old or partially migrated
|
||||||
|
# system must leave the fallback in place for the migration's proven cutover.
|
||||||
reset_state
|
reset_state
|
||||||
bash -eE -c 'source "$1"' bash "$ROOT/install/hardware/fix-yt6801-ethernet-adapter.sh"
|
bash -eE -c 'source "$1"' bash "$ROOT/install/hardware/fix-yt6801-ethernet-adapter.sh"
|
||||||
[[ ! -e $TEST_STATE/package ]] || fail "hardware setup did not remove the vendor package"
|
[[ -e $TEST_STATE/package && -e $TEST_STATE/vendor-loaded ]] ||
|
||||||
if grep -Eq '^(modinfo|modprobe|rmmod|tee) ' "$TEST_CALLS"; then
|
fail "manual hardware setup retired the YT6801 fallback"
|
||||||
fail "hardware setup must not manipulate the installer kernel"
|
[[ ! -s $TEST_CALLS ]] ||
|
||||||
fi
|
fail "manual hardware setup performed package, discovery, or module work" "$(cat "$TEST_CALLS")"
|
||||||
pass "fresh setup removes the package independently of the ISO kernel"
|
pass "manual hardware setup leaves the vendor fallback for the proven migration cutover"
|
||||||
|
|
||||||
for fault in pci-fail pci-partial query-fail remove-fail; do
|
|
||||||
reset_state
|
|
||||||
TEST_FAULT=$fault
|
|
||||||
if bash -eE -c 'source "$1"' bash "$ROOT/install/hardware/fix-yt6801-ethernet-adapter.sh" >"$test_tmp/output" 2>&1; then
|
|
||||||
fail "hardware setup must fail on $fault"
|
|
||||||
fi
|
|
||||||
[[ -e $TEST_STATE/package ]] || fail "failed setup unexpectedly removed the package"
|
|
||||||
pass "fresh setup propagates $fault"
|
|
||||||
done
|
|
||||||
|
|
||||||
reset_state
|
|
||||||
: >"$TEST_STATE/devices"
|
|
||||||
bash -eE -c 'source "$1"' bash "$ROOT/install/hardware/fix-yt6801-ethernet-adapter.sh"
|
|
||||||
assert_no_privileges "setup without target hardware must need no privileges"
|
|
||||||
pass "fresh setup skips machines without target hardware"
|
|
||||||
|
|
||||||
# Exercise the real runner's completion markers and queue, without using the
|
# Exercise the real runner's completion markers and queue, without using the
|
||||||
# current user's state directory or running any other repository migrations.
|
# current user's state directory or running any other repository migrations.
|
||||||
|
|||||||
Reference in new issue
Block a user