interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / evidence / own-gpu-driver / rung2 / window1-check.sh

16 lines · 1260 bytes Raw Blame History
1#!/usr/bin/env bash
2# L332 rung 2 window 1, part 3 (after the restore reboot): the box is back as before. Read-only.
3set -u
4export PATH=$PATH:/usr/sbin:/sbin # modinfo, lsmod and friends live in sbin; a normal user shell may not list it
5here=$(cd "$(dirname "$0")" && pwd)
6log=$here/$(readlink "$here/window1-current.log")
7ts() { echo "$(date -u +%FT%T.%NZ) $*" | tee -a "$log"; }
8ok=1
9ts "check start; boot $(uptime -s)"
10grep -q 'aien.gpuwindow=1' /proc/cmdline && { ts "still the window boot (aien.gpuwindow=1): the restore reboot did not happen; reboot"; ok=0; }
11[ -e /run/modprobe.d/zz-aien-gpu-window.conf ] && { ts "hold-back file still in /run: unexpected outside the window boot"; ok=0; }
12next=$(grub-editenv /boot/grub/grubenv list | sed -n 's/^next_entry=//p'); [ -z "$next" ] || { ts "grubenv next_entry still set ($next): clear it with 'sudo grub-editenv /boot/grub/grubenv unset next_entry'"; ok=0; }
13n=$(lsmod | grep -cE '^nvidia'); ts "nvidia modules loaded: $n (want 4)"; [ "$n" = 4 ] || ok=0
14lsmod | grep -q '^aien_gpu' && { ts "aien_gpu loaded after reboot: unexpected"; ok=0; }
15nvidia-smi -L >> "$log" 2>&1 || { ts "nvidia-smi failed: GPU not back on NVIDIA's driver"; ok=0; }
16ts "WINDOW1 RESTORE $([ $ok = 1 ] && echo PASS || echo FAIL)"