cat / goq
clone

turns a linux box into a private steam streaming appliance: plug in, tap your key, play from another computer

fix(uat): accept native 1280x800 panels

Dami committed 0fce3e4
commit
0fce3e4dc7f8c39c033d9b3656cca21f7c9f8bcc
parent
eb665a875e60bbfcb2736b74e4fe8318a81f3eb1
author
Dami <dami.etoile@gmail.com>
4 files changed, +83 -6
Mdocs/fresh-bazzite-host.md5++-
Mdocs/hardware-uat/README.md6+++
Mscripts/run-bazzite-hardware-uat.sh21++++++++---
Ascripts/tests/bazzite-hardware-uat-native-mode.sh57++++++++++++++++++++++++++++++
M docs/fresh-bazzite-host.md +4 -1
M docs/hardware-uat/README.md +6 -0
M scripts/run-bazzite-hardware-uat.sh +16 -5
@@ -71,6 +71,20 @@ gstva_factory_supports_uat() {
7171 done7272 }7373 74+classify_native_uat_mode() {75+ local native_size="$1"76+ local fixed_size="$2"77+78+ native_mode_relation=''79+ [[ "$native_size" =~ ^[1-9][0-9]*x[1-9][0-9]*$ ]] || return 180+ [[ "$fixed_size" =~ ^[1-9][0-9]*x[1-9][0-9]*$ ]] || return 181+ if [[ "$native_size" == "$fixed_size" ]]; then82+ native_mode_relation=identical-to-fixed83+ else84+ native_mode_relation=distinct-from-fixed85+ fi86+}87+7488 select_amd_gstva_h264_encoder() {7589 local gst_inspect_path="$1"7690 local sysfs_root="${2:-/sys/class/drm}"
@@ -536,11 +550,7 @@ grep -Fxq encoded_mode=1280x800@60 "$private/external-cqp-config-check.log"
536550 grep -Fxq config=ok "$private/native-config-check.log"537551 grep -Fxq capture_preflight=ok "$private/native-config-check.log"538552 native_size="$(sed -n 's/^encoded_mode=\([0-9][0-9]*x[0-9][0-9]*\)@60$/\1/p' "$private/native-config-check.log")"539-[[ -n "$native_size" ]]540-[[ "$native_size" != 1280x800 ]] || {541- echo "native UAT resolved to the fixed 1280x800 mode" >&2542- exit 1543-}553+classify_native_uat_mode "$native_size" 1280x800544554 545555 "$sigil" invitation create \546556 --config "$fixed_config" \
@@ -1054,6 +1064,7 @@ fi
10541064 echo gamescope_pointer_feedback_recovery=pass10551065 echo gamescope_pointer_daemon_pid_stable=pass10561066 echo "native_size=$native_size"1067+ echo "native_mode_relation=$native_mode_relation"10571068 echo native_performance_gate=observational10581069 echo "native_observed_fps=$native_observed_fps"10591070 echo "native_55fps_status=$native_55fps_status"
A scripts/tests/bazzite-hardware-uat-native-mode.sh +57 -0
@@ -0,0 +1,57 @@
1+#!/usr/bin/env bash2+3+set -euo pipefail4+5+script_dir="$(CDPATH='' cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"6+runner="$script_dir/../run-bazzite-hardware-uat.sh"7+8+export SIGIL_HARDWARE_UAT_SOURCE_ONLY=19+# shellcheck source=../run-bazzite-hardware-uat.sh10+# shellcheck disable=SC109111+source "$runner"12+13+fail() {14+ printf 'FAIL: %s\n' "$1" >&215+ exit 116+}17+18+native_mode_relation=stale19+classify_native_uat_mode 1280x800 1280x80020+[[ "$native_mode_relation" == identical-to-fixed ]] \21+ || fail 'a native 1280x800 panel was not accepted as identical to the fixed leg'22+23+classify_native_uat_mode 2560x1600 1280x80024+[[ "$native_mode_relation" == distinct-from-fixed ]] \25+ || fail 'a larger native panel was not classified as distinct from the fixed leg'26+27+for invalid_native in '' 1280 0x800 1280x0 -1x800; do28+ native_mode_relation=stale29+ if classify_native_uat_mode "$invalid_native" 1280x800; then30+ fail "an invalid native mode was accepted: $invalid_native"31+ fi32+ [[ -z "$native_mode_relation" ]] \33+ || fail 'failed native classification retained stale relation state'34+done35+36+native_mode_relation=stale37+if classify_native_uat_mode 1280x800 invalid; then38+ fail 'an invalid fixed mode was accepted'39+fi40+[[ -z "$native_mode_relation" ]] \41+ || fail 'failed fixed classification retained stale relation state'42+43+grep -Fq "classify_native_uat_mode \"\$native_size\" 1280x800" "$runner" \44+ || fail 'the resolved native mode does not use the tested classifier'45+grep -Fq "echo \"native_mode_relation=\$native_mode_relation\"" "$runner" \46+ || fail 'the evidence summary omits the native mode relation'47+if grep -Fq 'native UAT resolved to the fixed 1280x800 mode' "$runner"; then48+ fail 'the runner still rejects a native mode identical to the fixed leg'49+fi50+grep -Fq "run_capture_probe native \"\$native_config\" \"\$native_size\"" "$runner" \51+ || fail 'the native capture leg was collapsed into the fixed leg'52+grep -Fq "start_candidate native \"\$native_config\"" "$runner" \53+ || fail 'the native daemon leg was collapsed into the fixed leg'54+grep -Fq "run_probe_cycle native iroh-moq \"\$native_size\"" "$runner" \55+ || fail 'the native session leg was collapsed into the fixed leg'56+57+printf 'bazzite_hardware_uat_native_mode_tests=ok\n'