| /u-boot/test/lib/ |
| A D | test_print.c | 21 ut_silence_console(uts); in test_print_freq() 24 ut_unsilence_console(uts); in test_print_freq() 25 console_record_readline(uts->actual_str, sizeof(uts->actual_str)); in test_print_freq() 26 ut_asserteq_str(expected, uts->actual_str); in test_print_freq() 27 ut_assertok(ut_check_console_end(uts)); in test_print_freq() 34 ut_assertok(test_print_freq(uts, 321, "321 Hz;")); in lib_test_print_freq() 51 ut_silence_console(uts); in test_print_size() 54 ut_unsilence_console(uts); in test_print_size() 55 console_record_readline(uts->actual_str, sizeof(uts->actual_str)); in test_print_size() 56 ut_asserteq_str(expected, uts->actual_str); in test_print_size() [all …]
|
| /u-boot/test/ |
| A D | ut.c | 25 uts->fail_count++; in ut_fail() 39 uts->fail_count++; in ut_failf() 58 ret = console_record_readline(uts->actual_str, sizeof(uts->actual_str)); in readline_check() 75 len = vsnprintf(uts->expect_str, sizeof(uts->expect_str), fmt, args); in ut_check_console_line() 82 ret = readline_check(uts); in ut_check_console_line() 86 return strcmp(uts->expect_str, uts->actual_str); in ut_check_console_line() 96 len = vsnprintf(uts->expect_str, sizeof(uts->expect_str), fmt, args); in ut_check_console_linen() 103 ret = readline_check(uts); in ut_check_console_linen() 107 return strncmp(uts->expect_str, uts->actual_str, in ut_check_console_linen() 131 len = vsnprintf(uts->expect_str, sizeof(uts->expect_str), fmt, args); in ut_check_skip_to_line() [all …]
|
| A D | test-main.c | 71 cur_test_state = uts; in test_set_state() 90 uts->root = NULL; in dm_test_pre_run() 91 uts->testdev = NULL; in dm_test_pre_run() 107 uts->root = dm_root(); in dm_test_pre_run() 119 memcpy((void *)gd->fdt_blob, uts->fdt_copy, uts->fdt_size); in dm_test_post_run() 365 free(uts->of_other); in test_post_run() 381 uts->skip_count++; in skip_test() 422 skip_test(uts); in ut_run_test() 624 uts.fdt_copy = os_malloc(uts.fdt_size); in ut_run_list() 629 memcpy(uts.fdt_copy, gd->fdt_blob, uts.fdt_size); in ut_run_list() [all …]
|
| A D | str_ut.c | 26 static int str_upper(struct unit_test_state *uts) in str_upper() argument 95 ut_assertok(run_strtoul(uts, str6, 0, 63, 3, upper)); in str_simple_strtoul() 99 ut_assertok(run_strtoul(uts, str1, 10, 0, 0, upper)); in str_simple_strtoul() 102 ut_assertok(run_strtoul(uts, str1, 0, 0, 0, upper)); in str_simple_strtoul() 107 ut_assertok(run_strtoul(uts, str1, 2, 0, 0, upper)); in str_simple_strtoul() 108 ut_assertok(run_strtoul(uts, str2, 2, 2, 2, upper)); in str_simple_strtoul() 181 static int str_hextoul(struct unit_test_state *uts) in str_hextoul() argument 193 static int str_dectoul(struct unit_test_state *uts) in str_dectoul() argument 205 static int str_itoa(struct unit_test_state *uts) in str_itoa() argument 225 static int str_xtoa(struct unit_test_state *uts) in str_xtoa() argument [all …]
|
| A D | compression.c | 149 static int compress_using_gzip(struct unit_test_state *uts, in compress_using_gzip() argument 214 static int compress_using_lzma(struct unit_test_state *uts, in compress_using_lzma() argument 248 static int compress_using_lzo(struct unit_test_state *uts, in compress_using_lzo() argument 283 static int compress_using_lz4(struct unit_test_state *uts, in compress_using_lz4() argument 318 static int compress_using_zstd(struct unit_test_state *uts, in compress_using_zstd() argument 382 ut_assertok(compress(uts, buf->orig_buf, buf->orig_size, in run_test_internal() 419 ret = compress(uts, buf->orig_buf, buf->orig_size, in run_test_internal() 473 return run_test(uts, "gzip", compress_using_gzip, in compression_test_gzip() 480 return run_test(uts, "bzip2", compress_using_bzip2, in compression_test_bzip2() 487 return run_test(uts, "lzma", compress_using_lzma, in compression_test_lzma() [all …]
|
| /u-boot/test/cmd/ |
| A D | fdt.c | 157 ut_assertok(ut_check_console_end(uts)); in fdt_test_addr() 164 ut_assertok(ut_check_console_end(uts)); in fdt_test_addr() 173 ut_assertok(ut_check_console_end(uts)); in fdt_test_addr() 181 ut_assertok(ut_check_console_end(uts)); in fdt_test_addr() 193 ut_assertok(ut_check_console_end(uts)); in fdt_test_addr() 199 ut_assertok(ut_check_console_end(uts)); in fdt_test_addr() 207 ut_assertok(ut_check_console_end(uts)); in fdt_test_addr() 228 ut_assertok(ut_check_console_end(uts)); in fdt_test_addr_resize() 235 ut_assertok(ut_check_console_end(uts)); in fdt_test_addr_resize() 1242 fdt_test_memory_cells(uts, 1); in fdt_test_memory() [all …]
|
| A D | test_pause.c | 15 static int lib_test_hush_pause(struct unit_test_state *uts) in lib_test_hush_pause() argument 22 console_record_readline(uts->actual_str, sizeof(uts->actual_str)); in lib_test_hush_pause() 23 ut_asserteq_str("Press any key to continue...", uts->actual_str); in lib_test_hush_pause() 24 ut_assertok(ut_check_console_end(uts)); in lib_test_hush_pause() 31 console_record_readline(uts->actual_str, sizeof(uts->actual_str)); in lib_test_hush_pause() 32 ut_asserteq_str("Prompt for pause...", uts->actual_str); in lib_test_hush_pause() 33 ut_assertok(ut_check_console_end(uts)); in lib_test_hush_pause() 39 console_record_readline(uts->actual_str, sizeof(uts->actual_str)); in lib_test_hush_pause() 40 ut_asserteq_str("pause - delay until user input", uts->actual_str); in lib_test_hush_pause() 41 ut_asserteq(1, ut_check_console_end(uts)); in lib_test_hush_pause()
|
| A D | exit.c | 41 ut_assertok(ut_check_console_end(uts)); in cmd_exit_test() 49 ut_assertok(ut_check_console_end(uts)); in cmd_exit_test() 58 ut_assertok(ut_check_console_end(uts)); in cmd_exit_test() 66 ut_assertok(ut_check_console_end(uts)); in cmd_exit_test() 73 ut_assertok(ut_check_console_end(uts)); in cmd_exit_test() 80 ut_assertok(ut_check_console_end(uts)); in cmd_exit_test() 87 ut_assertok(ut_check_console_end(uts)); in cmd_exit_test() 94 ut_assertok(ut_check_console_end(uts)); in cmd_exit_test() 101 ut_assertok(ut_check_console_end(uts)); in cmd_exit_test() 107 ut_assertok(ut_check_console_end(uts)); in cmd_exit_test() [all …]
|
| A D | test_echo.c | 44 static int lib_test_hush_echo(struct unit_test_state *uts) in lib_test_hush_echo() argument 49 ut_silence_console(uts); in lib_test_hush_echo() 52 ut_unsilence_console(uts); in lib_test_hush_echo() 53 console_record_readline(uts->actual_str, in lib_test_hush_echo() 54 sizeof(uts->actual_str)); in lib_test_hush_echo() 55 ut_asserteq_str(echo_data[i].expected, uts->actual_str); in lib_test_hush_echo() 56 ut_assertok(ut_check_console_end(uts)); in lib_test_hush_echo()
|
| /u-boot/test/dm/ |
| A D | video.c | 153 ut_assertok(video_get_nologo(uts, &dev)); in dm_test_video_text() 156 ut_asserteq(46, compress_frame_buffer(uts, dev)); in dm_test_video_text() 189 ut_assertok(video_get_nologo(uts, &dev)); in dm_test_video_text_12x22() 223 ut_assertok(video_get_nologo(uts, &dev)); in dm_test_video_chars() 241 ut_assertok(video_get_nologo(uts, &dev)); in dm_test_video_ansi() 290 ut_assertok(video_get_nologo(uts, &dev)); in check_vidconsole_output() 380 ut_assertok(video_get_nologo(uts, &dev)); in dm_test_video_bmp() 502 ut_assertok(video_get_nologo(uts, &dev)); in dm_test_video_bmp_comp() 556 ut_assertok(video_get_nologo(uts, &dev)); in dm_test_video_truetype() 577 ut_assertok(video_get_nologo(uts, &dev)); in dm_test_video_truetype_scroll() [all …]
|
| A D | tag.c | 18 static int dm_test_tag_ptr(struct unit_test_state *uts) in dm_test_tag_ptr() argument 23 ut_assertok(dev_tag_set_ptr(uts->root, DM_TAG_EFI, &val)); in dm_test_tag_ptr() 25 ut_assertok(dev_tag_get_ptr(uts->root, DM_TAG_EFI, &ptr)); in dm_test_tag_ptr() 29 ut_assertok(dev_tag_del(uts->root, DM_TAG_EFI)); in dm_test_tag_ptr() 39 static int dm_test_tag_val(struct unit_test_state *uts) in dm_test_tag_val() argument 43 ut_assertok(dev_tag_set_val(uts->root, DM_TAG_EFI, val1)); in dm_test_tag_val() 45 ut_assertok(dev_tag_get_val(uts->root, DM_TAG_EFI, &val2)); in dm_test_tag_val() 49 ut_assertok(dev_tag_del(uts->root, DM_TAG_EFI)); in dm_test_tag_val() 59 static int dm_test_tag_inval(struct unit_test_state *uts) in dm_test_tag_inval() argument 73 static int dm_test_tag_del_all(struct unit_test_state *uts) in dm_test_tag_del_all() argument [all …]
|
| A D | tpm.c | 53 static int dm_test_tpm(struct unit_test_state *uts) in dm_test_tpm() argument 55 ut_assertok(test_tpm_init(uts, TPM_V1)); in dm_test_tpm() 56 ut_assertok(test_tpm_init(uts, TPM_V2)); in dm_test_tpm() 63 static int dm_test_tpm_report_state(struct unit_test_state *uts) in dm_test_tpm_report_state() argument 91 static int test_tpm_autostart(struct unit_test_state *uts, in test_tpm_autostart() argument 110 static int dm_test_tpm_autostart(struct unit_test_state *uts) in dm_test_tpm_autostart() argument 112 ut_assertok(test_tpm_autostart(uts, TPM_V1, false)); in dm_test_tpm_autostart() 113 ut_assertok(test_tpm_autostart(uts, TPM_V2, false)); in dm_test_tpm_autostart() 119 static int dm_test_tpm_autostart_reinit(struct unit_test_state *uts) in dm_test_tpm_autostart_reinit() argument 121 ut_assertok(test_tpm_autostart(uts, TPM_V1, true)); in dm_test_tpm_autostart_reinit() [all …]
|
| A D | fwu_mdata.c | 45 static int setup_blk_device(struct unit_test_state *uts) in setup_blk_device() argument 80 static int write_mmc_blk_device(struct unit_test_state *uts) in write_mmc_blk_device() argument 97 ut_assertok(setup_blk_device(uts)); in dm_test_fwu_mdata_read() 98 ut_assertok(populate_mmc_disk_image(uts)); in dm_test_fwu_mdata_read() 99 ut_assertok(write_mmc_blk_device(uts)); in dm_test_fwu_mdata_read() 115 ut_assertok(setup_blk_device(uts)); in dm_test_fwu_mdata_write() 116 ut_assertok(populate_mmc_disk_image(uts)); in dm_test_fwu_mdata_write() 117 ut_assertok(write_mmc_blk_device(uts)); in dm_test_fwu_mdata_write() 137 ut_assertok(setup_blk_device(uts)); in dm_test_fwu_mdata_check() 138 ut_assertok(populate_mmc_disk_image(uts)); in dm_test_fwu_mdata_check() [all …]
|
| A D | ofnode.c | 43 tree = oftree_from_np(uts->of_other); in get_other_oftree() 45 tree = oftree_from_fdt(uts->other_fdt); in get_other_oftree() 109 oftree otree = get_other_oftree(uts); in dm_test_ofnode_compatible_ot() 139 oftree otree = get_other_oftree(uts); in dm_test_ofnode_get_by_phandle_ot() 192 oftree otree = get_other_oftree(uts); in dm_test_ofnode_by_prop_value_ot() 244 oftree otree = get_other_oftree(uts); in dm_test_ofnode_read_ot() 338 oftree otree = get_other_oftree(uts); in dm_test_ofnode_phandle_ot() 438 oftree otree = get_other_oftree(uts); in dm_test_ofnode_get_child_count_ot() 471 oftree otree = get_other_oftree(uts); in dm_test_ofnode_is_enabled_ot() 520 oftree otree = get_other_oftree(uts); in dm_test_ofnode_get_reg_ot() [all …]
|
| A D | core.c | 86 uts->start = mallinfo(); in dm_leak_check_start() 87 if (!uts->start.uordblks) in dm_leak_check_start() 126 ut_assert(uts->root); in dm_test_autobind() 332 uts->force_fail_alloc = 1; in dm_test_lifecycle() 340 uts->force_fail_alloc = 0; in dm_test_lifecycle() 517 dm_leak_check_start(uts); in dm_test_leak() 610 uts->skip_post_probe = 1; in dm_test_children() 615 ut_assertok(create_children(uts, uts->root, NODE_COUNT, 0, top)); in dm_test_children() 692 uts->skip_post_probe = 1; in dm_test_device_reparent() 697 ut_assertok(create_children(uts, uts->root, NODE_COUNT, 0, top)); in dm_test_device_reparent() [all …]
|
| A D | scmi.c | 70 ret = ut_assert_scmi_state_preprobe(uts); in load_sandbox_scmi_test_devices() 78 return ut_assert_scmi_state_postprobe(uts, *dev); in load_sandbox_scmi_test_devices() 99 ret = load_sandbox_scmi_test_devices(uts, &dev); in dm_test_scmi_sandbox_agent() 101 ret = release_sandbox_scmi_test_devices(uts, dev); in dm_test_scmi_sandbox_agent() 107 static int dm_test_scmi_clocks(struct unit_test_state *uts) in dm_test_scmi_clocks() argument 116 ret = load_sandbox_scmi_test_devices(uts, &dev); in dm_test_scmi_clocks() 166 return release_sandbox_scmi_test_devices(uts, dev); in dm_test_scmi_clocks() 178 ret = load_sandbox_scmi_test_devices(uts, &dev); in dm_test_scmi_resets() 198 return release_sandbox_scmi_test_devices(uts, dev); in dm_test_scmi_resets() 211 ut_assertok(load_sandbox_scmi_test_devices(uts, &dev)); in dm_test_scmi_voltage_domains() [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
|
| /u-boot/test/log/ |
| A D | nolog_test.c | 24 static int log_test_nolog_err(struct unit_test_state *uts) in log_test_nolog_err() argument 32 ut_assertok(ut_check_console_line(uts, "testing log_err")); in log_test_nolog_err() 33 ut_assertok(ut_check_console_end(uts)); in log_test_nolog_err() 47 ut_assertok(ut_check_console_end(uts)); in log_test_nolog_warning() 61 ut_assertok(ut_check_console_end(uts)); in log_test_nolog_notice() 75 ut_assertok(ut_check_console_end(uts)); in log_test_nolog_info() 90 ut_assertok(ut_check_console_end(uts)); in nolog_test_nodebug() 104 ut_assertok(ut_check_console_end(uts)); in log_test_nolog_nodebug() 111 static int nolog_test_debug(struct unit_test_state *uts) in nolog_test_debug() argument 120 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 | cont_test.c | 18 static int log_test_cont(struct unit_test_state *uts) in log_test_cont() argument 35 ut_assertok(ut_check_console_line(uts, "ERR.arch, ea1")); in log_test_cont() 36 ut_assertok(ut_check_console_line(uts, "ERR.arch, cc2")); in log_test_cont() 37 ut_assertok(ut_check_console_end(uts)); in log_test_cont() 47 ut_assertok(ut_check_console_line(uts, "INFO.efi, ie3")); in log_test_cont() 48 ut_assertok(ut_check_console_end(uts)); in log_test_cont() 59 ut_assertok(ut_check_console_line(uts, "ERR.arch, ea1 cc2")); in log_test_cont() 60 ut_assertok(ut_check_console_end(uts)); in log_test_cont()
|
| 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") 103 int log_test_cat_allow(struct unit_test_state *uts) in log_test_cat_allow() argument 148 int log_test_file(struct unit_test_state *uts) in log_test_file() argument 204 int log_test_level(struct unit_test_state *uts) in log_test_level() argument 222 int log_test_double(struct unit_test_state *uts) in log_test_double() argument 242 int log_test_triple(struct unit_test_state *uts) in log_test_triple() argument 292 ret = do_log_test_helpers(uts); in log_test_helpers() 319 ret = do_log_test_disable(uts); in log_test_disable() 394 int log_test_min(struct unit_test_state *uts) in log_test_min() argument [all …]
|
| /u-boot/include/test/ |
| A D | ut.h | 156 ut_failf(uts, __FILE__, __LINE__, __func__, \ 171 ut_failf(uts, __FILE__, __LINE__, __func__, \ 189 ut_failf(uts, __FILE__, __LINE__, __func__, \ 207 ut_failf(uts, __FILE__, __LINE__, __func__, \ 318 uts->expect_str, uts->actual_str); \ 331 uts->expect_str, uts->actual_str); \ 341 if (ut_check_skipline(uts)) { \ 356 uts->expect_str, uts->actual_str); \ 366 if (ut_check_console_end(uts)) { \ 369 uts->actual_str); \ [all …]
|
| /u-boot/test/common/ |
| A D | test_autoboot.c | 16 static int check_for_input(struct unit_test_state *uts, const char *in, in check_for_input() argument 45 static int test_autoboot(struct unit_test_state *uts) in test_autoboot() argument 60 ut_assertok(check_for_input(uts, "a\n", true)); in test_autoboot() 66 ut_assertok(check_for_input(uts, "test\n", true)); in test_autoboot() 70 ut_assertok(check_for_input(uts, "test\n", true)); in test_autoboot() 80 ut_assertok(check_for_input(uts, "abc\n", true)); in test_autoboot() 86 ut_assertok(check_for_input(uts, "abc", true)); in test_autoboot() 88 ut_assertok(check_for_input(uts, "abc\n", true)); in test_autoboot() 90 ut_assertok(check_for_input(uts, "abd", false)); in test_autoboot()
|
| /u-boot/test/boot/ |
| A D | bootflow.c | 32 static int inject_response(struct unit_test_state *uts) in inject_response() argument 49 static int bootflow_cmd(struct unit_test_state *uts) in bootflow_cmd() argument 130 ut_assertok(bootstd_test_drop_bootdev_order(uts)); in bootflow_cmd_glob() 162 ut_assertok(bootstd_test_drop_bootdev_order(uts)); in bootflow_cmd_scan_e() 251 ut_assertok(inject_response(uts)); in bootflow_scan_boot() 410 ut_assertok(bootstd_test_drop_bootdev_order(uts)); in bootflow_iter_disable() 414 ut_assertok(inject_response(uts)); in bootflow_iter_disable() 422 ut_assertok(inject_response(uts)); in bootflow_iter_disable() 489 ut_assertok(inject_response(uts)); in bootflow_cmd_boot() 550 ut_assertok(prep_mmc4_bootdev(uts)); in bootflow_cmd_menu() [all …]
|
| /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()
|