Hi, I am trying to make use of environment variables defined on my lava-server inside interactive tests.
I have had some success with this, but I am not sure why one method works over the other.
For example, I do something like the following:
echo 'wget --user=some-name --password=${SECRET_PASSWORD}' > somefile.sh
And that works just fine. But when I already have a script (say it exists on the DUT already) that just takes it as a parameter, it doesn't work.
Example:
some_script.sh -p ${SECRET_PASSWORD} -u some-name
I have also tried accessing it directly in the script, similar to what somefile.sh would look like on the inside, but had no success with that.
I have tried exporting the environment variable as another one to see if that would work, but to no avail.
Is there something I'm missing? What I can I do to achieve this without hardcoding it anywhere in my scripts?
Regards,
Michael
Hi,
I upgraded my LAVA instance to 2025.04 yesterday I skipped one release
and the upgrade was from 2024.09. Most of the jobs I run in use
deploy-to-flasher with custom script handling the board flashing. Up
until 2024.09 (I don't know about 2025.02) "downloads" URLs resulted
in all files stored in a flat directory. My flashing scripts made use
of this "feature". In 2025.04 this has changed. This commit:
https://gitlab.com/lava/lava/-/commit/4d9f0ebdae9ca53baf6633f4a35e716183bd2…
makes the files stored in separate directories. It feels like a step
in a right direction but it broke my flashing scripts. To make a quick
fix I did this in the beginning of the script:
DOWNLOAD_DIRS=$(find . -maxdepth 1 -mindepth 1 -type d -printf '%f ')
for d in $DOWNLOAD_DIRS; do
FILE_TO_COPY=$(find ./$d -maxdepth 1 -mindepth 1 -type f -printf '%f')
ln "$PWD/$d/$FILE_TO_COPY" "$PWD/$FILE_TO_COPY"
done
This isn't great but it solves the issue for now. After a short
discussion with Chase we came to conclusion that solution that looks
"more correct" is to implement support for "uniquify" for "download"
URLs. Chase sent a patch here:
https://gitlab.com/lava/lava/-/merge_requests/2795
This should be available in the next release.
I hope this message helps someone with similar issues :)
Best Regards,
Milosz
Hi,
I am trying to write a test to conditionally extract files from a zip file for use in some scripts, e.g. unzip the file, copy/move the files I need out, remove the zip file and directory created from unzipping it.
However, the zip file size exceeds the disk space of the DUT.
I have considered doing something like a MultiNode job, where the DUT is booted as well as a QEMU instance, and the file is downloaded and extracted
on the QEMU and moved onto the DUT, but I would prefer not to do that if possible.
Is there any way to download the zip file mid-test to the worker instead, extract the files I need, and move them onto the DUT? Ideally no modifications to
the code of LAVA, but if that is necessary then I can figure out an interim solution and come back to it later.
Regards,
Michael
Hi,
I am trying to get LDAP working in my LAVA instance, and have managed to get logging into it working. The issue comes when I try to use Django's MIRROR_GROUPS setting.
I am already aware that it is not built into LAVA to be configurable, and I have already taken steps to add the relevant lines in lava_server/settings/common.py to make it work (initialize to None, values.get() in the update method, then run eval on the value in the LDAP if section), but it still won't work. All other required settings are clearly working just fine, and I can even set USER_FLAGS_BY_GROUP just fine, but I would prefer to mirror certain groups that users are members of and assign permissions to the groups.
Do I need to pre-create the groups before logging in to LAVA or am I missing something else/doing something wrong?
Original common.py source: https://gitlab.com/lava/lava/-/blob/master/lava_server/settings/common.py
Hi All,
I am trying to setup LAVA and execute test cases. I am using Intel x86-64 machine.
LAVA able to boot the Linux without any issues, but it is stuck just before login prompt.
I am able to boot the machine with manual procedure.
Pls find the log below.
[[0;32m OK [0m] Started [0;1;39mBerkeley Internet Name Domain (DNS)[0m.
[[0;32m OK [0m] Started [0;1;39mPostfix Mail Transport Agent[0m.
[[0;32m OK [0m] Reached target [0;1;39mMulti-User System[0m.
[[0;32m OK [0m] Reached target [0;1;39mHost and Network Name Lookups[0m.
Starting [0;1;39mRecord Runlevel Change in UTMP[0m...
[[0;32m OK [0m] Finished [0;1;39mRecord Runlevel Change in UTMP[0m.
Linux Update 6 intel-x86-64 ttyUSB0
<Login prompt print expected here ("intel-x86-64 login:"), but not displayed on the log>
bootloader-interrupt timed out after 280 seconds
end: 2.3.2 bootloader-interrupt (duration 00:04:40) [common]
case: bootloader-interrupt
case_id: 185
definition: lava
duration: 280.00
extra: ...
level: 2.3.2
namespace: common
result: fail
health check yaml file snippet:
- boot:
timeout:
minutes: 5
method: ipxe
commands: nfs
failure_retry: 3
prompts:
- '[a-zA-Z0-9\-\_]+@[a-zA-Z0-9\-\_]+:.*?#'
auto_login:
login_prompt: "intel-x86-64 login:"
username: root
password_prompt: "password:"
password: root
login_commands:
- cat /proc/cmdline
- cd /
- ls
- test:
failure_retry: 3
timeout:
minutes: 5
definitions:
- repository:
metadata:
format: Lava-Test Test Definition 1.0
name: smoke-tests-basic
description: "Basic system test command for Linaro Ubuntu images"
run:
steps:
- printenv
Thanks
Rajesh
Hi All,
I am trying to setup LAVA and execute test cases. I am using Intel x86-64 machine.
LAVA able to boot the Linux without any issues, but it is stuck just before login prompt.
I am able to boot the machine with manual procedure.
Pls find the log below.
[[0;32m OK [0m] Started [0;1;39mBerkeley Internet Name Domain (DNS)[0m.
[[0;32m OK [0m] Started [0;1;39mPostfix Mail Transport Agent[0m.
[[0;32m OK [0m] Reached target [0;1;39mMulti-User System[0m.
[[0;32m OK [0m] Reached target [0;1;39mHost and Network Name Lookups[0m.
Starting [0;1;39mRecord Runlevel Change in UTMP[0m...
[[0;32m OK [0m] Finished [0;1;39mRecord Runlevel Change in UTMP[0m.
Linux Update 6 intel-x86-64 ttyUSB0
<Login prompt print expected here ("intel-x86-64 login:"), but not displayed on the log>
bootloader-interrupt timed out after 280 seconds
end: 2.3.2 bootloader-interrupt (duration 00:04:40) [common]
case: bootloader-interrupt
case_id: 185
definition: lava
duration: 280.00
extra: ...
level: 2.3.2
namespace: common
result: fail
health check yaml file snippet:
- boot:
timeout:
minutes: 5
method: ipxe
commands: nfs
failure_retry: 3
prompts:
- '[a-zA-Z0-9\-\_]+@[a-zA-Z0-9\-\_]+:.*?#'
auto_login:
login_prompt: "intel-x86-64 login:"
username: root
password_prompt: "password:"
password: root
login_commands:
- cat /proc/cmdline
- cd /
- ls
- test:
failure_retry: 3
timeout:
minutes: 5
definitions:
- repository:
metadata:
format: Lava-Test Test Definition 1.0
name: smoke-tests-basic
description: "Basic system test command for Linaro Ubuntu images"
run:
steps:
- printenv
Thanks
Rajesh
We have a requirement for some test cases that the artifacts need to be modified (negative scenario) in order
to verify some scenarios. we are currently using postprocess under deploy action for this purpose.
As of part postprocess, we need to mount partitions of disk image and make some changes based on the requirement.
However, we are unable to mount the partitions using losetup command.
docker:
image: debian:bookworm
steps:
- apt-get update
- loop_dev=$(losetup -P -f --show image.wic)
- echo $loop_dev
The job failed with below error,
losetup -P -f --show image.wic
losetup: cannot find an unused loop device
It looks like the docker container needs root privileges. It works when we run locally with "privileged:true".
Is there any way we can pass "privileged: true" option to docker image through LAVA job definitions?
Any inputs regarding this matter are highly appreciated.
Hello,
I'm trying to verify secure boot on LAVA lab, I've verified the positive case of secure boot and confirmed the secure boot is enabled from the boot logs (kernel-start-message = "EFI stub: UEFI Secure Boot is enabled.").
Next, I would like to verify the negative test case as well by tampering the secure boot image where I expect the image boot shall fail.
Is there way in LAVA to make the job complete(e.g. waiting for specific message in boot logs like "Can't find image information. ") even though the image fails to boot on the DUT?
Ref. https://lava.ciplatform.org/scheduler/job/1236667#L81
Hi,
I am not able to submit multiple jobs on my single node lava server, currently even 1 job is running the second job waits till the 1st job is completed. I have tried to increase the job limit of my worker to 3 via lava Admin UI but still I cannot run 2 jobs in parallel. Could you please let me know how can I increase the no. jobs.