#!/bin/sh
# DF-3068 runner (guest, root): craft a v3 undo map whose reverse walk
# desyncs (fake tail at F anchors an oversized 24-byte DUMMY head at F-16
# while only 8 bytes remain) -> stage1's undo loop exits with bytes=-16 and
# KKASSERT(error || bytes == 0) at hammer_recover.c:460 panics the
# INVARIANTS kernel.  Uses vn1 so it can run while DF-3067's stuck mount
# holds vn0.  Expected: guest panics (evidence lands on the serial console;
# this script will not return).
cd /root
cp /root/base.img /root/desync.img
./padflood desync /root/desync.img || exit 1
vnconfig -c vn1 /root/desync.img
echo MOUNTING_DESYNC
mount_hammer /dev/vn1 /mnt
echo "MOUNT_OK rc=$? (no panic - finding NOT reproduced)"
umount /mnt
vnconfig -u vn1
