test: Drop struct dm_test_state

Driver model is a core part of U-Boot. We don't really need to have a
separate test structure for the driver model tests and it makes it harder
to write a test if you have to think about which type of test it is.

Subsume the fields from struct dm_test_state into struct unit_test_state
and delete the former.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2021-03-07 17:34:57 -07:00
committed by Tom Rini
parent 72b524cf42
commit 4a467c6de6
6 changed files with 39 additions and 63 deletions

View File

@@ -116,10 +116,8 @@ static int test_manual_bind(struct udevice *dev)
static int test_manual_probe(struct udevice *dev)
{
struct dm_test_state *dms = uts->priv;
dm_testdrv_op_count[DM_TEST_OP_PROBE]++;
if (!dms->force_fail_alloc)
if (!uts->force_fail_alloc)
dev_set_priv(dev, calloc(1, sizeof(struct dm_test_priv)));
if (!dev_get_priv(dev))
return -ENOMEM;