selftests/mm: report unique test names for each cow test
authorMark Brown <broonie@kernel.org>
Tue, 27 May 2025 16:04:47 +0000 (17:04 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 1 Jun 2025 05:46:16 +0000 (22:46 -0700)
commit3f2d9a9ac544694e26c8faeb1a044c2bdcd0c793
tree95fe65f967720f707ce6ea88c9484936065fd87b
parent3f192afbede24c60e59db1272ad155a3a44f5fe7
selftests/mm: report unique test names for each cow test

The kselftest framework uses the string logged when a test result is
reported as the unique identifier for a test, using it to track test
results between runs.  The cow test completely fails to follow this
pattern, it runs test functions repeatedly with various parameters with
each result report from those functions being a string logging an error
message which is fixed between runs.

Since the code already logs each test uniquely before it starts refactor
to also print this to a buffer, then use that name as the test result.
This isn't especially pretty but is relatively straightforward and is a
great help to tooling.

Link: https://lkml.kernel.org/r/20250527-selftests-mm-cow-dedupe-v2-3-ff198df8e38e@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/cow.c