/Zephyr-latest/tests/drivers/mm/sys_mm_drv_bank/src/ |
D | main.c | 18 struct sys_memory_stats *expected) in test_stats() argument 20 zassert_equal(stats->free_bytes, expected->free_bytes, in test_stats() 22 stats->free_bytes, expected->free_bytes); in test_stats() 23 zassert_equal(stats->allocated_bytes, expected->allocated_bytes, in test_stats() 25 stats->allocated_bytes, expected->allocated_bytes); in test_stats() 26 zassert_equal(stats->max_allocated_bytes, expected->max_allocated_bytes, in test_stats() 29 expected->max_allocated_bytes); in test_stats() 35 struct sys_memory_stats expected; in ZTEST() local 42 expected.free_bytes = EXPECTED(0); in ZTEST() 43 expected.allocated_bytes = EXPECTED(BANK_PAGES); in ZTEST() [all …]
|
/Zephyr-latest/tests/net/socket/can/src/ |
D | main.c | 21 struct can_frame expected = { 0 }; in ZTEST() local 30 expected.flags = CAN_FRAME_IDE; in ZTEST() 31 expected.id = 1234U; in ZTEST() 32 expected.dlc = can_bytes_to_dlc(sizeof(data)); in ZTEST() 33 memcpy(expected.data, data, sizeof(data)); in ZTEST() 39 LOG_HEXDUMP_DBG((const uint8_t *)&expected, sizeof(expected), "expected"); in ZTEST() 41 zassert_equal(zframe.flags, expected.flags, "Flags not equal"); in ZTEST() 42 zassert_equal(zframe.id, expected.id, "CAN id invalid"); in ZTEST() 43 zassert_equal(zframe.dlc, expected.dlc, "Msg length invalid"); in ZTEST() 44 zassert_mem_equal(&zframe.data, &expected.data, can_dlc_to_bytes(expected.dlc), in ZTEST() [all …]
|
/Zephyr-latest/tests/unit/crc/ |
D | main.c | 217 uint8_t fcs, expected; in ZTEST() local 227 expected = 0x00; in ZTEST() 228 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST() 231 expected = 0x00; in ZTEST() 232 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST() 235 expected = 0x1a; in ZTEST() 236 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST() 239 expected = 0x92; in ZTEST() 240 zassert_equal(fcs, expected, "0x%02x vs 0x%02x", fcs, expected); in ZTEST() 243 expected = 0x1a; in ZTEST() [all …]
|
/Zephyr-latest/tests/lib/c_lib/strerror/src/ |
D | main.c | 14 const char *expected; in ZTEST() local 19 expected = ""; in ZTEST() 22 expected = "Invalid argument"; in ZTEST() 25 zassert_equal(0, strcmp(expected, actual), in ZTEST() 26 "mismatch: exp: %s act: %s", expected, actual); in ZTEST() 34 expected = ""; in ZTEST() 36 zassert_equal(0, strcmp(expected, actual), "mismatch: exp: %s act: %s", in ZTEST() 37 expected, actual); in ZTEST() 39 zassert_equal(0, strcmp(expected, actual), "mismatch: exp: %s act: %s", in ZTEST() 40 expected, actual); in ZTEST() [all …]
|
/Zephyr-latest/subsys/mgmt/mcumgr/transport/src/ |
D | smp_reassembly.c | 21 smpt->__reassembly.expected = 0; in smp_reassembly_init() 30 return smpt->__reassembly.expected; in smp_reassembly_expected() 41 uint16_t expected = sys_be16_to_cpu(((struct smp_hdr *)buf)->nh_len); in smp_reassembly_collect() local 48 expected += sizeof(struct smp_hdr); in smp_reassembly_collect() 52 expected > MCUMGR_TRANSPORT_NETBUF_SIZE) { in smp_reassembly_collect() 56 if (len > expected) { in smp_reassembly_collect() 62 smpt->__reassembly.expected = expected; in smp_reassembly_collect() 73 if (smpt->__reassembly.expected >= len) { in smp_reassembly_collect() 75 smpt->__reassembly.expected -= len; in smp_reassembly_collect() 83 return smpt->__reassembly.expected; in smp_reassembly_collect() [all …]
|
/Zephyr-latest/tests/crypto/tinycrypt/src/ |
D | sha256.c | 59 const uint8_t expected[32] = { in ZTEST() local 73 result = check_result(1, expected, sizeof(expected), in ZTEST() 88 const uint8_t expected[32] = { in ZTEST() local 104 result = check_result(2, expected, sizeof(expected), in ZTEST() 116 const uint8_t expected[32] = { in ZTEST() local 131 result = check_result(3, expected, sizeof(expected), in ZTEST() 144 const uint8_t expected[32] = { in ZTEST() local 159 result = check_result(4, expected, sizeof(expected), in ZTEST() 172 const uint8_t expected[32] = { in ZTEST() local 189 result = check_result(5, expected, sizeof(expected), in ZTEST() [all …]
|
D | hmac.c | 46 size_t datalen, const uint8_t *expected, in do_hmac_test() argument 55 result = check_result(testnum, expected, expectedlen, in do_hmac_test() 78 const uint8_t expected[32] = { in ZTEST() local 90 expected, sizeof(expected)); in ZTEST() 111 const uint8_t expected[32] = { in ZTEST() local 124 expected, sizeof(expected)); in ZTEST() 151 const uint8_t expected[32] = { in ZTEST() local 164 expected, sizeof(expected)); in ZTEST() 193 const uint8_t expected[32] = { in ZTEST() local 206 expected, sizeof(expected)); in ZTEST() [all …]
|
D | ccm_mode.c | 75 const uint8_t *expected, size_t elen, in do_test() argument 98 if (memcmp(expected, ciphertext, elen) != 0) { in do_test() 99 show_str("\t\tExpected", expected, elen); in do_test() 143 const uint8_t expected[EXPECTED_BUF_LEN31] = { in ZTEST() local 155 data, sizeof(data), expected, sizeof(expected), mlen); in ZTEST() 181 const uint8_t expected[EXPECTED_BUF_LEN32] = { in ZTEST() local 193 data, sizeof(data), expected, sizeof(expected), mlen); in ZTEST() 220 const uint8_t expected[EXPECTED_BUF_LEN33] = { in ZTEST() local 233 sizeof(data), expected, sizeof(expected), mlen); in ZTEST() 259 const uint8_t expected[EXPECTED_BUF_LEN33] = { in ZTEST() local [all …]
|
/Zephyr-latest/tests/kernel/threads/thread_init/src/ |
D | main.c | 60 } expected; variable 68 zassert_true(t_delay >= expected.init_delay, in thread_entry() 76 zassert_equal(k_thread_priority_get(tid), expected.init_prio); in thread_entry() 77 zassert_equal(p1, expected.init_p1); in thread_entry() 78 zassert_equal(p2, expected.init_p2); in thread_entry() 79 zassert_equal(p3, expected.init_p3); in thread_entry() 101 expected.init_p1 = INIT_PREEMPT_P1; in ZTEST_USER() 102 expected.init_p2 = INIT_PREEMPT_P2; in ZTEST_USER() 103 expected.init_p3 = INIT_PREEMPT_P3_static; in ZTEST_USER() 104 expected.init_prio = INIT_PREEMPT_PRIO; in ZTEST_USER() [all …]
|
/Zephyr-latest/tests/subsys/mgmt/mcumgr/smp_reassembly/src/ |
D | main.c | 39 int expected; in ZTEST() local 58 expected = TEST_FRAME_SIZE - frag_used; in ZTEST() 60 zassert_equal(expected, ret, in ZTEST() 61 "Expected is %d should be %d\n", ret, expected); in ZTEST() 65 zassert_equal(expected, ret, in ZTEST() 66 "Forced completion ret %d, but expected was %d\n", ret, expected); in ZTEST() 86 int expected; in ZTEST() local 91 expected = TEST_FRAME_SIZE - frag_used; in ZTEST() 93 zassert_equal(expected, ret, in ZTEST() 94 "Expected is %d should be %d\n", ret, expected); in ZTEST() [all …]
|
/Zephyr-latest/tests/bsim/bluetooth/mesh/tests_scripts/blob_mdls/ |
D | blob_srv_persistence.sh | 15 blob_cli_stop -flash_erase blob_srv_stop -flash_erase -- -argstest expected-phase=1 19 blob_cli_stop blob_srv_stop -- -argstest expected-phase=2 23 blob_cli_stop blob_srv_stop -- -argstest expected-phase=3 27 blob_cli_stop -flash_rm blob_srv_stop -flash_rm -- -argstest expected-phase=4 32 blob_cli_stop -flash_erase blob_srv_stop -flash_erase -- -argstest expected-phase=5 36 blob_cli_stop -flash_rm blob_srv_stop -flash_rm -- -argstest expected-phase=4 41 blob_cli_stop -flash_erase blob_srv_stop -flash_erase -- -argstest expected-phase=1 45 blob_cli_stop blob_srv_stop -- -argstest expected-phase=2 49 blob_cli_stop blob_srv_stop -- -argstest expected-phase=3 53 blob_cli_stop -flash_rm blob_srv_stop -flash_rm -- -argstest expected-phase=4 [all …]
|
/Zephyr-latest/tests/arch/x86/pagetables/src/ |
D | main.c | 87 pentry_t entry, flags, expected; in ZTEST() local 105 expected = MMU_P | MMU_RW; in ZTEST() 107 expected = MMU_P | MMU_US; in ZTEST() 109 expected = MMU_P | MMU_US | MMU_XD; in ZTEST() 112 expected = MMU_P | MMU_RW | MMU_US | MMU_XD; in ZTEST() 117 expected = MMU_P | MMU_RW | MMU_US | MMU_XD; in ZTEST() 134 expected = MMU_P | MMU_US | MMU_RW | MMU_XD; in ZTEST() 138 expected = MMU_P | MMU_US; in ZTEST() 140 expected = MMU_P | MMU_US | MMU_XD; in ZTEST() 144 expected = MMU_P | MMU_US; in ZTEST() [all …]
|
/Zephyr-latest/tests/bsim/bluetooth/mesh/tests_scripts/dfu/ |
D | dfu_srv_recovery.sh | 19 -- -argstest recover=0 expected-phase=2 24 -- -argstest recover=1 expected-phase=3 29 -- -argstest recover=1 expected-phase=4 34 -- -argstest recover=1 expected-phase=6 40 -- -argstest recover=1 expected-phase=8 46 -- -argstest recover=0 expected-phase=2 51 -- -argstest recover=1 expected-phase=3 56 -- -argstest recover=1 expected-phase=4 61 -- -argstest recover=1 expected-phase=6 67 -- -argstest recover=1 expected-phase=8
|
/Zephyr-latest/tests/drivers/gpio/gpio_hogs/src/ |
D | main.c | 57 static void assert_gpio_hog_config(const struct gpio_dt_spec *spec, gpio_flags_t expected) in assert_gpio_hog_config() argument 73 zassert_equal(actual & expected, expected, in assert_gpio_hog_config() 75 spec->port->name, spec->pin, actual, expected); in assert_gpio_hog_config() 80 gpio_flags_t expected = GPIO_OUTPUT; in ZTEST() local 83 expected |= GPIO_OUTPUT_INIT_LOW; in ZTEST() 85 expected |= GPIO_OUTPUT_INIT_HIGH; in ZTEST() 88 assert_gpio_hog_config(&output_high_gpio, expected); in ZTEST() 93 gpio_flags_t expected = GPIO_OUTPUT; in ZTEST() local 96 expected |= GPIO_OUTPUT_INIT_LOW; in ZTEST() 98 expected |= GPIO_OUTPUT_INIT_HIGH; in ZTEST() [all …]
|
/Zephyr-latest/tests/subsys/dsp/utils/src/ |
D | f32.c | 32 const DSP_DATA q31_t expected) in test_shift_f32_to_q7() argument 36 zassert_equal(shifted_data, expected, in test_shift_f32_to_q7() 38 shifted_data, expected); in test_shift_f32_to_q7() 42 const DSP_DATA q31_t expected) in test_shift_f32_to_q15() argument 46 zassert_equal(shifted_data, expected, in test_shift_f32_to_q15() 48 shifted_data, expected); in test_shift_f32_to_q15() 52 const DSP_DATA q31_t expected) in test_shift_f32_to_q31() argument 56 zassert_equal(shifted_data, expected, in test_shift_f32_to_q31() 58 shifted_data, expected); in test_shift_f32_to_q31()
|
D | f64.c | 31 const DSP_DATA q7_t expected) in test_shift_f64_to_q7() argument 35 zassert_equal(shifted_data, expected, in test_shift_f64_to_q7() 37 shifted_data, expected); in test_shift_f64_to_q7() 41 const DSP_DATA q15_t expected) in test_shift_f64_to_q15() argument 45 zassert_equal(shifted_data, expected, in test_shift_f64_to_q15() 47 shifted_data, expected); in test_shift_f64_to_q15() 51 const DSP_DATA q31_t expected) in test_shift_f64_to_q31() argument 55 zassert_equal(shifted_data, expected, in test_shift_f64_to_q31() 57 shifted_data, expected); in test_shift_f64_to_q31()
|
D | q15.c | 30 static void test_shift_q15_to_f32(const q15_t data, const uint32_t shift, const float32_t expected) in test_shift_q15_to_f32() argument 34 zassert_equal(shifted_data, expected, in test_shift_q15_to_f32() 36 (double)shifted_data, (double)expected); in test_shift_q15_to_f32() 39 static void test_shift_q15_to_f64(const q15_t data, const uint32_t shift, const float64_t expected) in test_shift_q15_to_f64() argument 43 zassert_equal(shifted_data, expected, in test_shift_q15_to_f64() 45 shifted_data, expected); in test_shift_q15_to_f64()
|
D | q31.c | 31 static void test_shift_q31_to_f32(const q31_t data, const uint32_t shift, const float32_t expected) in test_shift_q31_to_f32() argument 35 zassert_equal(shifted_data, expected, in test_shift_q31_to_f32() 37 (double)shifted_data, (double)expected); in test_shift_q31_to_f32() 40 static void test_shift_q31_to_f64(const q31_t data, const uint32_t shift, const float64_t expected) in test_shift_q31_to_f64() argument 44 zassert_equal(shifted_data, expected, in test_shift_q31_to_f64() 46 shifted_data, expected); in test_shift_q31_to_f64()
|
D | q7.c | 29 static void test_shift_q7_to_f32(const q7_t data, const uint32_t shift, const float32_t expected) in test_shift_q7_to_f32() argument 33 zassert_equal(shifted_data, expected, in test_shift_q7_to_f32() 35 (double)shifted_data, (double)expected); in test_shift_q7_to_f32() 38 static void test_shift_q7_to_f64(const q7_t data, const uint32_t shift, const float64_t expected) in test_shift_q7_to_f64() argument 42 zassert_equal(shifted_data, expected, in test_shift_q7_to_f64() 44 shifted_data, expected); in test_shift_q7_to_f64()
|
/Zephyr-latest/tests/lib/math/interpolation/src/ |
D | main.c | 70 int32_t expected; in ZTEST() local 76 expected = round((i - 2000.0) / 10.0); in ZTEST() 77 zassert_equal(expected, linear_interpolate(x_axis, y_axis, len, i)); in ZTEST() 86 int32_t expected; in ZTEST() local 92 expected = round((i - 2000.0) / 10.0 - 100.0); in ZTEST() 93 zassert_equal(expected, linear_interpolate(x_axis, y_axis, len, i)); in ZTEST() 103 int32_t expected; in ZTEST() local 109 expected = round((i + 3000.0) / 10.0); in ZTEST() 110 zassert_equal(expected, linear_interpolate(x_axis, y_axis, len, i)); in ZTEST() 120 int32_t expected; in ZTEST() local [all …]
|
/Zephyr-latest/scripts/tests/twister/ |
D | test_cmakecache.py | 133 def test_cmakecacheentry_from_line(cmake_line, expected): argument 136 with pytest.raises(type(expected)) if \ 137 isinstance(expected, Exception) else nullcontext() as exception: 141 assert repr(exception.value) == repr(expected) 144 if expected is None: 148 assert entry.name == expected.name 149 assert entry.value == expected.value 169 def test_cmakecacheentry_str(cmake_cache_entry, expected): argument 170 assert str(cmake_cache_entry) == expected 186 expected = [ [all …]
|
D | test_testsuite.py | 96 def test_scanpathresults_dunders(original, provided, expected): argument 99 assert result == expected 206 def test_scan_file(test_data, test_file, class_env, expected: ScanPathResult): 214 assert result == expected 253 def test_scan_file_mmap(os_name, expected): argument 258 assert expected.items() <= kwargs.items() 372 def test_get_unique(testsuite_root, suite_path, name, expected): argument 379 assert suite.name == expected 427 expected argument 429 with pytest.raises(expected) if \ [all …]
|
/Zephyr-latest/tests/drivers/can/shell/src/ |
D | main.c | 141 struct can_timing expected = { 0 }; in can_shell_test_bitrate() local 144 err = can_calc_timing(fake_can_dev, &expected, expected_bitrate, expected_sample_pnt); in can_shell_test_bitrate() 153 assert_can_timing_equal(&expected, &timing_capture); in can_shell_test_bitrate() 183 struct can_timing expected = { 0 }; in can_shell_test_dbitrate() local 188 err = can_calc_timing_data(fake_can_dev, &expected, expected_bitrate, expected_sample_pnt); in can_shell_test_dbitrate() 198 assert_can_timing_equal(&expected, &timing_capture); in can_shell_test_dbitrate() 214 struct can_timing expected = { in ZTEST() local 229 assert_can_timing_equal(&expected, &timing_capture); in ZTEST() 246 struct can_timing expected = { in ZTEST() local 264 assert_can_timing_equal(&expected, &timing_capture); in ZTEST() [all …]
|
/Zephyr-latest/samples/drivers/mspi/mspi_flash/src/ |
D | main.c | 22 const uint8_t expected[] = { 0x55, 0xaa, 0x66, 0x99 }; in single_sector_test() local 23 const size_t len = sizeof(expected); in single_sector_test() 24 uint8_t buf[sizeof(expected)]; in single_sector_test() 49 rc = flash_write(flash_dev, SPI_FLASH_TEST_REGION_OFFSET, expected, len); in single_sector_test() 62 if (memcmp(expected, buf, len) == 0) { in single_sector_test() 65 const uint8_t *wp = expected; in single_sector_test() 84 const uint8_t expected[] = { 0x55, 0xaa, 0x66, 0x99 }; in multi_sector_test() local 85 const size_t len = sizeof(expected); in multi_sector_test() 86 uint8_t buf[sizeof(expected)]; in multi_sector_test() 132 rc = flash_write(flash_dev, offs, expected, len); in multi_sector_test() [all …]
|
/Zephyr-latest/tests/net/lib/mqtt_sn_packet/src/ |
D | mqtt_sn_packet.c | 23 struct mqtt_sn_param expected; member 102 .expected = (struct mqtt_sn_param){ 112 .expected = (struct mqtt_sn_param){ 125 .expected = (struct mqtt_sn_param){ 134 .expected = (struct mqtt_sn_param){ 143 .expected = (struct mqtt_sn_param){ 149 .expected = (struct mqtt_sn_param){ 155 .expected = (struct mqtt_sn_param){ 169 .expected = (struct mqtt_sn_param){ 180 .expected = (struct mqtt_sn_param){ [all …]
|