summaryrefslogtreecommitdiff
path: root/introspect/test/adv_core_hostile.sh
diff options
context:
space:
mode:
Diffstat (limited to 'introspect/test/adv_core_hostile.sh')
-rwxr-xr-xintrospect/test/adv_core_hostile.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/introspect/test/adv_core_hostile.sh b/introspect/test/adv_core_hostile.sh
new file mode 100755
index 0000000..bf4f812
--- /dev/null
+++ b/introspect/test/adv_core_hostile.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+# Adversarial raw-9P2000 client tests aimed at the introspect core.
+# Usage: bash introspect/test/adv_core_hostile.sh <introspect> [--fast] (part of zig build introspect-adv)
+# Spawns the server on a temporary unix socket and attacks it with
+# introspect/test/adv_core_hostile.py (Python 3 stdlib). Exit 1 on any failure.
+set -u
+INTROSPECT=$(realpath "${1:?path to introspect}")
+shift
+command -v python3 >/dev/null || { echo "SKIP: python3 missing"; exit 0; }
+exec python3 "$(dirname "$0")/adv_core_hostile.py" --server "$INTROSPECT" "$@"