On Wed, Oct 02, 2019 at 02:47:49PM +0200, Jean-Jacques Hiblot wrote:

> Provide tests to check the behavior of the multiplexer framework.
> The test uses a mmio-based multiplexer.
> 
> Signed-off-by: Jean-Jacques Hiblot <jjhib...@ti.com>

These tests don't pass (with all of the other series applied as well,
and some warnings fixed up):
_________________________ test_ut[ut_dm_devm_mux_mmio] _________________________

u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 
0x7f2550b89890>
ut_subtest = 'dm devm_mux_mmio'

    def test_ut(u_boot_console, ut_subtest):
        """Execute a "ut" subtest."""
    
        output = u_boot_console.run_command('ut ' + ut_subtest)
>       assert output.endswith('Failures: 0')
E       assert False
E        +  where False = <built-in method endswith of str object at 
0x7f2550567030>('Failures: 0')
E        +    where <built-in method endswith of str object at 0x7f2550567030> 
= 'Test: dm_test_devm_mux_mmio: 
mux-mmio.c\r\r\n/builds/u-boot/u-boot/test/dm/mux-mmio.c:110, 
dm_test_devm_mux_mmio(): "...ux-mmio.c:110, dm_test_devm_mux_mmio(): "b-test" = 
dev_b->name: Expected "b-test", got "another-test"\r\r\nFailures: 2'.endswith

test/py/tests/test_ut.py:28: AssertionError
----------------------------- Captured stdout call -----------------------------
=> ut dm devm_mux_mmio

Test: dm_test_devm_mux_mmio: mux-mmio.c

/builds/u-boot/u-boot/test/dm/mux-mmio.c:110, dm_test_devm_mux_mmio(): "b-test" 
= dev_b->name: Expected "b-test", got "another-test"

Test: dm_test_devm_mux_mmio: mux-mmio.c (flat tree)

/builds/u-boot/u-boot/test/dm/mux-mmio.c:110, dm_test_devm_mux_mmio(): "b-test" 
= dev_b->name: Expected "b-test", got "another-test"

Failures: 2

=> 

Finally, clang-7 reports:
/home/trini/u-boot/u-boot/drivers/mux/mux-uclass.c:108:34: warning: variable 
'mux' is uninitialized when used here [-Wuninitialized]
        debug("%s(mux=%p)\n", __func__, mux);
                                        ^~~
/home/trini/u-boot/u-boot/include/log.h:188:28: note: expanded from macro 
'debug'
        debug_cond(_DEBUG, fmt, ##args)
                                  ^~~~
/home/trini/u-boot/u-boot/include/log.h:168:41: note: expanded from macro 
'debug_cond'
                        log(LOG_CATEGORY, LOGL_DEBUG, fmt, ##args); \
                                                             ^~~~
/home/trini/u-boot/u-boot/include/log.h:139:25: note: expanded from macro 'log'
                      pr_fmt(_fmt), ##_args); \
                                      ^~~~~
/home/trini/u-boot/u-boot/drivers/mux/mux-uclass.c:105:25: note: initialize the 
variable 'mux' to silence this warning
        struct mux_control *mux;
                               ^
                                = NULL

Thanks!

-- 
Tom

Attachment: signature.asc
Description: PGP signature

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to