summaryrefslogtreecommitdiff
path: root/test/dm/virtio.c
AgeCommit message (Collapse)AuthorFilesLines
2021-02-03dm: core: Avoid partially removing devicesSimon Glass1-1/+3
At present if device_remove() decides that the device should not actually be removed, it still calls the uclass pre_remove() method and powers the device down. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dm: core: Access device flags through functionsSimon Glass1-1/+1
At present flags are stored as part of the device. In preparation for storing them separately, change the access to go through inline functions. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-08dm: Rename DM test flags to make them more genericSimon Glass1-4/+4
The test flags used by driver model are currently not available to other tests. Rather than creating two sets of flags, make these flags generic by changing the DM_ prefix to UT_ and moving them to the test.h header. This will allow adding other test flags without confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-04dm: core: Drop header files from dm/test.hSimon Glass1-1/+2
These header file should not be included in other header files. Remove them and add to each individual file. Add test/test.h to test/ui.h since that is a reasonable place. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-25test/dm: check if devices existHeinrich Schuchardt1-0/+7
Running 'ut dm' on the sandbox without -D or -d results in segmentation faults due to NULL pointer dereferences. Check that device pointers are non-NULL before using them. Use ut_assertnonnull() for pointers instead of ut_assert(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: Philippe Reynes <philippe.reynes@softathome.com>
2020-07-24Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"Tom Rini1-7/+0
This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing changes made to 56d37f1c564107e27d873181d838571b7d7860e7. Unfortunately this is causing CI failures: https://travis-ci.org/github/trini/u-boot/jobs/711313649 Signed-off-by: Tom Rini <trini@konsulko.com>
2020-07-20test/dm: check if devices existHeinrich Schuchardt1-0/+7
Running 'ut dm' on the sandbox without -D or -d results in segmentation faults due to NULL pointer dereferences. Check that device pointers are non-NULL before using them. Use ut_assertnonnull() for pointers instead of ut_assert(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: Philippe Reynes <philippe.reynes@softathome.com>
2018-11-14test: dm: virtio: Add test cases for virtio uclassBin Meng1-0/+122
Now that we have a sandbox virtio transport driver, add some test cases to test virtio uclass driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>