From: Jean-Jacques Hiblot Date: Fri, 25 Oct 2019 11:32:13 +0200 Subject: [U-Boot] [PATCH v1 4/4] test: Add tests for the multiplexer framework In-Reply-To: <20191024234558.GB11173@bill-the-cat> References: <20191002124749.7503-1-jjhiblot@ti.com> <20191002124749.7503-5-jjhiblot@ti.com> <20191024234558.GB11173@bill-the-cat> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Tom, On 25/10/2019 01:45, Tom Rini wrote: > 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 > 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 = > 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 = ('Failures: 0') > E + where = '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 There has been some changes in the regmap support for sandbox. I'll rebase on top of master and send an updated version. Thanks JJ > > 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!