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/aienux/blob/main/scripts/ck_swap_disk_bound_test.sh # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. 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 `aienux / scripts / ck_swap_disk_bound_test.sh` 17 lines ยท 876 bytes Raw Blame History 1 #!/bin/sh 2 # ck_swap_disk_bound_test.sh -- host test of the QEMU test-disk swap inbox bounds 3 # (native/kernel/x86/swap_disk_read.h, used by swap_x86.c): a slot object is read 4 # only if manifest + image, rounded up to whole sectors, fits the swap buffer. 5 # Uses a mocked sector reader. See native/kernel/x86/tests/swap_disk_bound_test.c. 6 # Hosted only. Ends with "AIENOS_SWAP_DISK_BOUND: PASS" or "... FAIL ". 7 set -u 8 cd "$(dirname "$0")/.." 9 K=native/kernel 10 W=$(mktemp -d "${TMPDIR:-/tmp}/ck_swap_disk_bound.XXXXXX") 11 trap 'rm -rf "$W"' EXIT 12 fail() { echo "AIENOS_SWAP_DISK_BOUND: FAIL $*"; exit 1; } 13 CC=${HOSTCC:-cc} 14 $CC -std=c11 -O1 -g -fsanitize=address,undefined -fno-sanitize-recover=undefined -Wall -Wextra -Werror \ 15 -o "$W/test" $K/x86/tests/swap_disk_bound_test.c || fail "test does not build" 16 "$W/test" || fail "bound checks" 17 echo "AIENOS_SWAP_DISK_BOUND: PASS"