All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0)
@ 2017-05-05 18:11 Bird, Timothy
       [not found] ` <CGME20170505181150epcas3p148ba4fc7113cc70e7a21473ca34f2930@epcms5p5>
  0 siblings, 1 reply; 14+ messages in thread
From: Bird, Timothy @ 2017-05-05 18:11 UTC (permalink / raw)
  To: dhinakar.k, fuego



> -----Original Message-----
> From: Dhinakar Kalyanasundaram on Wednesday, May 03, 2017 8:35 PM
> To: Bird, Timothy <Tim.Bird@sony.com>; fuego@lists.linuxfoundation.org
> Cc: Dhinakar Kalyanasundaram <dhinakar.k@samsung.com>
> Subject: RE: RE: RE: RE: RE: [Fuego] Functional.fuego_board_check test
> failure - console log (/dev/ttyUSB0)
> 
> Hi Tim,
> 
> 
> 
> Thanks for the prompt response.
> 
> We are using gcc-linaro-aarch64-linux-gnu-4.8-2014.01_linux.tar.xz toolchain
> in our project.
> 
> It can be found here ->
> https://releases.linaro.org/archive/14.01/components/toolchain/binaries/
> 
> As you mentioned I have manually downloaded it and untarred into
> /home/dhinakar/fuego/fuego-ro/toolchains/aarch64-toolchain/gcc-linaro-
> aarch64-linux-gnu-4.8-2014.01_linux/ folder
> 
> I think I missed to setup the environment variables such as CC, CPP, AS, LD,
> etc. I will try setting them. Do you have any sample {PLATFORM}-tools.sh file
> for ARM platform?

Yes.

/fuego-ro/toolchains/poky-qemuarm-tools.sh is provided as an example of
what the {PLATFORM}-tools.sh file should look like for an OpenEmbedded or
Yocto Project SDK.  It is provided as an example for users to copy, even though
Fuego itself does not provide a poky SDK.  In that particular example, it expects
that the user would install the poky SDK into /fuego-ro/toolchains/poky/2.0.1, 
performing the installation inside the container, as described on this page:
   http://bird.org/fuego/Adding_a_toolchain


The second script is 'qemu-armv7hf-tools.sh'.  This uses a Debian cross-toolchain
that can be installed using the script: /fuego-ro/toolchains/install_armhf_toolchain.sh.
For size reasons and build-time reasons, we decided not to include the Debian ARM
cross-compiler toolchains in the container image by default.

For more information about this, see:
http://bird.org/fuego/Adding_a_toolchain#Installing_a_Debian_cross-toolchain_target

Note that that page refers to 'install_cross_toolchain.sh', as the script has been changed
in the 'next' branch to be able to install lots of different Debian cross toolchains. (We've
gotten a bit ahead of ourselves in the documentation).

The script 'qemu-armv7hf-tools.sh' uses the 'export_tools' function I recommended
to you for your aarch64-linux-tools.sh script.
 
> 
> The tools.sh script scans for toolchains
> ${FUEGO_RO}/toolchains/${PLATFORM}-tools.sh, but I don't see toolchains
> downloaded and kept under 'toolchains' folder for poky-qemuarm, qemu-
> armv7hf etc.
No - the poky-qemuarm one is an example only.
The qemu-arm7hf requires that you run 'install-armhf-toolchain.sh' in order
to work.  Probably a note should be added to qemu-arm7hf-tools.sh to
help explain this.

> 
> Are the toolchains downloaded during test and used for cross compiling and
> later deleted? But the test runs so fast, so I doubt it.

No. see above.

> Can you please explain how exactly it works?
See above.

> 
> To answer your other question, aarch64-linux-gnu-gcc is available under
> /home/dhinakar/fuego/fuego-ro/toolchains/aarch64-toolchain/gcc-linaro-
> aarch64-linux-gnu-4.8-2014.01_linux/bin directory.

That's what I thought.  I think you can just edit the aarch64-linux-tools.sh file
as I explained (add a line to modify the PATH, and a line to call 'export_tools')
and it should work.
 
> 
> 
> Regards,
> 
> Dhinakar,
> 
> Senior Technical Manager,
> 
> 2-07-537, Phoenix Building,
> 
> +91-9902007650
> 
> Samsung Research Institute, Bangalore.
> 
> 
> 
> 
> 
> --------- Original Message ---------
> 
> Sender : Bird, Timothy <Tim.Bird@sony.com>
> 
> Date : 2017-05-03 22:36 (GMT+5:30)
> 
> Title : RE: RE: RE: RE: [Fuego] Functional.fuego_board_check test failure -
> console log (/dev/ttyUSB0)
> 
> To : Dhinakar Kalyanasundaram<dhinakar.k@samsung.com>,
> null<fuego@lists.linuxfoundation.org>
> 
> 
> 
> Comment inline below.
> 
> > -----Original Message-----
> > From: Dhinakar Kalyanasundaram on Wednesday, May 03, 2017 5:35 AM
> >
> > Thanks a lot for you tip.
> >
> > I built bash for the target and 'Functional.fuego_board_check' test passes
> > now.
> >
> > Thanks a lot for the tip.
> >
> > Now I tried to execute 'Functional.hello_world' test to check if it picks up
> the
> > cross compiler properly.
> >
> > But it seems it is compiling hello.c for x86_64 only even though I have
> > configured aarch64-toolchain and board.
> >
> > Please find below the my serial board configuration
> > (/home/dhinakar/fuego/fuego-ro/boards) and toolchain configuration
> > (/home/dhinakar/fuego/fuego-ro/toolchains) details.
> >
> > Please let me know what is wrong with the configuration.
> >
> >
> >
> > Board Configuration
> >
> > inherit "base-board"
> > include "base-params"
> > include "base-funcs"
> >
> > SERIAL="ttyUSB0"
> > BAUD="115200"
> > LOGIN="root"
> > BOARD_TESTDIR="/home/a"
> > PASSWORD="abcd@123 <mailto:abcd@123> "
> > PLATFORM="aarch64-linux"
> This looks OK.
> 
> > TRANSPORT="serial"
> > IO_TIME_SERIAL="5"
> > ARCHITECTURE="arm"
> > DISTRIB="nosyslogd.dist"
> >
> > SATA_DEV="/dev/sdb1"
> > SATA_MP="/mnt/sata"
> >
> > USB_DEV="/dev/sda1"
> > USB_MP="/mnt/usb"
> >
> > MMC_DEV="/dev/mmcblk0p2"
> > MMC_MP="/mnt/mmc"
> >
> > BENCHMARK_DHRYSTONE_LOOPS="100000000"
> >
> > LTP_OPEN_POSIX_SUBTEST_COUNT_POS="1319"
> > LTP_OPEN_POSIX_SUBTEST_COUNT_NEG="169"
> >
> > EXPAT_SUBTEST_COUNT_POS="1769"
> > EXPAT_SUBTEST_COUNT_NEG="41"
> >
> > FUNCTIONAL_SCIFAB_RES_LINES_COUNT="1"
> > FUNCTIONAL_STRESS_FAIL_CASE_COUNT="1"
> > FUNCTIONAL_CMT_FAIL_CASE_COUNT="1"
> > FUNCTIONAL_SCIFAB_FAIL_CASE_COUNT="1"
> > FUNCTIONAL_BZIP2_FAIL_CASE_COUNT="1"
> >
> > FUNCTIONAL_SDHI_0_RES_LINES_COUNT="1"
> > BENCHMARK_NETPERF_FAIL_CASE_COUNT="1"
> >
> > BENCHMARK_SIGNALTEST_FAIL_CASE_COUNT="1"
> >
> > BENCHMARK_OPENSSL_FAIL_CASE_COUNT="1"
> >
> >
> > aarch64-linux-tools.sh (toolchain) configuration
> >
> > # fuego toolchain script
> > # this sets up the environment needed for fuego to use a toolchain
> > # this includes the following variables:
> > # CC, CXX, CPP, CXXCPP, CONFIGURE_FLAGS, AS, LD, ARCH
> > # CROSS_COMPILE, PREFIX, HOST, SDKROOT
> > # CFLAGS and LDFLAGS are optional
> > #
> > # this script should be sourced by ${FUEGO_RO}/toolchains/tools.sh
> >
> > AARCH64_SDK_ROOT=${FUEGO_RO}/toolchains/aarch64-toolchain/gcc-
> > linaro-aarch64-linux-gnu-4.8-2014.01_linux
> > export ARCH=arm
> > export SDKROOT=${AARCH64_SDK_ROOT}/bin/aarch64-linux-gnu
> >
> > # the Yocto project environment setup script changes PATH so that python
> > uses
> > # libs from sysroot, which is not what we want, so save the original path
> > # and use it later
> > ORIG_PATH=$PATH
> >
> > PREFIX=aarch64-linux-gnu
> (Probably need to call 'export_tools' here)
> > # source ${AARCH64_SDK_ROOT}/bin/aarch64-linux-gnu
> >
> > #HOST=aarch64-linux-gnu-
> >
> > # don't use PYTHONHOME from environment setup script
> > unset PYTHONHOME
> > env -u PYTHONHOME
> 
> I don't see anywhere in this script that actually sets up the environment
> variables for the cross-compiler (CC, CPP, AS, LD, etc.)
> 
> The most common patterns for this are to use the helper routine
> export_tools
> which is found in /fuego-ro/toolchains/tools.sh, or to use the
> 'environment-setup...' script for an OpenEmbedded or Yocto Project SDK.
> export_tools uses the PREFIX to set the values for AS, CC, CXX, AR, RANLIB,
> CPP,
> CXXCPP, LD, LDFLAGS, CROSS_COMPILE, HOST and CONFIGURE_FLAGS.
> 
> > Note: I have kept the toolchain under /home/dhinakar/fuego/fuego-
> > ro/toolchains folder
> 
> I'm not sure what this means.  Do you mean that you installed the toolchain
> there?
> Specifically, where is the file: aarch64-linux-gnu-gcc
> 
> I presume it is in /home/dhinakar/fuego/fuego-ro/toolchains/gcc-linaro-
> aarch64-linux-gnu-4.8-2014.01_linux/bin
> 
> In your aarch64-linux-tools.sh file, you should have:
> PATH=$PATH: ${AARCH64_SDK_ROOT}/bin
> and after setting your PREFIX a call to export_tools.
> 
> I'm not that familiar with Linaro tools, but I presume you have to install the
> runtime-gcc-linaro package as well,
> and that is needs to be somewhere that gcc can find it. I'm not sure though.
> 
> How did you install the toolchain - by manually untarring them, or by installing
> debian packages?
> 
>  -- Tim
> 
> 
> 
> 
> <http://ext.samsung.net/mail/ext/v1/external/status/update?userid=dhina
> kar.k&do=bWFpbElEPTIwMTcwNTA0MDMzNDUxZXBjbXM1cDQwNDA3MGE
> yOGVhM2Y1N2FkZDZhN2UyNzVjNTYwY2UzNSZyZWNpcGllbnRBZGRyZXNzP
> VRpbS5CaXJkQHNvbnkuY29t>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0)
       [not found] ` <CGME20170505181150epcas3p148ba4fc7113cc70e7a21473ca34f2930@epcms5p5>
