summaryrefslogtreecommitdiff
path: root/introspect/test/adversarial.sh
blob: 918bb9ad91213e21194cee93ca44adeea38b8987 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash
# Runs every introspect adversarial suite in sequence: hostile raw-9P clients
# against the demo (framing, tags, floods; the core's /vars, snapshots, fids)
# and the Linux layer through one 9player mount (memory, signals, poll loop).
# Usage: bash introspect/test/adversarial.sh <9player> <introspect> [--fast]
# `zig build introspect-adv` runs the same suites as separate steps.
set -u
PLAYER=${1:?path to 9player}
INTROSPECT=${2:?path to introspect}
shift 2
HERE=$(cd "$(dirname "$0")" && pwd)
status=0
for suite in adv_introspect_hostile adv_core_hostile; do
    echo "### $suite"
    if bash "$HERE/$suite.sh" "$INTROSPECT" "$@"; then echo "### $suite: ok"; else echo "### $suite: FAILED"; status=1; fi
done
echo "### adv_linux_probe"
if bash "$HERE/adv_linux_probe.sh" "$PLAYER" "$INTROSPECT"; then echo "### adv_linux_probe: ok"; else echo "### adv_linux_probe: FAILED"; status=1; fi
exit $status