diff options
author | Jakub Czapiga <jacz@semihalf.com> | 2021-07-27 17:04:11 +0200 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2021-09-14 23:35:38 +0000 |
commit | b20aa094cc3e83abd106c5e7ef93ed6cde3e7cd7 (patch) | |
tree | 5a80e3b33a5f3ff4763a9d93b07862b3b912e513 /tests/include | |
parent | 4095291808b04544346432ca675e6fbfbb7ed11c (diff) |
tests: Add lib/cbfs-lookup-test test case
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I2ebebba1468c19661741de8a8456605b1c5f56b6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56813
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'tests/include')
-rw-r--r-- | tests/include/tests/lib/cbfs_util.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/include/tests/lib/cbfs_util.h b/tests/include/tests/lib/cbfs_util.h index ebf2fb8b7e..8475946382 100644 --- a/tests/include/tests/lib/cbfs_util.h +++ b/tests/include/tests/lib/cbfs_util.h @@ -14,6 +14,14 @@ BE32(((be64) >> 32) & 0xFFFFFFFF), \ BE32(((be64) >> 0) & 0xFFFFFFFF)) +#define LE32(val32) EMPTY_WRAP(\ + ((val32) >> 0) & 0xff, ((val32) >> 8) & 0xff, \ + ((val32) >> 16) & 0xff, ((val32) >> 24) & 0xff) + +#define LE64(val64) EMPTY_WRAP( \ + BE32(((val64) >> 0) & 0xFFFFFFFF), \ + BE32(((val64) >> 32) & 0xFFFFFFFF)) + #define FILENAME_SIZE 16 struct cbfs_test_file { @@ -98,5 +106,10 @@ extern const u8 bad_hash[VB2_SHA256_DIGEST_SIZE]; extern const struct cbfs_test_file file_no_hash; extern const struct cbfs_test_file file_valid_hash; extern const struct cbfs_test_file file_broken_hash; +extern const struct cbfs_test_file test_file_1; +extern const struct cbfs_test_file test_file_2; +extern const struct cbfs_test_file test_file_int_1; +extern const struct cbfs_test_file test_file_int_2; +extern const struct cbfs_test_file test_file_int_3; #endif /* TESTS_LIB_CBFS_UTIL_H */ |