Home
last modified time | relevance | path

Searched refs:expected (Results 1 – 25 of 73) sorted by relevance

123

/openthread-latest/third_party/mbedtls/repo/tests/suites/
Dtest_suite_constant_time.function40 mbedtls_ct_condition_t expected = (v != 0) ? MBEDTLS_CT_TRUE : MBEDTLS_CT_FALSE;
42 TEST_EQUAL(mbedtls_ct_bool(v), expected);
59 mbedtls_ct_condition_t expected = x1 ? MBEDTLS_CT_FALSE : MBEDTLS_CT_TRUE;
60 TEST_EQUAL(mbedtls_ct_bool_not(mbedtls_ct_bool(x)), expected);
62 expected = x1 != y1 ? MBEDTLS_CT_TRUE : MBEDTLS_CT_FALSE;
63 TEST_EQUAL(mbedtls_ct_uint_ne(x, y), expected);
65 expected = x1 == y1 ? MBEDTLS_CT_TRUE : MBEDTLS_CT_FALSE;
66 TEST_EQUAL(mbedtls_ct_uint_eq(x, y), expected);
68 expected = x1 > y1 ? MBEDTLS_CT_TRUE : MBEDTLS_CT_FALSE;
69 TEST_EQUAL(mbedtls_ct_uint_gt(x, y), expected);
[all …]
Dtest_suite_alignment.function57 /* Define expected result by manually aligning the raw bytes, and
63 /* Make a 16/32/64 byte read from the aligned location, and copy to expected */
64 uint64_t expected = 0;
67 expected = *raw_aligned_16;
70 expected = *raw_aligned_32;
73 expected = raw_aligned_64;
77 TEST_EQUAL(r, expected);
107 uint64_t input = 0, expected = 0;
109 TEST_ASSERT(parse_hex_string(expected_str, &expected));
111 /* Check against expected result */
[all …]
Dtest_suite_psa_crypto_low_hash.function27 data_t *expected)
31 size_t output_size = expected->len;
39 ASSERT_COMPARE(expected->x, expected->len, output, length);
44 output_size = expected->len + 1;
49 ASSERT_COMPARE(expected->x, expected->len, output, length);
167 void hash_empty(int alg_arg, data_t *expected)
171 size_t output_size = expected->len;
182 ASSERT_COMPARE(expected->x, expected->len, output, length);
191 ASSERT_COMPARE(expected->x, expected->len, output, length);
203 ASSERT_COMPARE(expected->x, expected->len, output, length);
Dtest_suite_asn1write.function30 const data_t *expected, int ret)
34 if (data->size < expected->len) {
41 expected->x, expected->len);
57 void mbedtls_asn1_write_null(data_t *expected)
62 for (data.size = 0; data.size <= expected->len + 1; data.size++) {
67 if (!generic_write_finish_step(&data, expected, ret)) {
79 void mbedtls_asn1_write_bool(int val, data_t *expected)
84 for (data.size = 0; data.size <= expected->len + 1; data.size++) {
89 if (!generic_write_finish_step(&data, expected, ret)) {
107 void mbedtls_asn1_write_int(int val, data_t *expected)
[all …]
Dtest_suite_platform_printf.function50 char *expected = NULL;
56 TEST_CALLOC(expected, n + 1);
57 expected[0] = '7';
58 memset(expected + 1, 'f', sizeof(value) * 2 - 1);
62 TEST_MEMORY_COMPARE(expected, n + 1, output, n + 1);
68 mbedtls_free(expected);
Dtest_suite_base64.function37 signed char expected;
44 expected = -1;
46 expected = p - base64_digits;
52 TEST_EQUAL(actual, expected);
Dtest_suite_dhm.function6 const mbedtls_mpi *expected)
13 TEST_ASSERT(mbedtls_mpi_cmp_mpi(&actual, expected) == 0);
22 * syntax and check that the value is the expected one (taken from the
24 static int check_dhm_param_output(const mbedtls_mpi *expected,
41 TEST_EQUAL(n, mbedtls_mpi_size(expected));
44 TEST_EQUAL(0, mbedtls_mpi_cmp_mpi(expected, &actual));
Dtest_suite_cipher.function425 iv_len = 13; /* For CCM, IV length is expected to be between 7 and 13 bytes.
441 int expected = (cipher_info->mode == MBEDTLS_MODE_GCM ||
445 TEST_EQUAL(expected, mbedtls_cipher_update_ad(&ctx_dec, ad, sizeof(ad) - i));
446 TEST_EQUAL(expected, mbedtls_cipher_update_ad(&ctx_enc, ad, sizeof(ad) - i));
465 TEST_EQUAL(expected, mbedtls_cipher_write_tag(&ctx_enc, tag, sizeof(tag)));
486 TEST_EQUAL(expected, mbedtls_cipher_check_tag(&ctx_dec, tag, sizeof(tag)));
542 int expected = (cipher_info->mode == MBEDTLS_MODE_GCM ||
546 TEST_EQUAL(expected, mbedtls_cipher_update_ad(&ctx, NULL, 0));
616 int expected = (cipher_info->mode == MBEDTLS_MODE_GCM ||
620 TEST_EQUAL(expected, mbedtls_cipher_update_ad(&ctx_dec, NULL, 0));
[all …]
Dtest_suite_psa_crypto_storage_format.function14 * Test that it has the expected representation.
36 /* Check that the key is represented as expected. */
161 /* Check that the injected key exists and looks as expected. */
228 * check that it has the expected format so that future versions
Dtest_suite_psa_crypto_hash.function66 // manual comparison against expected MAC
69 // use psa_mac_verify to compare to expected MAC
Dtest_suite_psa_crypto_pake.function256 … !"One of the last psa_pake_input() calls should have returned the expected error.");
350 … !"One of the last psa_pake_input() calls should have returned the expected error.");
383 … !"One of the last psa_pake_input() calls should have returned the expected error.");
439 … !"One of the last psa_pake_input() calls should have returned the expected error.");
503 … !"One of the last psa_pake_input() calls should have returned the expected error.");
530 … !"One of the last psa_pake_input() calls should have returned the expected error.");
549 * - terminated successfully if this exact error was expected at this stage
550 * - terminated with failure otherwise (either no error was expected at this
551 * stage or a different error code was expected)
572 * The test succeeds if the returned error is exactly the expected one,
Dtest_suite_ecdsa.function120 /* Check we generated the expected values */
496 void ecdsa_verify(int grp_id, char *x, char *y, char *r, char *s, data_t *content, int expected)
517 /* Test whether public key has expected validity */
519 expected == MBEDTLS_ERR_ECP_INVALID_KEY ? MBEDTLS_ERR_ECP_INVALID_KEY : 0);
524 TEST_EQUAL(result, expected);
Dtest_suite_ecp.function851 // Read expected parameters
868 // Compare group with expected parameters
904 // Read group from buffer and compare with expected ID
1183 void mbedtls_ecp_read_key(int grp_id, data_t *in_key, int expected, int canonical)
1196 TEST_ASSERT(ret == expected);
1198 if (expected == 0) {
1230 expected);
1242 expected);
1353 void genkey_mx_known_answer(int bits, data_t *seed, data_t *expected)
1366 TEST_CALLOC(actual, expected->len);
[all …]
Dtest_suite_lmots.data91 # alters the random value (C) of the signature, and is expected to fail to
97 # sets an invalid LMOTS type (0x5), and is expected to fail to
103 # sets an invalid LMOTS type (0x3), and is expected to fail to
Dtest_suite_aes.function92 void aes_ctr(data_t *key, data_t *ictr, data_t *pt, data_t *ct, int expected)
105 // expected result is always success on zero-length input, so skip len == 0 if expecting failure
106 for (size_t len = (expected == 0 ? 0 : 1); len <= pt->len; len++) {
121 TEST_ASSERT(!!memcmp(output, ct->x, len) == expected);
126 TEST_ASSERT(!!memcmp(output, pt->x, len) == expected);
/openthread-latest/third_party/mbedtls/repo/tests/scripts/
Dtest_generate_test_code.py178 expected = '#if ' + ' && '.join(['defined(%s)' %
180 self.assertEqual(dep_str, expected,
196 expected = '''
203 self.assertEqual(code, expected)
213 expected = '''
220 self.assertEqual(code, expected)
229 expected = '''
237 self.assertEqual(code, expected)
251 expected = '''
258 self.assertEqual(code, expected)
[all …]
Drun-metatests.sh10 metatest is expected to report a failure. The final line should be
/openthread-latest/third_party/mbedtls/repo/docs/architecture/psa-migration/
Dtesting.md43 (`mbedtls_pk_get_type()` etc.) work and the functions that are expected to
44 fail (`mbedtls_pk_verify()` etc) return the expected error.
46 check that signature generation works as expected
48 exporting (writing out) the public part of the key works as expected and
49 that exporting the private key fails as expected.
/openthread-latest/tools/harness-automation/autothreadharness/
Dopen_thread_controller.py124 def _expect(self, expected, times=50): argument
131 logger.debug('[%s] Expecting [%s]', self.port, expected)
139 if line == expected:
148 raise Exception('failed to find expected string[%s]' % expected)
/openthread-latest/third_party/mbedtls/repo/docs/architecture/testing/
Ddriver-interface-test-strategy.md25 …the proper function is called, that it receives the expected inputs and that it produces the expec…
41 …ons involve multiple driver methods; these should validate that all the expected driver methods ar…
45 … register multiple drivers with a key in each driver and check that the expected driver is called.…
46 …cture with multiple lifetime values and check that the driver receives the expected lifetime value.
56expected inputs reach the driver. This may be implicit in a test that checks the outputs if the on…
70 * Check that the storage ends up in the expected state. At least make sure that no intermediate fil…
90 * Check both that the storage has the expected content (this can be done by e.g. using a key that i…
Dpsa-storage-format-testing.md23expected state of the storage after the key is created. The test case creates a key as indicated b…
25 In addition, the test case also loads the key and checks that it has the expected data and metadata…
39 … the corresponding test cases in load-only mode: create a file with the expected content, load it …
62 …ven identifier (using `psa_import_key`) and verify that a file with the expected name is created, …
68 …th `psa_import_key`. Read the file content and validate that it has the expected layout, deduced f…
/openthread-latest/tools/harness-thci/
DOpenThread_BR.py206 def __bashExpect(self, expected, timeout=20, endswith=False): argument
207 self.log('Expecting [%r]' % (expected))
219 matched = line.endswith(expected)
221 matched = line == expected
224 print('[%s] Expected [%r]' % (self.port, expected))
230 raise Exception('failed to find expected string[%s]' % expected)
/openthread-latest/third_party/mbedtls/repo/programs/psa/
Dcrypto_examples.c22 #define ASSERT_STATUS(actual, expected) \ argument
25 if ((actual) != (expected)) \
29 (psa_status_t) actual, (psa_status_t) expected); \
/openthread-latest/.github/ISSUE_TEMPLATE/
Dbug_report.md15 **Expected behavior** A clear and concise description of what you expected to happen.
/openthread-latest/tests/scripts/thread-cert/
Dtest_ipv6.py714 expected = bytearray([type, 0x00, offset >> 5, ((offset << 3) & 0xff) | more_flag])\
717 self.assertEqual(expected, actual)
756 expected = bytearray([_type, code]) + struct.pack("!H", checksum) + body
758 self.assertEqual(expected, actual)
1238expected = bytearray([identifier >> 8, identifier & 0xff, sequence_number >> 8, sequence_number & …
1239 self.assertEqual(expected, actual)
1271 expected = bytearray([
1276 self.assertEqual(expected, actual)

123