Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to loop "-boot" action for reboot stress test? #337

Open
irreallich opened this issue Apr 8, 2024 · 0 comments
Open

how to loop "-boot" action for reboot stress test? #337

irreallich opened this issue Apr 8, 2024 · 0 comments

Comments

@irreallich
Copy link

irreallich commented Apr 8, 2024

Sorry, I'm not sure it's appropriate to ask a question here, I am new to lava, I hope to know how to use loop in lava test.

Because our system needs to save some content when rebooting, I hope to test this function, such as rebooting 5000 times, but I don’t know how to add a loop to lava device (jinja2) or job (yaml).
I find the file https://github.com/Linaro/lava-test-plans/blob/master/lava_test_plans/testcases/android-boottime.yaml, It looks like the "-boot" action can be controlled through a for loop.

{% 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 %}

But when I try the following 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 %}

lava report 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.

image

where did I go wrong?

@irreallich irreallich changed the title How to loop "-boot" action for reboot stress test? Could you please help me about how to loop "-boot" action for reboot stress test? Apr 8, 2024
@irreallich irreallich changed the title Could you please help me about how to loop "-boot" action for reboot stress test? how to loop "-boot" action for reboot stress test? Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant