aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Scull <ascull@google.com>2022-05-16 10:41:35 +0000
committerTom Rini <trini@konsulko.com>2022-06-08 09:24:04 -0400
commit82c8610a44c6d4d38b90246f6893cb8e7b911e0c (patch)
treeb7744f9d20086bc1673ef246339acb6d5398bd86 /test
parent1674b6c4d820a4139c406d673a3319f785503a5d (diff)
downloadu-boot-82c8610a44c6d4d38b90246f6893cb8e7b911e0c.zip
u-boot-82c8610a44c6d4d38b90246f6893cb8e7b911e0c.tar.gz
u-boot-82c8610a44c6d4d38b90246f6893cb8e7b911e0c.tar.bz2
test: dm: virtio: Test notify before del_vqs
The virtqueue is passed to virtio_notify() so move the virtqueue deletion to the end of the test when it's no longer needed. This wasn't causing any problems because the sandbox virtio transport driver doesn't do anything for notifications, but it could cause problems if things change and it was a bad example. Signed-off-by: Andrew Scull <ascull@google.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/dm/virtio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/dm/virtio.c b/test/dm/virtio.c
index aa4e3d7..ff1dea3 100644
--- a/test/dm/virtio.c
+++ b/test/dm/virtio.c
@@ -80,8 +80,8 @@ static int dm_test_virtio_all_ops(struct unit_test_state *uts)
ut_asserteq_64(BIT_ULL(VIRTIO_F_VERSION_1), features);
ut_assertok(virtio_set_features(dev));
ut_assertok(virtio_find_vqs(dev, nvqs, vqs));
- ut_assertok(virtio_del_vqs(dev));
ut_assertok(virtio_notify(dev, vqs[0]));
+ ut_assertok(virtio_del_vqs(dev));
return 0;
}