Attention is currently required from: Julius Werner, Jan Dabros. Jakub Czapiga has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56601 )
Change subject: tests: Add lib/cbfs-verification-test test case ......................................................................
Patch Set 9:
(4 comments)
File tests/include/tests/lib/cbfs_util.h:
https://review.coreboot.org/c/coreboot/+/56601/comment/b25bab7c_06a3ccb4 PS8, Line 74: TEST_REGION(cbfs_cache, TEST_CBFS_CACHE_SIZE);
I mean the definitions for the file_no_hash, file_valid_hash, etc. globals. […]
Ok, so I moved all globals (except cbfs_boot_device) to the mock file. I hope, that this is, what you expected :)
File tests/lib/cbfs-verification-test.c:
https://review.coreboot.org/c/coreboot/+/56601/comment/06922b23_79d9d957 PS2, Line 181: assert_memory_equal(mapping, &test_data, TEST_DATA_SIZE);
... […]
Yeah, sorry.
https://review.coreboot.org/c/coreboot/+/56601/comment/d8d46fcc_993deb4a PS2, Line 244: NULL
If you want to have a test for cbfs_walk() where all the vb2_digest...() stuff is mocked out you can certainly do that
If we will have two tests: one with mocked, and one with real hash functions (integration test), then we will know if potential error is caused by coreboot or vboot code.
To test CBFS with vb2_digest_*() functions we will have to make tests able to be linked with vboot, but it should not be a big problem, as I did it for depthcharge already.
(Marking as resolved, as the related code is not present anymore)
File tests/lib/cbfs-verification-test.c:
https://review.coreboot.org/c/coreboot/+/56601/comment/e5c99459_71795082 PS8, Line 244: return cmocka_run_group_tests(cbfs_verification_tests, NULL, NULL);
Yeah, that should also work
Done in CL:57144