/u-boot/test/lib/ |
A D | test_print.c | 18 static int test_print_freq(struct unit_test_state *uts, in test_print_freq() argument 24 console_record_readline(uts->actual_str, sizeof(uts->actual_str)); in test_print_freq() 25 ut_asserteq_str(expected, uts->actual_str); in test_print_freq() 26 ut_assertok(ut_check_console_end(uts)); in test_print_freq() 32 ut_assertok(test_print_freq(uts, 321, "321 Hz;")); in lib_test_print_freq() 33 ut_assertok(test_print_freq(uts, 4321, "4.32 kHz;")); in lib_test_print_freq() 52 console_record_readline(uts->actual_str, sizeof(uts->actual_str)); in test_print_size() 53 ut_asserteq_str(expected, uts->actual_str); in test_print_size() 54 ut_assertok(ut_check_console_end(uts)); in test_print_size() 61 ut_assertok(test_print_size(uts, 4321, "4.2 KiB;")); in lib_test_print_size() [all …]
|
A D | lmb.c | 196 ret = test_multi_alloc_512mb(uts, 0x40000000); in lib_test_lmb_simple() 201 return test_multi_alloc_512mb(uts, 0xE0000000); in lib_test_lmb_simple() 279 ret = test_bigblock(uts, 0x40000000); in lib_test_lmb_big() 284 return test_bigblock(uts, 0xE0000000); in lib_test_lmb_big() 354 ret = test_noreserved(uts, 0x40000000, 4, 1); in lib_test_lmb_noreserved() 359 return test_noreserved(uts, 0xE0000000, 4, 1); in lib_test_lmb_noreserved() 369 ret = test_noreserved(uts, 0x40000000, 5, 8); in lib_test_lmb_unaligned_size() 374 return test_noreserved(uts, 0xE0000000, 5, 8); in lib_test_lmb_unaligned_size() 581 ret = test_alloc_addr(uts, 0x40000000); in lib_test_lmb_alloc_addr() 586 return test_alloc_addr(uts, 0xE0000000); in lib_test_lmb_alloc_addr() [all …]
|
A D | string.c | 52 static int test_memset(struct unit_test_state *uts, u8 buf[], u8 mask, in test_memset() argument 75 static int lib_memset(struct unit_test_state *uts) in lib_memset() argument 86 if (test_memset(uts, buf, MASK, offset, len)) { in lib_memset() 109 static int test_memmove(struct unit_test_state *uts, u8 buf[], u8 mask, in test_memmove() argument 132 static int lib_memcpy(struct unit_test_state *uts) in lib_memcpy() argument 148 if (test_memmove(uts, buf2, MASK, offset1, in lib_memcpy() 170 static int lib_memmove(struct unit_test_state *uts) in lib_memmove() argument 183 if (test_memmove(uts, buf, 0, offset1, offset2, in lib_memmove()
|
A D | test_aes.c | 44 static int lib_test_aes_one_block(struct unit_test_state *uts, int key_len, in lib_test_aes_one_block() argument 62 static int lib_test_aes_cbc_chain(struct unit_test_state *uts, int key_len, in lib_test_aes_cbc_chain() argument 83 static int _lib_test_aes_run(struct unit_test_state *uts, int key_len, in _lib_test_aes_run() argument 117 ret = lib_test_aes_one_block(uts, key_len, key_exp, iv, in _lib_test_aes_run() 122 ret = lib_test_aes_cbc_chain(uts, key_len, key_exp, iv, in _lib_test_aes_run() 143 static int lib_test_aes_run(struct unit_test_state *uts, in lib_test_aes_run() argument 151 return _lib_test_aes_run(uts, key_len, key_exp_len, in lib_test_aes_run() 155 static int lib_test_aes(struct unit_test_state *uts) in lib_test_aes() argument 160 ret = lib_test_aes_run(uts, &test_aes[i]); in lib_test_aes()
|
/u-boot/test/ |
A D | ut.c | 25 uts->fail_count++; in ut_fail() 39 uts->fail_count++; in ut_failf() 59 vsnprintf(uts->expect_str, sizeof(uts->expect_str), fmt, args); in ut_check_console_line() 61 console_record_readline(uts->actual_str, sizeof(uts->actual_str)); in ut_check_console_line() 63 return strcmp(uts->expect_str, uts->actual_str); in ut_check_console_line() 71 vsnprintf(uts->expect_str, sizeof(uts->expect_str), fmt, args); in ut_check_console_linen() 73 console_record_readline(uts->actual_str, sizeof(uts->actual_str)); in ut_check_console_linen() 75 return strncmp(uts->expect_str, uts->actual_str, in ut_check_console_linen() 83 console_record_readline(uts->actual_str, sizeof(uts->actual_str)); in ut_check_skipline() 93 console_record_readline(uts->actual_str, sizeof(uts->actual_str)); in ut_check_console_end() [all …]
|
A D | compression.c | 130 static int compress_using_gzip(struct unit_test_state *uts, in compress_using_gzip() argument 160 static int compress_using_bzip2(struct unit_test_state *uts, in compress_using_bzip2() argument 195 static int compress_using_lzma(struct unit_test_state *uts, in compress_using_lzma() argument 229 static int compress_using_lzo(struct unit_test_state *uts, in compress_using_lzo() argument 264 static int compress_using_lz4(struct unit_test_state *uts, in compress_using_lz4() argument 324 errcheck(compress(uts, buf->orig_buf, buf->orig_size, in run_test_internal() 355 ret = compress(uts, buf->orig_buf, buf->orig_size, in run_test_internal() 412 return run_test(uts, "gzip", compress_using_gzip, in compression_test_gzip() 419 return run_test(uts, "bzip2", compress_using_bzip2, in compression_test_bzip2() 426 return run_test(uts, "lzma", compress_using_lzma, in compression_test_lzma() [all …]
|
A D | str_ut.c | 22 static int str_upper(struct unit_test_state *uts) in str_upper() argument 60 static int run_strtoul(struct unit_test_state *uts, const char *str, int base, in run_strtoul() argument 78 static int str_simple_strtoul(struct unit_test_state *uts) in str_simple_strtoul() argument 85 ut_assertok(run_strtoul(uts, str2, 10, 1099, 4, upper)); in str_simple_strtoul() 86 ut_assertok(run_strtoul(uts, str2, 16, 0x1099ab, 6, upper)); in str_simple_strtoul() 89 ut_assertok(run_strtoul(uts, str1, 10, 0, 0, upper)); in str_simple_strtoul() 92 ut_assertok(run_strtoul(uts, str1, 0, 0, 0, upper)); in str_simple_strtoul() 93 ut_assertok(run_strtoul(uts, str2, 0, 1099, 4, upper)); in str_simple_strtoul() 94 ut_assertok(run_strtoul(uts, str3, 0, 0xb, 3, upper)); in str_simple_strtoul() 97 ut_assertok(run_strtoul(uts, str1, 2, 0, 0, upper)); in str_simple_strtoul() [all …]
|
/u-boot/test/log/ |
A D | nolog_test.c | 23 static int log_test_nolog_err(struct unit_test_state *uts) in log_test_nolog_err() argument 31 ut_assertok(ut_check_console_line(uts, "testing log_err")); in log_test_nolog_err() 32 ut_assertok(ut_check_console_end(uts)); in log_test_nolog_err() 46 ut_assertok(ut_check_console_end(uts)); in log_test_nolog_warning() 60 ut_assertok(ut_check_console_end(uts)); in log_test_nolog_notice() 74 ut_assertok(ut_check_console_end(uts)); in log_test_nolog_info() 89 ut_assertok(ut_check_console_end(uts)); in nolog_test_nodebug() 103 ut_assertok(ut_check_console_end(uts)); in log_test_nolog_nodebug() 110 static int nolog_test_debug(struct unit_test_state *uts) in nolog_test_debug() argument 119 ut_assertok(ut_check_console_end(uts)); in nolog_test_debug() [all …]
|
A D | syslog_test.c | 31 struct unit_test_state *uts = env->uts; in sb_log_tx_handler() local 85 ut_assertok(syslog_test_setup(uts)); in log_test_syslog_err() 92 env.uts = uts; in log_test_syslog_err() 101 ut_assertok(syslog_test_finish(uts)); in log_test_syslog_err() 118 ut_assertok(syslog_test_setup(uts)); in log_test_syslog_warning() 125 env.uts = uts; in log_test_syslog_warning() 152 ut_assertok(syslog_test_setup(uts)); in log_test_syslog_notice() 159 env.uts = uts; in log_test_syslog_notice() 186 ut_assertok(syslog_test_setup(uts)); in log_test_syslog_info() 193 env.uts = uts; in log_test_syslog_info() [all …]
|
A D | log_test.c | 48 #define log_run_cat(cat) do_log_run(uts, cat, "file") 50 #define log_run() do_log_run(uts, UCLASS_SPI, "file") 102 int log_test_cat_allow(struct unit_test_state *uts) in log_test_cat_allow() argument 147 int log_test_file(struct unit_test_state *uts) in log_test_file() argument 203 int log_test_level(struct unit_test_state *uts) in log_test_level() argument 221 int log_test_double(struct unit_test_state *uts) in log_test_double() argument 241 int log_test_triple(struct unit_test_state *uts) in log_test_triple() argument 285 int log_test_helpers(struct unit_test_state *uts) in log_test_helpers() argument 290 ret = do_log_test_helpers(uts); in log_test_helpers() 317 ret = do_log_test_disable(uts); in log_test_disable() [all …]
|
A D | syslog_test_ndebug.c | 32 static int log_test_syslog_nodebug(struct unit_test_state *uts) in log_test_syslog_nodebug() argument 37 ut_assertok(syslog_test_setup(uts)); in log_test_syslog_nodebug() 44 env.uts = uts; in log_test_syslog_nodebug() 54 ut_assertok(syslog_test_finish(uts)); in log_test_syslog_nodebug()
|
A D | cont_test.c | 20 static int log_test_cont(struct unit_test_state *uts) in log_test_cont() argument 37 ut_assertok(ut_check_console_line(uts, "ERR.arch, ea1 ERR.arch, cc2")); in log_test_cont() 38 ut_assertok(ut_check_console_end(uts)); in log_test_cont() 48 ut_assertok(ut_check_console_line(uts, "INFO.efi, ie3")); in log_test_cont() 49 ut_assertok(ut_check_console_end(uts)); in log_test_cont()
|
A D | syslog_test.h | 22 struct unit_test_state *uts; member 54 int syslog_test_setup(struct unit_test_state *uts); 62 int syslog_test_finish(struct unit_test_state *uts);
|
/u-boot/include/test/ |
A D | ut.h | 127 ut_failf(uts, __FILE__, __LINE__, __func__, \ 140 ut_failf(uts, __FILE__, __LINE__, __func__, \ 156 ut_failf(uts, __FILE__, __LINE__, __func__, \ 172 ut_failf(uts, __FILE__, __LINE__, __func__, \ 189 ut_failf(uts, __FILE__, __LINE__, __func__, \ 285 uts->expect_str, uts->actual_str); \ 294 uts->expect_str, uts->actual_str); \ 300 if (ut_check_skipline(uts)) { \ 308 if (ut_check_console_end(uts)) { \ 311 uts->actual_str); \ [all …]
|
/u-boot/test/dm/ |
A D | video.c | 127 ut_asserteq(46, compress_frame_buffer(uts, dev)); in dm_test_video_text() 131 ut_asserteq(79, compress_frame_buffer(uts, dev)); in dm_test_video_text() 134 ut_asserteq(46, compress_frame_buffer(uts, dev)); in dm_test_video_text() 138 ut_asserteq(273, compress_frame_buffer(uts, dev)); in dm_test_video_text() 141 ut_asserteq(46, compress_frame_buffer(uts, dev)); in dm_test_video_text() 145 ut_asserteq(273, compress_frame_buffer(uts, dev)); in dm_test_video_text() 161 ut_asserteq(466, compress_frame_buffer(uts, dev)); in dm_test_video_chars() 181 ut_asserteq(46, compress_frame_buffer(uts, dev)); in dm_test_video_ansi() 185 ut_asserteq(46, compress_frame_buffer(uts, dev)); in dm_test_video_ansi() 225 ut_asserteq(46, compress_frame_buffer(uts, dev)); in check_vidconsole_output() [all …]
|
A D | test-main.c | 30 struct dm_test_state *dms = uts->priv; in dm_test_init() 39 gd_set_of_root(of_live ? uts->of_root : NULL); in dm_test_init() 89 ut_assertok(dm_test_init(uts, of_live)); in dm_do_test() 91 uts->start = mallinfo(); in dm_do_test() 95 ut_assertok(do_autoprobe(uts)); in dm_do_test() 107 test->func(uts); in dm_do_test() 111 ut_assertok(dm_test_destroy(uts)); in dm_do_test() 157 uts->priv = &_global_priv_dm_test_state; in dm_test_main() 158 uts->fail_count = 0; in dm_test_main() 177 uts->of_root = gd_of_root(); in dm_test_main() [all …]
|
A D | scmi.c | 25 static int ut_assert_scmi_state_preprobe(struct unit_test_state *uts) in ut_assert_scmi_state_preprobe() argument 74 ret = ut_assert_scmi_state_preprobe(uts); in load_sandbox_scmi_test_devices() 82 return ut_assert_scmi_state_postprobe(uts, *dev); in load_sandbox_scmi_test_devices() 103 ret = load_sandbox_scmi_test_devices(uts, &dev); in dm_test_scmi_sandbox_agent() 105 ret = release_sandbox_scmi_test_devices(uts, dev); in dm_test_scmi_sandbox_agent() 112 static int dm_test_scmi_clocks(struct unit_test_state *uts) in dm_test_scmi_clocks() argument 123 ret = load_sandbox_scmi_test_devices(uts, &dev); in dm_test_scmi_clocks() 169 return release_sandbox_scmi_test_devices(uts, dev); in dm_test_scmi_clocks() 174 static int dm_test_scmi_resets(struct unit_test_state *uts) in dm_test_scmi_resets() argument 184 ret = load_sandbox_scmi_test_devices(uts, &dev); in dm_test_scmi_resets() [all …]
|
A D | pmic.c | 27 static inline int power_pmic_get(struct unit_test_state *uts, char *name) in power_pmic_get() argument 41 static int dm_test_power_pmic_get(struct unit_test_state *uts) in dm_test_power_pmic_get() argument 43 power_pmic_get(uts, "sandbox_pmic"); in dm_test_power_pmic_get() 50 static int dm_test_power_pmic_mc34708_get(struct unit_test_state *uts) in dm_test_power_pmic_mc34708_get() argument 52 power_pmic_get(uts, "pmic@41"); in dm_test_power_pmic_mc34708_get() 60 static int dm_test_power_pmic_io(struct unit_test_state *uts) in dm_test_power_pmic_io() argument 90 static int dm_test_power_pmic_mc34708_regs_check(struct unit_test_state *uts) in dm_test_power_pmic_mc34708_regs_check() argument 106 static int dm_test_power_pmic_mc34708_rw_val(struct unit_test_state *uts) in dm_test_power_pmic_mc34708_rw_val() argument
|
A D | core.c | 86 uts->start = mallinfo(); in dm_leak_check_start() 87 if (!uts->start.uordblks) in dm_leak_check_start() 107 diff = end.uordblks - uts->start.uordblks; in dm_leak_check_end() 120 struct dm_test_state *dms = uts->priv; in dm_test_autobind() 210 struct dm_test_state *dms = uts->priv; in dm_test_autoprobe() 296 struct dm_test_state *dms = uts->priv; in dm_test_lifecycle() 352 struct dm_test_state *dms = uts->priv; in dm_test_ordering() 495 dm_leak_check_start(uts); in dm_test_leak() 509 ut_assertok(dm_leak_check_end(uts)); in dm_test_leak() 571 struct dm_test_state *dms = uts->priv; in dm_test_children() [all …]
|
A D | eth.c | 25 static int dm_test_eth(struct unit_test_state *uts) in dm_test_eth() argument 45 static int dm_test_eth_alias(struct unit_test_state *uts) in dm_test_eth_alias() argument 69 static int dm_test_eth_prime(struct unit_test_state *uts) in dm_test_eth_prime() argument 103 static int dm_test_eth_act(struct unit_test_state *uts) in dm_test_eth_act() argument 197 retval = _dm_test_eth_rotate1(uts); in dm_test_eth_rotate() 210 retval = _dm_test_eth_rotate2(uts); in dm_test_eth_rotate() 255 retval = _dm_test_net_retry(uts); in dm_test_net_retry() 272 struct unit_test_state *uts = priv->priv; in sb_check_arp_reply() local 337 sandbox_eth_set_priv(0, uts); in dm_test_eth_async_arp_reply() 358 struct unit_test_state *uts = priv->priv; in sb_check_ping_reply() local [all …]
|
A D | bus.c | 24 static int dm_test_bus_children(struct unit_test_state *uts) in dm_test_bus_children() argument 40 ut_assert(!dm_check_devices(uts, num_devices)); in dm_test_bus_children() 47 static int dm_test_bus_children_funcs(struct unit_test_state *uts) in dm_test_bus_children_funcs() argument 142 static int test_bus_parent_data(struct unit_test_state *uts) in test_bus_parent_data() argument 202 static int dm_test_bus_parent_data(struct unit_test_state *uts) in dm_test_bus_parent_data() argument 204 return test_bus_parent_data(uts); in dm_test_bus_parent_data() 227 ret = test_bus_parent_data(uts); in dm_test_bus_parent_data_uclass() 239 static int dm_test_bus_parent_ops(struct unit_test_state *uts) in dm_test_bus_parent_ops() argument 275 static int test_bus_parent_plat(struct unit_test_state *uts) in test_bus_parent_plat() argument 346 return test_bus_parent_plat(uts); in dm_test_bus_parent_plat() [all …]
|
/u-boot/test/cmd/ |
A D | test_echo.c | 42 static int lib_test_hush_echo(struct unit_test_state *uts) in lib_test_hush_echo() argument 50 console_record_readline(uts->actual_str, in lib_test_hush_echo() 51 sizeof(uts->actual_str)); in lib_test_hush_echo() 52 ut_asserteq_str(echo_data[i].expected, uts->actual_str); in lib_test_hush_echo() 53 ut_assertok(ut_check_console_end(uts)); in lib_test_hush_echo()
|
/u-boot/test/env/ |
A D | hashtable.c | 18 static int htab_fill(struct unit_test_state *uts, in htab_fill() argument 38 static int htab_check_fill(struct unit_test_state *uts, in htab_check_fill() argument 61 static int htab_create_delete(struct unit_test_state *uts, in htab_create_delete() argument 90 static int env_test_htab_fill(struct unit_test_state *uts) in env_test_htab_fill() argument 97 ut_assertok(htab_fill(uts, &htab, SIZE)); in env_test_htab_fill() 98 ut_assertok(htab_check_fill(uts, &htab, SIZE)); in env_test_htab_fill() 110 static int env_test_htab_deletes(struct unit_test_state *uts) in env_test_htab_deletes() argument 117 ut_assertok(htab_fill(uts, &htab, SIZE / 2)); in env_test_htab_deletes() 118 ut_assertok(htab_create_delete(uts, &htab, ITERATIONS)); in env_test_htab_deletes() 119 ut_assertok(htab_check_fill(uts, &htab, SIZE / 2)); in env_test_htab_deletes()
|
/u-boot/test/overlay/ |
A D | cmd_ut_overlay.c | 72 static int fdt_overlay_change_int_property(struct unit_test_state *uts) in fdt_overlay_change_int_property() argument 84 static int fdt_overlay_change_str_property(struct unit_test_state *uts) in fdt_overlay_change_str_property() argument 96 static int fdt_overlay_add_str_property(struct unit_test_state *uts) in fdt_overlay_add_str_property() argument 108 static int fdt_overlay_add_node_by_phandle(struct unit_test_state *uts) in fdt_overlay_add_node_by_phandle() argument 121 static int fdt_overlay_add_node_by_path(struct unit_test_state *uts) in fdt_overlay_add_node_by_path() argument 148 static int fdt_overlay_local_phandle(struct unit_test_state *uts) in fdt_overlay_local_phandle() argument 172 static int fdt_overlay_local_phandles(struct unit_test_state *uts) in fdt_overlay_local_phandles() argument 202 static int fdt_overlay_stacked(struct unit_test_state *uts) in fdt_overlay_stacked() argument 219 struct unit_test_state *uts; in do_ut_overlay() local 226 uts = calloc(1, sizeof(*uts)); in do_ut_overlay() [all …]
|
/u-boot/test/optee/ |
A D | cmd_ut_optee.c | 30 static int optee_fdt_firmware(struct unit_test_state *uts) in optee_fdt_firmware() argument 52 static int optee_fdt_protected_memory(struct unit_test_state *uts) in optee_fdt_protected_memory() argument 100 struct unit_test_state *uts; in do_ut_optee() local 106 uts = calloc(1, sizeof(*uts)); in do_ut_optee() 107 if (!uts) in do_ut_optee()
|