Page MenuHomeFreeBSD

Add `kern.features.witness`

Authored by ngie on Jun 16 2020, 9:16 PM.



Adding kern.features.witness helps expose whether or not the kernel has
options WITNESS enabled, so the feature_present(3) API can be used
to query whether or not witness(9) is built into the kernel.

This support is helpful with userspace applications (generally speaking,
tests), as it can be queried to determine whether or not tests related
to WITNESS should be run.

MFC after: 1 week
Sponsored by: DellEMC Isilon

Test Plan

Confirmed that the feature worked with a kernel with WITNESS enabled (GENERIC) and disabled (GENERIC-NODEBUG).

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ngie requested review of this revision.Jun 16 2020, 9:16 PM
ngie added a reviewer:
ngie retitled this revision from Add kern.features.witness to Add `kern.features.witness`.
ngie edited the summary of this revision. (Show Details)
ngie edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jun 16 2020, 9:19 PM

The FEATURE call should be moved down.

This revision now requires review to proceed.Jun 16 2020, 9:20 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jun 24 2020, 6:51 PM
Closed by commit rS362591: Add `kern.features.witness` (authored by ngie). · Explain Why
This revision was automatically updated to reflect the committed changes.