vpl: Correct some tests
v2 cover 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(-)
Signature · 1 line
2.40.0.348.gf938b09366-goog
PATCH v2 1/4 sandbox: Update the VBE firmware location
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.
---
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(-)
arch/sandbox/dts/test.dts +1 -1
@@ -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>;
Signature · 1 line
2.40.0.348.gf938b09366-goog
Re: [PATCH v2 1/4] sandbox: Update the VBE firmware location
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.
---
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!
PATCH v2 2/4 vbe: Use the correct image filename in the test
In reply to Simon GlassAt present this inadvertently relies on having a symlink to the correct file from the current directory. Use the correct path to fix this.
---
(no changes since v1)
test/py/tests/test_vbe_vpl.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
test/py/tests/test_vbe_vpl.py +4 -2
@@ -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
Signature · 1 line
2.40.0.348.gf938b09366-goog
Re: [PATCH v2 2/4] vbe: Use the correct image filename in the test
At present this inadvertently relies on having a symlink to the correct file from the current directory. Use the correct path to fix this.
---
(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!
PATCH v2 3/4 CI: Ensure that vpl test is run
In reply to Simon GlassThis is actually skipped at present due to the condition in the file. Fix this by running all vpl tests.
---
(no changes since v1)
.azure-pipelines.yml | 2 +- .gitlab-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
.azure-pipelines.yml +1 -1
@@ -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"
.gitlab-ci.yml +1 -1
@@ -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
Signature · 1 line
2.40.0.348.gf938b09366-goog
Re: [PATCH v2 3/4] CI: Ensure that vpl test is run
This is actually skipped at present due to the condition in the file. Fix this by running all vpl tests.
---
(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!
PATCH v2 4/4 test: Run the VPL tests with 'make check'
In reply to Simon GlassUpdate the script to run VPL tests as well as the others.
---
(no changes since v1)
test/run | 5 +++++ 1 file changed, 5 insertions(+)
test/run +5 -0
@@ -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
Signature · 1 line
2.40.0.348.gf938b09366-goog
Re: [PATCH v2 4/4] test: Run the VPL tests with 'make check'
Update the script to run VPL tests as well as the others.
---
(no changes since v1)
test/run | 5 +++++ 1 file changed, 5 insertions(+)
Applied to u-boot-dm/next, thanks!