Hi,
In LAVA v1, one could declare login commands to be run after logging in and
before starting any of the tests. For example:
"actions": [
{
"command": "deploy_image",
"parameters": {
"image": "https://some-url-to-a-rootfs.ext4.img.gz",
"bootfstype": "ext2",
"login_commands": [
"sudo su"
],
"login_prompt": "login:",
"username": "username",
"password_prompt": "Password:",
"password": "password"
}
},
In this case, "sudo su" is needed to open a regular user session and inherit
the user's environment while also having root privileges.
In LAVA v2, there isn't the possibility to do anything like this directly. One
could define a test with inline commands, but this is not ideal. The login
commands are not a test but part of how the job sets up the environment in
which the tests are run - i.e. it's part of the initial conditions. Also it's
quite a convoluted and lengthy way of running some commands, and it relies on
the side effects of that "login commands test" to persist when running
subsequent tests.
So I've made a couple of patches to see how this could be implemented in LAVA
v2 with an extra parameter in auto_login:
https://review.linaro.org/#/q/topic:T5703-login-commands
For example:
- boot:
method: qemu
auto_login:
login_prompt: 'login:'
username: user
password_prompt: 'Password:'
password: password
login_commands:
- sudo su
Essentially, this makes auto_login more flexible. At the moment, after logging
in auto_login sets the shell prompt: this is already some kind of hard-coded
login command. Some jobs need to run other things such as "sudo su" to stick
to the same example.
Another login command we've used is "systemctl --failed" to show if any systemd
units (services) failed to load during boot.
Notes from the Gerrit reviews:
* The login commands can't be part of a device definition as they are not
related to the device hardware or the boot configuration. For example, when
running Android, one would not want to run "sudo su" but maybe "setprop ..."
or something else - to be defined in each job.
* The login commands should not be fixed in a given distro / userspace
configuration as each job may need to set up a different initial environment.
For example, some jobs may need to be run with a regular user and would not
use the "sudo su" login command.
* Some documentation and unit tests would need to be added for this to be
merged. This is to first discuss the idea and review the code changes.
Any thoughts? Would it make sense to add this feature or maybe implement it
differently?
Best wishes,
Guillaume
Hi Everyone,
I have a co-worker who wants to use our Kernel CI & Lava Virtual
Machine. He says he wants to boot the VM, log in, and run a command that
downloads a kernel and then tests multiple defconfig's and multiple
versions of the Linux kernel. What is the best tool to do this (lava-ci,
lava-tool, or a different tool)?
Can you point me to some examples of the tool you recommend?
Any help you can offer would be greatly appreciated.
--
Don Brown
Codethink, Ltd.
Software Engineering Consultant
Indianapolis, IN USA
Email: don.brown(a)codethink.co.uk
Mobile: +1 317-560-0513
Hello,
I'm trying to set one timeout per test in a job. To do so I'm declaring one test block per test.
Unfortunately, it seems that only the first timeout declaration is taken into account. Did I miss something in my job definition?
Best regards,
Denis
Dear all,
This is my first post on the mailing list, I hope I'm at the right place.
Using Lava V2, I'm trying to install packages in the DUT following the guidelines from
https://validation.linaro.org/static/docs/v2/writing-tests.html#test-defini…
My job looks like this:
metadata:
(...)
install:
sources:
- http://<local_network_package_server>/sti
- http:// <local_network_package_server>/all
- http:// <local_network_package_server>/cortexa9hf-neon
deps:
- python-pytest
- python-lxml
- packagegroup-core-buildessential*
run:
steps:
- step1
- step2
parse:
pattern: "^(?P<test_case_id>\\w+) RESULT:(?P<result>(pass|fail|unknown))"
fixupdict:
FAILED: fail
SUCCESS: pass
ABORTED: unknown
Running this test, I get the following error:
<LAVA_TEST_RUNNER>: started<LAVA_TEST_RUNNER>: looking for work in /lava-3715/0/lava-test-runner.conf-1484266027
<LAVA_TEST_RUNNER>: running 0_TC_BENCH_DISK_AIO_STRESS under lava-test-shell...
<LAVA_TEST_RUNNER>: running 0_TC_BENCH_DISK_AIO_STRESS installer ...
/lava-3715/0/tests/0_TC_BENCH_DISK_AIO_STRESS/install.sh: line 5: lava-add-sources: command not found
/lava-3715/0/tests/0_TC_BENCH_DISK_AIO_STRESS/install.sh: line 6: lava-add-sources: command not found
/lava-3715/0/tests/0_TC_BENCH_DISK_AIO_STRESS/install.sh: line 7: lava-add-sources: command not found
Error: OPKG package manager not found in the path.
It seems lava-add-sources is not copied to the target. Do I understand the log correctly?
Best regards,
Denis
Hello Team,
My name is guru. i am very new to lava and i am very much interested using
lava concept for embedded linux boards for auto deployment and testing
concepts.
I tried to setup the lava for bbb device. i have followed below steps for
that.
> 1. installed debian on vm machine and lava-server and its component
(jessie-backport) 2016.
> 2. just for understanding purpose i tried to add kvm job it was loaded
successfully.
> 3. Now i am trying to add the BBB device on lava.
> 4. For that i have added the bbb device to dispatcher. find the conf file
below
> name: beaglebone-black01.conf
> content :
> device_type = beaglebone-black
> hostname = beaglebone-black01
> connection_command = telnet localhost 2003
> hard_reset: /usr/bin/reset.sh
> power_off: /usr/bin/off.sh
> power_on: /usr/bin/on.sh
> Note : i am not using pduclient. i am using my own script for control
commands
> but it is not working while executing the hard_reset command on lava..
find
the log for more details.
>
> 5. My current setup is like i am controlling the bbb using serial
controlled
relay from VM host machine(debian).
>
> for that i made my own custom script to on.off,reset serial python code
for
controlling the relay.
> 6. after that i tried to submit the below json test job. Find My
definition
job attached.
> I have taken the below json for reference.
> https://git.linaro.org/lava-team/lava-functional-tests.
git/tree/lava-test-shell/single-node/armmp-bbb-daily.json
> 7. after that i have submitted the job . find the job log for more
details.
> 8. i have no idea what is going on and what went wrong on my setup.
> Help me out to boot the BBB using lava.
Regards,
Guru