From: Sean Anderson Date: Mon, 14 Sep 2020 15:02:03 +0000 (-0400) Subject: test: dm: Test for default led naming X-Git-Tag: v2025.01-rc5-pxa1908~2185^2~12 X-Git-Url: http://git.dujemihanovic.xyz/html/index.html?a=commitdiff_plain;h=3e41c7b253bc28278c3b3b6f49dfa4387290f5c4;p=u-boot.git test: dm: Test for default led naming This modifies the existing led test to check for default led naming as added in the previous patch. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 6ea1073c47..c7d1376911 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -559,7 +559,7 @@ default_off { gpios = <&gpio_a 6 0>; - label = "sandbox:default_off"; + /* label intentionally omitted */ default-state = "off"; }; }; diff --git a/test/dm/led.c b/test/dm/led.c index 8b587d0a22..ac6ee36394 100644 --- a/test/dm/led.c +++ b/test/dm/led.c @@ -40,7 +40,8 @@ static int dm_test_led_default_state(struct unit_test_state *uts) ut_assertok(led_get_by_label("sandbox:default_on", &dev)); ut_asserteq(LEDST_ON, led_get_state(dev)); - ut_assertok(led_get_by_label("sandbox:default_off", &dev)); + /* Also tests default label behaviour */ + ut_assertok(led_get_by_label("default_off", &dev)); ut_asserteq(LEDST_OFF, led_get_state(dev)); return 0;