Re: [U-Boot] sandbox does not complete efi_selftest

2018-09-18 Thread Alexander Graf


On 18.09.18 17:52, Heinrich Schuchardt wrote:
> 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,

>>>
>>> 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 > 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@10002000
> Found 0 disks
> Segmentation fault
> 

With this patch I no longer see the segfault. I'm not sure though why
the calculated y value is so incredibly out of range (multiples of the
overall screen height).


diff --git a/drivers/video/console_truetype.c
b/drivers/video/console_truetype.c
index 30086600fb..e95c06442f 100644
--- a/drivers/video/console_truetype.c
+++ b/drivers/video/console_truetype.c
@@ -248,6 +248,8 @@ static int console_truetype_putc_xy(struct udevice
*dev, uint x, uint y,
, );
if (!data)
return width_frac;
+   if ((y + height) >= vid_priv->ysize)
+   return -EAGAIN;

/* Figure out where to write the character in the frame buffer */
bits = data;
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] sandbox does not complete efi_selftest

2018-09-18 Thread Heinrich Schuchardt
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  
>>> 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 s
>>> test/py/tests/test_bind.py ..
>>> test/py/tests/test_dfu.py s
>>> test/py/tests/test_efi_loader.py .s
>>> 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 
>>> 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 
>>> 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 

Re: [U-Boot] sandbox does not complete efi_selftest

2018-09-18 Thread Alexander Graf


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  
>> 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 s
>> test/py/tests/test_bind.py ..
>> test/py/tests/test_dfu.py s
>> test/py/tests/test_efi_loader.py .s
>> 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 
>> 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 
>> 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 https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] sandbox does not complete efi_selftest

2018-09-17 Thread Heinrich Schuchardt
On 09/16/2018 07:45 AM, Simon Glass wrote:
> 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

You have to ensure that the network interface used by the simple network
protocol is connected to a DHCP server for this test to succeed. The
loop interface is not a good choice.

> 
> 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.

This key is served by test_efi_selftest.py so this should not pose a
problem if the SandboxConsole class works correctly.

What really needs a fix is this segmentation fault for sandbox_defconfig:

$ valgrind ./u-boot -v -d u-boot.dtb  -c 'bootefi hello'
==12957== Memcheck, a memory error detector
==12957== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==12957== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==12957== Command: ./u-boot -v -d u-boot.dtb -c bootefi\ hello
==12957==


U-Boot 2018.09-00268-g05538f55c0 (Sep 18 2018 - 02:12:40 +0200)

Model: sandbox
DRAM:  128 MiB

Warning: host_lo MAC addresses don't match:
Address in ROM is  f2:49:6f:48:66:70
Address in environment is  00:00:11:22:33:44
==12957== Invalid read of size 1
==12957==at 0x1C5B3F: memcpy (string.c:526)
==12957==by 0x177653: eth_raw_bus_post_bind (sandbox-raw-bus.c:45)
==12957==by 0x15871A: device_bind_common.isra.0 (device.c:150)
==12957==by 0x1588CE: device_bind_with_driver_data (device.c:222)
==12957==by 0x15953C: lists_bind_fdt (lists.c:175)
==12957==by 0x1595D5: dm_scan_fdt_live (root.c:232)
==12957==by 0x159911: dm_extended_scan_fdt (root.c:338)
==12957==by 0x1599AD: dm_init_and_scan (root.c:384)
==12957==by 0x14458C: initr_dm (board_r.c:292)
==12957==by 0x1B23D5: initcall_run_list (initcall.c:30)
==12957==by 0x1445E8: board_init_r (board_r.c:879)
==12957==by 0x127568: main (start.c:321)
==12957==  Address 0x89171a3 is 0 bytes after a block of size 3 alloc'd
==12957==at 0x48357BF: malloc (vg_replace_malloc.c:299)
==12957==by 0x4B8FF49: strndup (strndup.c:43)
==12957==by 0x4C1BC90: if_nameindex_netlink (if_index.c:171)
==12957==by 0x4C1BC90: if_nameindex (if_index.c:208)
==12957==by 0x17757B: eth_raw_bus_post_bind (sandbox-raw-bus.c:23)
==12957==by 0x15871A: device_bind_common.isra.0 (device.c:150)
==12957==by 0x1588CE: device_bind_with_driver_data (device.c:222)
==12957==by 0x15953C: lists_bind_fdt (lists.c:175)
==12957==by 0x1595D5: dm_scan_fdt_live (root.c:232)
==12957==by 0x159911: dm_extended_scan_fdt (root.c:338)
==12957==by 0x1599AD: dm_init_and_scan (root.c:384)
==12957==by 0x14458C: initr_dm (board_r.c:292)
==12957==by 0x1B23D5: initcall_run_list (initcall.c:30)
==12957==
==12957== Invalid read of size 1
==12957==at 0x1C5B41: memcpy (string.c:527)
==12957==by 0x177653: eth_raw_bus_post_bind (sandbox-raw-bus.c:45)
==12957==by 0x15871A: device_bind_common.isra.0 (device.c:150)
==12957==by 0x1588CE: device_bind_with_driver_data (device.c:222)
==12957==by 0x15953C: lists_bind_fdt (lists.c:175)
==12957==by 0x1595D5: dm_scan_fdt_live (root.c:232)
==12957==by 0x159911: dm_extended_scan_fdt (root.c:338)
==12957==by 0x1599AD: dm_init_and_scan (root.c:384)
==12957==by 0x14458C: initr_dm (board_r.c:292)
==12957==by 0x1B23D5: initcall_run_list (initcall.c:30)
==12957==by 0x1445E8: board_init_r (board_r.c:879)
==12957==by 0x127568: main (start.c:321)
==12957==  Address 0x89171a4 is 1 bytes after a block of size 3 alloc'd
==12957==at 0x48357BF: malloc (vg_replace_malloc.c:299)
==12957==by 0x4B8FF49: strndup (strndup.c:43)
==12957==by 0x4C1BC90: if_nameindex_netlink (if_index.c:171)
==12957==by 0x4C1BC90: if_nameindex (if_index.c:208)
==12957==by 0x17757B: eth_raw_bus_post_bind (sandbox-raw-bus.c:23)
==12957==by 0x15871A: device_bind_common.isra.0 (device.c:150)
==12957==by 0x1588CE: device_bind_with_driver_data (device.c:222)
==12957==by 0x15953C: lists_bind_fdt (lists.c:175)
==12957==by 0x1595D5: dm_scan_fdt_live (root.c:232)
==12957==by 0x159911: dm_extended_scan_fdt (root.c:338)
==12957==by 0x1599AD: dm_init_and_scan (root.c:384)

