[PATCH v2 0/4] 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.
Changes in v2: - Add new patch to update the VBE firmware location
Simon Glass (4): sandbox: Update the VBE firmware location 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 +- arch/sandbox/dts/test.dts | 2 +- test/py/tests/test_vbe_vpl.py | 6 ++++-- test/run | 5 +++++ 5 files changed, 12 insertions(+), 5 deletions(-)

The image size was increased but the firmware-update part was not updated. Correct this so that VBE firmware update can succeed with sandbox_vpl.
Signed-off-by: Simon Glass sjg@chromium.org Fixes: 85c66dc95c2 ("sandbox: Expand size for VPL image") ---
Changes in v2: - Add new patch to update the VBE firmware location
arch/sandbox/dts/test.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index d72d7a567a71..7c1ee71cb7c2 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -129,7 +129,7 @@ status = "disabled"; compatible = "fwupd,vbe-simple"; storage = "mmc3"; - skip-offset = <0x400000>; + skip-offset = <0x800000>; area-start = <0>; area-size = <0xe00000>; state-offset = <0xdffc00>;

The image size was increased but the firmware-update part was not updated. Correct this so that VBE firmware update can succeed with sandbox_vpl.
Signed-off-by: Simon Glass sjg@chromium.org Fixes: 85c66dc95c2 ("sandbox: Expand size for VPL image") ---
Changes in v2: - Add new patch to update the VBE firmware location
arch/sandbox/dts/test.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-dm/next, thanks!

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 ---
(no changes since v1)
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 d1c9d0548ae0..ed12d3a46186 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

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 ---
(no changes since v1)
test/py/tests/test_vbe_vpl.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Applied to u-boot-dm/next, thanks!

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 ---
(no changes since v1)
.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 5594a67d6b52..64da11e87f51 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -263,7 +263,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 5431bf6011a6..2a423744c504 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -301,7 +301,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

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 ---
(no changes since v1)
.azure-pipelines.yml | 2 +- .gitlab-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Applied to u-boot-dm/next, thanks!

Update the script to run VPL tests as well as the others.
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
test/run | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/test/run b/test/run index 93b556f6cffc..768b22577c49 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

Update the script to run VPL tests as well as the others.
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
test/run | 5 +++++ 1 file changed, 5 insertions(+)
Applied to u-boot-dm/next, thanks!
participants (1)
-
Simon Glass