Page MenuHomeFreeBSD

uexterr_gettext: add tests
ClosedPublic

Authored by asomers on Jul 6 2025, 8:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 8, 12:05 PM
Unknown Object (File)
Wed, Nov 26, 8:32 AM
Unknown Object (File)
Tue, Nov 18, 12:49 PM
Unknown Object (File)
Oct 31 2025, 11:34 PM
Unknown Object (File)
Oct 29 2025, 2:18 AM
Unknown Object (File)
Oct 27 2025, 1:07 AM
Unknown Object (File)
Oct 24 2025, 8:18 AM
Unknown Object (File)
Oct 17 2025, 9:14 PM
Subscribers

Details

Summary

Add tests for the new extended errno feature, using a custom kernel
module to report errors to userland.

Sponsored by: ConnectWise
MFC after: 2 weeks

Abandon the custom kernel module. Rely on existing syscalls instead.

move the test into the kern directory

Now that the custom kld is gone, it doesn't need its own directory.

Diff Detail

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

Event Timeline

kib added inline comments.
sys/kern/sys_generic.c
2316

Add FALLTHROUGH annotation?

tests/sys/kern/exterr_test.c
54

I never intended for the returned strings to be part of the ABI.

This revision is now accepted and ready to land.Jul 6 2025, 9:06 PM
tests/sys/kern/exterr_test.c
54

Yeah, I didn't want to assume that the strings would never change. That's why I created a custom kernel module, at first. Would you like some other assertion instead of this?

tests/sys/kern/exterr_test.c
54

Might be a simple approach is to add a comment that the string in the test might need to be updated if kernel changed, and this is not a functional failure then.

This revision was automatically updated to reflect the committed changes.