diff --git a/.gitignore b/.gitignore index e0c7bdd..f5461ff 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,3 @@ share/* *.tmp host-keys.pub __pycache__/ -!share/golden/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 69df759..fa9494a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ of the history. ## Unreleased +- **feat: suite `gnome`** (`share/vmtest/gnome/`, GN1-GN7) on the GNOME + GDM VM (`vmsuite.sh gnome`, base image from `~/vms/gnome-vm`, port 2307); `vmsuite.sh` starts GDM/GNOME instead of Plasma for it; `prelude.sh` reads the running desktop and loads the GNOME libs; `vmtest.sh` runs it by default. New KDE block `cli/70-k1-kde-unchanged.sh` +- **chore: removed `share/vmtest/backend` and `share/golden/`** (safety nets of the scrapped Go refactor) + - **feat: `share/golden/`: a no-VM sandbox (bubblewrap, fake `/etc` `/sys` `$HOME`, shim `pacman` `systemctl` `sudo` `uname` `modinfo`) and golden `--backend status` and apply `plan` output of the bash 2.11.1 backend for an AMD PC, an NVIDIA PC and a Steam Machine; `record.sh` records, `record.sh check` compares (the Go refactor's safety net)** ## 0.5.0 - 2026-10-02 diff --git a/TESTPLAN.md b/TESTPLAN.md index b61dc9c..3654e03 100644 --- a/TESTPLAN.md +++ b/TESTPLAN.md @@ -64,6 +64,22 @@ change only shows right after Enter). ## F. Features per release +### F-GNOME. Steamify on GNOME/GDM (`feature/gnome-prototype`; suite `gnome` on `~/vms/gnome-vm`, plain CachyOS + GNOME + GDM, no Steamify) + +`scripts/vmsuite.sh gnome` (also part of `vmtest.sh`). KDE regression for it: cli block `70-k1-kde-unchanged.sh`. + +| # | Block | Expect | +|---|---|---| +| GN1 | `10-n1-menu.sh` | GDM and GNOME detected; GNOME theme offered; Plasma theme and single user mode hidden (menu and `--backend status`) | +| GN2 | `20-n2-conversion.sh` | `custom.conf` autologin, AccountsService `Session`/`XSession`, GDM-aware session tools (CachyOS's kept as `.bak-steamify`), pacman hook, sudoers rule, GNOME packages, launcher entry, shellcheck, second apply changes nothing | +| GN3 | `30-n3-turn-off.sh` | `custom.conf` and CachyOS's tools exactly as before; hook, sudoers rule, helper gone; GDM stays | +| GN4 | `40-n4-theme.sh` | dark style, accent, wallpaper, buttons, GTK4 colors, extensions; off restores every value | +| GN5 | `50-n5-desktop-pref.sh` | `--desktop kde\|gnome\|last` stored, bad values refused, the session tool resolves to what is installed | +| GN6 | `60-n6-switch-reboot.host.sh` | stand-in gamescope session: boot into it, Switch to Desktop, Return to Gaming Mode, boot into desktop and back across reboots, pacman hook restores our tools | +| GN7 | `70-n7-both-desktops.sh` | with Plasma installed too: GDM kept, both themes offered, preferred/last desktop picks the session | + +Not automatable: gamescope itself (no rendering in the VM), the app's dock icon and window frame, the Settings panel, real hardware (GDM restart behaviour). + ### F2.12.0 The SteamOS conversion on NVIDIA (`release/2.12.0`; suite `nvidia`, fake NVIDIA PC) Since 2.12.0 "Gaming on NVIDIA" (Steam on the desktop) is replaced by the SteamOS conversion with a patched gamescope @@ -178,3 +194,4 @@ and started with `--fremont`. Automated: `scripts/vmtest.sh` (see the vm-install | 2026-10-14 | Steamify `release/2.12.0` (dc189dc), plain CachyOS VM `~/vms/steamify-vm` (new ssh key: the old throwaway one was gone, authorized in the `ssh-ready` snapshot), dev `main` + the new nvidia suite; on the laptop (Ubuntu, KVM), headless | cli, menu, hw, installer, toggles, nvidia (N1, G1, N2-N5 rewritten for 2.12.0); boot loaders and the plain-PC install check not run (need the Steamify ISO) | **292 pass, 0 fail** (cli 65, menu 37, hw 78, installer 4, toggles 42, nvidia 66). Before the rewrite the old nvidia suite failed 8 checks, all because "Gaming on NVIDIA" is gone in 2.12.0. Test side: gamescope's smoke test needs a Vulkan device, so the VM gets `vulkan-swrast`; after a reboot the same gamescope fails with `vkAllocateMemory failed (-2)` on lavapipe in this VM (before the reboot it passes), so the offline-reinstall check runs before the reboot. Not seen on real hardware yet (N6) | | 2026-10-14 | Steamify 2.12.0 on the ISO `steamify-cachyos-2.12.0-dev-261014-x86_64.iso` (sha256 `bd93fa6b…ed47c`, built from `release/2.12.0`), dev `main` (7dd1f37); on the laptop (Ubuntu, KVM), headless | B1-B5 for limine, systemd-boot and grub; the plain-PC install check (generic) for all three | boot loaders: **limine 43, systemd-boot 42, grub 42 pass, 0 fail**. Plain PC: 21-22 pass, **1 fail per loader: "cec is on, but this is not a Steam Machine"**. Cause: `steamify-install` falls back to "everything on" (`...,vram,cec,machine,poweroff`) when Calamares passes no selection (the headless test install), and `cec` is offered on every PC; `poweroff` stays off by itself (`machine_available`). The docs say HDMI-CEC is ticked by default only on a Steam Machine: either the ISO's fallback should only include `cec` on a Steam Machine, or this check should not expect it off. To decide; a real install through the chooser is not affected by the fallback. Test side: three parallel first installs corrupted the shared package cache (`could not rename ... .part`): install one VM first to fill `~/vms/pkg-cache`; a first retry also hit a transient "cachyos: signature ... is invalid" from a mirror. Laptop needs a `bsdtar` shim (pycdlib) and `VM_SSH_KEY` outside `~/.ssh` | | 2026-10-14 | Steamify 2.12.0 on the rebuilt ISO `steamify-cachyos-2.12.0-dev-261014-x86_64.iso` (the ISO repo's PR #26 merged: the install fallback only turns HDMI-CEC on for a Steam Machine), dev `main` (7e11b94); laptop, headless | B1-B5 for limine, systemd-boot, grub; the plain-PC install check for all three | **boot loaders: limine 43, systemd-boot 42, grub 42; plain PC: limine 23, systemd-boot 22, grub 22: all pass, 0 fail.** The earlier "cec is on, but this is not a Steam Machine" is fixed. (The limine boot line in the summary says "aborted" only because its VM already existed from the first run of the same ISO; its 43 passed.) Test side: six parallel installs of a newly released kernel corrupted the shared package cache (`linux-cachyos ... corrupted (PGP signature)`): delete the new files from `~/vms/pkg-cache/pkg`, install one VM first, then the rest | +| 2026-10-15 | Steamify `feature/gnome-prototype` (dbaeaa1, from 2.12.0), plain CachyOS VM `~/vms/steamify-vm` and the new GNOME VM `~/vms/gnome-vm`, dev `main` + the `gnome` suite; laptop, headless | KDE regression: cli (+ new block 70-k1), menu, hw, installer, toggles, nvidia. GNOME: GN1-GN7 | **KDE: cli 89, hw 78, menu 37, installer 4, nvidia 66, toggles 42: 0 fail.** **GNOME: 0 fail** (first run 110 pass, 5 fail, all test bugs: shellcheck needs `-S warning -e SC2034,SC2154`, the VM's GDM already had autologin, a sed range cut the function out; GN2, GN3, GN5 re-run: 32, 11, 8 pass; GN1, GN4, GN6, GN7 passed first time). The Go-only `backend` suite and `share/golden` were removed (the Go refactor is scrapped). Not run: boot loaders, app screens U1-U9, real hardware | diff --git a/gnome/PLAN.md b/gnome/PLAN.md index 3365102..6052fda 100644 --- a/gnome/PLAN.md +++ b/gnome/PLAN.md @@ -1,5 +1,8 @@ # Steamify on GNOME (GDM): prototype plan +## Test status 2026-10-15 +Automated suite `gnome` (`scripts/vmsuite.sh gnome`, TESTPLAN F-GNOME, GN1-GN7): all pass, including session switching with the stand-in session, reboot persistence, boot into desktop, KDE+GNOME together. KDE regression (6 suites) passes on the branch. Open item (6) of the list below (GNOME regression run) is done; the rest stands. + ## RESUME HERE (written 2026-10-14, end of the first session) State: product branch `feature/gnome-prototype` in steamify-cachyos (pushed, not merged; main is the 2.12.0 release), the theme repo `github.com/theupriser/steamify-gnome-theme` (main). Everything is committed; the VM image is NOT in git (it lived in ~/vms/gnome-vm on one laptop). @@ -51,9 +54,9 @@ plus pacman hook, relogin by restarting gdm). 3. [x] Check: custom.conf, AccountsService, hook, sudoers, our tools in place. 4. [x] (gamescope itself dies in the VM: Vulkan/DRM scanout errors, also without GNOME; GDM did start it) Reboot: GDM autologs into the gamescope session (loginctl session desktop/type; gamescope may not render in the VM, a running session is enough). 5. [~] (gamescope->GNOME and GNOME->gamescope verified with a stand-in gamescope session (Exec=sleep infinity in /usr/share/wayland-sessions/gamescope-session.desktop, original kept as .real); reboot persistence, `boot` option and the shortcut click not yet) `steamos-session-select desktop` -> GNOME session; Return to Gaming Mode shortcut -> gamescope again; reboot persistence; `boot` option. -6. [ ] Turn off: everything restored (custom.conf backup, original tools). -7. [ ] KDE regression: existing suites still pass on the KDE VM. -8. [ ] Commit dev-repo changes (VM_DESKTOP) to main; product branch stays a prototype, no release without the user. +6. [x] (suite gnome GN3, 2026-10-15) Turn off: everything restored (custom.conf backup, original tools). +7. [x] (2026-10-15, laptop: cli, menu, hw, installer, toggles, nvidia, 0 fail) KDE regression: existing suites still pass on the KDE VM. +8. [x] (with the gnome suite, 2026-10-15) Commit dev-repo changes (VM_DESKTOP) to main; product branch stays a prototype, no release without the user. ## Later (solid version) - Tests: GNOME suite in the dev repo, TESTPLAN rows; ISO with a GNOME variant. diff --git a/scripts/vmsuite.sh b/scripts/vmsuite.sh index 1fa7aa0..bf99c9b 100755 --- a/scripts/vmsuite.sh +++ b/scripts/vmsuite.sh @@ -2,7 +2,8 @@ # One suite of the automated test (TESTPLAN.md rows that need no person) on the plain CachyOS VM # (Plasma, no Steamify: ~/vms/steamify-vm, from vminstall.sh --iso with VM_STEAMIFY=skip). # scripts/vmsuite.sh [--window] suites: the folders in share/vmtest/ (cli, ...) -# scripts/vmsuite.sh --prepare only make the base image (below) +# scripts/vmsuite.sh --prepare [gnome] only make the base image (below) +# The suite "gnome" runs on the plain CachyOS + GNOME + GDM VM (~/vms/gnome-vm, from vminstall.sh with VM_DESKTOP=gnome) instead. # Every block share/vmtest//NN-name.sh starts from a fresh copy of the VM's `ssh-ready` state, # runs in the guest as the VM user (repo on /mnt; NN-name.host.sh blocks run on the host instead: reboots, # host scripts), and prints PASS/FAIL/SKIP lines; the first comment lines say which TESTPLAN rows it @@ -15,7 +16,8 @@ set -uo pipefail here="$(cd "$(dirname "$0")" && pwd)" repo="$(cd "$here/.." && pwd)" -src="${SRC:-$HOME/vms/steamify-vm}" +desk=kde; [[ "${1:-}" == gnome* || "${2:-}" == gnome* ]] && desk=gnome +src="${SRC:-$HOME/vms/steamify-vm}"; [[ $desk == gnome ]] && src="${SRC:-$HOME/vms/gnome-vm}" base="$src/base-ssh-ready.qcow2" prepare_base() { # once, under a lock (parallel suites): the ssh-ready snapshot as a stand-alone image @@ -32,7 +34,7 @@ suite="${1:?usage: $0 [--window] | --prepare}" [[ "${2:-}" == --window ]] || export VM_HEADLESS=1 dir="$repo/share/vmtest/$suite" [[ -d "$dir" ]] || { echo "No suite $suite (folders in share/vmtest/)" >&2; exit 2; } -case "$suite" in cli) port=2301 ;; menu) port=2302 ;; hw) port=2303 ;; installer) port=2304 ;; toggles) port=2305 ;; nvidia) port=2306 ;; *) port=2390 ;; esac +case "$suite" in gnome*) port=2307 ;; cli) port=2301 ;; menu) port=2302 ;; hw) port=2303 ;; installer) port=2304 ;; toggles) port=2305 ;; nvidia) port=2306 ;; *) port=2390 ;; esac export VM_PORT="${VM_PORT:-$port}" export VM_DIR="$HOME/vms/run-$suite" export REPO="${REPO:-$repo/../steamify-cachyos}" @@ -59,16 +61,23 @@ vm_fresh() { # vm_fresh [VAR=value...]: extra environment for the VM start (BI cp "$repo/run.sh" "$VM_DIR/run.sh"; cp "$src/vars.ssh-ready.fd" "$VM_DIR/vars.fd" rm -f "$VM_DIR/disk.qcow2" "$VM_DIR/known_hosts" qemu-img create -q -f qcow2 -b "$base" -F qcow2 "$VM_DIR/disk.qcow2" || return 1 - (cd "$VM_DIR" && env "$@" nohup ./run.sh --fremont > vm.log 2>&1 &) + local fremont=--fremont; [[ $desk == gnome ]] && fremont= # GNOME: a plain PC + (cd "$VM_DIR" && env "$@" nohup ./run.sh $fremont > vm.log 2>&1 &) local _; for _ in $(seq 100); do vm_ssh -o ConnectTimeout=3 true 2>/dev/null && break; sleep 3; done - vm_ssh -o LogLevel=ERROR bash -s <<'REMOTE' + vm_ssh -o LogLevel=ERROR "DESK=$desk bash -s" <<'REMOTE' sudo mount -t 9p -o trans=virtio,version=9p2000.L repo /mnt +if [[ $DESK == kde ]]; then sudo mkdir -p /etc/plasmalogin.conf.d printf '[Autologin]\nUser=%s\nSession=plasma.desktop\n' "$USER" | sudo tee /etc/plasmalogin.conf.d/00-test-autologin.conf >/dev/null for _ in $(seq 10); do pgrep -u "$USER" -x plasmashell >/dev/null && break; sleep 3; done pgrep -u "$USER" -x plasmashell >/dev/null || { sudo systemctl reset-failed plasmalogin; sudo systemctl restart plasmalogin; } for _ in $(seq 40); do pgrep -u "$USER" -x plasmashell >/dev/null && break; sleep 3; done pkill -u "$USER" systemsettings; pkill -u "$USER" cachyos-hello +else + # GNOME: the VM's GDM autologs in (vminstall.sh); wait for the shell. + for _ in $(seq 60); do pgrep -u "$USER" -x gnome-shell >/dev/null && break; sleep 3; done + pgrep -u "$USER" -x gnome-shell >/dev/null || { sudo systemctl restart gdm; for _ in $(seq 40); do pgrep -u "$USER" -x gnome-shell >/dev/null && break; sleep 3; done; } +fi for f in /etc/pacman.d/*mirrorlist*; do sudo sed -i '/krfoss/s/^Server/#Server/' "$f"; done # the host's package cache over pacman's sudo mkdir -p /var/cache/steamify-pkg @@ -77,7 +86,11 @@ if sudo mount -t 9p -o trans=virtio,version=9p2000.L cache /var/cache/steamify-p # Steamify's own downloads (the CEC driver: GitHub rate-limits it) once for every VM sudo mkdir -p /var/cache/steamify-pkg/steamify /var/cache/steamify; sudo mount --bind /var/cache/steamify-pkg/steamify /var/cache/steamify fi -pgrep -u "$USER" -x plasmashell >/dev/null && echo "Logged in to Plasma." || { echo "Plasma did not start." >&2; exit 1; } +if [[ $DESK == kde ]]; then + pgrep -u "$USER" -x plasmashell >/dev/null && echo "Logged in to Plasma." || { echo "Plasma did not start." >&2; exit 1; } +else + pgrep -u "$USER" -x gnome-shell >/dev/null && echo "Logged in to GNOME." || { echo "GNOME did not start." >&2; exit 1; } +fi REMOTE } diff --git a/scripts/vmtest.sh b/scripts/vmtest.sh index 8de7126..e7db7ae 100755 --- a/scripts/vmtest.sh +++ b/scripts/vmtest.sh @@ -6,7 +6,7 @@ # boot the boot loader test (limine, systemd-boot, grub), or name loaders # generic the plain-PC install check for every loader (vmbootloadertest.sh --quick --generic: a PC that is not a # Steam Machine must get no Steam Machine items and no DKMS modules); part of the default run -# cli, menu, hw, installer, toggles, nvidia (folders in share/vmtest/) +# cli, menu, hw, installer, toggles, nvidia, gnome (folders in share/vmtest/) # --install install the boot loader VMs first from the newest Steamify ISO (asks before replacing a disk) # --window show the VMs' windows (default: headless; one shared Konsole follows ~/vms/test.log) # MAX_PARALLEL=3 (env) VMs at once (5 worked on a 9800X3D / 64 GB); the slowest suites start first @@ -42,7 +42,7 @@ if $screen; then fi if [[ ${#loaders[@]} -eq 0 && ${#suites[@]} -eq 0 ]] && ! $want_boot && ! $want_generic; then want_boot=true; want_generic=true - for d in cli menu hw installer toggles nvidia; do [[ -d "$repo/share/vmtest/$d" ]] && suites+=("$d"); done + for d in cli menu hw installer toggles nvidia gnome; do [[ -d "$repo/share/vmtest/$d" ]] && suites+=("$d"); done fi # What the ISO advertises: the boot loaders calamares-online.sh keeps. advertised="$(sed -n 's/.*"bootloader:\([^"]*\)".*/\1/p' "$iso_repo/archiso/airootfs/usr/local/bin/calamares-online.sh" 2>/dev/null | head -n 1)" @@ -55,8 +55,8 @@ summary="$HOME/vms/last-test.txt" maxp="${MAX_PARALLEL:-3}" # VMs at once (4 GB RAM each in the suites, see vmsuite.sh); 5 ran fine on a 9800X3D with 64 GB # Jobs, the slowest first so the last ones are short: suites, then the boot loaders. jobs_list=() -for s in toggles hw cli menu installer; do [[ " ${suites[*]} " == *" $s "* ]] && jobs_list+=("suite:$s"); done -for s in "${suites[@]}"; do [[ " toggles hw cli menu installer " == *" $s "* ]] || jobs_list+=("suite:$s"); done +for s in gnome toggles hw cli menu installer; do [[ " ${suites[*]} " == *" $s "* ]] && jobs_list+=("suite:$s"); done +for s in "${suites[@]}"; do [[ " gnome toggles hw cli menu installer " == *" $s "* ]] || jobs_list+=("suite:$s"); done for l in "${loaders[@]}"; do jobs_list+=("loader:$l"); done for l in "${gloaders[@]}"; do jobs_list+=("generic:$l"); done jobtag() { [[ "${1%%:*}" == generic ]] && echo "${1#*:}-generic" || echo "${1#*:}"; } # files and names of a job diff --git a/share/golden/expected/amd-pc.plan-gaming-desktop.json b/share/golden/expected/amd-pc.plan-gaming-desktop.json deleted file mode 100644 index d24b606..0000000 --- a/share/golden/expected/amd-pc.plan-gaming-desktop.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":["gaming","boot"]} diff --git a/share/golden/expected/amd-pc.plan-gaming.json b/share/golden/expected/amd-pc.plan-gaming.json deleted file mode 100644 index feba85d..0000000 --- a/share/golden/expected/amd-pc.plan-gaming.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":["gaming"]} diff --git a/share/golden/expected/amd-pc.plan-nothing.json b/share/golden/expected/amd-pc.plan-nothing.json deleted file mode 100644 index 290ecc1..0000000 --- a/share/golden/expected/amd-pc.plan-nothing.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":[]} diff --git a/share/golden/expected/amd-pc.plan-nvidia.json b/share/golden/expected/amd-pc.plan-nvidia.json deleted file mode 100644 index 290ecc1..0000000 --- a/share/golden/expected/amd-pc.plan-nvidia.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":[]} diff --git a/share/golden/expected/amd-pc.plan-poweroff.json b/share/golden/expected/amd-pc.plan-poweroff.json deleted file mode 100644 index 290ecc1..0000000 --- a/share/golden/expected/amd-pc.plan-poweroff.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":[]} diff --git a/share/golden/expected/amd-pc.plan-single.json b/share/golden/expected/amd-pc.plan-single.json deleted file mode 100644 index f05b90a..0000000 --- a/share/golden/expected/amd-pc.plan-single.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":["gaming","single"]} diff --git a/share/golden/expected/amd-pc.status.json b/share/golden/expected/amd-pc.status.json deleted file mode 100644 index 6019375..0000000 --- a/share/golden/expected/amd-pc.status.json +++ /dev/null @@ -1 +0,0 @@ -{"version":"2.12.0","firstRun":true,"steamMachine":false,"kernel":"7.0.0-fixture-cachyos","pinnedKernel":"7.1.6-1","cecDevices":"","leds":0,"bios":null,"items":[{"id":"gaming","label":"SteamOS conversion","hint":"boot into gaming mode, Steam on the desktop","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"boot","label":"Boot into the desktop instead of gaming mode","hint":"","kind":"choice","parent":"gaming","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"silent","label":"Start Steam silently in desktop mode","hint":"in the tray at login on the desktop, no window","kind":"toggle","parent":"gaming","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"glyphs","label":"Install Steam Deck/Machine icons","hint":"Deck button icons in gaming mode","kind":"toggle","parent":"gaming","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"theme","label":"Install SteamOS theme","hint":"Vapor look (cachyos-vapor)","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"single","label":"Single user mode","hint":"no password, lock screen or log out (SDDM)","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"launcher","label":"Steamify shortcut","hint":"the app on the desktop, Steamify Terminal in the launcher","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"notify","label":"Update notifications","hint":"a notification when there's a new Steamify, never updates by itself","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"extended_controller_support","label":"Extended controller support","hint":"Xbox wireless dongle (xone), Xbox controllers over Bluetooth (xpadneo)","kind":"toggle","parent":"","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"cec","label":"HDMI-CEC","hint":"use Steam with the TV remote, TV on/off with the PC (experimental)","kind":"toggle","parent":"","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true}]} diff --git a/share/golden/expected/nvidia-pc.plan-gaming-desktop.json b/share/golden/expected/nvidia-pc.plan-gaming-desktop.json deleted file mode 100644 index 290ecc1..0000000 --- a/share/golden/expected/nvidia-pc.plan-gaming-desktop.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":[]} diff --git a/share/golden/expected/nvidia-pc.plan-gaming.json b/share/golden/expected/nvidia-pc.plan-gaming.json deleted file mode 100644 index 290ecc1..0000000 --- a/share/golden/expected/nvidia-pc.plan-gaming.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":[]} diff --git a/share/golden/expected/nvidia-pc.plan-nothing.json b/share/golden/expected/nvidia-pc.plan-nothing.json deleted file mode 100644 index 290ecc1..0000000 --- a/share/golden/expected/nvidia-pc.plan-nothing.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":[]} diff --git a/share/golden/expected/nvidia-pc.plan-nvidia.json b/share/golden/expected/nvidia-pc.plan-nvidia.json deleted file mode 100644 index 8e59aed..0000000 --- a/share/golden/expected/nvidia-pc.plan-nvidia.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":["nvidia","bigpicture"]} diff --git a/share/golden/expected/nvidia-pc.plan-poweroff.json b/share/golden/expected/nvidia-pc.plan-poweroff.json deleted file mode 100644 index 290ecc1..0000000 --- a/share/golden/expected/nvidia-pc.plan-poweroff.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":[]} diff --git a/share/golden/expected/nvidia-pc.plan-single.json b/share/golden/expected/nvidia-pc.plan-single.json deleted file mode 100644 index 7a75397..0000000 --- a/share/golden/expected/nvidia-pc.plan-single.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":["single"]} diff --git a/share/golden/expected/nvidia-pc.status.json b/share/golden/expected/nvidia-pc.status.json deleted file mode 100644 index 3a68736..0000000 --- a/share/golden/expected/nvidia-pc.status.json +++ /dev/null @@ -1 +0,0 @@ -{"version":"2.12.0","firstRun":true,"steamMachine":false,"kernel":"7.0.0-fixture-cachyos","pinnedKernel":"7.1.6-1","cecDevices":"","leds":0,"bios":null,"items":[{"id":"nvidia","label":"Gaming on NVIDIA","hint":"Steam on the desktop, started at login","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"bigpicture","label":"Steam starts in Big Picture","hint":"the controller-friendly Steam (untick: Steam's normal window)","kind":"toggle","parent":"nvidia","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"nvsilent","label":"Start Steam silently","hint":"in the tray at login, no window (untick: Steam's normal window)","kind":"toggle","parent":"nvidia","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"theme","label":"Install SteamOS theme","hint":"Vapor look (cachyos-vapor)","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"single","label":"Single user mode","hint":"no password, lock screen or log out (SDDM)","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"launcher","label":"Steamify shortcut","hint":"the app on the desktop, Steamify Terminal in the launcher","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"notify","label":"Update notifications","hint":"a notification when there's a new Steamify, never updates by itself","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"extended_controller_support","label":"Extended controller support","hint":"Xbox wireless dongle (xone), Xbox controllers over Bluetooth (xpadneo)","kind":"toggle","parent":"","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"cec","label":"HDMI-CEC","hint":"use Steam with the TV remote, TV on/off with the PC (experimental)","kind":"toggle","parent":"","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true}]} diff --git a/share/golden/expected/steam-machine.plan-gaming-desktop.json b/share/golden/expected/steam-machine.plan-gaming-desktop.json deleted file mode 100644 index d24b606..0000000 --- a/share/golden/expected/steam-machine.plan-gaming-desktop.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":["gaming","boot"]} diff --git a/share/golden/expected/steam-machine.plan-gaming.json b/share/golden/expected/steam-machine.plan-gaming.json deleted file mode 100644 index feba85d..0000000 --- a/share/golden/expected/steam-machine.plan-gaming.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":["gaming"]} diff --git a/share/golden/expected/steam-machine.plan-nothing.json b/share/golden/expected/steam-machine.plan-nothing.json deleted file mode 100644 index 290ecc1..0000000 --- a/share/golden/expected/steam-machine.plan-nothing.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":[]} diff --git a/share/golden/expected/steam-machine.plan-nvidia.json b/share/golden/expected/steam-machine.plan-nvidia.json deleted file mode 100644 index 290ecc1..0000000 --- a/share/golden/expected/steam-machine.plan-nvidia.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":[]} diff --git a/share/golden/expected/steam-machine.plan-poweroff.json b/share/golden/expected/steam-machine.plan-poweroff.json deleted file mode 100644 index 3c3d372..0000000 --- a/share/golden/expected/steam-machine.plan-poweroff.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":["machine","poweroff"]} diff --git a/share/golden/expected/steam-machine.plan-single.json b/share/golden/expected/steam-machine.plan-single.json deleted file mode 100644 index f05b90a..0000000 --- a/share/golden/expected/steam-machine.plan-single.json +++ /dev/null @@ -1 +0,0 @@ -{"event":"plan","disable":[],"enable":["gaming","single"]} diff --git a/share/golden/expected/steam-machine.status.json b/share/golden/expected/steam-machine.status.json deleted file mode 100644 index d5eb5bd..0000000 --- a/share/golden/expected/steam-machine.status.json +++ /dev/null @@ -1 +0,0 @@ -{"version":"2.12.0","firstRun":true,"steamMachine":true,"kernel":"7.0.0-fixture-cachyos","pinnedKernel":"7.1.6-1","cecDevices":"","leds":0,"bios":{"current":"unknown","newest":"","selectable":false,"dryRun":false},"items":[{"id":"gaming","label":"SteamOS conversion","hint":"boot into gaming mode, Steam on the desktop","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"boot","label":"Boot into the desktop instead of gaming mode","hint":"","kind":"choice","parent":"gaming","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"silent","label":"Start Steam silently in desktop mode","hint":"in the tray at login on the desktop, no window","kind":"toggle","parent":"gaming","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"glyphs","label":"Install Steam Deck/Machine icons","hint":"Deck button icons in gaming mode","kind":"toggle","parent":"gaming","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"theme","label":"Install SteamOS theme","hint":"Vapor look (cachyos-vapor)","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"single","label":"Single user mode","hint":"no password, lock screen or log out (SDDM)","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"launcher","label":"Steamify shortcut","hint":"the app on the desktop, Steamify Terminal in the launcher","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"notify","label":"Update notifications","hint":"a notification when there's a new Steamify, never updates by itself","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"extended_controller_support","label":"Extended controller support","hint":"Xbox wireless dongle (xone), Xbox controllers over Bluetooth (xpadneo)","kind":"toggle","parent":"","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"cec","label":"HDMI-CEC","hint":"use Steam with the TV remote, TV on/off with the PC (experimental)","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"machine","label":"Steam Machine support","hint":"LED bar driver, hardware settings in Steam","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"poweroff","label":"Power-off fix","hint":"the Steam Machine stays off after shutting down","kind":"toggle","parent":"machine","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"bios","label":"Update BIOS","hint":"now unknown, newest unknown (offline?)","kind":"action","parent":"machine","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":false}]} diff --git a/share/golden/fixtures/amd-pc/etc/os-release b/share/golden/fixtures/amd-pc/etc/os-release deleted file mode 100644 index a5494cd..0000000 --- a/share/golden/fixtures/amd-pc/etc/os-release +++ /dev/null @@ -1,3 +0,0 @@ -NAME="CachyOS Linux" -ID=cachyos -ID_LIKE=arch diff --git a/share/golden/fixtures/amd-pc/packages b/share/golden/fixtures/amd-pc/packages deleted file mode 100644 index 47991f6..0000000 --- a/share/golden/fixtures/amd-pc/packages +++ /dev/null @@ -1,2 +0,0 @@ -sddm -plasma-desktop diff --git a/share/golden/fixtures/amd-pc/sys/class/dmi/id/product_name b/share/golden/fixtures/amd-pc/sys/class/dmi/id/product_name deleted file mode 100644 index 1411ccd..0000000 --- a/share/golden/fixtures/amd-pc/sys/class/dmi/id/product_name +++ /dev/null @@ -1 +0,0 @@ -PRIME B650 diff --git a/share/golden/fixtures/amd-pc/sys/class/dmi/id/sys_vendor b/share/golden/fixtures/amd-pc/sys/class/dmi/id/sys_vendor deleted file mode 100644 index c06f0f6..0000000 --- a/share/golden/fixtures/amd-pc/sys/class/dmi/id/sys_vendor +++ /dev/null @@ -1 +0,0 @@ -ASUSTeK diff --git a/share/golden/fixtures/nvidia-pc/etc/os-release b/share/golden/fixtures/nvidia-pc/etc/os-release deleted file mode 100644 index a5494cd..0000000 --- a/share/golden/fixtures/nvidia-pc/etc/os-release +++ /dev/null @@ -1,3 +0,0 @@ -NAME="CachyOS Linux" -ID=cachyos -ID_LIKE=arch diff --git a/share/golden/fixtures/nvidia-pc/modules b/share/golden/fixtures/nvidia-pc/modules deleted file mode 100644 index c01f206..0000000 --- a/share/golden/fixtures/nvidia-pc/modules +++ /dev/null @@ -1 +0,0 @@ -nvidia_drm diff --git a/share/golden/fixtures/nvidia-pc/packages b/share/golden/fixtures/nvidia-pc/packages deleted file mode 100644 index a76876f..0000000 --- a/share/golden/fixtures/nvidia-pc/packages +++ /dev/null @@ -1,3 +0,0 @@ -sddm -plasma-desktop -nvidia-utils diff --git a/share/golden/fixtures/nvidia-pc/sys/class/dmi/id/product_name b/share/golden/fixtures/nvidia-pc/sys/class/dmi/id/product_name deleted file mode 100644 index 1411ccd..0000000 --- a/share/golden/fixtures/nvidia-pc/sys/class/dmi/id/product_name +++ /dev/null @@ -1 +0,0 @@ -PRIME B650 diff --git a/share/golden/fixtures/nvidia-pc/sys/class/dmi/id/sys_vendor b/share/golden/fixtures/nvidia-pc/sys/class/dmi/id/sys_vendor deleted file mode 100644 index c06f0f6..0000000 --- a/share/golden/fixtures/nvidia-pc/sys/class/dmi/id/sys_vendor +++ /dev/null @@ -1 +0,0 @@ -ASUSTeK diff --git a/share/golden/fixtures/nvidia-pc/sys/class/drm/card0/device/class b/share/golden/fixtures/nvidia-pc/sys/class/drm/card0/device/class deleted file mode 100644 index c5f02e3..0000000 --- a/share/golden/fixtures/nvidia-pc/sys/class/drm/card0/device/class +++ /dev/null @@ -1 +0,0 @@ -0x030000 diff --git a/share/golden/fixtures/nvidia-pc/sys/class/drm/card0/device/vendor b/share/golden/fixtures/nvidia-pc/sys/class/drm/card0/device/vendor deleted file mode 100644 index 466e5df..0000000 --- a/share/golden/fixtures/nvidia-pc/sys/class/drm/card0/device/vendor +++ /dev/null @@ -1 +0,0 @@ -0x10de diff --git a/share/golden/fixtures/steam-machine/etc/os-release b/share/golden/fixtures/steam-machine/etc/os-release deleted file mode 100644 index a5494cd..0000000 --- a/share/golden/fixtures/steam-machine/etc/os-release +++ /dev/null @@ -1,3 +0,0 @@ -NAME="CachyOS Linux" -ID=cachyos -ID_LIKE=arch diff --git a/share/golden/fixtures/steam-machine/packages b/share/golden/fixtures/steam-machine/packages deleted file mode 100644 index 47991f6..0000000 --- a/share/golden/fixtures/steam-machine/packages +++ /dev/null @@ -1,2 +0,0 @@ -sddm -plasma-desktop diff --git a/share/golden/fixtures/steam-machine/sys/class/dmi/id/product_name b/share/golden/fixtures/steam-machine/sys/class/dmi/id/product_name deleted file mode 100644 index fda0fed..0000000 --- a/share/golden/fixtures/steam-machine/sys/class/dmi/id/product_name +++ /dev/null @@ -1 +0,0 @@ -Fremont diff --git a/share/golden/fixtures/steam-machine/sys/class/dmi/id/sys_vendor b/share/golden/fixtures/steam-machine/sys/class/dmi/id/sys_vendor deleted file mode 100644 index ab926ba..0000000 --- a/share/golden/fixtures/steam-machine/sys/class/dmi/id/sys_vendor +++ /dev/null @@ -1 +0,0 @@ -Valve diff --git a/share/golden/record.sh b/share/golden/record.sh deleted file mode 100755 index ef035e3..0000000 --- a/share/golden/record.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# Record what the bash backend (steamify.sh in $REPO) prints, per fixture, into share/golden/expected/. -# share/golden/record.sh record all | share/golden/record.sh check compare with the recorded files -set -uo pipefail -here="$(cd "$(dirname "$0")" && pwd)" -export REPO="${REPO:-$here/../../../steamify-cachyos}"; REPO="$(cd "$REPO" && pwd)" -backend="${BACKEND:-bash $REPO/steamify.sh}" -mode="${1:-record}"; failures=0; work="$(mktemp -d)"; trap 'rm -rf "$work"' EXIT -# case name -> backend arguments -# status: the whole output. plan-*: only the first line of the apply stream (the plan event, where the rules live); -# the steps after it need the real system (the VM suite), they are not stable with a fake sudo. -cases=("status:--backend status" - "plan-gaming:--backend apply gaming" - "plan-gaming-desktop:--backend apply --boot desktop gaming boot" - "plan-single:--backend apply single" - "plan-poweroff:--backend apply poweroff" - "plan-nothing:--backend apply" - "plan-nvidia:--backend apply nvidia bigpicture") -for fixture in "$here"/fixtures/*/; do - name="$(basename "$fixture")" - for entry in "${cases[@]}"; do - label="${entry%%:*}"; arguments="${entry#*:}" - expected="$here/expected/$name.$label.json"; mkdir -p "$here/expected" - if [[ "$label" == plan-* ]]; then # the plan event comes first; then the steps run for real, so stop after a moment - timeout -s KILL 5 "$here/sandbox.sh" "$fixture" $backend $arguments > "$work/stream" 2>&1 - actual="$(head -n 1 "$work/stream")" - else actual="$("$here/sandbox.sh" "$fixture" $backend $arguments 2>&1)"; fi - if [[ "$mode" == record ]]; then printf '%s\n' "$actual" > "$expected"; echo "recorded $expected" - elif ! diff -u "$expected" <(printf '%s\n' "$actual"); then echo "FAIL $name $label"; failures=$((failures+1)) - else echo "PASS $name $label"; fi - done -done -exit $failures diff --git a/share/golden/sandbox.sh b/share/golden/sandbox.sh deleted file mode 100755 index 9fc5b40..0000000 --- a/share/golden/sandbox.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# Run a command in a throw-away copy of a machine described by a fixture folder (no VM, no root). -# share/golden/sandbox.sh ... -# /etc/**, /sys/**, /usr/** : files shown at those places (the rest of /etc and /sys is empty) -# /home/ : the user's home (fresh copy each run) -# /packages, enabled-units, active-units : answers of the fake pacman and systemctl (shims/) -# /env : optional VAR=value lines for the command -# Needs bubblewrap. $GOLDEN_LOG collects the writes the shims were asked to make. -set -euo pipefail -here="$(cd "$(dirname "$0")" && pwd)" -fixture="$(cd "${1:?usage: $0 ...}" && pwd)"; shift -work="$(mktemp -d)"; trap 'rm -rf "$work"' EXIT -mkdir -p "$work/home" "$work/fixture" -cp -a "$fixture/." "$work/fixture/" -[[ -d "$fixture/home" ]] && cp -a "$fixture/home/." "$work/home/" -arguments=(--die-with-parent --unshare-pid --ro-bind / / --dev /dev --proc /proc --tmpfs /tmp --tmpfs /sys --tmpfs /etc - --bind "$work/home" "$HOME" --bind "$work/fixture" /mnt --ro-bind "$here/shims" /media) -[[ -n "${REPO:-}" ]] && arguments+=(--ro-bind "$REPO" "$REPO") -for keep in passwd group nsswitch.conf ld.so.cache ld.so.conf ld.so.conf.d localtime alternatives resolv.conf hostname; do - [[ -e "/etc/$keep" ]] && arguments+=(--ro-bind "/etc/$keep" "/etc/$keep") -done -for root in etc sys; do - [[ -d "$fixture/$root" ]] || continue - while IFS= read -r -d '' file; do - arguments+=(--ro-bind "$work/fixture/${file#"$fixture/"}" "/${file#"$fixture/"}") - done < <(find "$fixture/$root" -type f -print0) -done -environment=(--setenv FIXTURE /mnt --setenv PATH "/media:$PATH" --setenv GOLDEN_LOG "${GOLDEN_LOG:-/mnt/writes.log}") -[[ -f "$fixture/env" ]] && while IFS= read -r line; do - [[ "$line" == *=* ]] && environment+=(--setenv "${line%%=*}" "${line#*=}") -done < "$fixture/env" -exec bwrap "${arguments[@]}" "${environment[@]}" "$@" diff --git a/share/golden/shims/modinfo b/share/golden/shims/modinfo deleted file mode 100755 index 7a1a78f..0000000 --- a/share/golden/shims/modinfo +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -# Fake modinfo: modules listed in $FIXTURE/modules exist. -for module in "$@"; do [[ "$module" == -* ]] || grep -qx -- "$module" "$FIXTURE/modules" 2>/dev/null || exit 1; done diff --git a/share/golden/shims/pacman b/share/golden/shims/pacman deleted file mode 100755 index 62f9e09..0000000 --- a/share/golden/shims/pacman +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# Fake pacman for the golden sandbox: the installed packages are listed in $FIXTURE/packages (one name per line). -# Only the queries the status code makes: -Q/-Qq , -T ..., -Qi . Writes (-S, -U, -R) are logged and succeed. -list="$FIXTURE/packages"; touch "$list" 2>/dev/null -case "$1" in - -T) shift; for package in "$@"; do grep -qx -- "$package" "$list" || echo "$package"; done; [[ $# -gt 0 ]] ;; - -Q|-Qq|-Qi|-Qs) shift; status=0; for package in "$@"; do [[ "$package" == -* ]] && continue; grep -qx -- "$package" "$list" || status=1; done; exit $status ;; - -Ss|-Si) exit 1 ;; - *) echo "pacman $*" >> "${GOLDEN_LOG:-/dev/null}"; exit 0 ;; -esac diff --git a/share/golden/shims/sudo b/share/golden/shims/sudo deleted file mode 100755 index 257daf9..0000000 --- a/share/golden/shims/sudo +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -# Fake sudo: logs the command and succeeds; nothing runs. -while [[ "$1" == -* ]]; do shift; done -echo "sudo $*" >> "${GOLDEN_LOG:-/dev/null}" diff --git a/share/golden/shims/systemctl b/share/golden/shims/systemctl deleted file mode 100755 index af28847..0000000 --- a/share/golden/shims/systemctl +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# Fake systemctl: enabled units listed in $FIXTURE/enabled-units, active ones in $FIXTURE/active-units. -# Queries answer from those lists; everything else is logged and succeeds. -verb=""; units=() -for argument in "$@"; do - [[ "$argument" == -* ]] && continue - if [[ -z "$verb" ]]; then verb="$argument"; else units+=("$argument"); fi -done -case "$verb" in - is-enabled) for unit in "${units[@]}"; do grep -qx -- "$unit" "$FIXTURE/enabled-units" 2>/dev/null || { echo disabled; exit 1; }; done; echo enabled ;; - is-active) for unit in "${units[@]}"; do grep -qx -- "$unit" "$FIXTURE/active-units" 2>/dev/null || { echo inactive; exit 3; }; done; echo active ;; - *) echo "systemctl $*" >> "${GOLDEN_LOG:-/dev/null}"; exit 0 ;; -esac diff --git a/share/golden/shims/uname b/share/golden/shims/uname deleted file mode 100755 index c16e0d8..0000000 --- a/share/golden/shims/uname +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -if [[ "$1" == -r ]]; then echo 7.0.0-fixture-cachyos; else command uname "$@"; fi diff --git a/share/vmtest/backend/10-go-proxy-stream.sh b/share/vmtest/backend/10-go-proxy-stream.sh deleted file mode 100644 index bb899b6..0000000 --- a/share/vmtest/backend/10-go-proxy-stream.sh +++ /dev/null @@ -1,30 +0,0 @@ -# Go core (REFACTOR-2.12 phase 0/1): `steamify --backend apply` through the Go binary must emit the -# same event stream as the bash backend: enable two small items, then turn them off again, once with -# each backend, in the same VM. Needs the binary built in the repo (make build -> bin/steamify). -GO=/mnt/bin/steamify -[[ -x $GO ]] || { fail "no $GO (run make build in steamify-cachyos)"; exit 0; } -export STEAMIFY_NO_DOWNLOAD=1 -backend_run() { # backend_run