mbox series

[v2,0/1] Change the serial runner usage

Message ID 20230303090139.207454-1-lrannou@baylibre.com
Headers show
Series Change the serial runner usage | expand

Message

Louis Rannou March 3, 2023, 9:01 a.m. UTC
The actual serial runner has a different usage compare to the ssh runner. The
return status is different and failure are not raised as exceptions.

Initially, I wanted to create a new run_serial_socket and modify the old
run_serial to use the former. And there was a second patch that changed every
call to run_serial to run_serial_socket. But that is not easy as each test
can have a different manner to handle the exception.

Therefore, this patch only suggest a new runner and add a comment to deprecate
the former runner.

Louis Rannou (1):
  oeqa/utils/qemurunner: change the serial runner usage

 meta/lib/oeqa/targetcontrol.py    |  3 ++
 meta/lib/oeqa/utils/qemurunner.py | 57 +++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)


base-commit: 76db0baba26a5da5382f7cc44c64eb705e24e638

Comments

Richard Purdie March 29, 2023, 10:53 a.m. UTC | #1
On Fri, 2023-03-03 at 10:01 +0100, Louis Rannou wrote:
> The actual serial runner has a different usage compare to the ssh runner. The
> return status is different and failure are not raised as exceptions.
> 
> Initially, I wanted to create a new run_serial_socket and modify the old
> run_serial to use the former. And there was a second patch that changed every
> call to run_serial to run_serial_socket. But that is not easy as each test
> can have a different manner to handle the exception.
> 
> Therefore, this patch only suggest a new runner and add a comment to deprecate
> the former runner.
> 
> Louis Rannou (1):
>   oeqa/utils/qemurunner: change the serial runner usage
> 
>  meta/lib/oeqa/targetcontrol.py    |  3 ++
>  meta/lib/oeqa/utils/qemurunner.py | 57 +++++++++++++++++++++++++++++++
>  2 files changed, 60 insertions(+)

Sorry about the late reply to this. I think the idea of the new runner
is great and we should improve and clean this up.

As the patch stands, it creates a largely duplicate function with no
users. Experience shows this tends to bitrot quickly.

For that reason I'm reluctant to take just this change without
converting at least some of the existing users to use the new API.

Ideally we'd convert everything but at the very least the new function
should be usable by a decent chunk of the existing code, even if we
have to adjust it to make that work.

Cheers,

Richard
Louis Rannou March 31, 2023, 7:50 a.m. UTC | #2
On 29/03/2023 12:53, Richard Purdie wrote:
> On Fri, 2023-03-03 at 10:01 +0100, Louis Rannou wrote:
>> The actual serial runner has a different usage compare to the ssh runner. The
>> return status is different and failure are not raised as exceptions.
>>
>> Initially, I wanted to create a new run_serial_socket and modify the old
>> run_serial to use the former. And there was a second patch that changed every
>> call to run_serial to run_serial_socket. But that is not easy as each test
>> can have a different manner to handle the exception.
>>
>> Therefore, this patch only suggest a new runner and add a comment to deprecate
>> the former runner.
>>
>> Louis Rannou (1):
>>    oeqa/utils/qemurunner: change the serial runner usage
>>
>>   meta/lib/oeqa/targetcontrol.py    |  3 ++
>>   meta/lib/oeqa/utils/qemurunner.py | 57 +++++++++++++++++++++++++++++++
>>   2 files changed, 60 insertions(+)
> 
> Sorry about the late reply to this. I think the idea of the new runner
> is great and we should improve and clean this up.
> 
> As the patch stands, it creates a largely duplicate function with no
> users. Experience shows this tends to bitrot quickly.
> 
> For that reason I'm reluctant to take just this change without
> converting at least some of the existing users to use the new API.
> 
> Ideally we'd convert everything but at the very least the new function
> should be usable by a decent chunk of the existing code, even if we
> have to adjust it to make that work.

Hello,
You're right. I'll send a v3 changing some tests using that serial runner.

Thanks,
Louis