selftests/powerpc: Detect taint change in mitigation patching test
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 6 Nov 2024 13:04:53 +0000 (00:04 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 7 Nov 2024 11:36:31 +0000 (22:36 +1100)
commita8a54a65cac4f8202df36f925b6746328802d05f
tree770101888898927d059256bb4ec4b2f9e554b351
parentc6a75555b4b2643365a007b7162a670d69aa28fe
selftests/powerpc: Detect taint change in mitigation patching test

Currently the mitigation patching test errors out if the kernel is
tainted prior to the test running.

That causes the test to fail unnecessarily if some other test has caused
the kernel to be tainted, or if a proprietary or force module is loaded
for example.

Instead just warn if the kernel is tainted to begin with, and only
report a change in the taint state as an error in the test.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://patch.msgid.link/20241106130453.1741013-5-mpe@ellerman.id.au
tools/testing/selftests/powerpc/security/mitigation-patching.sh