diff options
author | Simon Glass <sjg@chromium.org> | 2022-07-30 15:52:11 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-08-12 08:14:24 -0400 |
commit | b7eaa4f5e5b78cbf8b133f13e65412be55484d07 (patch) | |
tree | ac08f75e10f9c21cfc963efdfcd53e44824de1ae | |
parent | be0789a8ee024e685f070dbd8c58736ea3891654 (diff) | |
download | u-boot-b7eaa4f5e5b78cbf8b133f13e65412be55484d07.tar.gz u-boot-b7eaa4f5e5b78cbf8b133f13e65412be55484d07.tar.bz2 u-boot-b7eaa4f5e5b78cbf8b133f13e65412be55484d07.zip |
dm: core: Tidy up ofnode-writing test
Update this test to use the livetree flag so that special check can be
avoided. Also drop a few blank lines.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | test/dm/ofnode.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c index 0aeaaeb7f8..ce96f9d1ee 100644 --- a/test/dm/ofnode.c +++ b/test/dm/ofnode.c @@ -546,13 +546,7 @@ static int dm_test_ofnode_livetree_writing(struct unit_test_state *uts) struct udevice *dev; ofnode node; - if (!of_live_active()) { - printf("Live tree not active; ignore test\n"); - return 0; - } - /* Test enabling devices */ - node = ofnode_path("/usb@2"); ut_assert(!of_device_is_available(ofnode_to_np(node))); @@ -564,7 +558,6 @@ static int dm_test_ofnode_livetree_writing(struct unit_test_state *uts) ut_assertok(uclass_find_device_by_seq(UCLASS_USB, 2, &dev)); /* Test string property setting */ - ut_assert(device_is_compatible(dev, "sandbox,usb")); ofnode_write_string(node, "compatible", "gdsys,super-usb"); ut_assert(device_is_compatible(dev, "gdsys,super-usb")); @@ -581,7 +574,6 @@ static int dm_test_ofnode_livetree_writing(struct unit_test_state *uts) ut_asserteq(0x42, dev_read_addr(dev)); /* Test disabling devices */ - device_remove(dev, DM_REMOVE_NORMAL); device_unbind(dev); @@ -591,4 +583,5 @@ static int dm_test_ofnode_livetree_writing(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ofnode_livetree_writing, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); +DM_TEST(dm_test_ofnode_livetree_writing, + UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT | UT_TESTF_LIVE_TREE); |