Page MenuHomeFreeBSD

libsysdecode: Add regression tests for sysdecode_cap_rights(3)
ClosedPublic

Authored by markj on Apr 13 2022, 2:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 24, 7:38 AM
Unknown Object (File)
Sun, Oct 20, 3:06 PM
Unknown Object (File)
Oct 7 2024, 9:37 AM
Unknown Object (File)
Oct 4 2024, 8:42 AM
Unknown Object (File)
Oct 3 2024, 4:17 PM
Unknown Object (File)
Oct 2 2024, 3:38 AM
Unknown Object (File)
Oct 1 2024, 5:15 PM
Unknown Object (File)
Oct 1 2024, 12:15 PM
Subscribers

Diff Detail

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

Event Timeline

markj requested review of this revision.Apr 13 2022, 2:34 PM
emaste added inline comments.
lib/libsysdecode/tests/sysdecode_test.c
101

I wonder about the naming, having not spent much time looking at ATF C tests before, it wasn't immediately obvious that sysdecode_cap_rights is the library routine and sysdecode_cap_rights_check is our test function. If this is the usual approach for ATF that's fine, otherwise maybe put check before the fn name?

This revision is now accepted and ready to land.Apr 13 2022, 2:47 PM
markj added inline comments.
lib/libsysdecode/tests/sysdecode_test.c
101

Yeah, better to avoid the libsysdecode namespace. There's a bunch of redundancy here too that I'll clean up.

markj marked an inline comment as done.

Simplify, improve naming.

This revision now requires review to proceed.Apr 13 2022, 2:58 PM

yeah, much clearer to me

lib/libsysdecode/tests/sysdecode_test.c
134

I might put the cap_rights_clear call by itself and just pass rights, feels slightly odd to set up the rights only partially in the check_sysdecode_cap_rights call

This revision is now accepted and ready to land.Apr 13 2022, 3:02 PM
markj marked an inline comment as done.

apply Ed's suggestion, add another test

This revision now requires review to proceed.Apr 13 2022, 3:13 PM
This revision is now accepted and ready to land.Apr 13 2022, 4:24 PM