Commit 9b4d5c01 authored by Joel Savitz's avatar Joel Savitz Committed by Shuah Khan

selftests: make use of GUP_TEST_FILE macro

Commit 17de1e55 ("selftests: clarify common error when running
gup_test") had most of its hunks dropped due to a conflict with another
patch accepted into Linux around the same time that implemented the same
behavior as a subset of other changes.

However, the remaining hunk defines the GUP_TEST_FILE macro without
making use of it. This patch makes use of the macro in the two relevant
places.

Furthermore, the above mentioned commit's log message erroneously describes
the changes that were dropped from the patch.

This patch corrects the record.

Fixes: 17de1e55 ("selftests: clarify common error when running gup_test")
Signed-off-by: default avatarJoel Savitz <jsavitz@redhat.com>
Reviewed-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Acked-by: default avatarNico Pache <npache@redhat.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 3084a4ec
...@@ -209,7 +209,7 @@ int main(int argc, char **argv) ...@@ -209,7 +209,7 @@ int main(int argc, char **argv)
if (write) if (write)
gup.gup_flags |= FOLL_WRITE; gup.gup_flags |= FOLL_WRITE;
gup_fd = open("/sys/kernel/debug/gup_test", O_RDWR); gup_fd = open(GUP_TEST_FILE, O_RDWR);
if (gup_fd == -1) { if (gup_fd == -1) {
switch (errno) { switch (errno) {
case EACCES: case EACCES:
...@@ -224,7 +224,7 @@ int main(int argc, char **argv) ...@@ -224,7 +224,7 @@ int main(int argc, char **argv)
printf("check if CONFIG_GUP_TEST is enabled in kernel config\n"); printf("check if CONFIG_GUP_TEST is enabled in kernel config\n");
break; break;
default: default:
perror("failed to open /sys/kernel/debug/gup_test"); perror("failed to open " GUP_TEST_FILE);
break; break;
} }
exit(KSFT_SKIP); exit(KSFT_SKIP);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment