[U-Boot] [PATCH 1/1] test/py: catch errors occurring when reading the console
Simon Glass
sjg at chromium.org
Wed Sep 19 15:29:42 UTC 2018
Hi Heinrich,
On 18 September 2018 at 18:43, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> On 09/18/2018 07:23 PM, Stephen Warren wrote:
>> On 09/18/2018 11:21 AM, Heinrich Schuchardt wrote:
>>> Spawn.exept has a try block without 'except'.
>>>
>>> If no output is available an OSError may arise. Catch this exception and
>>> continue testing.
>>>
>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>>> Reviewed-by: Simon Glass <sjg at chromium.org>
>>> ---
>>> I suggest that Alex takes the patch because we need it when working on
>>> the
>>> efi-next branch.
>>>
>>> v2
>>> replace TAB by spaces
>>> fix typo in subject
>>
>> I'll point out that I still object to this.
>>
>
> On 09/18/2018 07:06 PM, Stephen Warren wrote:
>> This doesn't make sense at all. It catches all errors and ignores them.
>> It'll turn any error condition into a timeout (presumably, the expected
>> data being waited for will never appear) rather than dealing with it
>> immediately (due to the thrown exception). Why is this needed?
>>
>
> When the py test is running it is connected via pipes to the U-Boot
> process. If the U-Boot process ends due to a segmentation fault the
> pipes are broken. Trying to read from a broken pipe results in an OSError.
Your explanation makes sense to me. Did I miss Stephen's objection? What is it?
Can you please add the above paragraph or part of it to the commit
message and to a code comment?
Regards,
Simon
More information about the U-Boot
mailing list