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

Yann E. MORIN yann.morin.1998 at free.fr
Tue Oct 5 05:33:51 UTC 2021


Edgar, All,

On 2021-10-04 22:46 +0200, Edgar Bonet spake thusly:
> As I suggested that the wrapping could be prevented by setting the
> "COLUMNS" environment variable to a large value (but no larger than
> 29999), Peter Korsgaard wrote:
> 
> > 29999 chars should be enough for anybody (tm) ;)
> >
> > Care to send a patch for this?
> 
> I would be happy to do so. However, as I am not familiar with this whole
> testing infrastructure, the patch would need to be tested by someone
> else.
> 
> Right now I am trying to check my hypothesis that setting COLUMNS=29999
> is enough to make ash (Busybox's shell) behave properly. And I found a
> little surprise: the command
> 
>     export COLUMNS=29999
> 
> does _not_ add the COLUMNS variable to the shell's environment. The
> variable is added to the environment of the processes started by the
> shell, but it is not in the environment of the shell itself. It doesn't
> prevent the shell from wrapping the commands at 80 columns.
> 
> Right now the fix I have in mind is to run
> 
>     COLUMNS=29999 exec sh

What about actually telling the shell the size we want::

    # stty columns 29999

Regards,
Yann E. MORIN.

> after logging in, at the end of the login() method. I just checked that
> reloading ash in this way does put the variable in the shell's
> environment, and does fix this wrapping behavior. At least on the copy
> of Busybox I compiled on my Ubuntu, I still have to test it on a
> Buildroot environment.
> 
> Does this sound like an appropriate fix?
> 
> Regards,
> 
> Edgar.
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'


More information about the buildroot mailing list