Re: [U-Boot] [PATCH 007/126] dm: test: Fix running of multiple test from command line

2019-10-06 Thread Bin Meng
On Fri, Oct 4, 2019 at 5:44 PM Bin Meng  wrote:
>
> On Wed, Sep 25, 2019 at 10:58 PM Simon Glass  wrote:
> >
> > At present when multiple 'ut dm' commands are executed, all but the first
> > is run with a flat tree, even if live tree is enabled. This is because the
> > live tree node pointer is set to NULL and never restored.
> >
> > This does not affect normal test running, which just runs all the test in
> > one go, but can be confusing when several individual tests are run during
> > the same U-Boot run.
> >
> > Correct this by restoring the pointer.
> >
> > Fixes: c166c47ba3 (dm: test: Add support for running tests with livetree)
> > Signed-off-by: Simon Glass 
> > ---
> >
> >  test/dm/test-main.c | 6 +-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
>
> Reviewed-by: Bin Meng 
> Tested-by: Bin Meng 

applied to u-boot-x86/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 007/126] dm: test: Fix running of multiple test from command line

2019-10-04 Thread Bin Meng
On Wed, Sep 25, 2019 at 10:58 PM Simon Glass  wrote:
>
> At present when multiple 'ut dm' commands are executed, all but the first
> is run with a flat tree, even if live tree is enabled. This is because the
> live tree node pointer is set to NULL and never restored.
>
> This does not affect normal test running, which just runs all the test in
> one go, but can be confusing when several individual tests are run during
> the same U-Boot run.
>
> Correct this by restoring the pointer.
>
> Fixes: c166c47ba3 (dm: test: Add support for running tests with livetree)
> Signed-off-by: Simon Glass 
> ---
>
>  test/dm/test-main.c | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>

Reviewed-by: Bin Meng 
Tested-by: Bin Meng 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 007/126] dm: test: Fix running of multiple test from command line

2019-09-25 Thread Simon Glass
At present when multiple 'ut dm' commands are executed, all but the first
is run with a flat tree, even if live tree is enabled. This is because the
live tree node pointer is set to NULL and never restored.

This does not affect normal test running, which just runs all the test in
one go, but can be confusing when several individual tests are run during
the same U-Boot run.

Correct this by restoring the pointer.

Fixes: c166c47ba3 (dm: test: Add support for running tests with livetree)
Signed-off-by: Simon Glass 
---

 test/dm/test-main.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/dm/test-main.c b/test/dm/test-main.c
index 5d79ce641d7..487d8b96275 100644
--- a/test/dm/test-main.c
+++ b/test/dm/test-main.c
@@ -188,8 +188,12 @@ static int dm_test_main(const char *test_name)
else
printf("Failures: %d\n", uts->fail_count);
 
+   /* Put everything back to normal so that sandbox works as expected */
+#ifdef CONFIG_OF_LIVE
+   gd->of_root = uts->of_root;
+#endif
gd->dm_root = NULL;
-   ut_assertok(dm_init(false));
+   ut_assertok(dm_init(IS_ENABLED(CONFIG_OF_LIVE)));
dm_scan_platdata(false);
dm_scan_fdt(gd->fdt_blob, false);
 
-- 
2.23.0.444.g18eeb5a265-goog

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