]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r360339, r360567
authorAlan Somers <asomers@FreeBSD.org>
Sun, 17 May 2020 02:35:50 +0000 (02:35 +0000)
committerAlan Somers <asomers@FreeBSD.org>
Sun, 17 May 2020 02:35:50 +0000 (02:35 +0000)
commit8ff6c303f4acd210173ad428ec2602531bc637dd
tree737c7a82700b7c143727a0ab9d98892d72e47c09
parentf16b46fc541bb75af35ac5204aff352a996aadf5
MFC r360339, r360567

r360339:
mac_bsdextended: ATFify the tests

The new tests have more complete setup and cleanup, are more granular, and
correctly annotate expected failures and skipped tests. A follow-up commit
will resolve a conflict with the fusefs tests (bug 244229).

Differential Revision: https://reviews.freebsd.org/D24257

r360567:
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

PR: 244229
Reported by: lwhsu
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D24577
tests/sys/fs/fusefs/utils.cc
tests/sys/mac/bsdextended/Makefile
tests/sys/mac/bsdextended/matches_test.sh