[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250610-selftest-mm-cow-tweaks-v1-2-43cd7457500f@kernel.org>
Date: Tue, 10 Jun 2025 15:13:55 +0100
From: Mark Brown <broonie@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>,
Shuah Khan <shuah@...nel.org>, David Hildenbrand <david@...hat.com>
Cc: linux-mm@...ck.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>
Subject: [PATCH 2/4] selftests/mm: Convert some cow error reports to
ksft_perror()
This prints the errno and a string decode of it.
Reported-by: David Hildenbrand <david@...hat.com>
Signed-off-by: Mark Brown <broonie@...nel.org>
---
tools/testing/selftests/mm/cow.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c
index 0adc0ab142c1..ff80329313e4 100644
--- a/tools/testing/selftests/mm/cow.c
+++ b/tools/testing/selftests/mm/cow.c
@@ -332,7 +332,7 @@ static void do_test_vmsplice_in_parent(char *mem, size_t size,
if (before_fork) {
transferred = vmsplice(fds[1], &iov, 1, 0);
if (transferred <= 0) {
- ksft_print_msg("vmsplice() failed\n");
+ ksft_perror("vmsplice() failed\n");
log_test_result(KSFT_FAIL);
goto close_pipe;
}
@@ -562,7 +562,7 @@ static void do_test_iouring(char *mem, size_t size, bool use_fork)
while (total < size) {
cur = pread(fd, tmp + total, size - total, total);
if (cur < 0) {
- ksft_print_msg("pread() failed\n");
+ ksft_perror("pread() failed\n");
log_test_result(KSFT_FAIL);
goto quit_child;
}
@@ -628,7 +628,7 @@ static void do_test_ro_pin(char *mem, size_t size, enum ro_pin_test test,
tmp = malloc(size);
if (!tmp) {
- ksft_print_msg("malloc() failed\n");
+ ksft_perror("malloc() failed\n");
log_test_result(KSFT_FAIL);
return;
}
--
2.39.5
Powered by blists - more mailing lists