Hello,

the support for the start-line/end-line will work in most cases but not all.

In your case, the board is sending the three lines ("LAVA_SIGNAL_STARTTC...", "wow" and "LAVA_SIGNAL_ENDTC") really quickly. Quickly enough so that LAVA (and more precisely the pexpect module that we use) can't match the strings in real time.
So in this case the timing is:
* the board send the 3 lines
* LAVA/pexpect match the first LAVA_SIGNAL_STARTTC and record the line number(already too late)
* LAVA/pexpect match the first LAVA_SIGNAL_ENDTC and record the line number (already too late).

That's why the start/end line numbers are wrong. Unfortunately I don't see anything we can do in LAVA to fix this issue. Fortunately this would only happen when LAVA is not fast enough to match the signal strings.

The best way to get the exact line numbers is to post-process the logfile that LAVAis recording. You just need to parse the serial console output that LAVA is recording to find the LAVA_SIGNAL_STARTTC and LAVA_SIGNAL_ENDTC.
In this case, this will work in every cases.

If you need more information about how to post-process, just send me a mail.


Rgds


Le lun. 4 nov. 2019 à 08:13, Larry Shen <larry.shen@nxp.com> a écrit :

All,

 

I’m testing some feature about associated log lines in lava, job.yaml is as follows.

 

Job.yaml:

 

- test:

    connection: lxc

    definitions:

    - from: inline

      name: my_suite

      path: me.yml

      repository:

        metadata:

          format: Lava-Test Test Definition 1.0

          name: smoke-case-run

          description: Run smoke case

        run:

          steps:

            - lava-test-case "Case001" --shell 'echo wow'

            - lava-test-case "Case002" --shell 'ls'

    namespace: lxcEnv

    timeout:

      minutes: 10

 

1. Then, let’s see next picture of Case001:

it said startline=153, lastline=154, that’s next:

Line153 is “Received signal: <STARTTC> Case001”, Line 154 is “Received signal: <ENDTC> Case001”.

You could see in fact the log “wow” not in the 2 lines.

 

2. let’s see next picture of Case002:

It said startline=160, lastline=163, that’s next:

It’s ok, that between Ln160 & Ln163 I got the output of `ls`.

 

What happened for “Case001”? The startline & endline not correct. It seems if I directly do “echo”, the info is wrong. while “execute command”, the info is correct.

Of course my case will not just do “echo”, just I want to know if any risk for me to fetch the wrong START/LAST lines in other scenario? (I will use script to fetch it with xmlrpc).

_______________________________________________
Lava-users mailing list
Lava-users@lists.lavasoftware.org
https://lists.lavasoftware.org/mailman/listinfo/lava-users


--
Rémi Duraffort
LAVA Architect
Linaro