diff options
author | Tom Rini <trini@konsulko.com> | 2020-07-23 15:56:06 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-23 15:56:06 -0400 |
commit | 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7 (patch) | |
tree | 5de77f2861f6856866c5bf4ffa7cab22d371ccf3 /test/dm/virtio.c | |
parent | 56d37f1c564107e27d873181d838571b7d7860e7 (diff) | |
parent | 60e7fa8b3b8538aae1e644dac61d5e4076901edb (diff) |
Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm
binman support for FIT
new UCLASS_SOC
patman switch 'test' command
minor fdt fixes
patman usability improvements
Diffstat (limited to 'test/dm/virtio.c')
-rw-r--r-- | test/dm/virtio.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/dm/virtio.c b/test/dm/virtio.c index 4b317d2ec3..4a0c0b23b8 100644 --- a/test/dm/virtio.c +++ b/test/dm/virtio.c @@ -22,9 +22,11 @@ static int dm_test_virtio_base(struct unit_test_state *uts) /* check probe success */ ut_assertok(uclass_first_device(UCLASS_VIRTIO, &bus)); + ut_assertnonnull(bus); /* check the child virtio-blk device is bound */ ut_assertok(device_find_first_child(bus, &dev)); + ut_assertnonnull(dev); ut_assertok(strcmp(dev->name, "virtio-blk#0")); /* check driver status */ @@ -49,15 +51,18 @@ static int dm_test_virtio_all_ops(struct unit_test_state *uts) /* check probe success */ ut_assertok(uclass_first_device(UCLASS_VIRTIO, &bus)); + ut_assertnonnull(bus); /* check the child virtio-blk device is bound */ ut_assertok(device_find_first_child(bus, &dev)); + ut_assertnonnull(dev); /* * fake the virtio device probe by filling in uc_priv->vdev * which is used by virtio_find_vqs/virtio_del_vqs. */ uc_priv = dev_get_uclass_priv(bus); + ut_assertnonnull(uc_priv); uc_priv->vdev = dev; /* test virtio_xxx APIs */ @@ -106,9 +111,11 @@ static int dm_test_virtio_remove(struct unit_test_state *uts) /* check probe success */ ut_assertok(uclass_first_device(UCLASS_VIRTIO, &bus)); + ut_assertnonnull(bus); /* check the child virtio-blk device is bound */ ut_assertok(device_find_first_child(bus, &dev)); + ut_assertnonnull(dev); /* set driver status to VIRTIO_CONFIG_S_DRIVER_OK */ ut_assertok(virtio_set_status(dev, VIRTIO_CONFIG_S_DRIVER_OK)); |