Files
erofs-freebsd-out-tree/tests/TC061-setattr-chmod-reject.md
T
2026-08-18 09:20:44 +02:00

681 B

Test Case: chmod Rejection

Test ID: TC061-setattr-chmod-reject Category: Read-Only Enforcement Priority: Critical

Objective

Verify a direct chmod request returns EROFS and leaves metadata unchanged.

Procedure

Mount vfs/vfs-plain.erofs and run:

./g3_vfs_probe stat /tmp/repo22-g3/mnt/testdir/file.txt > TC061-before.txt
./g3_vfs_probe expect-error chmod \
  /tmp/repo22-g3/mnt/testdir/file.txt 30
./g3_vfs_probe stat /tmp/repo22-g3/mnt/testdir/file.txt > TC061-after.txt
cmp TC061-before.txt TC061-after.txt

Expected Results

chmod reports errno 30 and complete metadata remains unchanged. Record output, fixture hash, and cleanup.