@ 2017-05-11  9:35   ` Dhinakar Kalyanasundaram
  2017-05-12  5:04     ` Bird, Timothy
  0 siblings, 1 reply; 14+ messages in thread
From: Dhinakar Kalyanasundaram @ 2017-05-11  9:35 UTC (permalink / raw)
  To: Bird, Timothy, fuego

[-- Attachment #1: Type: text/html, Size: 12320 bytes --]

[-- Attachment #2: 201602111742151_N3WZA6X7.png --]
[-- Type: image/png, Size: 33527 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0)
  2017-05-11  9:35   ` Dhinakar Kalyanasundaram
@ 2017-05-12  5:04     ` Bird, Timothy
  0 siblings, 0 replies; 14+ messages in thread
From: Bird, Timothy @ 2017-05-12  5:04 UTC (permalink / raw)
  To: dhinakar.k, fuego



> -----Original Message-----
> From: Dhinakar Kalyanasundaram on  Thursday, May 11, 2017 2:35 AM
> Hi Tim,
> 
> Thanks a lot for the tips, I was successfully able to setup our cross compiler
> and run some tests.

That's great news.

> 
> Some tests fail, I will report it later after analysis (if found to be some issue
> with fuego).
Sounds good.  I appreciate the feedback.

> 
> Can you reply to my other email with subject 'Setup Build Trigger based on
> Git/Gerrirt events' if you have some idea on that?

OK - I'll reply to that one.
 -- Tim


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0)
       [not found]     ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p4>
@ 2017-05-04  3:34       ` Dhinakar Kalyanasundaram
  0 siblings, 0 replies; 14+ messages in thread
From: Dhinakar Kalyanasundaram @ 2017-05-04  3:34 UTC (permalink / raw)
  To: Bird, Timothy, fuego

[-- Attachment #1: Type: text/html, Size: 8073 bytes --]

[-- Attachment #2: 201602111742151_N3WZA6X7.png --]
[-- Type: image/png, Size: 33527 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0)
  2017-05-03 12:35   ` Dhinakar Kalyanasundaram
@ 2017-05-03 17:06     ` Bird, Timothy
       [not found]     ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p4>
  1 sibling, 0 replies; 14+ messages in thread
From: Bird, Timothy @ 2017-05-03 17:06 UTC (permalink / raw)
  To: dhinakar.k, fuego

Comment inline below.

> -----Original Message-----
> From: Dhinakar Kalyanasundaram on Wednesday, May 03, 2017 5:35 AM
> 
> Thanks a lot for you tip.
> 
> I built bash for the target and 'Functional.fuego_board_check' test passes
> now.
> 
> Thanks a lot for the tip.
> 
> Now I tried to execute 'Functional.hello_world' test to check if it picks up the
> cross compiler properly.
> 
> But it seems it is compiling hello.c for x86_64 only even though I have
> configured aarch64-toolchain and board.
> 
> Please find below the my serial board configuration
> (/home/dhinakar/fuego/fuego-ro/boards) and toolchain configuration
> (/home/dhinakar/fuego/fuego-ro/toolchains) details.
> 
> Please let me know what is wrong with the configuration.
> 
> 
> 
> Board Configuration
> 
> inherit "base-board"
> include "base-params"
> include "base-funcs"
> 
> SERIAL="ttyUSB0"
> BAUD="115200"
> LOGIN="root"
> BOARD_TESTDIR="/home/a"
> PASSWORD="abcd@123 <mailto:abcd@123> "
> PLATFORM="aarch64-linux"
This looks OK.

> TRANSPORT="serial"
> IO_TIME_SERIAL="5"
> ARCHITECTURE="arm"
> DISTRIB="nosyslogd.dist"
> 
> SATA_DEV="/dev/sdb1"
> SATA_MP="/mnt/sata"
> 
> USB_DEV="/dev/sda1"
> USB_MP="/mnt/usb"
> 
> MMC_DEV="/dev/mmcblk0p2"
> MMC_MP="/mnt/mmc"
> 
> BENCHMARK_DHRYSTONE_LOOPS="100000000"
> 
> LTP_OPEN_POSIX_SUBTEST_COUNT_POS="1319"
> LTP_OPEN_POSIX_SUBTEST_COUNT_NEG="169"
> 
> EXPAT_SUBTEST_COUNT_POS="1769"
> EXPAT_SUBTEST_COUNT_NEG="41"
> 
> FUNCTIONAL_SCIFAB_RES_LINES_COUNT="1"
> FUNCTIONAL_STRESS_FAIL_CASE_COUNT="1"
> FUNCTIONAL_CMT_FAIL_CASE_COUNT="1"
> FUNCTIONAL_SCIFAB_FAIL_CASE_COUNT="1"
> FUNCTIONAL_BZIP2_FAIL_CASE_COUNT="1"
> 
> FUNCTIONAL_SDHI_0_RES_LINES_COUNT="1"
> BENCHMARK_NETPERF_FAIL_CASE_COUNT="1"
> 
> BENCHMARK_SIGNALTEST_FAIL_CASE_COUNT="1"
> 
> BENCHMARK_OPENSSL_FAIL_CASE_COUNT="1"
> 
> 
> aarch64-linux-tools.sh (toolchain) configuration
> 
> # fuego toolchain script
> # this sets up the environment needed for fuego to use a toolchain
> # this includes the following variables:
> # CC, CXX, CPP, CXXCPP, CONFIGURE_FLAGS, AS, LD, ARCH
> # CROSS_COMPILE, PREFIX, HOST, SDKROOT
> # CFLAGS and LDFLAGS are optional
> #
> # this script should be sourced by ${FUEGO_RO}/toolchains/tools.sh
> 
> AARCH64_SDK_ROOT=${FUEGO_RO}/toolchains/aarch64-toolchain/gcc-
> linaro-aarch64-linux-gnu-4.8-2014.01_linux
> export ARCH=arm
> export SDKROOT=${AARCH64_SDK_ROOT}/bin/aarch64-linux-gnu
> 
> # the Yocto project environment setup script changes PATH so that python
> uses
> # libs from sysroot, which is not what we want, so save the original path
> # and use it later
> ORIG_PATH=$PATH
> 
> PREFIX=aarch64-linux-gnu
(Probably need to call 'export_tools' here)
> # source ${AARCH64_SDK_ROOT}/bin/aarch64-linux-gnu
> 
> #HOST=aarch64-linux-gnu-
> 
> # don't use PYTHONHOME from environment setup script
> unset PYTHONHOME
> env -u PYTHONHOME

I don't see anywhere in this script that actually sets up the environment
variables for the cross-compiler (CC, CPP, AS, LD, etc.)

The most common patterns for this are to use the helper routine export_tools
which is found in /fuego-ro/toolchains/tools.sh, or to use the
'environment-setup...' script for an OpenEmbedded or Yocto Project SDK.
export_tools uses the PREFIX to set the values for AS, CC, CXX, AR, RANLIB, CPP,
CXXCPP, LD, LDFLAGS, CROSS_COMPILE, HOST and CONFIGURE_FLAGS.

> Note: I have kept the toolchain under /home/dhinakar/fuego/fuego-
> ro/toolchains folder

I'm not sure what this means.  Do you mean that you installed the toolchain there?
Specifically, where is the file: aarch64-linux-gnu-gcc

I presume it is in /home/dhinakar/fuego/fuego-ro/toolchains/gcc-linaro-aarch64-linux-gnu-4.8-2014.01_linux/bin

In your aarch64-linux-tools.sh file, you should have:
PATH=$PATH: ${AARCH64_SDK_ROOT}/bin
and after setting your PREFIX a call to export_tools.

I'm not that familiar with Linaro tools, but I presume you have to install the runtime-gcc-linaro package as well,
and that is needs to be somewhere that gcc can find it. I'm not sure though.

How did you install the toolchain - by manually untarring them, or by installing debian packages?

 -- Tim


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0)
       [not found] ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p8>
  2017-04-19 13:29   ` Dhinakar Kalyanasundaram
@ 2017-05-03 12:35   ` Dhinakar Kalyanasundaram
  2017-05-03 17:06     ` Bird, Timothy
       [not found]     ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p4>
  1 sibling, 2 replies; 14+ messages in thread
From: Dhinakar Kalyanasundaram @ 2017-05-03 12:35 UTC (permalink / raw)
  To: Bird, Timothy, fuego

[-- Attachment #1: Type: text/html, Size: 6808 bytes --]

[-- Attachment #2: 201602111742151_N3WZA6X7.png --]
[-- Type: image/png, Size: 33527 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0)
  2017-04-27  4:34           ` Dhinakar Kalyanasundaram
@ 2017-04-27 16:49             ` Bird, Timothy
  0 siblings, 0 replies; 14+ messages in thread
From: Bird, Timothy @ 2017-04-27 16:49 UTC (permalink / raw)
  To: dhinakar.k, fuego; +Cc: Frank Rowand



> -----Original Message-----
> From: Dhinakar Kalyanasundaram on Wednesday, April 26, 2017 9:34 PM
> 
> Thanks Tim for reproducing the issue.
> 
> I will check with the development manager regarding using 'bash' on the
> target.

Note that I'm pretty sure dash would work also.

Can't you just build bash or dash and put it on the target yourself?
sercp seems to work, and you only need to do this once.  It doesn't
have the be the main shell of the target, just installed somewhere
it can be used.  the sequence would be:
Once:
 * build bash or dash for the target (or find an ARM version somewhere on the Internet)
 * install it on target (somewhere like /usr/local/bin)

Once before executing tests:
 * manually start /usr/local/bin/bash on target so it will be the console shell

During tests:
 * run tests normally, and they should use that shell.

After executing tests:
 * just exit the shell on the console, to return to the original busybox shell.

Eventually, invoking the alternate shell could be put into something like 
the ov_transport_connect() function (when that is created).  But it could
be done manually as a workaround for the short term.
> 
> Meanwhile, Is it difficult to fix this issue or any workaround available?

Well, this should get fixed in serio - it should handle busybox sh correctly.
I don't have time to work on this much this week, though.  I don't have any
workaround aside from using a supported shell.

 -- Tim


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0)
       [not found]         ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p1>
  2017-04-27  4:17           ` Dhinakar Kalyanasundaram
@ 2017-04-27  4:34           ` Dhinakar Kalyanasundaram
  2017-04-27 16:49             ` Bird, Timothy
  1 sibling, 1 reply; 14+ messages in thread
From: Dhinakar Kalyanasundaram @ 2017-04-27  4:34 UTC (permalink / raw)
  To: Bird, Timothy, fuego

[-- Attachment #1: Type: text/html, Size: 4232 bytes --]

[-- Attachment #2: Type: image/gif, Size: 13402 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0)
       [not found]         ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p1>
@ 2017-04-27  4:17           ` Dhinakar Kalyanasundaram
  2017-04-27  4:34           ` Dhinakar Kalyanasundaram
  1 sibling, 0 replies; 14+ messages in thread
From: Dhinakar Kalyanasundaram @ 2017-04-27  4:17 UTC (permalink / raw)
  To: Bird, Timothy, fuego

[-- Attachment #1: Type: text/html, Size: 12159 bytes --]

[-- Attachment #2: Type: image/gif, Size: 13402 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0)
  2017-04-26 17:58       ` Dhinakar Kalyanasundaram
  2017-04-26 18:35         ` Bird, Timothy
@ 2017-04-27  1:13         ` Bird, Timothy
       [not found]         ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p1>
  2 siblings, 0 replies; 14+ messages in thread
From: Bird, Timothy @ 2017-04-27  1:13 UTC (permalink / raw)
  To: dhinakar.k, fuego

> -----Original Message-----
> From: Bird, Timothy on Wednesday, April 26, 2017 11:32 AM
> 
> > -----Original Message-----
> > From: Dhinakar Kalyanasundaram on Wednesday, April 26, 2017 10:58 AM
> >
> > Answer: I did an echo $0 on my target '#' prompt it displayed '-sh'
> >
> >             echo "$SHELL" displayed '/bin/sh' it is basically from 'buildroot'
> 
> Can you please do the following on your target:
> ls -l /bin/sh
> and
> /bin/sh --version
> 
> I think you mentioned earlier that you were using busybox ash.
> 
> > and 2) what is the shell prompt on the target?
> >
> > Answer: '#'
> 
> OK - I have some ideas to try and reproduce this on my machine.
> I'll need to install busybox on my target, but I should be able to do some
> investigation today.

OK - I duplicated this here using busybox sh and a long prompt.
Here's what I did:
on the target (after installing busybox):
$ /bin/busybox sh
$ export PS1="root@beaglebone:busybox_sh_long_prompt $ "

Then on the host:
serio-test.sh ttyACM1

And I got the error message:
Doing cleanup
'
ERROR: invalid literal for int() with base 10: '[[&&serio_cmd_done&&]]'

I suspect that even though your shell prompt is short, the extremely long
commands from the tests are triggering this bug.  I'm not sure whether
to call it a bug with serio or with busybox sh, but in any event, this seems to
be where the problem is coming from.

Can you use 'bash' on the target?
 -- Tim


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0)
  2017-04-26 17:58       ` Dhinakar Kalyanasundaram
@ 2017-04-26 18:35         ` Bird, Timothy
  2017-04-27  1:13         ` Bird, Timothy
       [not found]         ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p1>
  2 siblings, 0 replies; 14+ messages in thread
From: Bird, Timothy @ 2017-04-26 18:35 UTC (permalink / raw)
  To: dhinakar.k, fuego



> -----Original Message-----
> From: Dhinakar Kalyanasundaram on Wednesday, April 26, 2017 10:58 AM
>
> Answer: I did an echo $0 on my target '#' prompt it displayed '-sh'
>
>             echo "$SHELL" displayed '/bin/sh' it is basically from 'buildroot'

Can you please do the following on your target:
ls -l /bin/sh
and
/bin/sh --version

I think you mentioned earlier that you were using busybox ash.

> and 2) what is the shell prompt on the target?
>  
> Answer: '#'

OK - I have some ideas to try and reproduce this on my machine.
I'll need to install busybox on my target, but I should be able to do some
investigation today.
 -- Tim

 
> 
> 
> As I had written before, I executed 'serio-test.sh' from the host ->
> root@Ubuntu-1604-64bit:/serio <mailto: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&&]]'
> >
> 
> 
> 
> <http://ext.samsung.net/mail/ext/v1/external/status/update?userid=dhina
> kar.k&do=bWFpbElEPTIwMTcwNDI2MTc1ODA2ZXBjbXM1cDZmZWY0ZDVkO
> WM4MjQ5MjcxMmNlYTczMDNlYWU2NDAyMCZyZWNpcGllbnRBZGRyZXNzP
> VRpbS5CaXJkQHNvbnkuY29t>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0)
       [not found]     ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p6>
@ 2017-04-26 17:58       ` Dhinakar Kalyanasundaram
  2017-04-26 18:35         ` Bird, Timothy
                           ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Dhinakar Kalyanasundaram @ 2017-04-26 17:58 UTC (permalink / raw)
  To: Bird, Timothy, fuego

[-- Attachment #1: Type: text/html, Size: 8987 bytes --]

[-- Attachment #2: 201602111742151_N3WZA6X7.png --]
[-- Type: image/png, Size: 33527 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0)
  2017-04-19 13:29   ` Dhinakar Kalyanasundaram
