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, Oct 13, 7:58 AM
Unknown Object (File)
Mon, Oct 13, 7:58 AM
Unknown Object (File)
Mon, Oct 13, 7:58 AM
Unknown Object (File)
Sun, Oct 12, 7:41 PM
Unknown Object (File)
Fri, Oct 3, 12:37 PM
Unknown Object (File)
Wed, Oct 1, 12:38 PM
Unknown Object (File)
Tue, Sep 30, 8:07 AM
Unknown Object (File)
Fri, Sep 26, 5:51 AM
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.