All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftest/vm: clarify error statement in gup_test
@ 2022-03-30 21:52 Sidhartha Kumar
  2022-03-31  1:54 ` Andrew Morton
  2022-03-31 19:28 ` Shuah Khan
  0 siblings, 2 replies; 3+ messages in thread
From: Sidhartha Kumar @ 2022-03-30 21:52 UTC (permalink / raw)
  To: shuah, akpm
  Cc: Sidhartha Kumar, linux-mm, linux-kselftest, linux-kernel, stable

Print two possible reasons /sys/kernel/debug/gup_test
cannot be opened to help users of this test diagnose
failures.

Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: stable@vger.kernel.org # 5.15+
---
 tools/testing/selftests/vm/gup_test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/vm/gup_test.c b/tools/testing/selftests/vm/gup_test.c
index fe043f67798b0..c496bcefa7a0e 100644
--- a/tools/testing/selftests/vm/gup_test.c
+++ b/tools/testing/selftests/vm/gup_test.c
@@ -205,7 +205,9 @@ int main(int argc, char **argv)
 
 	gup_fd = open("/sys/kernel/debug/gup_test", O_RDWR);
 	if (gup_fd == -1) {
-		perror("open");
+		perror("failed to open /sys/kernel/debug/gup_test");
+		printf("check if CONFIG_GUP_TEST is enabled in kernel config\n");
+		printf("check if debugfs is mounted at /sys/kernel/debug\n");
 		exit(1);
 	}
 
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-31 19:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-30 21:52 [PATCH] selftest/vm: clarify error statement in gup_test Sidhartha Kumar
2022-03-31  1:54 ` Andrew Morton
2022-03-31 19:28 ` Shuah Khan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.