[U-Boot] sandbox does not complete efi_selftest

Heinrich Schuchardt xypron.glpk at gmx.de
Wed Sep 19 00:52:57 UTC 2018


On 09/19/2018 01:12 AM, Alexander Graf wrote:
> 
> 
> On 17.09.18 15:44, Heinrich Schuchardt wrote:
>> On 09/16/2018 07:45 AM, Simon Glass wrote:
>>> 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
>>>
>>
>>
>> With https://patchwork.ozlabs.org/patch/965315/ we can see where the
>> problem occurs. The ConsoleSandbox seems to hang on the detection of the
>> console size (172*42 is the size of my console). This problem does not
>> occur when running the same interactively.
> 
> I don't understand this. When I run u-boot with </dev/null it
> successfully times out and proceeds.
> 
> 
> Alex
> 

$ make mrproper && make sandbox_defconfig && make
$ ./u-boot -v -d u-boot.dtb -c 'bootefi selftest'

leads to a segmentation fault. See output below.

This is the segmentation fault that leads to OSError when running 'make
tests'.

Best regards

Heinrich Schuchardt

U-Boot 2018.09-00269-ga2b22dffcb (Sep 19 2018 - 02:47:16 +0200)

Model: sandbox
DRAM:  128 MiB

Warning: host_lo MAC addresses don't match:
Address in ROM is          f2:1a:c7:df:78:d4
Address in environment is  00:00:11:22:33:44

Warning: host_enp2s0 MAC addresses don't match:
Address in ROM is          f2:1a:c7:df:78:d4
Address in environment is  00:00:11:22:33:45

Warning: host_wlp4s0 using MAC address from ROM
MMC:
In:    cros-ec-keyb
Out:   vidconsole
Err:   vidconsole
Model: sandbox
SCSI:
Net:   eth0: host_lo, eth1: host_enp2s0, eth2: host_wlp4s0, eth3:
eth at 10002000
Found 0 disks
Segmentation fault


More information about the U-Boot mailing list