Page MenuHomeFreeBSD

exterror: advertise error strings via kern.features.exterr_strings
ClosedPublic

Authored by netchild on Sat, Jul 18, 1:19 PM.
Tags
None
Referenced Files
F163433595: D58321.id182282.diff
Thu, Jul 23, 4:16 AM
F163403732: D58321.id182282.diff
Wed, Jul 22, 9:57 PM
F163398205: D58321.diff
Wed, Jul 22, 8:44 PM
Unknown Object (File)
Wed, Jul 22, 11:51 AM
Unknown Object (File)
Wed, Jul 22, 5:04 AM
Unknown Object (File)
Wed, Jul 22, 3:50 AM
Unknown Object (File)
Wed, Jul 22, 2:29 AM
Unknown Object (File)
Tue, Jul 21, 10:06 PM
Subscribers

Details

Summary

Allow userland, in particular test cases for EXTERROR conversions,
to detect at run time whether extended errors include the
descriptive message strings, which depends on the EXTERR_STRINGS
kernel option and cannot be probed in any other way.

MFC after: 1 week
Assisted-by: Claude Code (Fable 5)

Test Plan

unit test in another review

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

The kern.features.exterror part is for the benefit of userland programs which want to use it (e.g. difference between FreeBSD 14.x and 15.x).
The kern.features.exterr_strings part is for the benefit of unit tests to be able to skip if the verbose strings are not enabled.

As I said it elsewhere, there is no point in kern.features.exterror. You cannot run 15 userspace on <= 14 kernel.

So you disagree with kern.features.exterror.
Do you also disagree with kern.features.exterr_strings which covers the optional behavior of verbose exterror and is useful in unit tests to differentiate between "fails because something is wrong -> error" and "fails because it does not exist -> intendet -> ok".

So you disagree with kern.features.exterror.
Do you also disagree with kern.features.exterr_strings which covers the optional behavior of verbose exterror and is useful in unit tests to differentiate between "fails because something is wrong -> error" and "fails because it does not exist -> intendet -> ok".

kern.features.exterr_strings is fine

netchild retitled this revision from exterror: advertise availability via kern.features.exterror and kern.features.exterr_strings to exterror: advertise error strings via kern.features.exterr_strings.
netchild edited the summary of this revision. (Show Details)

Please upload patches with the full context.

share/man/man9/exterror.9
188

The example is rather pointless. I suggest to remove the lines 185-189.

This revision is now accepted and ready to land.Mon, Jul 20, 3:55 PM