M2: refcnt_rele polarity, radix SALEN by family, LIST_HEAD dispatch + harness scp-failure hardening (gates 01-03 green)
This commit is contained in:
1 parent
493ec25fb3
commit
7014628e8d
5 files changed
+144
-34
No files matched your search
+22
-5
@@ -17,20 +17,37 @@ reset_pf0() {
|
||||
return 1
|
||||
}
|
||||
deploy() {
|
||||
scp -q -o ProxyJump=root@192.168.1.242 -o StrictHostKeyChecking=accept-new \
|
||||
-i "$HOME/.ssh/pflab_ed" "$REPO/module/pf.ko" \
|
||||
"$REPO/tools/out/pfctl" "$REPO/tests/confs/"*.conf pf0:/tmp/ 2>/dev/null || \
|
||||
ssh "$DEB" "mkdir -p /opt/pf"
|
||||
# The scp through the libvirt jump host is occasionally refused; a silent
|
||||
# failure used to leave the previous gate's module/pfctl in place, which
|
||||
# showed up as a bogus gate failure. Retry and verify the copy.
|
||||
local i
|
||||
for i in 1 2 3; do
|
||||
if scp -q -o ProxyJump=root@192.168.1.242 -o StrictHostKeyChecking=accept-new \
|
||||
-i "$HOME/.ssh/pflab_ed" "$REPO/module/pf.ko" \
|
||||
"$REPO/tools/out/pfctl" "$REPO/tests/confs/"*.conf pf0:/tmp/ 2>/dev/null; then
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
# stage onto pf0 /opt/pf via mgmt alias already copied to /tmp
|
||||
ssh "$DEB" "$SSH 'mkdir -p /opt/pf; mv /tmp/pf.ko /tmp/pfctl /opt/pf/ 2>/dev/null; true'" >/dev/null
|
||||
ssh "$DEB" "$SSH 'test -s /opt/pf/pf.ko && test -x /opt/pf/pfctl'" >/dev/null 2>&1 || {
|
||||
echo "deploy: pf.ko/pfctl missing on pf0"; return 1; }
|
||||
}
|
||||
PUSH=0 FAIL=0
|
||||
# Never leave pf0 with pf enabled when the runner exits (a failed gate
|
||||
# would otherwise keep filtering the lab traffic).
|
||||
pf_disable_pf0() {
|
||||
ssh -o ConnectTimeout=8 "$DEB" "$SSH '/opt/pf/pfctl -d >/dev/null 2>&1; true'" \
|
||||
>/dev/null 2>&1 || true
|
||||
}
|
||||
trap pf_disable_pf0 EXIT INT TERM
|
||||
for t in "$REPO"/tests/vm/[0-9]*.sh; do
|
||||
[ -e "$t" ] || continue
|
||||
name="$(basename "$t")"
|
||||
echo "=== $name ==="
|
||||
reset_pf0 || { echo "FAIL $name (vm reset)"; FAIL=$((FAIL+1)); continue; }
|
||||
deploy
|
||||
deploy || { echo "FAIL $name (deploy)"; FAIL=$((FAIL+1)); continue; }
|
||||
if bash "$t" >"$LOGD/$name.log" 2>&1; then
|
||||
echo "PASS $name"; PUSH=$((PUSH+1))
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user