Hi Tim,

 

Nice to have you back in the forum.

Hope you had a nice vacation.

 

Regarding your questions, please find my answers below.

So: 1) what shell are you using on target?

 

Answer: I did an echo $0 on my target '#' prompt it displayed '-sh'

            echo "$SHELL" displayed '/bin/sh' it is basically from 'buildroot'


and 2) what is the shell prompt on the target?

 

Answer: '#'

 

As I had written before, I executed 'serio-test.sh' from the host -> root@Ubuntu-1604-64bit:/serio# ./serio-test.sh ttyUSB0

and it worked perfectly with all 8 tests 'ok' and also the final 'cleanup'

The problem happens only if I run from within Jenkins as a job (Functional.fuego_board_check).

 

Regards,

Dhinakar

 

--------- Original Message ---------

Sender : Bird, Timothy <Tim.Bird@sony.com>

Date : 2017-04-26 03:16 (GMT+5:30)

Title : RE: [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0)

To : Dhinakar Kalyanasundaram<dhinakar.k@samsung.com>, null<fuego@lists.linuxfoundation.org>

CC : null<frowand.list@gmail.com>

 

> -----Original Message-----
> From Dhinakar Kalyanasundaram


> I executed the Functional.fuego_board_check test on my target board (serial
> port communication test).
> 
> I have some queries based on the console log which are listed below.
>
> 1. What is this recommendation in the console log?
> 
> **********************************************************
> **
> 
> == Fuego target feature scan results ==
> HAS_PROGRAM_CAT=1
> HAS_PROGRAM_LOGREAD=0
> 
> ...................................
> 
> ....................................
> 
> -------------------------------------
> Based on this scan,
> the recommended DISTRIB value should be:
>    distribs/nosyslogd.dist

This is a recommendation for the value to set DISTRIB to in your board file (in Fuego v1.1)
based on attributes of the target board that were discovered during the test.
It is there merely for reporting, and to suggest a DISTRIB value if one is not set.
(Actually, the DISTRIB should not have the 'distribs/' prefix anymore.  I'll fix that
in the test.)

> -------------------------------------
> RESULT=FAILURE - Missing 'pkill'
> One or more required items are missing
> -------------------------------------
This indicates that the target does not have the 'pkill' command.  This is not strictly necessary,
but some test cleanup operations may fail.
 
> 
> 
> 2. The errors that I get have been pasted below.
> 
> *******************************************************
> 
> 
> 
> ++ python /usr/local/bin/sersh -T 5 -b 115200 root@ttyUSB0
> <mailto:root@ttyUSB0>  'rm -rf
> /home/a/fuego.Functional.fuego_board_check
> /tmp/fuego.Functional.fuego_board_check'
> .fuego_board_check' ; r=$?; echo '
> ERROR: invalid literal for int() with base 10: '[[&&serio_cmd_done&&]]'
> 
I'm not sure what the actual problem is, but this error is coming from
serio trying to interpret the command delimiter as the response code for the
command.  The response code is supposed to be output on a line by itself,
immediately following the end-of-output delimiter, but you're getting
the end-of-output delimiter in place of the response code.  I'm not sure how
this could happen, but there's a comment in serio about having too long a
prompt, and possibly being related to the type of shell on the target.
See serio lines 418 to 424.

                       # FIXME - remote_cmd works ok if the remote shell that executes
                        #         remote_cmd is bash, but not if the remote shell that
                        #         executes remote_cmd is busybox sh.
                        #         This appears to be due to sh echoing a '\n' when the
                        #         input line is too long due to a large prompt.A
                        #         For example, if PS1='\w \$ ', and in the directory
                        #         /usr/data/frowand/tmp, then when remote_cmd is:
                        #             sh -c 'ls .' ; r=$?; echo '[[&&serio_cmd_done&&]]'; echo ${r}
                        #         sh splits the input with a '\n' before ' ${r}'

So: 1) what shell are you using on target?
and 2) what is the shell prompt on the target?

Based on your log, some commands are working fine on the target  - at least
some of the short ones, like "true" work without any problem.  So there's
definitely something funny going on here.

One last question.  Are the error lines identical between runs?
That is, are the line splits and error messages the exact same in the console logs?
That would indicate that this is not a race condition, but an actual length-related
or parsing error bug.
 -- Tim



> 
> ++ python /usr/local/bin/sersh -T 5 -b 115200 root@ttyUSB0
> <mailto:root@ttyUSB0>  'echo; uptime; echo; free; echo; df -h; echo; mount;
> echo; ps |grep -Fv '\''  ['\''; echo; cat /proc/interrupts; echo'
> '  ['; echo; cat /proc/interrupts; echo' ; r=$?; echo '
> ERROR: invalid literal for int() with base 10: 'echo ${r}'
> 
> 
> 
> ++ python /usr/local/bin/sersh -T 5 -b 115200 root@ttyUSB0
> <mailto:root@ttyUSB0>  'if [ ! -d /home/a ]; then mkdir -p /home/a; fi'
> # #
> # echo '[''[&&serio_cmd_done&&]]'
> 
> ERROR: invalid literal for int() with base 10: "# sh -c 'if [ ! -d /home/a ]; then
> mkdir -p /home/a; fi' ; r=$?; echo '[[&&serio\r"
> 
> 
> 
> ++ python /usr/local/bin/sersh -T 5 -b 115200 root@ttyUSB0
> <mailto:root@ttyUSB0>  'rm -rf
> /home/a/fuego.Functional.fuego_board_check
> /tmp/fuego.Functional.fuego_board_check; mkdir -p
> /home/a/fuego.Functional.fuego_board_check'
> .fuego_board_check; mkdir -p
> /home/a/fuego.Functional.fuego_board_check' ; r=$?;
>  echo '
> ERROR: invalid literal for int() with base 10: '[[&&serio_cmd_done&&]]'
> 
> 
> 
> ++ python /usr/local/bin/sersh -T 5 -b 115200 root@ttyUSB0
> <mailto:root@ttyUSB0>  'if [ ! -f
> /tmp/fuego.Functional.fuego_board_check/fake-syslog ] ; then   mkdir -p
> /tmp/fuego.Functional.fuego_board_check ; touch
> /tmp/fuego.Functional.fuego_board_check/fake-syslog ; fi ;   echo Starting
> test xxxx-serial.default.Functional.fuego_board_check >>
> /tmp/fuego.Functional.fuego_board_check/fake-syslog'
> 
mkdir -p /tmp/fuego.Functional.fuego_board_check ; touch
> /tmp/fuego.Functional.f
> uego_board_check/fake-syslog ; fi ; 
echo Starting test xxxx-
> serial.default.Funct
> ional.fuego_board_check >>
> /tmp/fuego.Functional.fuego_board_check/fake-syslog'
> ; r=$?; echo '
> ERROR: invalid literal for int() with base 10: '[[&&serio_cmd_done&&]]'
>