From 8b83136326502b178886b8d0686e5aa4ddb4d93b Mon Sep 17 00:00:00 2001 From: Brandon Maier Date: Mon, 15 Jul 2024 14:50:39 +0000 Subject: [PATCH] support/testing/infra/emulator.py: support init=/bin/sh The TestInitSystemNone bypasses the normal init and instead launches directly into a shell. So it needs to bypass the login code and go directly to a shell. Signed-off-by: Brandon Maier Signed-off-by: Thomas Petazzoni (cherry picked from commit 95e10430131fb524a27985b82ee70ae8d0fe71d9) Signed-off-by: Peter Korsgaard --- support/testing/infra/emulator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/support/testing/infra/emulator.py b/support/testing/infra/emulator.py index 4be7e9598b..d0f190b924 100644 --- a/support/testing/infra/emulator.py +++ b/support/testing/infra/emulator.py @@ -137,6 +137,9 @@ class Emulator(object): self.qemu.expect("Password:") self.qemu.sendline(password) + self.connect_shell() + + def connect_shell(self): extra_init_cmd = " && ".join([ 'export PAGER=cat', 'dmesg -n 1',