qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/4] tests/functional: Add a class containing Linux kernel helper


From: Philippe Mathieu-Daudé
Subject: [PATCH 1/4] tests/functional: Add a class containing Linux kernel helpers
Date: Tue, 27 Aug 2024 00:10:55 +0200

Use the 'linux_kernel' namespace to provide common helpers
to functional tests booting a Linux kernel.

Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 tests/functional/qemu_test/linux_kernel.py | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 tests/functional/qemu_test/linux_kernel.py

diff --git a/tests/functional/qemu_test/linux_kernel.py 
b/tests/functional/qemu_test/linux_kernel.py
new file mode 100644
index 0000000000..917beb7fb6
--- /dev/null
+++ b/tests/functional/qemu_test/linux_kernel.py
@@ -0,0 +1,19 @@
+# Linux kernel functional test helpers
+#
+# Copyright (c) 2024 Linaro Ltd.
+#
+# Author:
+#  Philippe Mathieu-Daudé <philmd@linaro.org>
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+from . import wait_for_console_pattern
+
+KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
+
+KERNEL_PANIC_MESSAGE = 'Kernel panic - not syncing'
+
+def linux_kernel_wait_for_pattern(test, success_message):
+    wait_for_console_pattern(test,
+                             success_message=success_message,
+                             failure_message=KERNEL_PANIC_MESSAGE)
-- 
2.45.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]