[Buildroot] Issue with capture of emulator output in runtime test infra

Thomas Petazzoni thomas.petazzoni at bootlin.com
Mon Oct 4 12:14:55 UTC 2021


On Mon, 04 Oct 2021 13:52:06 +0200
Peter Korsgaard <peter at korsgaard.com> wrote:

>  > While we would have expected output[] to contain just a single element,
>  > "200", which is really the only output of the command. For now, I've
>  > worked around this by looking at output[-1] in my test case, which is
>  > good enough because I only care about one line of output.  
> 
>  > However, I'm not really sure how to fix this in the Emulator.run() core
>  > itself. Perhaps we should not be using the -serial stdio (which
>  > requires interacting on stdin/stdout), but instead use a separate
>  > telnet port (but then there's always the issue of which port to use) ?  
> 
> Just a hack, but how about we add a marker after each shell command (#
> MARKER) and just strip everything util after the marker?

Hm, why not. Indeed a hack, though :-/

The problem with the telnet mechanism is that you need to specify a TCP
port that is available. Tricky, especially if you run multiple test
cases in parallel.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com


More information about the buildroot mailing list