Index: tests/sys/audit/file-attribute-modify.c =================================================================== --- tests/sys/audit/file-attribute-modify.c +++ tests/sys/audit/file-attribute-modify.c @@ -711,6 +711,15 @@ ATF_TC_CLEANUP(chflagsat_success, tc) { + + /* + * PR 247761: wipe out SF_IMMUTABLE so kyua can clean up the work + * directory. + * + * This isn't needed for `chflagsat_failure` because the chflagsat(2) + * operation is guaranteed to fail. + */ + chflags(path, 0); cleanup(); }