aboutsummaryrefslogtreecommitdiff
path: root/test/dm
diff options
context:
space:
mode:
authorSimon Glass2023-01-17 10:47:50 -0700
committerTom Rini2023-01-23 18:11:40 -0500
commit902400201de139cc1499dc4f794ed34d8a758ca8 (patch)
treeff0fdaed2feec1376ef90ca04a9b02502cc7d656 /test/dm
parent811c81e88990555117e5d8cd5ef585f4b0d2400b (diff)
virtio: Avoid strange behaviour on removal
This device does a check on removal which is better handled in the actual test. Move it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm')
-rw-r--r--test/dm/virtio_device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/dm/virtio_device.c b/test/dm/virtio_device.c
index b5c4523a028..fdda4da4178 100644
--- a/test/dm/virtio_device.c
+++ b/test/dm/virtio_device.c
@@ -100,6 +100,7 @@ DM_TEST(dm_test_virtio_all_ops, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
static int dm_test_virtio_remove(struct unit_test_state *uts)
{
struct udevice *bus, *dev;
+ u8 status;
/* check probe success */
ut_assertok(uclass_first_device_err(UCLASS_VIRTIO, &bus));
@@ -117,6 +118,8 @@ static int dm_test_virtio_remove(struct unit_test_state *uts)
ut_asserteq(-EKEYREJECTED, device_remove(bus, DM_REMOVE_ACTIVE_ALL));
ut_asserteq(false, device_active(dev));
+ virtio_get_status(dev, &status);
+ ut_assertok(status);
return 0;
}