From 8233cb94cd38c91191b153200fbec6ea3db1e00e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Tue, 21 Jan 2025 22:41:53 +0100 Subject: [PATCH] Fix kernel tainted test (#3818) I have only tested that it fails for unreleased 6.6.72 kernel but haven't tested the happy path and missed that it also failed because the types were different. Stupid me. --- tests/smoke_test/test_basic.py | 2 +- tests/supervisor_test/test_supervisor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/smoke_test/test_basic.py b/tests/smoke_test/test_basic.py index 615695ff4..eb6d42b45 100644 --- a/tests/smoke_test/test_basic.py +++ b/tests/smoke_test/test_basic.py @@ -83,4 +83,4 @@ def test_kernel_not_tainted(shell): """Check if the kernel is not tainted - do it at the end of the test suite to increase the chance of catching issues.""" output = shell.run_check("cat /proc/sys/kernel/tainted") - assert output == "0\n", f"Kernel tainted: {output}" + assert "\n".join(output) == "0", f"Kernel tainted: {output}" diff --git a/tests/supervisor_test/test_supervisor.py b/tests/supervisor_test/test_supervisor.py index 92623e327..8351fb6c5 100644 --- a/tests/supervisor_test/test_supervisor.py +++ b/tests/supervisor_test/test_supervisor.py @@ -197,4 +197,4 @@ def test_kernel_not_tainted(shell): """Check if the kernel is not tainted - do it at the end of the test suite to increase the chance of catching issues.""" output = shell.run_check("cat /proc/sys/kernel/tainted") - assert output == "0\n", f"Kernel tainted: {output}" + assert "\n".join(output) == "0", f"Kernel tainted: {output}"