@ 2017-04-25 21:45     ` Bird, Timothy
       [not found]     ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p6>
  1 sibling, 0 replies; 14+ messages in thread
From: Bird, Timothy @ 2017-04-25 21:45 UTC (permalink / raw)
  To: dhinakar.k, fuego; +Cc: Frank Rowand



> -----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'
> \rmkdir -p /tmp/fuego.Functional.fuego_board_check ; touch
> /tmp/fuego.Functional.f
> uego_board_check/fake-syslog ; fi ; \recho 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&&]]'
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0)
       [not found] ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p8>
@ 2017-04-19 13:29   ` Dhinakar Kalyanasundaram
  2017-04-25 21:45     ` Bird, Timothy
       [not found]     ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p6>
  2017-05-03 12:35   ` Dhinakar Kalyanasundaram
  1 sibling, 2 replies; 14+ messages in thread
From: Dhinakar Kalyanasundaram @ 2017-04-19 13:29 UTC (permalink / raw)
  To: fuego

[-- Attachment #1: Type: text/html, Size: 55475 bytes --]

[-- Attachment #2: 201602111742151_N3WZA6X7.png --]
[-- Type: image/png, Size: 33527 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-05-12  5:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-05 18:11 [Fuego] Functional.fuego_board_check test failure - console log (/dev/ttyUSB0) Bird, Timothy
     [not found] ` <CGME20170505181150epcas3p148ba4fc7113cc70e7a21473ca34f2930@epcms5p5>
2017-05-11  9:35   ` Dhinakar Kalyanasundaram
2017-05-12  5:04     ` Bird, Timothy
     [not found] <20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p6>
     [not found] ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p8>
2017-04-19 13:29   ` Dhinakar Kalyanasundaram
2017-04-25 21:45     ` Bird, Timothy
     [not found]     ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p6>
2017-04-26 17:58       ` Dhinakar Kalyanasundaram
2017-04-26 18:35         ` Bird, Timothy
2017-04-27  1:13         ` Bird, Timothy
     [not found]         ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p1>
2017-04-27  4:17           ` Dhinakar Kalyanasundaram
2017-04-27  4:34           ` Dhinakar Kalyanasundaram
2017-04-27 16:49             ` Bird, Timothy
2017-05-03 12:35   ` Dhinakar Kalyanasundaram
2017-05-03 17:06     ` Bird, Timothy
     [not found]     ` <CGME20170419125909epcms5p6ae6c34804cd8eab710cf4dbd80692188@epcms5p4>
2017-05-04  3:34       ` Dhinakar Kalyanasundaram

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.