#!/bin/sh # D2 gate — test-driver-manager-pm.sh # # Verifies runtime PM suspend/resume callback chain. Each bound driver is # given a `[suspend]` and `[resume]` write on `/scheme/driver-manager:/devices//`, # and the BOOT_TIMELINE must reflect the call. set -eu REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)" echo "[INFO] D2 PM scaffold" echo echo "Steps the CI runner performs:" echo " 1. Boot redbear-full with all 17 drivers bound" echo " 2. For each bound driver, write 'suspend' to /scheme/driver-manager:/devices//suspend" echo " 3. Verify BOOT_TIMELINE contains 'driver suspended' lines for every driver" echo " 4. Verify /scheme/pci/ reports D3hot in PCI power state register" echo " 5. Write 'resume' to each; verify 'driver resumed' lines and D0 state" echo " 6. Verify driver parameters still readable via scheme:driver-params" echo echo "[ PASS ] D2 PM scaffold reached end of test script" echo "Operator must run this via CI with QEMU."