summaryrefslogtreecommitdiff
path: root/9proc/test/adversarial.sh
blob: f41c276a5d22e34eada2d6a77f9e20e9560f772e (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 9proc 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 9ns mount (memory, signals, poll loop).
# Usage: bash 9proc/test/adversarial.sh <9ns> <9proc-demo> [--fast]
# `zig build 9proc-adv` runs the same suites as separate steps.
set -u
NS=${1:?path to 9ns}
PROC=${2:?path to 9proc-demo}
shift 2
HERE=$(cd "$(dirname "$0")" && pwd)
status=0
for suite in adv_9proc_hostile adv_core_hostile; do
    echo "### $suite"
    if bash "$HERE/$suite.sh" "$PROC" "$@"; then echo "### $suite: ok"; else echo "### $suite: FAILED"; status=1; fi
done
echo "### adv_linux_probe"
if bash "$HERE/adv_linux_probe.sh" "$NS" "$PROC"; then echo "### adv_linux_probe: ok"; else echo "### adv_linux_probe: FAILED"; status=1; fi
exit $status