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)
May 14 2024, 2:20 PM
Unknown Object (File)
Mar 22 2024, 9:23 PM
Unknown Object (File)
Mar 22 2024, 9:22 PM
Unknown Object (File)
Mar 22 2024, 9:22 PM
Unknown Object (File)
Mar 22 2024, 9:22 PM
Unknown Object (File)
Mar 22 2024, 9:22 PM
Unknown Object (File)
Mar 16 2024, 3:44 AM
Unknown Object (File)
Mar 8 2024, 6:35 AM
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