feat: the hw suite (H1, H4, H5, R1.7 CEC) and host-side suite blocks

vmsuite.sh runs NN-name.host.sh blocks on the host (reboot, scripts/vmcec.sh) with
prelude-host.sh; every block that applies Steamify says so first (INFO) so the shared
console is not silent for minutes. 68 checks pass.
This commit is contained in:
theupriser committed 2026-09-29 14:12:39 +02:00
1 parent b91ef9172e
commit 6d264acaf2
12 files changed
+50 -2

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ R2.2 (first desktop login look), H-Real (real Steam Machine).
prints the skipped manual rows; move the loader matrix under suite `boot` prints the skipped manual rows; move the loader matrix under suite `boot`
- [x] S2. Suite `cli` (55 checks pass): G1-G3, F1-F7 (exit codes, `features.state`, boot-desktop unit) - [x] S2. Suite `cli` (55 checks pass): G1-G3, F1-F7 (exit codes, `features.state`, boot-desktop unit)
- [x] S3. Suite `menu` (36 checks pass): R1.1-R1.6, R1.10 with scripted menu input (`vmrun.sh`) and `vmstate.sh` asserts - [x] S3. Suite `menu` (36 checks pass): R1.1-R1.6, R1.10 with scripted menu input (`vmrun.sh`) and `vmstate.sh` asserts
- [ ] S4. Suite `hw`: H1, H3 (`WIZARD_BIOS_DRY_RUN=1`), H4, H5, R1.7 (`vmcec.sh --no-sleep`) - [x] S4. Suite `hw` (68 checks pass; H3 BIOS dry-run still to add): H1, H3 (`WIZARD_BIOS_DRY_RUN=1`), H4, H5, R1.7 (`vmcec.sh --no-sleep`)
- [ ] S5. Suite `installer`: R2.1 (`vminstallsim.sh`) - [ ] S5. Suite `installer`: R2.1 (`vminstallsim.sh`)
- [ ] S6. R1.8 toggle matrix and R1.9 reboot checks (from the skill), as suite `toggles` - [ ] S6. R1.8 toggle matrix and R1.9 reboot checks (from the skill), as suite `toggles`
- [ ] S7. TESTPLAN.md: mark which rows are automated (a column or a tag), keep the results log automatic: - [ ] S7. TESTPLAN.md: mark which rows are automated (a column or a tag), keep the results log automatic:
+5 -1
View File
@@ -3,7 +3,7 @@
# CachyOS VM (Plasma, no Steamify: ~/vms/steamify-vm, from vminstall.sh --iso <CachyOS ISO> with VM_STEAMIFY=skip). # CachyOS VM (Plasma, no Steamify: ~/vms/steamify-vm, from vminstall.sh --iso <CachyOS ISO> with VM_STEAMIFY=skip).
# scripts/vmsuite.sh <suite> [--window] suites: the folders in share/vmtest/ (cli, ...) # scripts/vmsuite.sh <suite> [--window] suites: the folders in share/vmtest/ (cli, ...)
# Every block share/vmtest/<suite>/NN-name.sh starts from a fresh `ssh-ready` (vmreset.sh --fremont), # Every block share/vmtest/<suite>/NN-name.sh starts from a fresh `ssh-ready` (vmreset.sh --fremont),
# runs in the guest as the VM user (repo on /mnt), and prints PASS/FAIL/SKIP lines; the first # runs in the guest as the VM user (repo on /mnt; NN-name.host.sh blocks run on the host instead), and prints PASS/FAIL/SKIP lines; the first
# comment lines say which TESTPLAN rows it covers. Log: $VM_DIR.<suite>.log. Exit status = FAILs. # comment lines say which TESTPLAN rows it covers. Log: $VM_DIR.<suite>.log. Exit status = FAILs.
# Env: ONLY=<block name prefix> runs just that block; VM_DIR (default ~/vms/steamify-vm), REPO (default ../steamify-cachyos). # Env: ONLY=<block name prefix> runs just that block; VM_DIR (default ~/vms/steamify-vm), REPO (default ../steamify-cachyos).
set -uo pipefail set -uo pipefail
@@ -24,6 +24,10 @@ for block in "$dir"/*.sh; do
[[ -z "${ONLY:-}" || "$(basename "$block")" == "$ONLY"* ]] || continue # ONLY=50: just that block [[ -z "${ONLY:-}" || "$(basename "$block")" == "$ONLY"* ]] || continue # ONLY=50: just that block
printf '\n##### %s %s\n' "$(date +%T)" "$(basename "$block" .sh)" printf '\n##### %s %s\n' "$(date +%T)" "$(basename "$block" .sh)"
"$here/vmreset.sh" --fremont > /tmp/vmsuite-reset.out 2>&1 || { echo "FAIL vmreset.sh failed: $(tail -n 1 /tmp/vmsuite-reset.out)"; continue; } "$here/vmreset.sh" --fremont > /tmp/vmsuite-reset.out 2>&1 || { echo "FAIL vmreset.sh failed: $(tail -n 1 /tmp/vmsuite-reset.out)"; continue; }
if [[ "$block" == *.host.sh ]]; then # runs on the host (reboots, host scripts); prelude-host.sh has the helpers
( . "$repo/share/vmtest/prelude-host.sh"; . "$block" ) 2>&1 | sed -u 's/\x1b\[[0-9;]*m//g'
continue
fi
cat "$repo/share/vmtest/prelude.sh" "$block" | vm_ssh -o ConnectTimeout=6 -o LogLevel=ERROR bash -s 2>&1 | sed -u 's/\x1b\[[0-9;]*m//g' cat "$repo/share/vmtest/prelude.sh" "$block" | vm_ssh -o ConnectTimeout=6 -o LogLevel=ERROR bash -s 2>&1 | sed -u 's/\x1b\[[0-9;]*m//g'
done done
} 2>&1 | tee "$log" | tee -a "$TEST_LOG" } 2>&1 | tee "$log" | tee -a "$TEST_LOG"
+1
View File
@@ -1,4 +1,5 @@
# F3: every item and --boot desktop: all on, the boot-desktop unit enabled, VRAM left out with a warning. # F3: every item and --boot desktop: all on, the boot-desktop unit enabled, VRAM left out with a warning.
info "applying Steamify (installs packages, builds kernel modules: a few minutes)..."
out=$(sf --defaults --options gaming,theme,glyphs,single,launcher,notify,vram,cec,machine,poweroff --boot desktop); rc=$? out=$(sf --defaults --options gaming,theme,glyphs,single,launcher,notify,vram,cec,machine,poweroff --boot desktop); rc=$?
[[ $rc -eq 0 ]] && pass "F3 exit 0" || fail "F3 exit $rc" [[ $rc -eq 0 ]] && pass "F3 exit 0" || fail "F3 exit $rc"
expect_on gaming theme glyphs single launcher notify machine poweroff cec expect_on gaming theme glyphs single launcher notify machine poweroff cec
+1
View File
@@ -1,4 +1,5 @@
# F4: --options theme,single,machine --boot desktop: single brings the conversion; the rest stays off. # F4: --options theme,single,machine --boot desktop: single brings the conversion; the rest stays off.
info "applying Steamify (installs packages, builds kernel modules: a few minutes)..."
sf --defaults --options theme,single,machine --boot desktop >/dev/null; rc=$? sf --defaults --options theme,single,machine --boot desktop >/dev/null; rc=$?
[[ $rc -eq 0 ]] && pass "F4 exit 0" || fail "F4 exit $rc" [[ $rc -eq 0 ]] && pass "F4 exit 0" || fail "F4 exit $rc"
expect_on gaming theme single machine expect_on gaming theme single machine
+1
View File
@@ -1,5 +1,6 @@
# F5: --options launcher,vram,poweroff: poweroff brings Steam Machine support; conversion off, plasmalogin unchanged. # F5: --options launcher,vram,poweroff: poweroff brings Steam Machine support; conversion off, plasmalogin unchanged.
dm_before=$(current_display_manager) dm_before=$(current_display_manager)
info "applying Steamify (installs packages, builds kernel modules: a few minutes)..."
sf --defaults --options launcher,vram,poweroff >/dev/null; rc=$? sf --defaults --options launcher,vram,poweroff >/dev/null; rc=$?
[[ $rc -eq 0 ]] && pass "F5 exit 0" || fail "F5 exit $rc" [[ $rc -eq 0 ]] && pass "F5 exit 0" || fail "F5 exit $rc"
expect_on machine poweroff launcher expect_on machine poweroff launcher
+1
View File
@@ -1,4 +1,5 @@
# F7: on an install, --boot desktop, again, --boot gamescope: only Boot into changes; the menu ticks stay. # F7: on an install, --boot desktop, again, --boot gamescope: only Boot into changes; the menu ticks stay.
info "applying Steamify (installs packages, builds kernel modules: a few minutes)..."
sf --defaults --options gaming,theme,single,launcher,notify,machine,poweroff >/dev/null sf --defaults --options gaming,theme,single,launcher,notify,machine,poweroff >/dev/null
base=$(ticks | sed 's/boot //') base=$(ticks | sed 's/boot //')
sf --boot desktop >/dev/null; rc=$? sf --boot desktop >/dev/null; rc=$?
+16
View File
@@ -0,0 +1,16 @@
# H1 (LED driver) and H5 (power-off module) with the faked Steam Machine.
info "applying Steamify (installs packages, builds kernel modules: a few minutes)..."
sf --defaults --options gaming,theme,glyphs,single,launcher,notify,cec,machine,poweroff >/dev/null; rc=$?
[[ $rc -eq 0 ]] && pass "Steamify applied (exit 0)" || fail "Steamify exit $rc"
# H1
lsmod | grep -q '^leds_valve' && pass "H1 leds_valve loaded" || fail "H1 leds_valve not loaded"
n=$(compgen -G "/sys/class/leds/valve-leds*" | wc -l); [[ $n -eq 17 ]] && pass "H1 17 valve-leds nodes" || fail "H1 $n valve-leds nodes"
own=$(stat -c %U /sys/class/leds/valve-leds*/brightness 2>/dev/null | sort -u | tr '\n' ' '); [[ "$own" == "$(id -un) " ]] && pass "H1 the nodes belong to the user" || fail "H1 node owner: $own"
# H5
for k in $(ls /usr/lib/modules); do
compgen -G "/usr/lib/modules/$k/updates/dkms/steamify-fremont-poweroff.ko*" >/dev/null && pass "H5 power-off module built for $k" || fail "H5 no power-off module for $k"
done
sudo modprobe -r steamify_fremont_poweroff 2>/dev/null
out=$(sudo modprobe steamify_fremont_poweroff 2>&1); rc=$?
# in the VM there is no GPIO wake bit: it loads, or answers "No such device"
[[ $rc -eq 0 ]] || grep -q "No such device" <<< "$out" && pass "H5 the module loads (or: No such device, no GPIO wake bit)" || fail "H5 modprobe: $out"
@@ -0,0 +1,10 @@
# H4: Boot into desktop, reboot: Plasma straight after boot; Boot into gaming: SDDM autologin into gamescope (session file).
conf=/etc/sddm.conf.d/10-gamescope-autologin.conf
info "applying Steamify (a few minutes)..."
guest 'sf --defaults --options gaming,theme,single,machine --boot gamescope >/dev/null; echo done' | tail -n 1 | grep -q done && pass "H4 conversion applied" || fail "H4 apply"
guest "grep -h '^Session=' $conf" | grep -qi gamescope && pass "H4 gaming: the SDDM autologin session is gamescope" || fail "H4 gaming session: $(guest "grep -h Session= $conf")"
guest 'sf --boot desktop >/dev/null; echo done' | tail -n 1 | grep -q done && pass "H4 --boot desktop" || fail "H4 --boot desktop"
reboot_guest && pass "H4 the VM is back after the reboot" || { fail "H4 no ssh after the reboot"; return 0 2>/dev/null || exit 0; }
up=""; for _ in $(seq 40); do vm_ssh "pgrep -u $VM_USER -x plasmashell" >/dev/null 2>&1 && { up=1; break; }; sleep 3; done
[[ -n "$up" ]] && pass "H4 Plasma straight after the boot (boot into desktop)" || fail "H4 no plasmashell after the reboot"
guest 'sf --boot gamescope >/dev/null; echo done' | tail -n 1 | grep -q done && pass "H4 --boot gamescope" || fail "H4 --boot gamescope"
+4
View File
@@ -0,0 +1,4 @@
# R1.7 / H2: HDMI-CEC with vivid (fake TV and remote): scripts/vmcec.sh prints PASS/FAIL/SKIP (2 SKIP in the VM: wake from TV, sleep).
info "applying Steamify (a few minutes)..."
guest 'sf --defaults --options gaming,theme,glyphs,single,launcher,notify,cec,machine,poweroff >/dev/null; sudo modprobe vivid; echo done' | tail -n 1 | grep -q done && pass "CEC: Steamify applied, vivid loaded" || fail "CEC setup"
"$repo/scripts/vmcec.sh" --no-sleep 2>&1 | sed 's/\x1b\[[0-9;]*m//g' | grep -E '^(PASS|FAIL|SKIP)|PASS|FAIL' | sed -E 's/^[^A-Z]*(PASS|FAIL|SKIP)/\1 CEC:/' | cut -c1-140
+1
View File
@@ -6,6 +6,7 @@ for n in 1 3 4 5 6 7 8 9 10; do grep -qE "^ +$n +[a-z-]+ +\[x\]" <<< "$out" && p
grep -qE "^ +11 .*\[ \]" <<< "$out" && pass "R1.1 Update BIOS not ticked" || fail "R1.1 Update BIOS ticked" grep -qE "^ +11 .*\[ \]" <<< "$out" && pass "R1.1 Update BIOS not ticked" || fail "R1.1 Update BIOS ticked"
grep -q "Boot into: \[gamescope\]" <<< "$out" && pass "R1.1 boots into gamescope by default" || fail "R1.1 boot default is not gamescope" grep -q "Boot into: \[gamescope\]" <<< "$out" && pass "R1.1 boots into gamescope by default" || fail "R1.1 boot default is not gamescope"
# R1.2: everything OK, back in the menu with all on # R1.2: everything OK, back in the menu with all on
info "applying Steamify (installs packages, builds kernel modules: a few minutes)..."
out=$(menu '\ny\nm\nq\nn\n') out=$(menu '\ny\nm\nq\nn\n')
grep -q '^\[ERROR\]' <<< "$out" && fail "R1.2 errors: $(grep -m1 '^\[ERROR\]' <<< "$out")" || pass "R1.2 no errors" grep -q '^\[ERROR\]' <<< "$out" && fail "R1.2 errors: $(grep -m1 '^\[ERROR\]' <<< "$out")" || pass "R1.2 no errors"
grep -q "^\[OK\]" <<< "$out" && pass "R1.2 applied (the run printed [OK] lines)" || fail "R1.2 printed no [OK] line" grep -q "^\[OK\]" <<< "$out" && pass "R1.2 applied (the run printed [OK] lines)" || fail "R1.2 printed no [OK] line"
+8
View File
@@ -0,0 +1,8 @@
# Sourced in front of a *.host.sh block (scripts/vmsuite.sh): the block runs on the host with the VM's ssh helpers.
. "$repo/scripts/common.sh"
info() { echo "INFO $*"; }
pass() { echo "PASS $*"; }; fail() { echo "FAIL $*"; }; skip() { echo "SKIP $*"; }
# guest <cmd...>: a command in the guest with the Plasma session environment and Steamify's libs
guest() { { cat "$repo/share/vmtest/prelude.sh"; echo "$*"; } | vm_ssh -o ConnectTimeout=6 -o LogLevel=ERROR bash -s 2>&1 | sed 's/\x1b\[[0-9;]*m//g'; }
waitssh() { local _; for _ in $(seq 60); do vm_ssh -o ConnectTimeout=4 'uptime -p' >/dev/null 2>&1 && return 0; sleep 5; done; return 1; }
reboot_guest() { vm_ssh 'sudo systemctl reboot' >/dev/null 2>&1; sleep 25; waitssh; }
+1
View File
@@ -1,6 +1,7 @@
# Sent to the guest in front of every block (scripts/vmsuite.sh): helpers and Steamify's libs. # Sent to the guest in front of every block (scripts/vmsuite.sh): helpers and Steamify's libs.
# ssh has no Plasma session: the theme item (Vapor layout) needs one (vmrun.sh does the same). # ssh has no Plasma session: the theme item (Vapor layout) needs one (vmrun.sh does the same).
export XDG_RUNTIME_DIR=/run/user/$(id -u) WAYLAND_DISPLAY=wayland-0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus export XDG_RUNTIME_DIR=/run/user/$(id -u) WAYLAND_DISPLAY=wayland-0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
info() { echo "INFO $*"; }
pass() { echo "PASS $*"; }; fail() { echo "FAIL $*"; }; skip() { echo "SKIP $*"; } pass() { echo "PASS $*"; }; fail() { echo "FAIL $*"; }; skip() { echo "SKIP $*"; }
sudo mountpoint -q /mnt || sudo mount -t 9p -o trans=virtio,version=9p2000.L repo /mnt sudo mountpoint -q /mnt || sudo mount -t 9p -o trans=virtio,version=9p2000.L repo /mnt
cd /mnt || exit 1 cd /mnt || exit 1