Home
last modified time | relevance | path

Searched refs:ut_asserteq (Results 1 – 25 of 36) sorted by relevance

12

/external/u-boot/test/dm/
Dclk.c23 ut_asserteq(0, sandbox_clk_query_enable(dev_clk, SANDBOX_CLK_ID_SPI)); in dm_test_clk()
24 ut_asserteq(0, sandbox_clk_query_enable(dev_clk, SANDBOX_CLK_ID_I2C)); in dm_test_clk()
25 ut_asserteq(0, sandbox_clk_query_rate(dev_clk, SANDBOX_CLK_ID_SPI)); in dm_test_clk()
26 ut_asserteq(0, sandbox_clk_query_rate(dev_clk, SANDBOX_CLK_ID_I2C)); in dm_test_clk()
32 ut_asserteq(1234, in dm_test_clk()
35 ut_asserteq(0, sandbox_clk_test_get_rate(dev_test, in dm_test_clk()
37 ut_asserteq(0, sandbox_clk_test_get_rate(dev_test, in dm_test_clk()
44 ut_asserteq(1234, rate); in dm_test_clk()
46 ut_asserteq(0, sandbox_clk_test_set_rate(dev_test, in dm_test_clk()
49 ut_asserteq(0, sandbox_clk_test_set_rate(dev_test, in dm_test_clk()
[all …]
Dgpio.c33 ut_asserteq(4, offset); in dm_test_gpio()
34 ut_asserteq(CONFIG_SANDBOX_GPIO_COUNT + 20 + 4, gpio); in dm_test_gpio()
38 ut_asserteq(10, offset_count); in dm_test_gpio()
45 ut_asserteq(-EBUSY, gpio_get_value(gpio + 1)); in dm_test_gpio()
67 ut_asserteq(1, ops->get_value(dev, offset)); in dm_test_gpio()
69 ut_asserteq(0, ops->get_value(dev, offset)); in dm_test_gpio()
73 ut_asserteq(1, ops->get_value(dev, offset)); in dm_test_gpio()
76 ut_asserteq(0, sandbox_gpio_get_open_drain(dev, offset)); in dm_test_gpio()
78 ut_asserteq(1, sandbox_gpio_get_open_drain(dev, offset)); in dm_test_gpio()
80 ut_asserteq(0, sandbox_gpio_get_open_drain(dev, offset)); in dm_test_gpio()
[all …]
Dled.c24 ut_asserteq(-ENODEV, uclass_get_device(UCLASS_LED, 5, &dev)); in dm_test_led_base()
37 ut_asserteq(LEDST_ON, led_get_state(dev)); in dm_test_led_default_state()
40 ut_asserteq(LEDST_OFF, led_get_state(dev)); in dm_test_led_default_state()
58 ut_asserteq(0, sandbox_gpio_get_value(gpio, offset)); in dm_test_led_gpio()
60 ut_asserteq(1, sandbox_gpio_get_value(gpio, offset)); in dm_test_led_gpio()
61 ut_asserteq(LEDST_ON, led_get_state(dev)); in dm_test_led_gpio()
64 ut_asserteq(0, sandbox_gpio_get_value(gpio, offset)); in dm_test_led_gpio()
65 ut_asserteq(LEDST_OFF, led_get_state(dev)); in dm_test_led_gpio()
83 ut_asserteq(0, sandbox_gpio_get_value(gpio, offset)); in dm_test_led_toggle()
85 ut_asserteq(1, sandbox_gpio_get_value(gpio, offset)); in dm_test_led_toggle()
[all …]
Dsysreset.c22 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()
24 ut_asserteq(-ENODEV, sysreset_request(dev, SYSRESET_POWER)); 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()
30 ut_asserteq(-ENOSYS, sysreset_request(dev, SYSRESET_POWER)); in dm_test_sysreset_base()
33 ut_asserteq(-EINPROGRESS, sysreset_request(dev, SYSRESET_WARM)); in dm_test_sysreset_base()
38 ut_asserteq(-ENOSYS, sysreset_request(dev, SYSRESET_WARM)); in dm_test_sysreset_base()
39 ut_asserteq(-EACCES, sysreset_request(dev, SYSRESET_COLD)); in dm_test_sysreset_base()
41 ut_asserteq(-EACCES, sysreset_request(dev, SYSRESET_POWER)); in dm_test_sysreset_base()
[all …]
Dregmap.c26 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(4, map->ranges[0].size); in dm_test_regmap_base()
29 ut_asserteq(0x10, map_to_sysmem(regmap_get_range(map, 0))); 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()
41 ut_asserteq(addr, map_to_sysmem(regmap_get_range(map, i))); in dm_test_regmap_base()
55 ut_asserteq(4, map->range_count); in dm_test_regmap_base()
[all …]
Dspmi.c30 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()
85 ut_asserteq(device_get_uclass_id(dev->parent), UCLASS_PMIC); in dm_test_spmi_access_peripheral()
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()
[all …]
Dreset.c25 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 …]
Dcore.c101 ut_asserteq(uts->start.uordblks, end.uordblks); in dm_leak_check_end()
117 ut_asserteq(1, list_count_items(&gd->uclass_root)); in dm_test_autobind()
118 ut_asserteq(0, list_count_items(&gd->dm_root->child_head)); in dm_test_autobind()
119 ut_asserteq(0, dm_testdrv_op_count[DM_TEST_OP_POST_BIND]); in dm_test_autobind()
128 ut_asserteq(3, dm_testdrv_op_count[DM_TEST_OP_POST_BIND]); in dm_test_autobind()
208 ut_asserteq(1, dm_testdrv_op_count[DM_TEST_OP_INIT]); in dm_test_autoprobe()
209 ut_asserteq(0, dm_testdrv_op_count[DM_TEST_OP_PRE_PROBE]); in dm_test_autoprobe()
210 ut_asserteq(0, dm_testdrv_op_count[DM_TEST_OP_POST_PROBE]); in dm_test_autoprobe()
240 ut_asserteq(3, dm_testdrv_op_count[DM_TEST_OP_POST_PROBE]); in dm_test_autoprobe()
241 ut_asserteq(3, dm_testdrv_op_count[DM_TEST_OP_PRE_PROBE]); in dm_test_autoprobe()
[all …]
Dvideo.c33 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()
153 ut_asserteq(466, compress_frame_buffer(dev)); in dm_test_video_chars()
[all …]
Dbus.c112 ut_asserteq(num_devices, list_count_items(&uc->dev_head)); in dm_test_bus_children()
119 ut_asserteq(num_devices, list_count_items(&uc->dev_head)); in dm_test_bus_children()
138 ut_asserteq(-ENODEV, device_get_child(bus, 4, &dev)); in dm_test_bus_children_funcs()
144 ut_asserteq(-ENODEV, device_find_child_by_seq(bus, -1, true, &dev)); in dm_test_bus_children_funcs()
147 ut_asserteq(-ENODEV, device_find_child_by_seq(bus, 0, false, &dev)); in dm_test_bus_children_funcs()
152 ut_asserteq(-ENODEV, device_find_child_by_seq(bus, 2, false, &dev)); in dm_test_bus_children_funcs()
153 ut_asserteq(-ENODEV, device_find_child_by_seq(bus, 2, true, &dev)); in dm_test_bus_children_funcs()
154 ut_asserteq(-ENODEV, device_get_child_by_seq(bus, 2, &dev)); in dm_test_bus_children_funcs()
158 ut_asserteq(-ENODEV, device_find_child_by_of_offset(bus, node, &dev)); in dm_test_bus_children_funcs()
160 ut_asserteq(-ENODEV, device_find_child_by_of_offset(bus, node, &dev)); in dm_test_bus_children_funcs()
[all …]
Dusb.c23 ut_asserteq(-ENODEV, uclass_get_device_by_seq(UCLASS_USB, 0, &bus)); in dm_test_usb_base()
25 ut_asserteq(-ENODEV, uclass_get_device_by_seq(UCLASS_USB, 2, &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()
[all …]
Dblk.c21 ut_asserteq(-ENODEV, uclass_get_device_by_seq(UCLASS_BLK, 0, &blk)); in dm_test_blk_base()
30 ut_asserteq(-ENODEV, blk_get_device(IF_TYPE_HOST, 0, &dev)); in dm_test_blk_base()
34 ut_asserteq(-ENODEV, blk_get_device(IF_TYPE_USB, 0, &dev)); in dm_test_blk_base()
41 ut_asserteq(-ENODEV, blk_next_device(&dev)); in dm_test_blk_base()
45 ut_asserteq(-ENODEV, blk_next_device(&dev)); in dm_test_blk_base()
85 ut_asserteq(6, count_blk_devices()); in dm_test_blk_usb()
90 ut_asserteq(6, count_blk_devices()); in dm_test_blk_usb()
104 ut_asserteq(-ENODEV, blk_find_device(IF_TYPE_HOST, 0, &dev)); in dm_test_blk_find()
107 ut_asserteq(false, device_active(dev)); in dm_test_blk_find()
112 ut_asserteq(true, device_active(dev)); in dm_test_blk_find()
[all …]
Dadc.c38 ut_asserteq(-EINVAL, adc_start_channel(dev, SANDBOX_ADC_CHANNELS)); in dm_test_adc_wrong_channel_selection()
54 ut_asserteq(SANDBOX_ADC_VSS_VALUE, uV); in dm_test_adc_supply()
58 ut_asserteq(SANDBOX_BUCK2_INITIAL_EXPECTED_UV, uV); in dm_test_adc_supply()
63 ut_asserteq(SANDBOX_BUCK2_SET_UV, regulator_get_value(supply)); in dm_test_adc_supply()
67 ut_asserteq(SANDBOX_BUCK2_SET_UV, uV); in dm_test_adc_supply()
71 ut_asserteq(false, regulator_get_enable(supply)); in dm_test_adc_supply()
74 ut_asserteq(true, regulator_get_enable(supply)); in dm_test_adc_supply()
98 ut_asserteq(tdata->data, data); in dm_test_adc_single_channel_conversion()
122 ut_asserteq(tdata->data, channels[i].data); in dm_test_adc_multi_channel_conversion()
137 ut_asserteq(tdata->data, data); in dm_test_adc_single_channel_shot()
[all …]
Dregulator.c114 ut_asserteq(val_set, val_get); in dm_test_power_regulator_set_get_voltage()
141 ut_asserteq(val_set, val_get); in dm_test_power_regulator_set_get_current()
149 ut_asserteq(-ENODATA, uc_pdata->min_uA); in dm_test_power_regulator_set_get_current()
150 ut_asserteq(-ENODATA, uc_pdata->max_uA); in dm_test_power_regulator_set_get_current()
153 ut_asserteq(-ENOSYS, regulator_set_current(dev, 0)); in dm_test_power_regulator_set_get_current()
172 ut_asserteq(regulator_get_enable(dev), val_set); in dm_test_power_regulator_set_get_enable()
191 ut_asserteq(regulator_get_mode(dev), val_set); in dm_test_power_regulator_set_get_mode()
219 ut_asserteq(regulator_get_value(dev), in dm_test_power_regulator_autoset()
221 ut_asserteq(regulator_get_current(dev), in dm_test_power_regulator_autoset()
223 ut_asserteq(regulator_get_enable(dev), in dm_test_power_regulator_autoset()
[all …]
Dphy.c31 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()
Dwdt.c23 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()
Dtest-fdt.c182 ut_asserteq(num_devices, list_count_items(&uc->dev_head)); in dm_test_fdt()
210 ut_asserteq(1, list_count_items(&uc->dev_head)); in dm_test_fdt_pre_reloc()
228 ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 5, in dm_test_fdt_uclass_seq()
236 ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 7, in dm_test_fdt_uclass_seq()
258 ut_asserteq(-ENODEV, uclass_get_device_by_seq(UCLASS_TEST_FDT, 1, in dm_test_fdt_uclass_seq()
287 ut_asserteq(-ENODEV, uclass_get_device_by_of_offset(UCLASS_TEST_FDT, in dm_test_fdt_offset()
293 ut_asserteq(-ENODEV, uclass_get_device_by_of_offset(UCLASS_TEST_FDT, in dm_test_fdt_offset()
320 ut_asserteq(4, count); in dm_test_first_next_device()
328 ut_asserteq(-ENOMEM, uclass_next_device(&dev)); in dm_test_first_next_device()
336 ut_asserteq(-ENOENT, uclass_first_device(UCLASS_TEST_PROBE, &dev)); in dm_test_first_next_device()
[all …]
Dspi.c28 ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_SPI, busnum, in dm_test_spi_find()
35 ut_asserteq(0, uclass_get_device_by_seq(UCLASS_SPI, busnum, &bus)); in dm_test_spi_find()
49 ut_asserteq(-ENODEV, spi_find_bus_and_cs(busnum, cs, &bus, &dev)); in dm_test_spi_find()
50 ut_asserteq(-ENODEV, spi_get_bus_and_cs(busnum, cs, speed, mode, in dm_test_spi_find()
59 ut_asserteq(-ENODEV, spi_find_bus_and_cs(busnum, cs, &bus, &dev)); in dm_test_spi_find()
60 ut_asserteq(-ENOENT, spi_get_bus_and_cs(busnum, cs, speed, mode, in dm_test_spi_find()
110 ut_asserteq(0xff, din[0]); in dm_test_spi_xfer()
111 ut_asserteq(0x20, din[1]); in dm_test_spi_xfer()
112 ut_asserteq(0x20, din[2]); in dm_test_spi_xfer()
113 ut_asserteq(0x15, din[3]); in dm_test_spi_xfer()
Dpower-domain.c23 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()
32 ut_asserteq(0, sandbox_power_domain_query(dev_power_domain, 0)); in dm_test_power_domain()
33 ut_asserteq(1, sandbox_power_domain_query(dev_power_domain, in dm_test_power_domain()
37 ut_asserteq(0, sandbox_power_domain_query(dev_power_domain, 0)); in dm_test_power_domain()
38 ut_asserteq(0, sandbox_power_domain_query(dev_power_domain, in dm_test_power_domain()
Dsyscon.c19 ut_asserteq(SYSCON0, dev->driver_data); in dm_test_syscon_base()
22 ut_asserteq(SYSCON1, dev->driver_data); in dm_test_syscon_base()
24 ut_asserteq(-ENODEV, uclass_get_device(UCLASS_SYSCON, 2, &dev)); in dm_test_syscon_base()
36 ut_asserteq(SYSCON0, dev->driver_data); in dm_test_syscon_by_driver_data()
39 ut_asserteq(SYSCON1, dev->driver_data); in dm_test_syscon_by_driver_data()
41 ut_asserteq(-ENODEV, syscon_get_by_driver_data(2, &dev)); in dm_test_syscon_by_driver_data()
Dpmic.c69 ut_asserteq(reg_count, SANDBOX_PMIC_REG_COUNT); in dm_test_power_pmic_io()
80 ut_asserteq(out_buffer, in_buffer); in dm_test_power_pmic_io()
98 ut_asserteq(reg_count, MC34708_PMIC_REG_COUNT); in dm_test_power_pmic_mc34708_regs_check()
114 ut_asserteq(val, 0x422100); in dm_test_power_pmic_mc34708_rw_val()
121 ut_asserteq(val, MC34708_PMIC_TEST_VAL); in dm_test_power_pmic_mc34708_rw_val()
125 ut_asserteq(val, (0x422100 & ~(0x3 << 8)) | (1 << 9)); in dm_test_power_pmic_mc34708_rw_val()
Dremoteproc.c24 ut_asserteq(true, rproc_is_initialized()); in dm_test_remoteproc_base()
31 ut_asserteq(-EINVAL, rproc_start(0)); in dm_test_remoteproc_base()
32 ut_asserteq(-EINVAL, rproc_ping(0)); in dm_test_remoteproc_base()
55 ut_asserteq(-EINVAL, rproc_start(0)); in dm_test_remoteproc_base()
56 ut_asserteq(-EINVAL, rproc_ping(0)); in dm_test_remoteproc_base()
Drtc.c20 ut_asserteq(-ENODEV, uclass_get_device_by_seq(UCLASS_RTC, 2, &dev)); in dm_test_rtc_base()
89 ut_asserteq(1, cmp.tm_sec); in dm_test_rtc_set_get()
107 ut_asserteq(0, cmp.tm_sec); in dm_test_rtc_set_get()
109 ut_asserteq(now.tm_sec + 1, cmp.tm_sec); in dm_test_rtc_set_get()
133 ut_asserteq(0, sandbox_i2c_rtc_get_set_base_time(emul, -1)); in dm_test_rtc_reset()
138 ut_asserteq(old_base_time, base_time); in dm_test_rtc_reset()
166 ut_asserteq(-EINVAL, cmp_times(&now1, &cmp, false)); in dm_test_rtc_dual()
Dmailbox.c20 ut_asserteq(-ETIMEDOUT, sandbox_mbox_test_recv(dev, &msg)); in dm_test_mailbox()
23 ut_asserteq(msg, 0xaaff9955UL ^ SANDBOX_MBOX_PING_XOR); in dm_test_mailbox()
24 ut_asserteq(-ETIMEDOUT, sandbox_mbox_test_recv(dev, &msg)); in dm_test_mailbox()
/external/u-boot/test/env/
Dattr.c41 ut_asserteq(-ENOENT, env_attr_lookup(",,", "foo", attrs)); in env_test_attrs_lookup()
43 ut_asserteq(-ENOENT, env_attr_lookup("goo:baz", "foo", attrs)); in env_test_attrs_lookup()
56 ut_asserteq(-EINVAL, env_attr_lookup(NULL, "foo", attrs)); in env_test_attrs_lookup()
57 ut_asserteq(-EINVAL, env_attr_lookup("foo:bar", "foo", NULL)); in env_test_attrs_lookup()
83 ut_asserteq(-ENOENT, env_attr_lookup("\\.foo:bar", "ufoo", attrs)); in env_test_attrs_lookup_regex()

12