Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41046 )
Change subject: tests: Add region-test for rdev API ......................................................................
Patch Set 4:
(3 comments)
https://review.coreboot.org/c/coreboot/+/41046/3/tests/commonlib/region-test... File tests/commonlib/region-test.c:
https://review.coreboot.org/c/coreboot/+/41046/3/tests/commonlib/region-test... PS3, Line 119: will_return_maybe(mock_mmap, mmap_result);
Yes, pkg-config should do the trick with checking package version (and automatically provide flags f […]
Could probably check the return value of the call and just fall back to -lcmocka without any extra tests if it didn't work (e.g. pkg-config not installed)?
https://review.coreboot.org/c/coreboot/+/41046/4/tests/commonlib/region-test... File tests/commonlib/region-test.c:
https://review.coreboot.org/c/coreboot/+/41046/4/tests/commonlib/region-test... PS4, Line 212: assert_ptr_equal(rdev_mmap(&mock_rdev, offs, wrap_size), NULL);
Can you add a short comment why we are expecting failure of API calls here? Similar to what you have […]
Done
https://review.coreboot.org/c/coreboot/+/41046/4/tests/commonlib/region-test... PS4, Line 247: /* Remaining test use rdev chained to [child_offs:child_size) subregion. */
nit: *tests
Done