Skip to content

Commit

Permalink
selftests: make use of GUP_TEST_FILE macro
Browse files Browse the repository at this point in the history
Commit 17de1e5 ("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: 17de1e5 ("selftests: clarify common error when running gup_test")

Signed-off-by: Joel Savitz <jsavitz@redhat.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Acked-by: Nico Pache <npache@redhat.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
  • Loading branch information
Joel Savitz authored and Shuah Khan committed Jun 16, 2022
1 parent 3084a4e commit 9b4d5c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/testing/selftests/vm/gup_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ int main(int argc, char **argv)
if (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) {
switch (errno) {
case EACCES:
Expand All @@ -224,7 +224,7 @@ int main(int argc, char **argv)
printf("check if CONFIG_GUP_TEST is enabled in kernel config\n");
break;
default:
perror("failed to open /sys/kernel/debug/gup_test");
perror("failed to open " GUP_TEST_FILE);
break;
}
exit(KSFT_SKIP);
Expand Down

0 comments on commit 9b4d5c0

Please sign in to comment.