HomeSort by relevance Sort by last modified time
    Searched refs:TEST_EQ (Results 1 - 25 of 51) sorted by null

1 2 3

  /external/vboot_reference/tests/futility/
test_not_really.c 12 TEST_EQ(sizeof(GoogleBinaryBlockHeader),
16 TEST_EQ(0, 0, "Not Really A");
  /external/vboot_reference/tests/
rollback_index3_tests.c 23 TEST_EQ(RollbackS3Resume(), 0, "RollbackS3Resume()");
27 TEST_EQ(RollbackFirmwareSetup(0, 0, 0, &is_virt_dev, &version),
29 TEST_EQ(is_virt_dev, 0, "rfs is_virt_dev");
30 TEST_EQ(version, 0, "rfs version");
32 TEST_EQ(RollbackFirmwareWrite(0), 0, "RollbackFirmwareWrite()");
33 TEST_EQ(RollbackFirmwareLock(), 0, "RollbackFirmwareLock()");
36 TEST_EQ(RollbackKernelRead(&version), 0, "RollbackKernelRead()");
37 TEST_EQ(version, 0, "rkr version");
39 TEST_EQ(RollbackKernelWrite(0), 0, "RollbackKernelWrite()");
40 TEST_EQ(RollbackKernelLock(0), 0, "RollbackKernelLock()")
    [all...]
utility_tests.c 26 TEST_EQ(CombineUint16Pair(1, 2), 0x00010002, "CombineUint16Pair");
27 TEST_EQ(CombineUint16Pair(0xFFFE, 0xFFFF), 0xFFFEFFFF,
29 TEST_EQ(CombineUint16Pair(-4, -16), 0xFFFCFFF0,
31 TEST_EQ(CombineUint16Pair(0x10003, 0x10004), 0x00030004,
34 TEST_EQ(Min(1, 2), 1, "Min 1");
35 TEST_EQ(Min(4, 3), 3, "Min 2");
36 TEST_EQ(Min(5, 5), 5, "Min 5");
37 TEST_EQ(Min(a, b), b, "Min uint64 1");
38 TEST_EQ(Min(b, a), b, "Min uint64 2");
39 TEST_EQ(Min(b, b), b, "Min uint64 same")
    [all...]
vb2_rsa_utility_tests.c 43 TEST_EQ(kNumAlgorithms, VB2_ALG_COUNT, "Algorithm counts");
46 TEST_EQ(vb2_crypto_to_signature(VB2_ALG_RSA1024_SHA1),
48 TEST_EQ(vb2_crypto_to_signature(VB2_ALG_RSA2048_SHA256),
50 TEST_EQ(vb2_crypto_to_signature(VB2_ALG_RSA4096_SHA256),
52 TEST_EQ(vb2_crypto_to_signature(VB2_ALG_RSA8192_SHA512),
54 TEST_EQ(vb2_crypto_to_signature(VB2_ALG_COUNT),
58 TEST_EQ(vb2_rsa_sig_size(VB2_SIG_RSA1024), RSA1024NUMBYTES,
60 TEST_EQ(vb2_rsa_sig_size(VB2_SIG_RSA2048), RSA2048NUMBYTES,
62 TEST_EQ(vb2_rsa_sig_size(VB2_SIG_RSA4096), RSA4096NUMBYTES,
64 TEST_EQ(vb2_rsa_sig_size(VB2_SIG_RSA8192), RSA8192NUMBYTES
    [all...]
tlcl_tests.c 113 TEST_EQ(TlclLibInit(), VBERROR_SUCCESS, "Init");
117 TEST_EQ(TlclLibInit(), mock_retval, "Init bad");
120 TEST_EQ(TlclLibClose(), VBERROR_SUCCESS, "Close");
124 TEST_EQ(TlclLibClose(), mock_retval, "Close bad");
128 TEST_EQ(TlclPacketSize(buf), 123, "TlclPacketSize");
132 TEST_EQ(TlclSendReceive(buf, buf2, sizeof(buf2)), 0, "SendReceive");
134 TEST_EQ(calls[0].req_size, 10, "SendReceive size");
139 TEST_EQ(TlclSendReceive(buf, buf2, sizeof(buf2)), VBERROR_SIMULATED,
145 TEST_EQ(TlclSendReceive(buf, buf2, sizeof(buf2)), 123,
160 TEST_EQ(TlclStartup(), 0, "SaveState")
    [all...]
vb20_common_tests.c 20 TEST_EQ(EXPECTED_VB2_PACKED_KEY_SIZE,
23 TEST_EQ(EXPECTED_VB2_SIGNATURE_SIZE,
26 TEST_EQ(EXPECTED_VB2_KEYBLOCK_SIZE,
29 TEST_EQ(EXPECTED_VB2_FW_PREAMBLE_SIZE,
32 TEST_EQ(EXPECTED_VB2_GBB_HEADER_SIZE,
37 TEST_EQ(EXPECTED_VB2_PACKED_KEY_SIZE,
40 TEST_EQ(EXPECTED_VB2_SIGNATURE_SIZE,
43 TEST_EQ(EXPECTED_VB2_KEYBLOCK_SIZE,
46 TEST_EQ(EXPECTED_VB2_FW_PREAMBLE_SIZE,
58 TEST_EQ((int)vb2_offset_of(p, p), 0, "vb2_offset_of() equal")
    [all...]
utility_string_tests.c 23 TEST_EQ(0, StrnAppend(dest, NULL, sizeof(dest)), "StrnAppend('', null)");
24 TEST_EQ(0, StrnAppend(NULL, "Hey!", sizeof(dest)), "StrnAppend(null, '')");
28 TEST_EQ(0, StrnAppend(dest, "", sizeof(dest)), "StrnAppend('', '')");
29 TEST_EQ(0, strcmp(dest, ""), "StrnAppend('', '') result");
33 TEST_EQ(3, StrnAppend(dest, "", sizeof(dest)), "StrnAppend(B, '')");
34 TEST_EQ(0, strcmp(dest, "Bob"), "StrnAppend(B, '') result");
38 TEST_EQ(5, StrnAppend(dest, "Alice", sizeof(dest)), "StrnAppend('', A)");
39 TEST_EQ(0, strcmp(dest, "Alice"), "StrnAppend('', A) result");
43 TEST_EQ(10, StrnAppend(dest, "Bunny", sizeof(dest)), "StrnAppend(T, B)");
44 TEST_EQ(0, strcmp(dest, "TigreBunny"), "StrnAppend(T, B) result")
    [all...]
vboot_common_tests.c 22 TEST_EQ(EXPECTED_VBPUBLICKEY_SIZE, sizeof(VbPublicKey),
24 TEST_EQ(EXPECTED_VBSIGNATURE_SIZE, sizeof(VbSignature),
26 TEST_EQ(EXPECTED_VBKEYBLOCKHEADER_SIZE, sizeof(VbKeyBlockHeader),
28 TEST_EQ(EXPECTED_VBFIRMWAREPREAMBLEHEADER2_0_SIZE,
31 TEST_EQ(EXPECTED_VBFIRMWAREPREAMBLEHEADER2_1_SIZE,
34 TEST_EQ(EXPECTED_VBKERNELPREAMBLEHEADER2_2_SIZE,
38 TEST_EQ(VB_SHARED_DATA_HEADER_SIZE_V1,
42 TEST_EQ(VB_SHARED_DATA_HEADER_SIZE_V2,
54 TEST_EQ(ARRAY_SIZE(arr1), 12, "ARRAYSIZE(uint8_t)");
55 TEST_EQ(ARRAY_SIZE(arr2), 7, "ARRAYSIZE(uint32_t)")
    [all...]
vboot_api_init_tests.c 147 TEST_EQ(VbInit(&cparams, &iparams), expected_retval, desc);
149 TEST_EQ(rr, expected_recovery, " (recovery request)");
166 TEST_EQ(shared->timer_vb_init_enter, 21, " time enter");
167 TEST_EQ(shared->timer_vb_init_exit, 43, " time exit");
168 TEST_EQ(shared->flags, 0, " shared flags");
169 TEST_EQ(iparams.out_flags, 0, " out flags");
170 TEST_EQ(nv_write_called, 0,
182 TEST_EQ(nv_write_called, 1, " NV write called");
191 TEST_EQ(shared->flags, VBSD_BOOT_FIRMWARE_WP_ENABLED,
197 TEST_EQ(shared->flags, VBSD_BOOT_FIRMWARE_SW_WP_ENABLED
    [all...]
stateful_util_tests.c 29 TEST_EQ(0, s.overrun, "StatefulInit() overrun");
30 TEST_EQ(128, s.remaining_len, "StatefulInit() len");
43 TEST_EQ(128 - 5, s.remaining_len, "StatefulSkip(5) len");
45 TEST_EQ(0, s.overrun, "StatefulSkip(5) overrun");
50 TEST_EQ(0, s.remaining_len, "StatefulSkip(all) len");
52 TEST_EQ(0, s.overrun, "StatefulSkip(all) overrun");
56 TEST_EQ(0, s.remaining_len, "StatefulSkip(0) len");
58 TEST_EQ(0, s.overrun, "StatefulSkip(0) overrun");
62 TEST_EQ(0, s.remaining_len, "StatefulSkip(+1) len");
63 TEST_EQ(1, s.overrun, "StatefulSkip(+1) overrun")
    [all...]
vb21_host_misc_tests.c 20 TEST_EQ(roundup32(0), 0, "roundup32(0)");
21 TEST_EQ(roundup32(15), 16, "roundup32(15)");
22 TEST_EQ(roundup32(16), 16, "roundup32(16)");
24 TEST_EQ(vb2_desc_size(NULL), 0, "desc size null");
25 TEST_EQ(vb2_desc_size(""), 0, "desc size empty");
26 TEST_EQ(vb2_desc_size("foo"), 4, "desc size 'foo'");
27 TEST_EQ(vb2_desc_size("foob"), 8, "desc size 'foob'");
42 TEST_EQ(vb2_read_file(testfile, &read_data, &read_size),
44 TEST_EQ(vb2_write_file("no/such/dir", test_data, sizeof(test_data)),
51 TEST_EQ(read_size, sizeof(test_data), " data size")
    [all...]
vb2_common_tests.c 17 TEST_EQ(vb2_safe_memcmp("foo", "foo", 3), 0, "memcmp equal");
19 TEST_EQ(vb2_safe_memcmp("foo1", "foo2", 0), 0, "memcmp 0-size");
36 TEST_EQ(vb2_offset_of(p0, ptr), 0, "ptr");
37 TEST_EQ(size, 16, " size");
38 TEST_EQ(vb2_align(&ptr, &size, 4, 17),
45 TEST_EQ(vb2_offset_of(p0, ptr), 4, "ptr");
46 TEST_EQ(size, 12, " size");
51 TEST_EQ(vb2_align(&ptr, &size, 4, 15),
57 TEST_EQ(vb2_align(&ptr, &size, 4, 1),
75 TEST_EQ(vb2_offset_of(p0, wb.buf), 0, "Workbuf init aligned")
    [all...]
vb2_misc_tests.c 89 TEST_EQ(c.workbuf_used, sizeof(struct vb2_shared_data),
95 TEST_EQ(c.workbuf_used, 200, "Didn't re-init");
100 TEST_EQ(vb2_init_context(&c),
106 TEST_EQ(vb2_init_context(&c),
120 TEST_EQ(wb.size, cc.workbuf_size - 16, "vb_workbuf_from_ctx() size");
137 TEST_EQ(sizeof(struct vb2_gbb_header),
151 TEST_EQ(vb2_read_gbb_header(&cc, &gbbdest),
156 TEST_EQ(vb2_read_gbb_header(&cc, &gbbdest),
161 TEST_EQ(vb2_read_gbb_header(&cc, &gbbdest),
172 TEST_EQ(vb2_read_gbb_header(&cc, &gbbdest)
    [all...]
vboot_nvstorage_test.c 59 TEST_EQ(VbNvSetup(&c), 0, "VbNvSetup()");
60 TEST_EQ(c.raw[0], 0x70, "VbNvSetup() reset header byte");
62 TEST_EQ(VbNvTeardown(&c), 0, "VbNvTeardown()");
64 TEST_EQ(c.raw_changed, 1, "VbNvTeardown() changed");
69 TEST_EQ(c.raw_changed, 0, "VbNvTeardown() didn't change");
70 TEST_EQ(c.raw[15], goodcrc, "VbNvTeardown() CRC same");
75 TEST_EQ(c.raw[0], 0x70, "VbNvSetup() reset header byte again");
78 TEST_EQ(c.raw_changed, 1, "VbNvTeardown() changed again");
79 TEST_EQ(c.raw[15], goodcrc, "VbNvTeardown() CRC same again");
82 TEST_EQ(c.raw[11], 0, "Kernel byte starts at 0")
    [all...]
vboot_api_kernel2_tests.c 207 TEST_EQ(VbUserConfirms(&cparams, 0), -1, "Shutdown requested");
211 TEST_EQ(VbUserConfirms(&cparams, 0), 1, "Enter");
215 TEST_EQ(VbUserConfirms(&cparams, 0), 0, "Esc");
220 TEST_EQ(VbUserConfirms(&cparams, VB_CONFIRM_SPACE_MEANS_NO), 0,
226 TEST_EQ(VbUserConfirms(&cparams, 0), -1, "Space ignored");
231 TEST_EQ(VbUserConfirms(&cparams, VB_CONFIRM_MUST_TRUST_KEYBOARD),
237 TEST_EQ(VbUserConfirms(&cparams,
244 TEST_EQ(VbUserConfirms(&cparams,
256 TEST_EQ(VbUserConfirms(&cparams,
268 TEST_EQ(VbBootNormal(&cparams, &lkp), 1002, "VbBootNormal()")
    [all...]
rollback_index2_tests.c 131 TEST_EQ(length, sizeof(mock_rsf), "TlclRead rsf size");
135 TEST_EQ(length, sizeof(mock_rsk), "TlclRead rsk size");
151 TEST_EQ(length, sizeof(mock_rsf), "TlclWrite rsf size");
155 TEST_EQ(length, sizeof(mock_rsk), "TlclWrite rsk size");
249 TEST_EQ(ReadSpaceFirmware(&rsf), 0, "ReadSpaceFirmware(), v0");
260 TEST_EQ(ReadSpaceFirmware(&rsf), TPM_E_CORRUPTED_STATE,
273 TEST_EQ(ReadSpaceFirmware(&rsf), 0,
283 TEST_EQ(WriteSpaceFirmware(&rsf), 0, "WriteSpaceFirmware(), v0");
284 TEST_EQ(mock_rsf.struct_version, 2, "WriteSpaceFirmware(), check v2");
295 TEST_EQ(WriteSpaceFirmware(&rsf), 0
    [all...]
rsa_padding_test.c 22 TEST_EQ(RSAVerify(key, signatures[0], RSA1024NUMBYTES, 0,
34 TEST_EQ(unexpected_success, 0, "RSA Padding Test invalid sigs");
43 TEST_EQ(RSAVerify(key, signatures[0], RSA1024NUMBYTES, 0,
45 TEST_EQ(RSAVerify(key, signatures[0], RSA1024NUMBYTES - 1, 0,
47 TEST_EQ(RSAVerify(key, signatures[0], RSA1024NUMBYTES, kNumAlgorithms,
49 TEST_EQ(RSAVerify(key, signatures[0], RSA1024NUMBYTES, 3,
55 TEST_EQ(RSAVerify(key, sig, RSA1024NUMBYTES, 0, test_message_sha1_hash), 0,
60 TEST_EQ(RSAVerify(key, sig, RSA1024NUMBYTES, 0, test_message_sha1_hash), 0,
vb2_secdata_tests.c 26 TEST_EQ(ctx->flags & VB2_CONTEXT_SECDATA_CHANGED, 0, why);
44 TEST_EQ(vb2_secdata_check_crc(&c),
46 TEST_EQ(vb2_secdata_init(&c),
57 TEST_EQ(vb2_secdata_check_crc(&c),
59 TEST_EQ(vb2_secdata_init(&c),
67 TEST_EQ(v, 0, "Flags created 0");
74 TEST_EQ(v, 0x12, "Flags changed");
75 TEST_EQ(vb2_secdata_set(&c, VB2_SECDATA_FLAGS, 0x100),
81 TEST_EQ(v, 0, "Versions created 0");
91 TEST_EQ(v, 0x123456ff, "Versions changed")
    [all...]
rsa_utility_tests.c 47 TEST_EQ(RSAProcessedKeySize(0, &u), 1, "Processed key size 0");
48 TEST_EQ(u, RSA1024NUMBYTES * 2 + sizeof(uint32_t) * 2,
50 TEST_EQ(RSAProcessedKeySize(3, &u), 1, "Processed key size 3");
51 TEST_EQ(u, RSA2048NUMBYTES * 2 + sizeof(uint32_t) * 2,
53 TEST_EQ(RSAProcessedKeySize(7, &u), 1, "Processed key size 7");
54 TEST_EQ(u, RSA4096NUMBYTES * 2 + sizeof(uint32_t) * 2,
56 TEST_EQ(RSAProcessedKeySize(11, &u), 1, "Processed key size 11");
57 TEST_EQ(u, RSA8192NUMBYTES * 2 + sizeof(uint32_t) * 2,
59 TEST_EQ(RSAProcessedKeySize(kNumAlgorithms, &u), 0,
64 TEST_EQ(key == NULL, 0, "New key not null")
    [all...]
vboot_kernel_tests.c 254 TEST_EQ(mock_data_key_allocated, 0, " mock data key not allocated");
264 TEST_EQ(mock_data_key_allocated, 1, " mock data key allocated");
303 TEST_EQ(AllocAndReadGptData(handle, &g), 0, "AllocAndRead");
314 TEST_EQ(WriteAndFreeGptData(handle, &g), 0, "WriteAndFree");
323 TEST_EQ(AllocAndReadGptData(handle, &g), 0,
325 TEST_EQ(CheckHeader(mock_gpt_primary, 0, g.streaming_drive_sectors,
328 TEST_EQ(CheckHeader(mock_gpt_secondary, 1, g.streaming_drive_sectors,
342 TEST_EQ(AllocAndReadGptData(handle, &g), 0,
344 TEST_EQ(CheckHeader(mock_gpt_primary, 0, g.streaming_drive_sectors,
347 TEST_EQ(CheckHeader(mock_gpt_secondary, 1, g.streaming_drive_sectors
    [all...]
vb2_nvstorage_tests.c 59 TEST_EQ(ctx->flags & VB2_CONTEXT_NVDATA_CHANGED, 0, why);
80 TEST_EQ(c.nvdata[0], 0x70, "vb2_nv_init() reset header byte");
82 TEST_EQ(sd->status, VB2_SD_STATUS_NV_INIT | VB2_SD_STATUS_NV_REINIT,
93 TEST_EQ(c.nvdata[15], goodcrc, "vb2_nv_init() CRC same");
94 TEST_EQ(sd->status, VB2_SD_STATUS_NV_INIT, "vb2_nv_init() status same");
98 TEST_EQ(vb2_nv_check_crc(&c),
101 TEST_EQ(c.nvdata[0], 0x70, "vb2_nv_init() reset header byte again");
103 TEST_EQ(c.nvdata[15], goodcrc, "vb2_nv_init() CRC same again");
106 TEST_EQ(c.nvdata[11], 0, "Kernel byte starts at 0");
108 TEST_EQ(vb2_nv_check_crc(&c)
    [all...]
vboot_firmware_tests.c 109 TEST_EQ(hash_only, 0, " Don't verify firmware with hash");
201 TEST_EQ(LoadFirmware(&cparams, &fparams, &vnc), expected_retval, desc);
203 TEST_EQ(rr, expected_recovery, " recovery request");
204 TEST_EQ(data_key.len, 0, " Data key free must be paired with alloc");
228 TEST_EQ(shared->flags & VBSD_LF_DEV_SWITCH_ON, 0,
230 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_DEV_MISMATCH,
232 TEST_EQ(shared->check_fw_b_result, VBSD_LF_CHECK_REC_MISMATCH,
246 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_DEV_MISMATCH,
248 TEST_EQ(shared->check_fw_b_result, VBSD_LF_CHECK_REC_MISMATCH,
259 TEST_EQ(shared->check_fw_a_result, VBSD_LF_CHECK_VERIFY_KEYBLOCK
    [all...]
vb21_misc_tests.c 190 TEST_EQ(sd->fw_version, 0x20000, "keyblock version");
191 TEST_EQ(sd->vblock_preamble_offset, sizeof(mock_vblock.k),
193 TEST_EQ(sd->workbuf_data_key_offset,
197 TEST_EQ(ctx.workbuf_used,
204 TEST_EQ(k->sig_alg, VB2_SIG_RSA4096, "data key algorithm");
205 TEST_EQ(k->key_version, 2, "data key version");
206 TEST_EQ(k->key_size, sizeof(mock_vblock.k.data_key_data),
208 TEST_EQ(memcmp(ctx.workbuf + sd->workbuf_data_key_offset +
212 TEST_EQ(ctx.workbuf_used,
219 TEST_EQ(vb2_load_fw_keyblock(&ctx)
    [all...]
  /ndk/tests/device/math/jni/
math.c 26 void TEST_EQ(long double a, long double b)
42 TEST_EQ(ld, 0.6668696L);
43 TEST_EQ(ld1, 0.7451744L);
44 TEST_EQ(d, 0.6593847);
45 TEST_EQ(d1, 0.7518057);
46 TEST_EQ(f, 0.6518338f);
47 TEST_EQ(f1, 0.7583619f);
56 TEST_EQ(ld, 10L);
58 TEST_EQ(ld, 3.321928L);
61 TEST_EQ(d, 5.827311)
    [all...]
math.cpp 26 void TEST_EQ(long double a, long double b)
42 TEST_EQ(ld, 0.6668696L);
43 TEST_EQ(ld1, 0.7451744L);
44 TEST_EQ(d, 0.6593847);
45 TEST_EQ(d1, 0.7518057);
46 TEST_EQ(f, 0.6518338f);
47 TEST_EQ(f1, 0.7583619f);
56 TEST_EQ(ld, 10L);
58 TEST_EQ(ld, 3.321928L);
61 TEST_EQ(d, 5.827311)
    [all...]

Completed in 88 milliseconds

1 2 3