Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests/mm: convert some cow error reports to ksft_perror()

This prints the errno and a string decode of it.

Link: https://lkml.kernel.org/r/20250610-selftest-mm-cow-tweaks-v1-2-43cd7457500f@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Mark Brown and committed by
Andrew Morton
5fbfb1f3 be3d3343

+3 -3
+3 -3
tools/testing/selftests/mm/cow.c
··· 332 332 if (before_fork) { 333 333 transferred = vmsplice(fds[1], &iov, 1, 0); 334 334 if (transferred <= 0) { 335 - ksft_print_msg("vmsplice() failed\n"); 335 + ksft_perror("vmsplice() failed\n"); 336 336 log_test_result(KSFT_FAIL); 337 337 goto close_pipe; 338 338 } ··· 562 562 while (total < size) { 563 563 cur = pread(fd, tmp + total, size - total, total); 564 564 if (cur < 0) { 565 - ksft_print_msg("pread() failed\n"); 565 + ksft_perror("pread() failed\n"); 566 566 log_test_result(KSFT_FAIL); 567 567 goto quit_child; 568 568 } ··· 628 628 629 629 tmp = malloc(size); 630 630 if (!tmp) { 631 - ksft_print_msg("malloc() failed\n"); 631 + ksft_perror("malloc() failed\n"); 632 632 log_test_result(KSFT_FAIL); 633 633 return; 634 634 }