]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftest: hugetlb_dio: fix test naming
authorMark Brown <broonie@kernel.org>
Wed, 27 Nov 2024 16:14:22 +0000 (16:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:27 +0000 (20:03 +0100)
commited9132d03854c37da31d959dcd80dac9fbc8c588
tree9f412e83d7c094065140141c6b5908e422644a6b
parenta32ea1d9ee710af89513ea5b9ea45959d8039a8b
selftest: hugetlb_dio: fix test naming

commit 4ae132c693896b0713db572676c90ffd855a4246 upstream.

The string logged when a test passes or fails is used by the selftest
framework to identify which test is being reported.  The hugetlb_dio test
not only uses the same strings for every test that is run but it also uses
different strings for test passes and failures which means that test
automation is unable to follow what the test is doing at all.

Pull the existing duplicated logging of the number of free huge pages
before and after the test out of the conditional and replace that and the
logging of the result with a single ksft_print_result() which incorporates
the parameters passed into the test into the output.

Link: https://lkml.kernel.org/r/20241127-kselftest-mm-hugetlb-dio-names-v1-1-22aab01bf550@kernel.org
Fixes: fae1980347bf ("selftests: hugetlb_dio: fixup check for initial conditions to skip in the start")
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Donet Tom <donettom@linux.ibm.com>
Cc: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/mm/hugetlb_dio.c