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-mv/blob/main/om/blake3/test-output.sh # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / om / blake3 / test-output.sh` 21 lines ยท 975 bytes Raw Blame History 1 #!/bin/sh 2 # Host output-contract regression. Pass a freshly compiled blake3.om binary. 3 # Does not compile, access the GPU, or change the live server. 4 set -eu 5 [ "$#" -eq 1 ] || { echo 'usage: test-output.sh /path/to/blake3' >&2; exit 2; } 6 B=$1 7 [ -x "$B" ] || { echo 'FAIL: binary is not executable' >&2; exit 1; } 8 [ -c /dev/full ] || { echo 'NOT_RUN: /dev/full unavailable' >&2; exit 77; } 9 T=$(mktemp -d) 10 trap 'rm -rf "$T"' EXIT HUP INT TERM 11 bad() { printf 'FAIL: %s\n' "$*" >&2; exit 1; } 12 "$B" "$T/out" || bad 'empty-input control failed' 13 printf '%s\n' `af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262` >"$T/want" 14 cmp "$T/want" "$T/out" || bad 'empty-input digest or newline differs' 15 rc=0 16 "$B" /dev/full || rc=$? 17 [ "$rc" -eq 74 ] || bad "/dev/full returned $rc, wanted 74" 18 rc=0 19 "$B" &- || rc=$? 20 [ "$rc" -eq 74 ] || bad "closed stdout returned $rc, wanted 74" 21 printf '%s\n' 'PASS: empty digest, /dev/full and closed stdout'