Re: [U-Boot] sandbox does not complete efi_selftest

2018-09-17 Thread Heinrich Schuchardt
On 09/16/2018 07:45 AM, Simon Glass wrote:
> Hi Heinrich,
> 
> On 15 September 2018 at 22:02, Heinrich Schuchardt  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 s
> test/py/tests/test_bind.py ..
> test/py/tests/test_dfu.py s
> test/py/tests/test_efi_loader.py .s
> 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 
> 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 
> 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.


$ rm build-sandbox -rf && make tests
./test/run
+make O=/home/zfsdt/workspace/u-boot-build/denx/build-sandbox -s
sandbox_defconfig
+make O=/home/zfsdt/workspace/u-boot-build/denx/build-sandbox -s -j8
===
test session starts

Re: [U-Boot] sandbox does not complete efi_selftest

2018-09-17 Thread Heinrich Schuchardt
In efi_next the command

./u-boot -v -d selfconfig.dtb

leads to a segmentation fault for sandbox_defconfig.

The command is executed by ConsoleSandbox.get_spawn().

We cannot expect 'make tests' to succeed until this is fixed.

Valgrind indicates where the segmentation fault occurs:

==13906== Invalid read of size 4
==13906==at 0x14C4D7: find_id (bootstage.c:72)
==13906==by 0x14C564: bootstage_add_record (bootstage.c:106)
==13906==by 0x1C45FA: hang (hang.c:27)
==13906==by 0x144359: board_init_f (board_f.c:901)
==13906==by 0x127556: main (start.c:319)
==13906==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

Best regards

Heinrich
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] sandbox does not complete efi_selftest

2018-09-17 Thread Heinrich Schuchardt
On 09/17/2018 07:42 PM, Heinrich Schuchardt wrote:
> On 09/16/2018 07:45 AM, Simon Glass wrote:
>> Hi Heinrich,
>>
>> On 15 September 2018 at 22:02, Heinrich Schuchardt  
>> 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
> 
> with agraf/efi-next rebased on master it does not even compile:
> 
> make tests V=1
> 
> /usr/bin/ld: test/overlay/built-in.o: relocation R_X86_64_32 against
> `.rodata.str1.1' can not be used when making a PIE object; recompile
> with -fPIC

This patch is missing in efi-next:
https://patchwork.ozlabs.org/patch/965315/

Regards

Heinrich
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] sandbox does not complete efi_selftest

2018-09-17 Thread Heinrich Schuchardt
On 09/16/2018 07:45 AM, Simon Glass wrote:
> Hi Heinrich,
> 
> On 15 September 2018 at 22:02, Heinrich Schuchardt  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

With you git repository this fails with



Checking: https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/7.3.0/

Traceback (most recent call last):
  File "/home/zfsdt/temp/u-boot-dm/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'

Please, provide a reproducable way to show you problem.

Best regards

Heinrich


___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] sandbox does not complete efi_selftest

2018-09-17 Thread Heinrich Schuchardt
On 09/16/2018 07:45 AM, Simon Glass wrote:
> Hi Heinrich,
> 
> On 15 September 2018 at 22:02, Heinrich Schuchardt  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

with agraf/efi-next rebased on master it does not even compile:

make tests V=1

/usr/bin/ld: test/overlay/built-in.o: relocation R_X86_64_32 against
`.rodata.str1.1' can not be used when making a PIE object; recompile
with -fPIC

Regards

Heinrich

> ./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 s
> test/py/tests/test_bind.py ..
> test/py/tests/test_dfu.py s
> test/py/tests/test_efi_loader.py .s
> 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 
> 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 
> 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, 

Re: [U-Boot] sandbox does not complete efi_selftest

2018-09-15 Thread Simon Glass
Hi Heinrich,

On 15 September 2018 at 22:02, Heinrich Schuchardt  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 s
test/py/tests/test_bind.py ..
test/py/tests/test_dfu.py s
test/py/tests/test_efi_loader.py .s
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 
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 
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,