]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
test: dm: Test for default led naming
authorSean Anderson <seanga2@gmail.com>
Mon, 14 Sep 2020 15:02:03 +0000 (11:02 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 8 Oct 2020 15:42:36 +0000 (11:42 -0400)
This modifies the existing led test to check for default led naming as
added in the previous patch.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/sandbox/dts/test.dts
test/dm/led.c

index 6ea1073c47957c739bbbab8239177d4deba021e2..c7d137691163e664d34b87e0e72d64735a2a5774 100644 (file)
 
                default_off {
                        gpios = <&gpio_a 6 0>;
-                       label = "sandbox:default_off";
+                       /* label intentionally omitted */
                        default-state = "off";
                };
        };
index 8b587d0a22a8b098dfd5f182a17cb0c5b37f2075..ac6ee363940beded9a8d8bef762c9cbd6bd593b7 100644 (file)
@@ -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;