diff mbox series

[09/27] dm: test: Drop assumptions of no sequence numbers

Message ID 20201130015402.2328621-8-sjg@chromium.org
State Superseded
Delegated to: Simon Glass
Headers show
Series dm: Change the way sequence numbers are implemented | expand

Commit Message

Simon Glass Nov. 30, 2020, 1:53 a.m. UTC
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 | 3 ---
 test/dm/i2c.c | 3 ---
 test/dm/spi.c | 3 ---
 3 files changed, 9 deletions(-)
diff mbox series

Patch

diff --git a/test/dm/blk.c b/test/dm/blk.c
index f34c13f7511..ea5e0955d98 100644
--- a/test/dm/blk.c
+++ b/test/dm/blk.c
@@ -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));
diff --git a/test/dm/i2c.c b/test/dm/i2c.c
index 681ce45107c..d74f5f9fbc7 100644
--- a/test/dm/i2c.c
+++ b/test/dm/i2c.c
@@ -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.
diff --git a/test/dm/spi.c b/test/dm/spi.c
index fb180aed1f0..b767cf9c4a0 100644
--- a/test/dm/spi.c
+++ b/test/dm/spi.c
@@ -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.