[Fuego] Multiple problems with busybox tests

Wang, Mingyu wangmy at cn.fujitsu.com
Thu Jun 14 08:55:15 UTC 2018


Hi Tim:

>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?
With regard to the test of this command, I need to investigate the source code of chvt first and see the logic of judgement when chvt switches tty.
After this, I'll discuss how to modify the case or skip the test with you.

>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.
I will add the judgement of expr in fuego_test.sh. If there is no expr command on board, then skip the test.

>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.
Thank you very much for making such a good suggestion. I'll look at this tool first, and then I'll discuss with you whether add the tool to test scripts or not.

by Wangmy

-----Original Message-----
From: Tim.Bird at sony.com [mailto:Tim.Bird at sony.com] 
Sent: Thursday, June 14, 2018 3:00 PM
To: Wang, Mingyu/王 鸣瑜 <wangmy at cn.fujitsu.com>; fuego at lists.linuxfoundation.org
Subject: RE: Multiple problems with busybox tests

> -----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