]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: test: Drop assumptions of no sequence numbers
authorSimon Glass <sjg@chromium.org>
Thu, 17 Dec 2020 04:20:13 +0000 (21:20 -0700)
committerSimon Glass <sjg@chromium.org>
Sat, 19 Dec 2020 03:32:21 +0000 (20:32 -0700)
Drop code in a few tests which assumes that sequence numbers are only
valid when a device is probed.

Signed-off-by: Simon Glass <sjg@chromium.org>
test/dm/blk.c
test/dm/i2c.c
test/dm/spi.c

index 23940b3e0319170a323fa280e19da75fde9d4fac..a39a1ebd289ac4a97460fda030fe514faa452dcb 100644 (file)
@@ -19,9 +19,6 @@ static int dm_test_blk_base(struct unit_test_state *uts)
 {
        struct udevice *blk1, *blk3, *dev;
 
-       /* Make sure there are no block devices */
-       ut_asserteq(-ENODEV, uclass_get_device_by_seq(UCLASS_BLK, 0, &dev));
-
        /* Create two, one the parent of the other */
        ut_assertok(blk_create_device(gd->dm_root, "sandbox_host_blk", "test",
                                      IF_TYPE_HOST, 1, 512, 2, &blk1));
index 681ce45107c31f8ebeedd13b1bf2745dfaf65404..d74f5f9fbc7c70bab4423ba1aaf6c6c6ec366a62 100644 (file)
@@ -28,9 +28,6 @@ static int dm_test_i2c_find(struct unit_test_state *uts)
        struct udevice *bus, *dev;
        const int no_chip = 0x10;
 
-       ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_I2C, busnum,
-                                                      false, &bus));
-
        /*
         * The post_bind() method will bind devices to chip selects. Check
         * this then remove the emulation and the slave device.
index fb180aed1f08a9f38d20377364552589b648c093..b767cf9c4a024277eff7625e50135243e10d37e8 100644 (file)
@@ -26,9 +26,6 @@ static int dm_test_spi_find(struct unit_test_state *uts)
        struct spi_cs_info info;
        ofnode node;
 
-       ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_SPI, busnum,
-                                                      false, &bus));
-
        /*
         * The post_bind() method will bind devices to chip selects. Check
         * this then remove the emulation and the slave device.