Page MenuHomeFreeBSD

Resolve conflict between the fusefs(5) and mac_bsdextended(4) tests
ClosedPublic

Authored by asomers on Apr 26 2020, 4:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 7:30 PM
Unknown Object (File)
Fri, Dec 6, 10:00 PM
Unknown Object (File)
Thu, Dec 5, 3:38 PM
Unknown Object (File)
Wed, Dec 4, 1:52 PM
Unknown Object (File)
Wed, Dec 4, 1:44 PM
Unknown Object (File)
Tue, Dec 3, 11:11 PM
Unknown Object (File)
Oct 4 2024, 2:57 PM
Unknown Object (File)
Sep 7 2024, 7:39 AM
Subscribers

Details

Summary

Resolve conflict between the fusefs(5) and mac_bsdextended(4) tests

mac_bsdextended(4), when enabled, causes ordinary operations to send many
more VOP_GETATTRs to file system. The fusefs tests expectations aren't
written with those in mind. Optionally expecting them would greatly
obfuscate the fusefs tests. Worse, certain fusefs functionality (like
attribute caching) would be impossible to test if the tests couldn't expect
an exact number of GETATTR operations.

This commit resolves that conflict by making two changes:

  1. The fusefs tests will now check for mac_bsdextended, and skip if it's enabled.
  2. The mac_bsdextended tests will now check whether the module is enabled, not merely loaded. If it's loaded but disabled, the tests will automatically enable it for the duration of the tests.

With these changes, a CI system can achieve best coverage by loading both
fusefs and mac_bsdextended at boot, and setting
security.mac.bsdextended.enabled=0

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30733
Build 28461: arc lint + arc unit

Event Timeline

I have no idea what mac_bsdextended is, but this seems fine.

tests/sys/mac/bsdextended/matches_test.sh
19

I'd use $(). Not a big deal.

This revision is now accepted and ready to land.Apr 26 2020, 7:12 PM