Hello Milosz,

I updated the job as suggested. But even though it is matching the prompt successfully the "kernel-messages" as passed. It stays in hung state and fails after timeout.

- boot:
    timeout:
      minutes: 15
    method: qemu
    media: tmpfs
    prompts:
    - 'root@device-mgmt'
    auto_login:
      login_prompt: "device-mgmt login:"
      username: root
      password_prompt: "Password:"
      password: "root"

Please find the logs attched.

Thanks,
Sweta

  

From: Milosz Wasilewski <milosz.wasilewski@foundries.io>
Sent: Tuesday, October 29, 2024 6:55 PM
To: Sweta Ghosh <sweta.ghosh@nagarro.com>
Cc: Stefan <lists.lavasoftware.org_23@green-sparklet.de>; lava-users@lists.lavasoftware.org <lava-users@lists.lavasoftware.org>
Subject: Re: [lava-users] Re: Auto login fails after adding banner message before login prompt
 
[Email from a non-Nagarro source: please exercise caution with links and attachments]


On Tue, Oct 29, 2024 at 1:02 PM Sweta Ghosh <sweta.ghosh@nagarro.com> wrote:
>
> Yes, after changing the kernel_start_message to Starting systemd-udevd version \d+(\.\d+)*(-\S+)*  it progressed. But now even after matching the prompt it is failing. Please find the job description:
> - boot:
>     prompts:
>      - 'root@device-mgmt'
>      - 'device-mgmt login:'
>     timeout:
>       minutes: 10
>     method: qemu
>     media: tmpfs
>     auto_login:
>       login_prompt: "login:"
>       username: root
>       password_prompt: "Password:"
>       password: "root"

The log looks a bit odd. In some places the list of patterns is empty.
In your device's rendered dictionary you can look for
default-shell-prompt. This might explain some issues.

One thing I might suggest is to remove "device-mgmt login:" from
prompts. You can set it as login_prompt. LAVA is matching this string
and ignores auto_login section. Anyway, at this point it's an exercise
in selecting proper regexes for your job.

Best Regards,
Milosz