/openbmc/u-boot/test/ |
H A D | unicode_ut.c | 85 ut_asserteq(' ', buf[1]); in unicode_test_string16() 91 ut_asserteq(' ', buf[4]); in unicode_test_string16() 97 ut_asserteq(' ', buf[8]); in unicode_test_string16() 130 ut_asserteq(c2[i], code); in unicode_test_utf8_get() 141 ut_asserteq(c3[i], code); in unicode_test_utf8_get() 255 ut_asserteq(6, pos - buf); in unicode_test_utf8_utf16_strcpy() 260 ut_asserteq(8, pos - buf); in unicode_test_utf8_utf16_strcpy() 265 ut_asserteq(3, pos - buf); in unicode_test_utf8_utf16_strcpy() 270 ut_asserteq(6, pos - buf); in unicode_test_utf8_utf16_strcpy() 276 ut_asserteq(4, pos - buf); in unicode_test_utf8_utf16_strcpy() [all …]
|
H A D | bloblist.c | 48 ut_asserteq(-ENOENT, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); in bloblist_test_init() 51 ut_asserteq(-EPROTONOSUPPORT, bloblist_check(TEST_ADDR, in bloblist_test_init() 54 ut_asserteq(-ENOSPC, bloblist_new(TEST_ADDR, 0x10, 0)); in bloblist_test_init() 55 ut_asserteq(-EFAULT, bloblist_new(1, TEST_BLOBLIST_SIZE, 0)); in bloblist_test_init() 58 ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); in bloblist_test_init() 62 ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); in bloblist_test_init() 132 ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); in bloblist_test_checksum() 140 ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); in bloblist_test_checksum() 144 ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); in bloblist_test_checksum() 149 ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); in bloblist_test_checksum() [all …]
|
/openbmc/u-boot/test/dm/ |
H A D | clk.c | 36 ut_asserteq(1234, in dm_test_clk() 39 ut_asserteq(0, sandbox_clk_test_get_rate(dev_test, in dm_test_clk() 41 ut_asserteq(0, sandbox_clk_test_get_rate(dev_test, in dm_test_clk() 48 ut_asserteq(1234, rate); in dm_test_clk() 50 ut_asserteq(0, sandbox_clk_test_set_rate(dev_test, in dm_test_clk() 53 ut_asserteq(0, sandbox_clk_test_set_rate(dev_test, in dm_test_clk() 57 ut_asserteq(1000, sandbox_clk_test_get_rate(dev_test, in dm_test_clk() 59 ut_asserteq(2000, sandbox_clk_test_get_rate(dev_test, in dm_test_clk() 62 ut_asserteq(1000, sandbox_clk_test_set_rate(dev_test, in dm_test_clk() 65 ut_asserteq(2000, sandbox_clk_test_set_rate(dev_test, in dm_test_clk() [all …]
|
H A D | gpio.c | 33 ut_asserteq(4, offset); in dm_test_gpio() 38 ut_asserteq(10, offset_count); in dm_test_gpio() 98 ut_asserteq(15, offset); in dm_test_gpio() 103 ut_asserteq(20, offset_count); in dm_test_gpio() 120 ut_asserteq(14, offset); in dm_test_gpio_anon() 121 ut_asserteq(14, gpio); in dm_test_gpio_anon() 198 ut_asserteq(4, desc.offset); in dm_test_gpio_phandles() 206 ut_asserteq(desc.offset, 0); in dm_test_gpio_phandles() 223 ut_asserteq(1, desc_list[0].offset); in dm_test_gpio_phandles() 225 ut_asserteq(4, desc_list[1].offset); in dm_test_gpio_phandles() [all …]
|
H A D | panel.c | 35 ut_asserteq(false, enable); in dm_test_panel() 41 ut_asserteq(1000, period_ns); in dm_test_panel() 42 ut_asserteq(170 * 1000 / 256, duty_ns); in dm_test_panel() 43 ut_asserteq(true, enable); in dm_test_panel() 44 ut_asserteq(false, polarity); in dm_test_panel() 51 ut_asserteq(64 * 1000 / 256, duty_ns); in dm_test_panel() 56 ut_asserteq(255 * 1000 / 256, duty_ns); in dm_test_panel() 61 ut_asserteq(0 * 1000 / 256, duty_ns); in dm_test_panel() 67 ut_asserteq(true, enable); in dm_test_panel() 68 ut_asserteq(170 * 1000 / 256, duty_ns); in dm_test_panel() [all …]
|
H A D | sysreset.c | 22 ut_asserteq(-ENODEV, sysreset_request(dev, SYSRESET_WARM)); in dm_test_sysreset_base() 23 ut_asserteq(-ENODEV, sysreset_request(dev, SYSRESET_COLD)); in dm_test_sysreset_base() 28 ut_asserteq(-EACCES, sysreset_request(dev, SYSRESET_WARM)); in dm_test_sysreset_base() 29 ut_asserteq(-ENOSYS, sysreset_request(dev, SYSRESET_COLD)); in dm_test_sysreset_base() 75 ut_asserteq(-EACCES, sysreset_walk(SYSRESET_WARM)); in dm_test_sysreset_walk() 76 ut_asserteq(-EACCES, sysreset_walk(SYSRESET_COLD)); in dm_test_sysreset_walk() 77 ut_asserteq(-EACCES, sysreset_walk(SYSRESET_POWER)); in dm_test_sysreset_walk() 87 ut_asserteq(-EACCES, sysreset_walk(SYSRESET_POWER)); in dm_test_sysreset_walk() 101 ut_asserteq(SYSRESET_WARM, sysreset_get_last(dev)); in dm_test_sysreset_get_last() 105 ut_asserteq(SYSRESET_POWER, sysreset_get_last(dev)); in dm_test_sysreset_get_last() [all …]
|
H A D | led.c | 40 ut_asserteq(LEDST_ON, led_get_state(dev)); in dm_test_led_default_state() 43 ut_asserteq(LEDST_OFF, led_get_state(dev)); in dm_test_led_default_state() 61 ut_asserteq(0, sandbox_gpio_get_value(gpio, offset)); in dm_test_led_gpio() 64 ut_asserteq(LEDST_ON, led_get_state(dev)); in dm_test_led_gpio() 68 ut_asserteq(LEDST_OFF, led_get_state(dev)); in dm_test_led_gpio() 89 ut_asserteq(LEDST_ON, led_get_state(dev)); in dm_test_led_toggle() 93 ut_asserteq(LEDST_OFF, led_get_state(dev)); in dm_test_led_toggle() 105 ut_asserteq(1, device_active(dev)); in dm_test_led_label() 110 ut_asserteq(1, device_active(dev)); in dm_test_led_label() 136 ut_asserteq(LEDST_OFF, led_get_state(dev)); in dm_test_led_blink() [all …]
|
H A D | regmap.c | 26 ut_asserteq(1, map->range_count); in dm_test_regmap_base() 27 ut_asserteq(0x10, map->ranges[0].start); in dm_test_regmap_base() 28 ut_asserteq(16, map->ranges[0].size); in dm_test_regmap_base() 34 ut_asserteq(4, map->range_count); in dm_test_regmap_base() 35 ut_asserteq(0x20, map->ranges[0].start); in dm_test_regmap_base() 39 ut_asserteq(addr, map->ranges[i].start); in dm_test_regmap_base() 40 ut_asserteq(5 + i, map->ranges[i].size); in dm_test_regmap_base() 55 ut_asserteq(4, map->range_count); in dm_test_regmap_base() 76 ut_asserteq(1, map->range_count); in dm_test_regmap_syscon() 80 ut_asserteq(4, map->range_count); in dm_test_regmap_syscon() [all …]
|
H A D | spmi.c | 30 ut_asserteq(device_has_children(bus), true); in dm_test_spmi_probe() 39 ut_asserteq(device_get_uclass_id(dev), UCLASS_PMIC); in dm_test_spmi_probe() 61 ut_asserteq(spmi_reg_read(bus, 0, 0xC0, 0x4), 0x10); in dm_test_spmi_access() 62 ut_asserteq(spmi_reg_read(bus, 0, 0xC0, 0x5), 0x5); in dm_test_spmi_access() 65 ut_asserteq(pmic_reg_read(pmic, 0xC004), 0x10); in dm_test_spmi_access() 66 ut_asserteq(pmic_reg_read(pmic, 0xC005), 0x5); in dm_test_spmi_access() 88 ut_asserteq(1, offset); in dm_test_spmi_access_peripheral() 95 ut_asserteq(4, offset_count); in dm_test_spmi_access_peripheral() 101 ut_asserteq(gpio_get_value(gpio), 0); in dm_test_spmi_access_peripheral() 103 ut_asserteq(gpio_get_value(gpio), 1); in dm_test_spmi_access_peripheral() [all …]
|
H A D | reset.c | 25 ut_asserteq(0, sandbox_reset_query(dev_reset, TEST_RESET_ID)); in dm_test_reset() 32 ut_asserteq(1, sandbox_reset_query(dev_reset, TEST_RESET_ID)); in dm_test_reset() 35 ut_asserteq(0, sandbox_reset_query(dev_reset, TEST_RESET_ID)); in dm_test_reset() 50 ut_asserteq(0, sandbox_reset_query(dev_reset, TEST_RESET_ID)); in dm_test_reset_bulk() 51 ut_asserteq(0, sandbox_reset_query(dev_reset, OTHER_RESET_ID)); in dm_test_reset_bulk() 58 ut_asserteq(1, sandbox_reset_query(dev_reset, TEST_RESET_ID)); in dm_test_reset_bulk() 59 ut_asserteq(1, sandbox_reset_query(dev_reset, OTHER_RESET_ID)); in dm_test_reset_bulk() 62 ut_asserteq(0, sandbox_reset_query(dev_reset, TEST_RESET_ID)); in dm_test_reset_bulk() 63 ut_asserteq(0, sandbox_reset_query(dev_reset, OTHER_RESET_ID)); in dm_test_reset_bulk() 66 ut_asserteq(1, sandbox_reset_query(dev_reset, TEST_RESET_ID)); in dm_test_reset_bulk() [all …]
|
H A D | pci.c | 37 ut_asserteq(SANDBOX_PCI_VENDOR_ID, vendor); in dm_test_pci_busdev() 41 ut_asserteq(SANDBOX_PCI_DEVICE_ID, device); in dm_test_pci_busdev() 49 ut_asserteq(SANDBOX_PCI_VENDOR_ID, vendor); in dm_test_pci_busdev() 72 ut_asserteq(2, inb(io_addr)); in dm_test_pci_swapcase() 93 ut_asserteq(2, inb(io_addr)); in dm_test_pci_swapcase() 154 ut_asserteq(2, inb(io_addr)); in dm_test_pci_mixed() 178 ut_asserteq(2, inb(io_addr)); in dm_test_pci_mixed() 212 ut_asserteq(0, cap); in dm_test_pci_cap() 222 ut_asserteq(0, cap); in dm_test_pci_cap() 233 ut_asserteq(0, cap); in dm_test_pci_cap() [all …]
|
H A D | test-fdt.c | 227 ut_asserteq(5, ret); in dm_test_alias_highest_id() 230 ut_asserteq(2, ret); in dm_test_alias_highest_id() 233 ut_asserteq(2, ret); in dm_test_alias_highest_id() 236 ut_asserteq(0, ret); in dm_test_alias_highest_id() 239 ut_asserteq(-1, ret); in dm_test_alias_highest_id() 371 ut_asserteq(4, count); in dm_test_first_next_device() 415 ut_asserteq(expected_ret, in check_devices() 445 ut_asserteq(4, count); in dm_test_first_next_ok_device() 774 ut_asserteq(1234, val32); in dm_test_read_int() 780 ut_asserteq(1234, val32); in dm_test_read_int() [all …]
|
H A D | sound.c | 25 ut_asserteq(0, sandbox_get_setup_called(dev)); in dm_test_sound() 28 ut_asserteq(4560, sandbox_get_sound_sum(dev)); in dm_test_sound() 30 ut_asserteq(9120, sandbox_get_sound_sum(dev)); in dm_test_sound() 43 ut_asserteq(-ENOSYS, sound_start_beep(dev, 100)); in dm_test_sound_beep() 44 ut_asserteq(0, sandbox_get_beep_frequency(dev)); in dm_test_sound_beep() 47 ut_asserteq(0, sound_start_beep(dev, 100)); in dm_test_sound_beep() 48 ut_asserteq(100, sandbox_get_beep_frequency(dev)); in dm_test_sound_beep() 50 ut_asserteq(0, sound_stop_beep(dev)); in dm_test_sound_beep() 51 ut_asserteq(0, sandbox_get_beep_frequency(dev)); in dm_test_sound_beep()
|
H A D | pch.c | 22 ut_asserteq(0x10, sbase); in dm_test_pch_base() 24 ut_asserteq(0, sandbox_get_pch_spi_protect(dev)); in dm_test_pch_base() 26 ut_asserteq(1, sandbox_get_pch_spi_protect(dev)); in dm_test_pch_base() 29 ut_asserteq(0x20, gbase); in dm_test_pch_base() 32 ut_asserteq(0x30, iobase); in dm_test_pch_base() 46 ut_asserteq(-ENOSYS, pch_ioctl(dev, PCH_REQ_TEST1, NULL, 0)); in dm_test_pch_ioctl() 48 ut_asserteq('a', pch_ioctl(dev, PCH_REQ_TEST2, "a", 1)); in dm_test_pch_ioctl() 50 ut_asserteq(1, pch_ioctl(dev, PCH_REQ_TEST3, &data, 1)); in dm_test_pch_ioctl() 51 ut_asserteq('x', data); in dm_test_pch_ioctl()
|
H A D | usb.c | 23 ut_asserteq(-ENODEV, uclass_get_device_by_seq(UCLASS_USB, 0, &bus)); in dm_test_usb_base() 48 ut_asserteq(512, dev_desc->blksz); in dm_test_usb_flash() 50 ut_asserteq(2, blk_dread(dev_desc, 0, 2, cmp)); in dm_test_usb_flash() 110 ut_asserteq(6, count_usb_devices()); in dm_test_usb_stop() 112 ut_asserteq(0, count_usb_devices()); in dm_test_usb_stop() 126 ut_asserteq(0, tstc()); in dm_test_usb_keyb() 136 ut_asserteq(1, tstc()); in dm_test_usb_keyb() 137 ut_asserteq('a', getc()); in dm_test_usb_keyb() 138 ut_asserteq(1, tstc()); in dm_test_usb_keyb() 139 ut_asserteq('b', getc()); in dm_test_usb_keyb() [all …]
|
H A D | video.c | 33 ut_asserteq(1366, video_get_xsize(dev)); in dm_test_video_base() 34 ut_asserteq(768, video_get_ysize(dev)); in dm_test_video_base() 36 ut_asserteq(priv->fb_size, 1366 * 768 * 2); in dm_test_video_base() 119 ut_asserteq(46, compress_frame_buffer(dev)); in dm_test_video_text() 123 ut_asserteq(79, compress_frame_buffer(dev)); in dm_test_video_text() 126 ut_asserteq(46, compress_frame_buffer(dev)); in dm_test_video_text() 130 ut_asserteq(273, compress_frame_buffer(dev)); in dm_test_video_text() 133 ut_asserteq(46, compress_frame_buffer(dev)); in dm_test_video_text() 137 ut_asserteq(273, compress_frame_buffer(dev)); in dm_test_video_text() 173 ut_asserteq(46, compress_frame_buffer(dev)); in dm_test_video_ansi() [all …]
|
H A D | core.c | 101 ut_asserteq(uts->start.uordblks, end.uordblks); in dm_leak_check_end() 407 ut_asserteq(expected, pingret); in dm_check_operations() 412 ut_asserteq(expected, pingret); in dm_check_operations() 625 ut_asserteq(1 + NODE_COUNT * (1 + NODE_COUNT), in dm_test_children() 637 ut_asserteq(1 + NODE_COUNT * (1 + NODE_COUNT), in dm_test_children() 679 ut_asserteq(true, device_active(dev)); in dm_test_remove_active_dma() 685 ut_asserteq(false, device_active(dev)); in dm_test_remove_active_dma() 691 ut_asserteq(true, device_active(dev)); in dm_test_remove_active_dma() 697 ut_asserteq(false, device_active(dev)); in dm_test_remove_active_dma() 712 ut_asserteq(true, device_active(dev)); in dm_test_remove_active_dma() [all …]
|
H A D | power-domain.c | 23 ut_asserteq(0, sandbox_power_domain_query(dev_power_domain, 0)); in dm_test_power_domain() 24 ut_asserteq(0, sandbox_power_domain_query(dev_power_domain, in dm_test_power_domain() 29 ut_asserteq(1, sandbox_power_domain_query(dev_power_domain, in dm_test_power_domain() 34 ut_asserteq(0, sandbox_power_domain_query(dev_power_domain, 0)); in dm_test_power_domain() 35 ut_asserteq(1, sandbox_power_domain_query(dev_power_domain, in dm_test_power_domain() 39 ut_asserteq(0, sandbox_power_domain_query(dev_power_domain, 0)); in dm_test_power_domain() 40 ut_asserteq(0, sandbox_power_domain_query(dev_power_domain, in dm_test_power_domain()
|
H A D | bus.c | 395 ut_asserteq(1, plat->count); in test_bus_parent_platdata() 400 ut_asserteq(1, plat->count); in test_bus_parent_platdata() 404 ut_asserteq(3, child_count); in test_bus_parent_platdata() 414 ut_asserteq(1, plat->count); in test_bus_parent_platdata() 417 ut_asserteq(3, child_count); in test_bus_parent_platdata() 434 ut_asserteq(0, plat->count); in test_bus_parent_platdata() 437 ut_asserteq(3, child_count); in test_bus_parent_platdata() 495 ut_asserteq(3, child_count); in dm_test_bus_child_post_bind() 518 ut_asserteq(3, child_count); in dm_test_bus_child_post_bind_uclass() 554 ut_asserteq(3, child_count); in dm_test_bus_child_pre_probe_uclass() [all …]
|
H A D | adc.c | 31 ut_asserteq((1 << SANDBOX_ADC_CHANNELS) - 1, channel_mask); in dm_test_adc_bind() 58 ut_asserteq(SANDBOX_ADC_VSS_VALUE, uV); in dm_test_adc_supply() 62 ut_asserteq(SANDBOX_BUCK2_INITIAL_EXPECTED_UV, uV); in dm_test_adc_supply() 71 ut_asserteq(SANDBOX_BUCK2_SET_UV, uV); in dm_test_adc_supply() 75 ut_asserteq(false, regulator_get_enable(supply)); in dm_test_adc_supply() 78 ut_asserteq(true, regulator_get_enable(supply)); in dm_test_adc_supply() 102 ut_asserteq(tdata->data, data); in dm_test_adc_single_channel_conversion() 126 ut_asserteq(tdata->data, channels[i].data); in dm_test_adc_multi_channel_conversion() 141 ut_asserteq(tdata->data, data); in dm_test_adc_single_channel_shot() 162 ut_asserteq(tdata->data, channels[i].data); in dm_test_adc_multi_channel_shot() [all …]
|
H A D | wdt.c | 23 ut_asserteq(0, state->wdt.counter); in dm_test_wdt_base() 24 ut_asserteq(false, state->wdt.running); in dm_test_wdt_base() 27 ut_asserteq(timeout, state->wdt.counter); in dm_test_wdt_base() 28 ut_asserteq(true, state->wdt.running); in dm_test_wdt_base() 32 ut_asserteq(reset_count + 1, state->wdt.reset_count); in dm_test_wdt_base() 33 ut_asserteq(true, state->wdt.running); in dm_test_wdt_base() 36 ut_asserteq(false, state->wdt.running); in dm_test_wdt_base()
|
H A D | syscon.c | 20 ut_asserteq(SYSCON0, dev->driver_data); in dm_test_syscon_base() 23 ut_asserteq(SYSCON1, dev->driver_data); in dm_test_syscon_base() 25 ut_asserteq(-ENODEV, uclass_get_device(UCLASS_SYSCON, 2, &dev)); in dm_test_syscon_base() 37 ut_asserteq(SYSCON0, dev->driver_data); in dm_test_syscon_by_driver_data() 40 ut_asserteq(SYSCON1, dev->driver_data); in dm_test_syscon_by_driver_data() 42 ut_asserteq(-ENODEV, syscon_get_by_driver_data(2, &dev)); in dm_test_syscon_by_driver_data() 61 ut_asserteq(1, map->range_count); in dm_test_syscon_by_phandle() 68 ut_asserteq(4, map->range_count); in dm_test_syscon_by_phandle()
|
H A D | phy.c | 31 ut_asserteq(phy1_method1.id, phy1_method2.id); in dm_test_phy_base() 48 ut_asserteq(-ENODEV, uclass_get_device(UCLASS_PHY, 3, &dev)); in dm_test_phy_base() 49 ut_asserteq(-ENODATA, generic_phy_get_by_name(parent, in dm_test_phy_base() 68 ut_asserteq(0, phy1.id); in dm_test_phy_ops() 70 ut_asserteq(1, phy2.id); in dm_test_phy_ops() 72 ut_asserteq(0, phy3.id); in dm_test_phy_ops() 103 ut_asserteq(-EIO, generic_phy_power_off(&phy2)); in dm_test_phy_ops() 107 ut_asserteq(-EIO, generic_phy_power_off(&phy3)); in dm_test_phy_ops() 108 ut_asserteq(-EIO, generic_phy_power_off(&phy3)); in dm_test_phy_ops()
|
/openbmc/u-boot/test/lib/ |
H A D | lmb.c | 73 ut_asserteq(ret, 0); in test_multi_alloc() 77 ut_asserteq(ret, 0); in test_multi_alloc() 93 ut_asserteq(ret, 0); in test_multi_alloc() 119 ut_asserteq(ret, 0); in test_multi_alloc() 124 ut_asserteq(a, a2); in test_multi_alloc() 128 ut_asserteq(ret, 0); in test_multi_alloc() 133 ut_asserteq(ret, 0); in test_multi_alloc() 139 ut_asserteq(b, b2); in test_multi_alloc() 251 ut_asserteq(b, 0); in test_bigblock() 263 ut_asserteq(a, 0); in test_bigblock() [all …]
|
H A D | hexdump.c | 14 ut_asserteq(0x0, hex_to_bin('0')); in lib_test_hex_to_bin() 15 ut_asserteq(0x1, hex_to_bin('1')); in lib_test_hex_to_bin() 16 ut_asserteq(0x2, hex_to_bin('2')); in lib_test_hex_to_bin() 17 ut_asserteq(0x3, hex_to_bin('3')); in lib_test_hex_to_bin() 18 ut_asserteq(0x4, hex_to_bin('4')); in lib_test_hex_to_bin() 19 ut_asserteq(0x5, hex_to_bin('5')); in lib_test_hex_to_bin() 20 ut_asserteq(0x6, hex_to_bin('6')); in lib_test_hex_to_bin() 21 ut_asserteq(0x7, hex_to_bin('7')); in lib_test_hex_to_bin() 22 ut_asserteq(0x8, hex_to_bin('8')); in lib_test_hex_to_bin() 23 ut_asserteq(0x9, hex_to_bin('9')); in lib_test_hex_to_bin() [all …]
|