Home
last modified time | relevance | path

Searched refs:TEST_EQ (Results 1 – 25 of 48) sorted by relevance

12

/external/vboot_reference/tests/
Dtlcl_tests.c113 TEST_EQ(TlclLibInit(), VBERROR_SUCCESS, "Init"); in TlclTest()
117 TEST_EQ(TlclLibInit(), mock_retval, "Init bad"); in TlclTest()
120 TEST_EQ(TlclLibClose(), VBERROR_SUCCESS, "Close"); in TlclTest()
124 TEST_EQ(TlclLibClose(), mock_retval, "Close bad"); in TlclTest()
128 TEST_EQ(TlclPacketSize(buf), 123, "TlclPacketSize"); in TlclTest()
132 TEST_EQ(TlclSendReceive(buf, buf2, sizeof(buf2)), 0, "SendReceive"); in TlclTest()
134 TEST_EQ(calls[0].req_size, 10, "SendReceive size"); in TlclTest()
139 TEST_EQ(TlclSendReceive(buf, buf2, sizeof(buf2)), VBERROR_SIMULATED, in TlclTest()
145 TEST_EQ(TlclSendReceive(buf, buf2, sizeof(buf2)), 123, in TlclTest()
160 TEST_EQ(TlclStartup(), 0, "SaveState"); in SendCommandTest()
[all …]
Dvboot_api_init_tests.c147 TEST_EQ(VbInit(&cparams, &iparams), expected_retval, desc); in TestVbInit()
149 TEST_EQ(rr, expected_recovery, " (recovery request)"); in TestVbInit()
166 TEST_EQ(shared->timer_vb_init_enter, 21, " time enter"); in VbInitTest()
167 TEST_EQ(shared->timer_vb_init_exit, 43, " time exit"); in VbInitTest()
168 TEST_EQ(shared->flags, 0, " shared flags"); in VbInitTest()
169 TEST_EQ(iparams.out_flags, 0, " out flags"); in VbInitTest()
170 TEST_EQ(nv_write_called, 0, in VbInitTest()
182 TEST_EQ(nv_write_called, 1, " NV write called"); in VbInitTest()
191 TEST_EQ(shared->flags, VBSD_BOOT_FIRMWARE_WP_ENABLED, in VbInitTest()
197 TEST_EQ(shared->flags, VBSD_BOOT_FIRMWARE_SW_WP_ENABLED, in VbInitTest()
[all …]
Dvboot_common_tests.c22 TEST_EQ(EXPECTED_VBPUBLICKEY_SIZE, sizeof(VbPublicKey), in StructPackingTest()
24 TEST_EQ(EXPECTED_VBSIGNATURE_SIZE, sizeof(VbSignature), in StructPackingTest()
26 TEST_EQ(EXPECTED_VBKEYBLOCKHEADER_SIZE, sizeof(VbKeyBlockHeader), in StructPackingTest()
28 TEST_EQ(EXPECTED_VBFIRMWAREPREAMBLEHEADER2_0_SIZE, in StructPackingTest()
31 TEST_EQ(EXPECTED_VBFIRMWAREPREAMBLEHEADER2_1_SIZE, in StructPackingTest()
34 TEST_EQ(EXPECTED_VBKERNELPREAMBLEHEADER2_2_SIZE, in StructPackingTest()
38 TEST_EQ(VB_SHARED_DATA_HEADER_SIZE_V1, in StructPackingTest()
42 TEST_EQ(VB_SHARED_DATA_HEADER_SIZE_V2, in StructPackingTest()
54 TEST_EQ(ARRAY_SIZE(arr1), 12, "ARRAYSIZE(uint8_t)"); in ArraySizeTest()
55 TEST_EQ(ARRAY_SIZE(arr2), 7, "ARRAYSIZE(uint32_t)"); in ArraySizeTest()
[all …]
Dvboot_api_kernel2_tests.c207 TEST_EQ(VbUserConfirms(&cparams, 0), -1, "Shutdown requested"); in VbUserConfirmsTest()
211 TEST_EQ(VbUserConfirms(&cparams, 0), 1, "Enter"); in VbUserConfirmsTest()
215 TEST_EQ(VbUserConfirms(&cparams, 0), 0, "Esc"); in VbUserConfirmsTest()
220 TEST_EQ(VbUserConfirms(&cparams, VB_CONFIRM_SPACE_MEANS_NO), 0, in VbUserConfirmsTest()
226 TEST_EQ(VbUserConfirms(&cparams, 0), -1, "Space ignored"); in VbUserConfirmsTest()
231 TEST_EQ(VbUserConfirms(&cparams, VB_CONFIRM_MUST_TRUST_KEYBOARD), in VbUserConfirmsTest()
237 TEST_EQ(VbUserConfirms(&cparams, in VbUserConfirmsTest()
244 TEST_EQ(VbUserConfirms(&cparams, in VbUserConfirmsTest()
256 TEST_EQ(VbUserConfirms(&cparams, in VbUserConfirmsTest()
268 TEST_EQ(VbBootNormal(&cparams, &lkp), 1002, "VbBootNormal()"); in VbBootTest()
[all …]
Dstateful_util_tests.c29 TEST_EQ(0, s.overrun, "StatefulInit() overrun"); in StatefulInitTest()
30 TEST_EQ(128, s.remaining_len, "StatefulInit() len"); in StatefulInitTest()
43 TEST_EQ(128 - 5, s.remaining_len, "StatefulSkip(5) len"); in StatefulSkipTest()
45 TEST_EQ(0, s.overrun, "StatefulSkip(5) overrun"); in StatefulSkipTest()
50 TEST_EQ(0, s.remaining_len, "StatefulSkip(all) len"); in StatefulSkipTest()
52 TEST_EQ(0, s.overrun, "StatefulSkip(all) overrun"); in StatefulSkipTest()
56 TEST_EQ(0, s.remaining_len, "StatefulSkip(0) len"); in StatefulSkipTest()
58 TEST_EQ(0, s.overrun, "StatefulSkip(0) overrun"); in StatefulSkipTest()
62 TEST_EQ(0, s.remaining_len, "StatefulSkip(+1) len"); in StatefulSkipTest()
63 TEST_EQ(1, s.overrun, "StatefulSkip(+1) overrun"); in StatefulSkipTest()
[all …]
Dvb2_misc_tests.c89 TEST_EQ(c.workbuf_used, sizeof(struct vb2_shared_data), in init_context_tests()
95 TEST_EQ(c.workbuf_used, 200, "Didn't re-init"); in init_context_tests()
100 TEST_EQ(vb2_init_context(&c), in init_context_tests()
106 TEST_EQ(vb2_init_context(&c), in init_context_tests()
120 TEST_EQ(wb.size, cc.workbuf_size - 16, "vb_workbuf_from_ctx() size"); in misc_tests()
137 TEST_EQ(sizeof(struct vb2_gbb_header), in gbb_tests()
151 TEST_EQ(vb2_read_gbb_header(&cc, &gbbdest), in gbb_tests()
156 TEST_EQ(vb2_read_gbb_header(&cc, &gbbdest), in gbb_tests()
161 TEST_EQ(vb2_read_gbb_header(&cc, &gbbdest), in gbb_tests()
172 TEST_EQ(vb2_read_gbb_header(&cc, &gbbdest), in gbb_tests()
[all …]
Dvboot_nvstorage_test.c59 TEST_EQ(VbNvSetup(&c), 0, "VbNvSetup()"); in VbNvStorageTest()
60 TEST_EQ(c.raw[0], 0x70, "VbNvSetup() reset header byte"); in VbNvStorageTest()
62 TEST_EQ(VbNvTeardown(&c), 0, "VbNvTeardown()"); in VbNvStorageTest()
64 TEST_EQ(c.raw_changed, 1, "VbNvTeardown() changed"); in VbNvStorageTest()
69 TEST_EQ(c.raw_changed, 0, "VbNvTeardown() didn't change"); in VbNvStorageTest()
70 TEST_EQ(c.raw[15], goodcrc, "VbNvTeardown() CRC same"); in VbNvStorageTest()
75 TEST_EQ(c.raw[0], 0x70, "VbNvSetup() reset header byte again"); in VbNvStorageTest()
78 TEST_EQ(c.raw_changed, 1, "VbNvTeardown() changed again"); in VbNvStorageTest()
79 TEST_EQ(c.raw[15], goodcrc, "VbNvTeardown() CRC same again"); in VbNvStorageTest()
82 TEST_EQ(c.raw[11], 0, "Kernel byte starts at 0"); in VbNvStorageTest()
[all …]
Drollback_index2_tests.c131 TEST_EQ(length, sizeof(mock_rsf), "TlclRead rsf size"); in TlclRead()
135 TEST_EQ(length, sizeof(mock_rsk), "TlclRead rsk size"); in TlclRead()
151 TEST_EQ(length, sizeof(mock_rsf), "TlclWrite rsf size"); in TlclWrite()
155 TEST_EQ(length, sizeof(mock_rsk), "TlclWrite rsk size"); in TlclWrite()
249 TEST_EQ(ReadSpaceFirmware(&rsf), 0, "ReadSpaceFirmware(), v0"); in CrcTestFirmware()
260 TEST_EQ(ReadSpaceFirmware(&rsf), TPM_E_CORRUPTED_STATE, in CrcTestFirmware()
273 TEST_EQ(ReadSpaceFirmware(&rsf), 0, in CrcTestFirmware()
283 TEST_EQ(WriteSpaceFirmware(&rsf), 0, "WriteSpaceFirmware(), v0"); in CrcTestFirmware()
284 TEST_EQ(mock_rsf.struct_version, 2, "WriteSpaceFirmware(), check v2"); in CrcTestFirmware()
295 TEST_EQ(WriteSpaceFirmware(&rsf), 0, in CrcTestFirmware()
[all …]
Dutility_tests.c26 TEST_EQ(CombineUint16Pair(1, 2), 0x00010002, "CombineUint16Pair"); in MacrosTest()
27 TEST_EQ(CombineUint16Pair(0xFFFE, 0xFFFF), 0xFFFEFFFF, in MacrosTest()
29 TEST_EQ(CombineUint16Pair(-4, -16), 0xFFFCFFF0, in MacrosTest()
31 TEST_EQ(CombineUint16Pair(0x10003, 0x10004), 0x00030004, in MacrosTest()
34 TEST_EQ(Min(1, 2), 1, "Min 1"); in MacrosTest()
35 TEST_EQ(Min(4, 3), 3, "Min 2"); in MacrosTest()
36 TEST_EQ(Min(5, 5), 5, "Min 5"); in MacrosTest()
37 TEST_EQ(Min(a, b), b, "Min uint64 1"); in MacrosTest()
38 TEST_EQ(Min(b, a), b, "Min uint64 2"); in MacrosTest()
39 TEST_EQ(Min(b, b), b, "Min uint64 same"); in MacrosTest()
[all …]
Dvb20_common_tests.c20 TEST_EQ(EXPECTED_VB2_PACKED_KEY_SIZE, in test_struct_packing()
23 TEST_EQ(EXPECTED_VB2_SIGNATURE_SIZE, in test_struct_packing()
26 TEST_EQ(EXPECTED_VB2_KEYBLOCK_SIZE, in test_struct_packing()
29 TEST_EQ(EXPECTED_VB2_FW_PREAMBLE_SIZE, in test_struct_packing()
32 TEST_EQ(EXPECTED_VB2_GBB_HEADER_SIZE, in test_struct_packing()
37 TEST_EQ(EXPECTED_VB2_PACKED_KEY_SIZE, in test_struct_packing()
40 TEST_EQ(EXPECTED_VB2_SIGNATURE_SIZE, in test_struct_packing()
43 TEST_EQ(EXPECTED_VB2_KEYBLOCK_SIZE, in test_struct_packing()
46 TEST_EQ(EXPECTED_VB2_FW_PREAMBLE_SIZE, in test_struct_packing()
58 TEST_EQ((int)vb2_offset_of(p, p), 0, "vb2_offset_of() equal"); in test_helper_functions()
[all …]
Dvb2_rsa_utility_tests.c43 TEST_EQ(kNumAlgorithms, VB2_ALG_COUNT, "Algorithm counts"); in test_utils()
46 TEST_EQ(vb2_crypto_to_signature(VB2_ALG_RSA1024_SHA1), in test_utils()
48 TEST_EQ(vb2_crypto_to_signature(VB2_ALG_RSA2048_SHA256), in test_utils()
50 TEST_EQ(vb2_crypto_to_signature(VB2_ALG_RSA4096_SHA256), in test_utils()
52 TEST_EQ(vb2_crypto_to_signature(VB2_ALG_RSA8192_SHA512), in test_utils()
54 TEST_EQ(vb2_crypto_to_signature(VB2_ALG_COUNT), in test_utils()
58 TEST_EQ(vb2_rsa_sig_size(VB2_SIG_RSA1024), RSA1024NUMBYTES, in test_utils()
60 TEST_EQ(vb2_rsa_sig_size(VB2_SIG_RSA2048), RSA2048NUMBYTES, in test_utils()
62 TEST_EQ(vb2_rsa_sig_size(VB2_SIG_RSA4096), RSA4096NUMBYTES, in test_utils()
64 TEST_EQ(vb2_rsa_sig_size(VB2_SIG_RSA8192), RSA8192NUMBYTES, in test_utils()
[all …]
Drsa_utility_tests.c47 TEST_EQ(RSAProcessedKeySize(0, &u), 1, "Processed key size 0"); in TestUtils()
48 TEST_EQ(u, RSA1024NUMBYTES * 2 + sizeof(uint32_t) * 2, in TestUtils()
50 TEST_EQ(RSAProcessedKeySize(3, &u), 1, "Processed key size 3"); in TestUtils()
51 TEST_EQ(u, RSA2048NUMBYTES * 2 + sizeof(uint32_t) * 2, in TestUtils()
53 TEST_EQ(RSAProcessedKeySize(7, &u), 1, "Processed key size 7"); in TestUtils()
54 TEST_EQ(u, RSA4096NUMBYTES * 2 + sizeof(uint32_t) * 2, in TestUtils()
56 TEST_EQ(RSAProcessedKeySize(11, &u), 1, "Processed key size 11"); in TestUtils()
57 TEST_EQ(u, RSA8192NUMBYTES * 2 + sizeof(uint32_t) * 2, in TestUtils()
59 TEST_EQ(RSAProcessedKeySize(kNumAlgorithms, &u), 0, in TestUtils()
64 TEST_EQ(key == NULL, 0, "New key not null"); in TestUtils()
[all …]
Dvb2_common_tests.c17 TEST_EQ(vb2_safe_memcmp("foo", "foo", 3), 0, "memcmp equal"); in test_memcmp()
19 TEST_EQ(vb2_safe_memcmp("foo1", "foo2", 0), 0, "memcmp 0-size"); in test_memcmp()
36 TEST_EQ(vb2_offset_of(p0, ptr), 0, "ptr"); in test_align()
37 TEST_EQ(size, 16, " size"); in test_align()
38 TEST_EQ(vb2_align(&ptr, &size, 4, 17), in test_align()
45 TEST_EQ(vb2_offset_of(p0, ptr), 4, "ptr"); in test_align()
46 TEST_EQ(size, 12, " size"); in test_align()
51 TEST_EQ(vb2_align(&ptr, &size, 4, 15), in test_align()
57 TEST_EQ(vb2_align(&ptr, &size, 4, 1), in test_align()
75 TEST_EQ(vb2_offset_of(p0, wb.buf), 0, "Workbuf init aligned"); in test_workbuf()
[all …]
Dvboot_kernel_tests.c254 TEST_EQ(mock_data_key_allocated, 0, " mock data key not allocated"); in PublicKeyToRSA()
264 TEST_EQ(mock_data_key_allocated, 1, " mock data key allocated"); in RSAPublicKeyFree()
303 TEST_EQ(AllocAndReadGptData(handle, &g), 0, "AllocAndRead"); in ReadWriteGptTest()
314 TEST_EQ(WriteAndFreeGptData(handle, &g), 0, "WriteAndFree"); in ReadWriteGptTest()
323 TEST_EQ(AllocAndReadGptData(handle, &g), 0, in ReadWriteGptTest()
325 TEST_EQ(CheckHeader(mock_gpt_primary, 0, g.streaming_drive_sectors, in ReadWriteGptTest()
328 TEST_EQ(CheckHeader(mock_gpt_secondary, 1, g.streaming_drive_sectors, in ReadWriteGptTest()
342 TEST_EQ(AllocAndReadGptData(handle, &g), 0, in ReadWriteGptTest()
344 TEST_EQ(CheckHeader(mock_gpt_primary, 0, g.streaming_drive_sectors, in ReadWriteGptTest()
347 TEST_EQ(CheckHeader(mock_gpt_secondary, 1, g.streaming_drive_sectors, in ReadWriteGptTest()
[all …]
Dutility_string_tests.c23 TEST_EQ(0, StrnAppend(dest, NULL, sizeof(dest)), "StrnAppend('', null)"); in StrncatTest()
24 TEST_EQ(0, StrnAppend(NULL, "Hey!", sizeof(dest)), "StrnAppend(null, '')"); in StrncatTest()
28 TEST_EQ(0, StrnAppend(dest, "", sizeof(dest)), "StrnAppend('', '')"); in StrncatTest()
29 TEST_EQ(0, strcmp(dest, ""), "StrnAppend('', '') result"); in StrncatTest()
33 TEST_EQ(3, StrnAppend(dest, "", sizeof(dest)), "StrnAppend(B, '')"); in StrncatTest()
34 TEST_EQ(0, strcmp(dest, "Bob"), "StrnAppend(B, '') result"); in StrncatTest()
38 TEST_EQ(5, StrnAppend(dest, "Alice", sizeof(dest)), "StrnAppend('', A)"); in StrncatTest()
39 TEST_EQ(0, strcmp(dest, "Alice"), "StrnAppend('', A) result"); in StrncatTest()
43 TEST_EQ(10, StrnAppend(dest, "Bunny", sizeof(dest)), "StrnAppend(T, B)"); in StrncatTest()
44 TEST_EQ(0, strcmp(dest, "TigreBunny"), "StrnAppend(T, B) result"); in StrncatTest()
[all …]
Dvb2_nvstorage_tests.c59 TEST_EQ(ctx->flags & VB2_CONTEXT_NVDATA_CHANGED, 0, why); in test_changed()
80 TEST_EQ(c.nvdata[0], 0x70, "vb2_nv_init() reset header byte"); in nv_storage_test()
82 TEST_EQ(sd->status, VB2_SD_STATUS_NV_INIT | VB2_SD_STATUS_NV_REINIT, in nv_storage_test()
93 TEST_EQ(c.nvdata[15], goodcrc, "vb2_nv_init() CRC same"); in nv_storage_test()
94 TEST_EQ(sd->status, VB2_SD_STATUS_NV_INIT, "vb2_nv_init() status same"); in nv_storage_test()
98 TEST_EQ(vb2_nv_check_crc(&c), in nv_storage_test()
101 TEST_EQ(c.nvdata[0], 0x70, "vb2_nv_init() reset header byte again"); in nv_storage_test()
103 TEST_EQ(c.nvdata[15], goodcrc, "vb2_nv_init() CRC same again"); in nv_storage_test()
106 TEST_EQ(c.nvdata[11], 0, "Kernel byte starts at 0"); in nv_storage_test()
108 TEST_EQ(vb2_nv_check_crc(&c), in nv_storage_test()
[all …]
Dvboot_firmware_tests.c109 TEST_EQ(hash_only, 0, " Don't verify firmware with hash"); in KeyBlockVerify()
201 TEST_EQ(LoadFirmware(&cparams, &fparams, &vnc), expected_retval, desc); in TestLoadFirmware()
203 TEST_EQ(rr, expected_recovery, " recovery request"); in TestLoadFirmware()
204 TEST_EQ(data_key.len, 0, " Data key free must be paired with alloc"); in TestLoadFirmware()
228 TEST_EQ(shared->flags & VBSD_LF_DEV_SWITCH_ON, 0, in LoadFirmwareTest()
230 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_DEV_MISMATCH, in LoadFirmwareTest()
232 TEST_EQ(shared->check_fw_b_result, VBSD_LF_CHECK_REC_MISMATCH, in LoadFirmwareTest()
246 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_DEV_MISMATCH, in LoadFirmwareTest()
248 TEST_EQ(shared->check_fw_b_result, VBSD_LF_CHECK_REC_MISMATCH, in LoadFirmwareTest()
259 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_VERIFY_KEYBLOCK, in LoadFirmwareTest()
[all …]
Dvb21_common_tests.c30 TEST_EQ(EXPECTED_GUID_SIZE, in test_struct_packing()
33 TEST_EQ(EXPECTED_VB2_STRUCT_COMMON_SIZE, in test_struct_packing()
36 TEST_EQ(EXPECTED_VB2_PACKED_KEY_SIZE, in test_struct_packing()
39 TEST_EQ(EXPECTED_VB2_SIGNATURE_SIZE, in test_struct_packing()
42 TEST_EQ(EXPECTED_VB2_KEYBLOCK_SIZE, in test_struct_packing()
45 TEST_EQ(EXPECTED_VB2_FW_PREAMBLE_SIZE, in test_struct_packing()
74 TEST_EQ(0, strcmp(vb2_common_desc(c), test_desc), "vb2_common_desc()"); in test_common_header_functions()
75 TEST_EQ(0, strcmp(vb2_common_desc(c2), ""), "vb2_common_desc() empty"); in test_common_header_functions()
83 TEST_EQ(vb2_verify_common_header(cbuf, sizeof(cbuf)), in test_common_header_functions()
89 TEST_EQ(vb2_verify_common_header(cbuf, sizeof(cbuf)), in test_common_header_functions()
[all …]
Dvboot_api_firmware_tests.c139 TEST_EQ(VbSelectFirmware(&cparams, &fparams), expected_retval, desc); in TestVbSf()
141 TEST_EQ(rr, expected_recovery, " recovery request"); in TestVbSf()
150 TEST_EQ(shared->timer_vb_select_firmware_enter, 21, " time enter"); in VbSelectFirmwareTest()
151 TEST_EQ(shared->timer_vb_select_firmware_exit, 43, " time exit"); in VbSelectFirmwareTest()
152 TEST_EQ(nv_write_called, 0, " NV write not called since nothing changed"); in VbSelectFirmwareTest()
153 TEST_EQ(mock_stbms_got_flags, 0, " SetTPMBootModeState() flags"); in VbSelectFirmwareTest()
154 TEST_EQ(mock_stbms_got_fw_flags, 0xABCDE0, " fw keyblock flags"); in VbSelectFirmwareTest()
155 TEST_EQ(mock_rfl_called, 1, " RollbackFirmwareLock() called"); in VbSelectFirmwareTest()
161 TEST_EQ(mock_stbms_got_flags, MOCK_DEV_FLAG, " SetTPMBootModeState() flags"); in VbSelectFirmwareTest()
162 TEST_EQ(mock_rfl_called, 1, " RollbackFirmwareLock() called"); in VbSelectFirmwareTest()
[all …]
Dvb20_misc_tests.c183 TEST_EQ(sd->fw_version, 0x20000, "keyblock version"); in verify_keyblock_tests()
184 TEST_EQ(sd->vblock_preamble_offset, sizeof(mock_vblock.k), in verify_keyblock_tests()
186 TEST_EQ(sd->workbuf_data_key_offset, in verify_keyblock_tests()
190 TEST_EQ(cc.workbuf_used, in verify_keyblock_tests()
196 TEST_EQ(k->algorithm, 7, "data key algorithm"); in verify_keyblock_tests()
197 TEST_EQ(k->key_version, 2, "data key version"); in verify_keyblock_tests()
198 TEST_EQ(k->key_size, sizeof(mock_vblock.k.data_key_data), in verify_keyblock_tests()
200 TEST_EQ(memcmp(cc.workbuf + sd->workbuf_data_key_offset + in verify_keyblock_tests()
204 TEST_EQ(cc.workbuf_used, in verify_keyblock_tests()
211 TEST_EQ(vb2_load_fw_keyblock(&cc), in verify_keyblock_tests()
[all …]
Dvb21_host_key_tests.c52 TEST_EQ(vb2_private_key_read_pem(&key, "no_such_key"), in private_key_tests()
57 TEST_EQ(vb2_private_key_read_pem(&key, testfile), in private_key_tests()
65 TEST_EQ(strcmp(key->desc, testdesc), 0, " right contents"); in private_key_tests()
79 TEST_EQ(vb2_private_key_read(&k2, testfile), in private_key_tests()
81 TEST_EQ(vb2_private_key_write(key, "no/such/dir"), in private_key_tests()
87 TEST_EQ(k2->sig_alg, key->sig_alg, " sig alg"); in private_key_tests()
88 TEST_EQ(k2->hash_alg, key->hash_alg, " hash alg"); in private_key_tests()
89 TEST_EQ(memcmp(&k2->guid, &key->guid, sizeof(k2->guid)), 0, " guid"); in private_key_tests()
90 TEST_EQ(strcmp(k2->desc, testdesc), 0, " desc"); in private_key_tests()
106 TEST_EQ(vb2_private_key_unpack(&k2, buf, bufsize), in private_key_tests()
[all …]
Dvb21_misc_tests.c190 TEST_EQ(sd->fw_version, 0x20000, "keyblock version"); in load_keyblock_tests()
191 TEST_EQ(sd->vblock_preamble_offset, sizeof(mock_vblock.k), in load_keyblock_tests()
193 TEST_EQ(sd->workbuf_data_key_offset, in load_keyblock_tests()
197 TEST_EQ(ctx.workbuf_used, in load_keyblock_tests()
204 TEST_EQ(k->sig_alg, VB2_SIG_RSA4096, "data key algorithm"); in load_keyblock_tests()
205 TEST_EQ(k->key_version, 2, "data key version"); in load_keyblock_tests()
206 TEST_EQ(k->key_size, sizeof(mock_vblock.k.data_key_data), in load_keyblock_tests()
208 TEST_EQ(memcmp(ctx.workbuf + sd->workbuf_data_key_offset + in load_keyblock_tests()
212 TEST_EQ(ctx.workbuf_used, in load_keyblock_tests()
219 TEST_EQ(vb2_load_fw_keyblock(&ctx), in load_keyblock_tests()
[all …]
Dvb2_api_tests.c103 TEST_EQ(vb2api_secdata_check(&cc), VB2_ERROR_SECDATA_CRC, in misc_tests()
111 TEST_EQ(vb2_nv_get(&cc, VB2_NV_RECOVERY_REQUEST), in misc_tests()
113 TEST_EQ(vb2_nv_get(&cc, VB2_NV_RECOVERY_SUBCODE), in misc_tests()
121 TEST_EQ(sd->recovery_reason, 0, " not recovery"); in phase1_tests()
122 TEST_EQ(cc.flags & VB2_CONTEXT_RECOVERY_MODE, 0, " recovery flag"); in phase1_tests()
123 TEST_EQ(cc.flags & VB2_CONTEXT_CLEAR_RAM, 0, " clear ram flag"); in phase1_tests()
127 TEST_EQ(vb2api_fw_phase1(&cc), VB2_ERROR_API_PHASE1_RECOVERY, in phase1_tests()
129 TEST_EQ(sd->recovery_reason, VB2_RECOVERY_GBB_HEADER, in phase1_tests()
137 TEST_EQ(vb2api_fw_phase1(&cc), VB2_ERROR_API_PHASE1_RECOVERY, in phase1_tests()
139 TEST_EQ(sd->recovery_reason, VB2_RECOVERY_DEV_SWITCH, in phase1_tests()
[all …]
Dvb20_api_tests.c222 TEST_EQ(vb2api_fw_phase3(&cc), VB2_ERROR_MOCK, "phase3 keyblock"); in phase3_tests()
223 TEST_EQ(vb2_nv_get(&cc, VB2_NV_RECOVERY_REQUEST), in phase3_tests()
228 TEST_EQ(vb2api_fw_phase3(&cc), VB2_ERROR_MOCK, "phase3 keyblock"); in phase3_tests()
229 TEST_EQ(vb2_nv_get(&cc, VB2_NV_RECOVERY_REQUEST), in phase3_tests()
244 TEST_EQ(sd->workbuf_hash_offset, in init_hash_tests()
248 TEST_EQ(sd->workbuf_hash_size, sizeof(struct vb2_digest_context), in init_hash_tests()
250 TEST_EQ(cc.workbuf_used, in init_hash_tests()
253 TEST_EQ(sd->hash_tag, VB2_HASH_TAG_FW_BODY, "hash tag"); in init_hash_tests()
254 TEST_EQ(sd->hash_remaining_size, mock_body_size, "hash remaining"); in init_hash_tests()
259 TEST_EQ(cc.workbuf_used, wb_used_before, "init hash reuses context"); in init_hash_tests()
[all …]
Dvb21_api_tests.c187 TEST_EQ(vb2api_fw_phase3(&ctx), VB2_ERROR_MOCK, "phase3 keyblock"); in phase3_tests()
188 TEST_EQ(vb2_nv_get(&ctx, VB2_NV_RECOVERY_REQUEST), in phase3_tests()
193 TEST_EQ(vb2api_fw_phase3(&ctx), VB2_ERROR_MOCK, "phase3 keyblock"); in phase3_tests()
194 TEST_EQ(vb2_nv_get(&ctx, VB2_NV_RECOVERY_REQUEST), in phase3_tests()
213 TEST_EQ(sd->workbuf_hash_offset, in init_hash_tests()
217 TEST_EQ(sd->workbuf_hash_size, sizeof(struct vb2_digest_context), in init_hash_tests()
219 TEST_EQ(ctx.workbuf_used, in init_hash_tests()
222 TEST_EQ(sd->hash_tag, in init_hash_tests()
225 TEST_EQ(sd->hash_remaining_size, mock_body_size, "hash remaining"); in init_hash_tests()
230 TEST_EQ(ctx.workbuf_used, wb_used_before, "init hash reuses context"); in init_hash_tests()
[all …]

12