[U-Boot] sandbox does not complete efi_selftest

Simon Glass sjg at chromium.org
Sun Sep 16 05:45:38 UTC 2018


Hi Heinrich,

On 15 September 2018 at 22:02, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> Hello Simon,
>
> in the chat with Alex you indicated that you see a problem with
> efi_selftest expecting an input before resetting the board.
>
> I do not understand why this should be a problem with sandbox. There
> never was a problem with the Python tests for any other board.
>
> Could you, please, detail where the issue is and how it can be reproduced.

Using u-boot-dm/ef-working I see this:

$ make tests
./test/run
+make O=build-sandbox -s sandbox_defconfig
+make O=build-sandbox -s -j8
============================= test session starts ==============================
platform linux2 -- Python 2.7.13, pytest-3.0.6, py-1.4.34, pluggy-0.4.0
rootdir: test/py, inifile: pytest.ini
collected 326 items

test/py/tests/test_000_version.py .
test/py/tests/test_avb.py sssss
test/py/tests/test_bind.py ..
test/py/tests/test_dfu.py s
test/py/tests/test_efi_loader.py .sssss
test/py/tests/test_efi_selftest.py FF
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File
"/usr/lib/python2.7/dist-packages/_pytest/main.py", line 98, in
wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File
"/usr/lib/python2.7/dist-packages/_pytest/main.py", line 133, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File
"/usr/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py",
line 745, in __call__
INTERNALERROR>     return self._hookexec(self, self._nonwrappers +
self._wrappers, kwargs)
INTERNALERROR>   File
"/usr/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py",
line 339, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File
"/usr/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py",
line 334, in <lambda>
INTERNALERROR>     _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR>   File
"/usr/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py",
line 614, in execute
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File
"/usr/lib/python2.7/dist-packages/_pytest/main.py", line 154, in
pytest_runtestloop
INTERNALERROR>     item.config.hook.pytest_runtest_protocol(item=item,
nextitem=nextitem)
INTERNALERROR>   File
"/usr/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py",
line 745, in __call__
INTERNALERROR>     return self._hookexec(self, self._nonwrappers +
self._wrappers, kwargs)
INTERNALERROR>   File
"/usr/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py",
line 339, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File
"/usr/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py",
line 334, in <lambda>
INTERNALERROR>     _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR>   File
"/usr/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py",
line 613, in execute
INTERNALERROR>     return _wrapped_call(hook_impl.function(*args), self.execute)
INTERNALERROR>   File
"/usr/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py",
line 254, in _wrapped_call
INTERNALERROR>     return call_outcome.get_result()
INTERNALERROR>   File
"/usr/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py",
line 280, in get_result
INTERNALERROR>     _reraise(*ex)  # noqa
INTERNALERROR>   File
"/usr/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py",
line 265, in __init__
INTERNALERROR>     self.result = func()
INTERNALERROR>   File
"/usr/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py",
line 614, in execute
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "test/py/conftest.py", line 577, in
pytest_runtest_protocol
INTERNALERROR>     console.drain_console()
INTERNALERROR>   File "test/py/u_boot_console_base.py", line 306, in
drain_console
INTERNALERROR>     self.p.expect(['This should never match U-Boot output'])
INTERNALERROR>   File "test/py/u_boot_spawn.py", line 174, in expect
INTERNALERROR>     c = os.read(self.fd, 1024)
INTERNALERROR> OSError: [Errno 5] Input/output error

=============== 2 failed, 4 passed, 11 skipped in 17.08 seconds ================
+make O=build-sandbox_spl -s sandbox_spl_defconfig
+make O=build-sandbox_spl -s -j8
============================= test session starts ==============================
platform linux2 -- Python 2.7.13, pytest-3.0.6, py-1.4.34, pluggy-0.4.0
rootdir: test/py, inifile: pytest.ini
collected 320 items

test/py/tests/test_ofplatdata.py .

============================= 319 tests deselected =============================
=================== 1 passed, 319 deselected in 0.21 seconds ===================
+make O=build-sandbox_flattree -s sandbox_flattree_defconfig
+make O=build-sandbox_flattree -s -j8
============================= test session starts ==============================
platform linux2 -- Python 2.7.13, pytest-3.0.6, py-1.4.34, pluggy-0.4.0
rootdir: test/py, inifile: pytest.ini
collected 321 items

