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.
This commit is contained in:
Jan Čermák 2025-01-21 22:41:53 +01:00 committed by GitHub
parent 48bf9b5056
commit 8233cb94cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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}"

View File

@ -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}"