#!/bin/sh
# DF-5763 CONTROL phase only: production flags (PR_RIGHTS clear).
# dom_dispose must never fire; any number of rounds must leave the
# guest healthy.  Run INSIDE the guest as root.
set -e
cd "$(dirname "$0")"

echo "== load rig (registers the production btdomain; netbt_init pools) =="
kldload ./btdisp_rig.ko
sysctl hw.btdisp.info

echo
echo "== CONTROL: 8 rounds, production flags (PR_RIGHTS clear) =="
./btdisp 8
sysctl hw.btdisp.info
echo "CONTROL PASSED: guest alive, pools untouched"
