Hi, I hope to be able to test whether the system can boot normally after multiple restarts (10,000 times) Because every boot requires the auto_login of the boot action, it seems that a loop needs to be implemented in yaml, and this loop needs to include the boot action. Are there any relevant examples that you can refer to? There are roughly two types of test logic 1: while (a<10000) { -boot auto_login - test basic io test software reboot in target board a=a+1 } 2: while (a<10000) { -boot auto_login - test basic io test a=a+1 hardware reboot in worker }
Thanks
The following is my job yaml, Each time to add a -boot, we can get a reboot, it is working if I want to run reboot 1000 times, I can't think of any way except adding 1000 (-boot), it is supid. I don't know how to add a loop to the job and No examples found,
device_type: ppp job_name: ppp test health check visibility: public
timeouts: job: minutes: 20 action: minutes: 15
actions: - deploy: timeout: minutes: 2 to: download images: kernel: url: http://10.19.207.190/static/docs/v2/contents.html#contents-first-steps-using
- boot: method: minimal timeout: minutes: 10 auto_login: login_prompt: 'tegra-ubuntu login:' username: root password_prompt: "Password:" password: "root" login_commands: - ifconfig prompts: - 'root@tegra-ubuntu:' parameters: kernel-start-message: ''
- boot: method: minimal timeout: minutes: 10 auto_login: login_prompt: 'tegra-ubuntu login:' username: root password_prompt: "Password:" password: "root" login_commands: - ifconfig prompts: - 'root@tegra-ubuntu:' parameters: kernel-start-message: ''
Hi, I try to following the code https://github.com/Linaro/lava-test-plans/blob/master/lava_test_plans/testca... line 20-27 , code as below, it seems that we can use "for loop" on "- boot" . {% for index in range(1,8) %} {% with FASTBOOT_COMMANDS=Null %} - boot: {% include "include/boot_target/boot_target.jinja2" %} {% endwith %} {% with test_timeout=boottime_timeout %} {% include "include/test_target.jinja2" %} {% endwith %}
when I try the following code, lava report error: code: {% for index in range(1,8) %} - boot: method: minimal timeout: minutes: 10 auto_login: login_prompt: 'tegra-ubuntu login:' username: root password_prompt: "Password:" password: "root" login_commands: - ifconfig prompts: - 'root@tegra-ubuntu:' parameters: kernel-start-message: '' transfer_overlay: download_command: cd /tmp ; wget unpack_command: tar -m -C / -xzf {% endfor %}
error: line22 is "{% for index in range(1,8) %}" Invalid definition: Loading job submission failed: while scanning for the next token found character that cannot start any token in "", line 22, column 2.
Where did I go wrong?
There is no support for loops in LAVA test job definitions.
Best Regards, Milosz
On Mon, Apr 8, 2024 at 8:18 AM irreallich@126.com wrote:
Hi, I try to following the code https://github.com/Linaro/lava-test-plans/blob/master/lava_test_plans/testca... line 20-27 , code as below, it seems that we can use "for loop" on "- boot" . {% for index in range(1,8) %} {% with FASTBOOT_COMMANDS=Null %}
- boot:
{% include "include/boot_target/boot_target.jinja2" %} {% endwith %} {% with test_timeout=boottime_timeout %} {% include "include/test_target.jinja2" %} {% endwith %}
when I try the following code, lava report error: code: {% for index in range(1,8) %}
- boot: method: minimal timeout: minutes: 10 auto_login: login_prompt: 'tegra-ubuntu login:' username: root password_prompt: "Password:" password: "root" login_commands: - ifconfig prompts: - 'root@tegra-ubuntu:' parameters: kernel-start-message: '' transfer_overlay: download_command: cd /tmp ; wget unpack_command: tar -m -C / -xzf
{% endfor %}
error: line22 is "{% for index in range(1,8) %}" Invalid definition: Loading job submission failed: while scanning for the next token found character that cannot start any token in "", line 22, column 2.
Where did I go wrong? _______________________________________________ lava-users mailing list -- lava-users@lists.lavasoftware.org To unsubscribe send an email to lava-users-leave@lists.lavasoftware.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
On Mon, 2024-04-08 at 09:57 +0100, Milosz Wasilewski wrote:
There is no support for loops in LAVA test job definitions.
But you can generate the job definition. Might become big and maybe you run into some limits, but in general it should work.
Best Regards, Milosz
On Mon, Apr 8, 2024 at 8:18 AM irreallich@126.com wrote:
Hi, I try to following the code https://github.com/Linaro/lava-test-plans/blob/master/lava_test_plans/testca... line 20-27 , code as below, it seems that we can use "for loop" on "- boot" . {% for index in range(1,8) %} {% with FASTBOOT_COMMANDS=Null %}
- boot:
{% include "include/boot_target/boot_target.jinja2" %} {% endwith %} {% with test_timeout=boottime_timeout %} {% include "include/test_target.jinja2" %} {% endwith %}
when I try the following code, lava report error: code: {% for index in range(1,8) %}
- boot: method: minimal timeout: minutes: 10 auto_login: login_prompt: 'tegra-ubuntu login:' username: root password_prompt: "Password:" password: "root" login_commands: - ifconfig prompts: - 'root@tegra-ubuntu:' parameters: kernel-start-message: '' transfer_overlay: download_command: cd /tmp ; wget unpack_command: tar -m -C / -xzf
{% endfor %}
error: line22 is "{% for index in range(1,8) %}" Invalid definition: Loading job submission failed: while scanning for the next token found character that cannot start any token in "", line 22, column 2.
Where did I go wrong? _______________________________________________ lava-users mailing list -- lava-users@lists.lavasoftware.org To unsubscribe send an email to lava-users-leave@lists.lavasoftware.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
lava-users mailing list -- lava-users@lists.lavasoftware.org To unsubscribe send an email to lava-users-leave@lists.lavasoftware.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
On Mon, Apr 8, 2024 at 10:10 AM Florian Bezdeka florian.bezdeka@siemens.com wrote:
On Mon, 2024-04-08 at 09:57 +0100, Milosz Wasilewski wrote:
There is no support for loops in LAVA test job definitions.
But you can generate the job definition. Might become big and maybe you run into some limits, but in general it should work.
yep, that works for sure. I know folks that run some really long job definitions. There may be some side effects, like your runner runs out of memory. Worth to try, but the author expressed his dislike of the idea.
Best Regards, Milosz
Best Regards, Milosz
On Mon, Apr 8, 2024 at 8:18 AM irreallich@126.com wrote:
Hi, I try to following the code https://github.com/Linaro/lava-test-plans/blob/master/lava_test_plans/testca... line 20-27 , code as below, it seems that we can use "for loop" on "- boot" . {% for index in range(1,8) %} {% with FASTBOOT_COMMANDS=Null %}
- boot:
{% include "include/boot_target/boot_target.jinja2" %} {% endwith %} {% with test_timeout=boottime_timeout %} {% include "include/test_target.jinja2" %} {% endwith %}
when I try the following code, lava report error: code: {% for index in range(1,8) %}
- boot: method: minimal timeout: minutes: 10 auto_login: login_prompt: 'tegra-ubuntu login:' username: root password_prompt: "Password:" password: "root" login_commands: - ifconfig prompts: - 'root@tegra-ubuntu:' parameters: kernel-start-message: '' transfer_overlay: download_command: cd /tmp ; wget unpack_command: tar -m -C / -xzf
{% endfor %}
error: line22 is "{% for index in range(1,8) %}" Invalid definition: Loading job submission failed: while scanning for the next token found character that cannot start any token in "", line 22, column 2.
Where did I go wrong? _______________________________________________ lava-users mailing list -- lava-users@lists.lavasoftware.org To unsubscribe send an email to lava-users-leave@lists.lavasoftware.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
lava-users mailing list -- lava-users@lists.lavasoftware.org To unsubscribe send an email to lava-users-leave@lists.lavasoftware.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
How to generate long job define? I found that if I add a "-boot" every time, I can do a reboot. Is there any way to achieve this?
Hi Milosz, Thank you for your confirmation ,this saves me a lot of time Regarding the long job define mentioned earlier, How to generate it? I found that if I add a "-boot" every time, I can do a reboot. Is this the method you are talking about? Or there are other ways to implement it, Regardless of whether it is beautiful or not, realization always first priority
lava-users@lists.lavasoftware.org