# Test Case: Special Vnode Combined Setattr Rejection **Test ID**: TC159-special-setattr-combinations **Category**: Read-Only Vnode Operations **Priority**: Critical **Regression**: A special-vnode size field caused early success and hid other requested mutations ## Objective Verify that size-only setattr remains an ignored no-op for special vnodes, while a single `VOP_SETATTR` containing size plus mode, ownership, timestamps, or all three classes returns `EROFS`. ## Fixture and Probe Use `special-setattr.erofs` and its FIFO `/special.fifo`. Build the kernel-side probe against the same FreeBSD 15 source tree: ```sh mkdir setattr-probe cp tests/final_review_setattr_probe.c setattr-probe/ cp tests/final_review_setattr_probe.mk setattr-probe/Makefile make -C setattr-probe SYSDIR=/path/to/freebsd/sys ``` The probe performs one locked vnode lookup and one `VOP_SETATTR` per sysctl trigger, avoiding userspace syscalls that split attributes across operations. ## Procedure 1. Mount the fixture read-only and record mode, uid, gid, atime, and mtime. 2. Load `erofs_setattr_probe.ko` and set `debug.erofs_setattr_probe.path` to the FIFO. 3. Trigger operation 1 (size only); require result 0. 4. Trigger operations 2 through 5 (size+mode, size+owner, size+times, all); require result 30 (`EROFS`) after each trigger. 5. Require the metadata snapshot to remain unchanged, then unload the probe, unmount, detach, and unload EROFS. ## Expected Results - Size-only special-vnode setattr returns 0. - Every combined mutation returns `EROFS`, never false success. - No mode, ownership, or timestamp changes are observable.