Page MenuHomeFreeBSD

Fix usr.bin.truncate.truncate_test.bad_truncate with ZFS /tmp.
ClosedPublic

Authored by asomers on Jan 11 2016, 9:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 6, 1:53 PM
Unknown Object (File)
Wed, Apr 29, 2:02 AM
Unknown Object (File)
Wed, Apr 29, 2:00 AM
Unknown Object (File)
Apr 5 2026, 11:23 AM
Unknown Object (File)
Apr 4 2026, 5:57 PM
Unknown Object (File)
Apr 4 2026, 4:17 PM
Unknown Object (File)
Apr 3 2026, 10:08 AM
Unknown Object (File)
Mar 26 2026, 3:19 PM
Subscribers

Details

Summary

Use simmutable instead of uimmutable in the bad_truncate test. The former
is supported by both ZFS and UFS, but the latter only by UFS.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

asomers retitled this revision from to Fix usr.bin.truncate.truncate_test.bad_truncate with ZFS /tmp..
asomers updated this object.
asomers edited the test plan for this revision. (Show Details)
asomers added a reviewer: jilles.

This adds a requirement that the test be run as root and that securelevel be -1 or 0, which may not be desirable. To prevent compatibility problems, a line

TEST_METADATA.truncate_test+=  required_user="root"

should be added to usr.bin/truncate/tests/Makefile.

Alternatively, file permissions (chmod 444) instead of file flags could be used. This requires

TEST_METADATA.truncate_test+=  required_user="unprivileged"

and the expected error message should be Permission denied instead of Operation not permitted.

asomers edited edge metadata.

Address feedback from jilles: Use permissions instead of flags in bad_truncate

jilles edited edge metadata.

Looks good to me.

This revision is now accepted and ready to land.Jan 19 2016, 10:02 PM
This revision was automatically updated to reflect the committed changes.