Dear Lava users,
I'm trying to create a job that performs the following steps :
Deploy to flasher our custom tool (OK) Boot in bootloader mode - u-boot (OK) Test in interactive mode (OK) From interactive mode start kernel (OK) Launch a test from kernel (KO)
The last part fails because I don't know where to check the kernel prompt. I cannot add a boot stage and declare an additional prompt because I don't want to reboot, that would reset the configuration done in interactive mode. Do you have any piece of advice or example of job showing how to proceed to manage the kernel prompt & autologin in such a job?
Best regards,
Denis
On Fri, 18 Jan 2019 at 14:57, Denis HUMEAU denis.humeau@st.com wrote:
I think I have an idea how to do that. Do you have your example job so I can experiment?
milosz
Hi Milosz,
Unfortunately not, I do have a job but I can't share it for re-execution on your side. I can share the job without internal sensitive data if you wish. I'm about to try the following trick: when starting kernel from u-boot, I want to add a kernel pattern (the last message before autologin), and maybe add a little delay to be sure that I'm logged
Denis
-----Original Message----- From: Milosz Wasilewski milosz.wasilewski@linaro.org Sent: vendredi 18 janvier 2019 16:25 To: Denis HUMEAU denis.humeau@st.com Cc: lava-users@lists.lavasoftware.org Subject: Re: [Lava-users] Piece of advice to combine interactive boot and Linux testing
On Fri, 18 Jan 2019 at 14:57, Denis HUMEAU denis.humeau@st.com wrote:
I think I have an idea how to do that. Do you have your example job so I can experiment?
milosz
On Fri, 18 Jan 2019 at 15:28, Denis HUMEAU denis.humeau@st.com wrote:
I think this approach might work.
Could you share with all the sensitive details removed? I just need to see how you call u-boot commands inside u-boot shell. You can remove sensitive stuff with 'env print'.
milosz
Here is a cleaned job version
device_type: <my_device_type>
job_name: test_dhu timeouts: job: minutes: 60 action: minutes: 60 priority: medium visibility: public
actions: - deploy: to: flasher timeout: minutes: 20 os: oe # Specify Layout file and images to be flashed images: layout: url: <layout_url> #tarball: # url: <tarball_url>
- boot: method: minimal timeout: minutes: 10 transfer_overlay: download_command: ifplugd ; sleep 1 ; cd /usr/local ; rm -f overlay*; wget unpack_command: tar -C / -xzf prompts: - <linux_prompt> auto_login: login_prompt: <auto_login> username: root
- test: timeout: minutes: 60 definitions:
- repository: metadata: format: Lava-Test-Shell Test Definition 1.0 name: Copy description: "Copy files" run: steps: - cp /usr/local/<my_file> /boot/<target_file> - sync from: inline name: copy-file path: copy-file
- boot: method: bootloader bootloader: u-boot commands: [] prompts: ['U-Boot'] timeout: minutes: 10
- test: timeout: minutes: 20 interactive: - name: firmware prompts: ['=>'] script: - command: env print name: command1 - command: env print name: command 2 - command: env print name: command 3 - command: env print name: command 4 - command: run bootcmd name: start_kernel patterns: - message: "login: root (automatic login)" result: success
- test: timeout: minutes: 500 definitions: - from: git repository: <my_repo> revision: iso/dhu path: tests-def/hacking_session.yaml name: hacking history: False
-----Original Message----- From: Milosz Wasilewski milosz.wasilewski@linaro.org Sent: vendredi 18 janvier 2019 16:32 To: Denis HUMEAU denis.humeau@st.com Cc: lava-users@lists.lavasoftware.org Subject: Re: [Lava-users] Piece of advice to combine interactive boot and Linux testing
On Fri, 18 Jan 2019 at 15:28, Denis HUMEAU denis.humeau@st.com wrote:
I think this approach might work.
Could you share with all the sensitive details removed? I just need to see how you call u-boot commands inside u-boot shell. You can remove sensitive stuff with 'env print'.
milosz
On Fri, 18 Jan 2019 at 15:40, Denis HUMEAU denis.humeau@st.com wrote:
syntax is wrong here, but when fixed this should work. Please check here: https://staging.validation.linaro.org/scheduler/job/247775/definition
milosz
On Fri, 18 Jan 2019 at 16:21, Milosz Wasilewski milosz.wasilewski@linaro.org wrote:
What I tried didn't actually work. Here is a job: https://staging.validation.linaro.org/scheduler/job/247794/definition
LAVA reports it's missing all it's helpers. That is pretty obvious as there was no 'deploy to fastboot' stage. I tried adding it but than LAVA complains that 'namespace' and 'interactive' test don't work together. @Remi could you take a look?
milosz
On Fri, 18 Jan 2019 at 16:55, Milosz Wasilewski milosz.wasilewski@linaro.org wrote:
To use transfer_overlay or any test action based on a POSIX shell, the overlay has to be created and that needs a deploy action in the test job. This test job has that deploy, the X15 test job later does not, as Milosz has already noted.
You shouldn't need a namespace for this but there's nothing particular about interactive that would block using a namespace, as long as that namespace is set consistently. Namespaces are useful when there is more than one target location for the files to be downloaded by LAVA. e.g. files into an LXC and files onto the device / TFTP locations. The namespace used to create the overlay needs to be the same as the namespace used to retrieve the overlay and the namespace used to execute files in that overlay. (i.e. namespaces allow two or more different POSIX test actions to occur in one test job, some in the LXC and some on device, by keeping the list of test definition scripts separate.) If namespaces are not used, LAVA uses a reserved namespace called "common" to keep everything together.
It's not going to be straightforward to test this using the X15. It'll need to be tested on something which is closer to the original test device, i.e. one which can do something useful with a deploy stage. Possibly the x15-evm-bl device once that support arrives on staging.validation.linaro.org.
With an available deploy action to build the overlay, the original test job may work by picking up the modifications in https://staging.validation.linaro.org/scheduler/job/247794/definition
On Mon, 21 Jan 2019 at 14:00, Neil Williams neil.williams@linaro.org wrote:
it just doesn't work. I suppose it's bug in LAVA. Here is the error message I'm getting when I add 'namespace' to interactive test section: "Invalid definition: required key not provided @ data['actions'][1]['test']['monitors']"
I disagree. It works on x15 to the point when posix test shell should be started. But it's not started as deployment isn't possible earlier in the job. X15 requires LXC to deploy images to emmc. This requires separate namespace for deployment (LXC) and tests (target). However you can't (currently) do namespaces when there is interactive test section involved. Again, is this expected or is it LAVA bug?
milosz
On Mon, 21 Jan 2019 at 14:32, Milosz Wasilewski milosz.wasilewski@linaro.org wrote:
Can you provide the invalid definition please? Either here or as a new issue on gitlab.
I'll need to check. The current schema doesn't worry about namespace, I suspect something else is going on but that just means that your example (and the modification it needs) should go into our unit tests.
On Mon, 21 Jan 2019 at 14:42, Neil Williams neil.williams@linaro.org wrote:
Done: https://git.lavasoftware.org/lava/lava/issues/202
milosz
1/ namespace are now available for interactive tests too (missing parameter in the schema validator): https://git.lavasoftware.org/lava/lava/commit/c0eeb4b28fda334b4320572dbb0b1a... 2/ adding another deploy stage with the right namespace as suggested by milosz should work
On Tue, 22 Jan 2019 at 10:11, Remi Duraffort remi.duraffort@linaro.org wrote:
Yay, this works. Thank you for a quick fix! https://staging.validation.linaro.org/scheduler/job/247927
milosz
Thanks for quick reply.
Sorry, I'm a bit confused. In my initial job (skeleton below), I already had a deploy (custom), and no namespace. Rémi, are your latest patches sufficient to succeed in combining interactive and kernel test without rebooting in between?
Denis
-----Original Message----- From: Milosz Wasilewski milosz.wasilewski@linaro.org Sent: mardi 22 janvier 2019 11:25 To: Remi Duraffort remi.duraffort@linaro.org Cc: Denis HUMEAU denis.humeau@st.com; lava-users@lists.lavasoftware.org Subject: Re: [Lava-users] Piece of advice to combine interactive boot and Linux testing
On Tue, 22 Jan 2019 at 10:11, Remi Duraffort remi.duraffort@linaro.org wrote:
Yay, this works. Thank you for a quick fix! https://staging.validation.linaro.org/scheduler/job/247927
milosz
On Tue, 22 Jan 2019 at 10:32, Denis HUMEAU denis.humeau@st.com wrote:
I looked at the original job you posted. What is 'flasher'? - deploy: to: flasher I didn't find it in the lava docs. But looking at the whole job it looks like sth external to the board. In this case you need to separate 'flasher' actions to separate namespace and board testing actions to a different one.
milosz
Flasher is the name we gave to the custom deploy method that will call our internal programmer.
Denis
-----Original Message----- From: Milosz Wasilewski milosz.wasilewski@linaro.org Sent: mardi 22 janvier 2019 11:45 To: Denis HUMEAU denis.humeau@st.com Cc: Remi Duraffort remi.duraffort@linaro.org; lava-users@lists.lavasoftware.org Subject: Re: [Lava-users] Piece of advice to combine interactive boot and Linux testing
On Tue, 22 Jan 2019 at 10:32, Denis HUMEAU denis.humeau@st.com wrote:
I looked at the original job you posted. What is 'flasher'? - deploy: to: flasher I didn't find it in the lava docs. But looking at the whole job it looks like sth external to the board. In this case you need to separate 'flasher' actions to separate namespace and board testing actions to a different one.
milosz
flasher is an official deploy method that will ran a set of device-type specific commands to flash a device. https://git.lavasoftware.org/lava/lava/blob/master/lava_dispatcher/actions/d...
We are missing some documentation on this.
Le mar. 22 janv. 2019 à 11:49, Denis HUMEAU denis.humeau@st.com a écrit :
On Tue, 22 Jan 2019 at 10:53, Remi Duraffort remi.duraffort@linaro.org wrote:
Thanks guys. We discussed this with Remi on IRC and there is a chance I can use my SDMux as a 'flasher' device to closely replicate the job that was posted. I'll try this tomorrow (no access to HW today).
milosz
The syntax evolved a bit since the initial support for interactive tests in https://git.lavasoftware.org/lava/lava/commit/2cf6b51ab279f9cbcb5cd4afa51f4e... and https://git.lavasoftware.org/lava/lava/commit/8041e101293328f50a385aafb2d769...
Rgds
lava-users@lists.lavasoftware.org