[Fuego] Multiple problems with busybox tests

Tim.Bird at sony.com Tim.Bird at sony.com
Thu Jun 14 06:59:49 UTC 2018

> -----Original Message-----
> From: Wang, Mingyu
> Hi Tim:
> >I fixed many of them.  See commit  2f0661ce0 in my master branch.
> >Please look at the issues I resolved, and try to avoid them in future
> >patches:
> >- ls issues 'total' line
> > - some echos don't support -e
> >http://wiki.bash-hackers.org/syntax/pe#substring_removal
> >Can you please look at these and propose fixes.
> Thank you very much for making these suggestions, which is very helpful for
> me as a beginner.
> I will also pay attention to these issues in future patch.
> >A few tests are still not working for me.
> > - busybox_chvt.sh - tty returns either 'not a tty' or '/dev/pts/0'.
> >   - neither of these values is handled correctly by the script.
> As for the chvt command, because the test is performed by ssh remote login
> to board, the result of the execution of the command tty should be
> /dev/pts/0, so that the current test set is meaningless.
> Can it be tested like following:
> chvt 1
> echo $? = 0
> chvt 1000
> echo $?=1
> Because tty1 should exist, but tty1000 does not exist theoretically.
I'm not a vt expert, but this looks OK.  It's the logic to save the old vt and
restore it that has problems on most of my boards.  I'm not sure how to fix
that.  Maybe check specifically for vt '0', and don't try to restore the vt, or
SKIP the test?

> > - busybox_chroot.sh - line 17 'j=${i:1:5}' is a bashims not support on several
> of my boards
> >    - please find another way to extract the library path
> Whether it can be changed to the following:
> j=$(expr substr "$i" 2 5)
I think that would work, but Fuego does not require 'expr' on the target.
If you add a dependency check for 'expr', using that solution would be OK.

By the way, there is a handy tool called 'checkbashims'.  I know it's easily
obtainable in an Ubuntu system.  You might want to run this tool on all your
scripts, to see if there are any issues reported.
 -- Tim

More information about the Fuego mailing list