[PATCH 0/3] vpl: Correct some tests

It was reported that one of the VPL tests does not work. The problem turned out to be a leftover symlink that I had which made things work locally. This was not noticed in CI since the tests did not run there either.
This little series fixes these problems.
Simon Glass (3): vbe: Use the correct image filename in the test CI: Ensure that vpl test is run test: Run the VPL tests with 'make check'
.azure-pipelines.yml | 2 +- .gitlab-ci.yml | 2 +- test/py/tests/test_vbe_vpl.py | 6 ++++-- test/run | 5 +++++ 4 files changed, 11 insertions(+), 4 deletions(-)

At present this inadvertently relies on having a symlink to the correct file from the current directory. Use the correct path to fix this.
Signed-off-by: Simon Glass sjg@chromium.org ---
test/py/tests/test_vbe_vpl.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/py/tests/test_vbe_vpl.py b/test/py/tests/test_vbe_vpl.py index d1c9d0548ae..ed12d3a4618 100644 --- a/test/py/tests/test_vbe_vpl.py +++ b/test/py/tests/test_vbe_vpl.py @@ -15,6 +15,7 @@ def test_vbe_vpl(u_boot_console): #cmd = [cons.config.build_dir + fname, '-v'] ram = os.path.join(cons.config.build_dir, 'ram.bin') fdt = os.path.join(cons.config.build_dir, 'arch/sandbox/dts/test.dtb') + image_fname = os.path.join(cons.config.build_dir, 'image.bin')
# Enable firmware1 and the mmc that it uses. These are needed for the full # VBE flow. @@ -24,12 +25,13 @@ def test_vbe_vpl(u_boot_console): cons, f'fdtput -t s {fdt} /bootstd/firmware1 status okay') u_boot_utils.run_and_log( cons, f'fdtput -t s {fdt} /mmc3 status okay') + u_boot_utils.run_and_log( + cons, f'fdtput -t s {fdt} /mmc3 filename {image_fname}')
# Remove any existing RAM file, so we don't have old data present if os.path.exists(ram): os.remove(ram) - flags = ['-p', os.path.join(cons.config.build_dir, 'image.bin'), '-w', - '-s', 'state.dtb'] + flags = ['-p', image_fname, '-w', '-s', 'state.dtb'] cons.restart_uboot_with_flags(flags)
# Make sure that VBE was used in both VPL (to load SPL) and SPL (to load

This is actually skipped at present due to the condition in the file. Fix this by running all vpl tests.
Signed-off-by: Simon Glass sjg@chromium.org ---
.azure-pipelines.yml | 2 +- .gitlab-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 30025ff7517..3e213de4f41 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -253,7 +253,7 @@ stages: TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl" sandbox_vpl: TEST_PY_BD: "sandbox_vpl" - TEST_PY_TEST_SPEC: "test_vpl_help or test_spl" + TEST_PY_TEST_SPEC: "vpl or test_spl" sandbox_noinst: TEST_PY_BD: "sandbox_noinst" TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e320a24ef31..6eccff86b09 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -284,7 +284,7 @@ sandbox_noinst_test.py: sandbox_vpl test.py: variables: TEST_PY_BD: "sandbox_vpl" - TEST_PY_TEST_SPEC: "test_vpl_help or test_spl" + TEST_PY_TEST_SPEC: "vpl or test_spl" <<: *buildman_and_testpy_dfn
# Enable tracing and disable LTO, to ensure functions are not elided

On Tue, Feb 28, 2023 at 08:34:20PM -0700, Simon Glass wrote:
This is actually skipped at present due to the condition in the file. Fix this by running all vpl tests.
Signed-off-by: Simon Glass sjg@chromium.org
.azure-pipelines.yml | 2 +- .gitlab-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
This fails: https://source.denx.de/u-boot/u-boot/-/jobs/598435

Update the script to run VPL tests as well as the others.
Signed-off-by: Simon Glass sjg@chromium.org ---
test/run | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/test/run b/test/run index c4ab046ce8f..9e94ae23fb7 100755 --- a/test/run +++ b/test/run @@ -56,6 +56,11 @@ echo "${prompt}" run_test "sandbox_noinst" ./test/py/test.py --bd sandbox_noinst --build ${para} \ -k 'test_ofplatdata or test_handoff or test_spl'
+# Run tests which require sandbox_vpl +echo "${prompt}" +run_test "sandbox_vpl" ./test/py/test.py --bd sandbox_vpl --build ${para} \ + -k 'vpl or test_spl' + if [ -z "$tools_only" ]; then # Run tests for the flat-device-tree version of sandbox. This is a special # build which does not enable CONFIG_OF_LIVE for the live device tree, so we can
participants (2)
-
Simon Glass
-
Tom Rini