* tests/rm/empty-immutable-skip.sh: Use cleanup_() to
remove the immutable attribute, so that false failures
or stale files do not result from e.g. a killed test run.
echo test > a || framework_failure_
+cleanup_() { chattr -i b; }
+
# Install once to create the destination, then make it immutable.
ginstall -Cv -m0644 -o$u1 -g$g1 a b || framework_failure_
chattr +i b || framework_failure_
# it would actually change.
ginstall -Cv -m0644 -o$u1 -g$g1 a b || fail=1
-chattr -i b
-
Exit $fail
skip_ "chattr +i doesn't work on this file system"
fi
+cleanup_() { chattr -i empty; }
+
mkdir empty || framework_failure_
touch x y || framework_failure_
chattr +i empty || framework_failure_
rm -rf empty x y
{ test -f x || test -f y; } && fail=1
-chattr -i empty
Exit $fail