Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-gpu-driver/blob/main/tests/arena_large.sh # omega-gpu-driver aien-dev/omega-gpu-driver Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-gpu-driver / tests / arena_large.sh` 34 lines ยท 1340 bytes Raw Blame History 1 #!/bin/sh 2 # Host-only on AArch64. The simulator uses an anonymous CPU mapping. 3 set -eu 4 r=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd) 5 fw=${1:?usage: arena_large.sh FIRMWARE VERIFIED_GB20B_PACKAGE} 6 package=${2:?missing GB20B package from fwprep} 7 compiler=${OMC:-$r/build/irq-omc} 8 pin=$(sed -n 's/^OMC_SHA256=//p' "$r/tools/irq-omc.pin") 9 printf '%s %s\n' "$pin" "$compiler" | sha256sum -c - 10 tmp=$(mktemp -d) 11 trap 'rm -rf "$tmp"' EXIT HUP INT TERM 12 ( 13 cd "$r" 14 test "$(tail -1 tools/ogd.units)" = ogd.om 15 sed '$d' tools/ogd.units | xargs cat 16 cat tests/arena_large.om 17 ) > "$tmp/large.om" 18 "$compiler" < "$tmp/large.om" > "$tmp/large" 19 chmod +x "$tmp/large" 20 python3 "$r/tests/arena_large.py" "$tmp/large" "$fw" "$package" 21 sha256sum "$tmp/large.om" "$tmp/large" 22 orig='ret arbyte get aroword arword o o' 23 test "$(grep -Fxc "$orig" "$tmp/large.om")" -eq 1 24 sed "s/^$orig\$/ret uchar xor arbyte get aroword arword o o 1/" "$tmp/large.om" > "$tmp/mut.om" 25 "$compiler" < "$tmp/mut.om" > "$tmp/mut" 26 chmod +x "$tmp/mut" 27 if python3 "$r/tests/arena_large.py" "$tmp/mut" "$fw" "$package" > "$tmp/mut.log" 2>&1; then 28 echo 'FAIL high-byte copy mutant survived'; exit 1 29 else 30 rc=$? 31 fi 32 test "$rc" = 1 33 grep -Fxq 'AssertionError: firmware bytes changed' "$tmp/mut.log" 34 echo 'PASS compiled high-byte copy mutant ran and changed the firmware bytes'