test/py/tests/test_000_version.py .
test/py/tests/test_avb.py sssss
test/py/tests/test_bind.py ss
test/py/tests/test_dfu.py s
test/py/tests/test_efi_loader.py .sssss
test/py/tests/test_efi_selftest.py sss
test/py/tests/test_env.py ............
test/py/tests/test_fit.py s
test/py/tests/test_fpga.py sssssssssssssssssssssssssss
test/py/tests/test_gpt.py sssssss
test/py/tests/test_help.py .
test/py/tests/test_hush_if_test.py
......................................................s
test/py/tests/test_log.py ..
test/py/tests/test_md.py ..
test/py/tests/test_mmc_rd.py s
test/py/tests/test_net.py .sssss
test/py/tests/test_ofplatdata.py s
test/py/tests/test_sandbox_exit.py ss
test/py/tests/test_sf.py ssss
test/py/tests/test_shell_basics.py ....
test/py/tests/test_sleep.py .
test/py/tests/test_tpm2.py ...........
test/py/tests/test_ums.py s
test/py/tests/test_unknown_cmd.py .
test/py/tests/test_ut.py
...................................................................................................................................................................
test/py/tests/test_vboot.py s

==================== 254 passed, 67 skipped in 9.23 seconds ====================
<unittest.result.TestResult run=110 errors=0 failures=0>
<unittest.result.TestResult run=12 errors=0 failures=0>
Checking: https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/7.3.0/
<unittest.result.TestResult run=35 errors=0 failures=1>
Traceback (most recent call last):
  File "tools/buildman/test.py", line 426, in testToolchainDownload
    self.toolchains.LocateArchUrl('arm'))
AssertionError:
'https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/x86_64-gcc-4.9.0-nolibc_arm-unknown-linux-gnueabi.tar.xz'
!= 'https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/7.3.0/x86_64-gcc-7.3.0-nolibc_arm-linux-gnueabi.tar.xz'

/tmp/binman.ddKM14/source.dtb: Warning (clocks_property):
/phandle-source:clocks: Could not get phandle node for (cell 0)
/tmp/binman.ddKM14/source.dtb: Warning (clocks_property):
/phandle-source2: Missing property '#clock-cells' in node
/phandle-target or bad phandle (referred from clocks[0])
<unittest.result.TestResult run=22 errors=0 failures=0>
<unittest.result.TestResult run=110 errors=0 failures=0>
100%
/tmp/binman.Z_3MuD/source.dtb: Warning (clocks_property):
/phandle-source:clocks: Could not get phandle node for (cell 0)
/tmp/binman.Z_3MuD/source.dtb: Warning (clocks_property):
/phandle-source2: Missing property '#clock-cells' in node
/phandle-target or bad phandle (referred from clocks[0])
<unittest.result.TestResult run=22 errors=0 failures=0>
100%
<unittest.result.TestResult run=31 errors=0 failures=0>
100%
Tests FAILED
Makefile:1711: recipe for target 'tests' failed
make: *** [tests] Error 1


When I run

$ sandbox/u-boot -D -c "bootefi selftest"

I get at the end the network timeout failure:

Setting up 'simple network protocol'
Failed to open socket: 1 Operation not permitted
Failed to open socket: 1 Operation not permitted
Failed to open socket: 1 Operation not permitted
Setting up 'simple network protocol' succeeded

Executing 'simple network protocol'
DHCP Discover
DHCP Discover
DHCP Discover
DHCP Discover
DHCP Discover
DHCP Discover
DHCP Discover
DHCP Discover
DHCP Discover
DHCP Discover
lib/efi_selftest/efi_selftest_snp.c(311):
ERROR: Timeout occurred
lib/efi_selftest/efi_selftest.c(109):
ERROR: Executing 'simple network protocol' failed

Tearing down 'simple network protocol'
Tearing down 'simple network protocol' succeeded


and then at the end:

Summary: 1 failures

Preparing for reset. Press any key...
resetting ...

Here it hangs waiting for a key.

Also can I suggest removing some of the output when it runs the tests?
For example, this seems like boilerplate to me:

Setting up 'event services'
Setting up 'event services' succeeded

Executing 'event services'
Executing 'event services' succeeded

Regards,
Simon


More information about the U-Boot mailing list