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

Edgar Bonet bonet at grenoble.cnrs.fr
Mon Oct 4 20:46:07 UTC 2021


Hello!

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

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.


More information about the buildroot mailing list