[U-Boot] sandbox does not complete efi_selftest

Alexander Graf agraf at suse.de
Tue Sep 18 23:12:02 UTC 2018



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


More information about the U-Boot mailing list