Skip to content

Commit 9b4d5c0

Browse files
theyoyojoshuahkh
authored andcommitted
selftests: make use of GUP_TEST_FILE macro
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 <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Acked-by: Nico Pache <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent 3084a4e commit 9b4d5c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/vm/gup_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ int main(int argc, char **argv)
209209
if (write)
210210
gup.gup_flags |= FOLL_WRITE;
211211

212-
gup_fd = open("/sys/kernel/debug/gup_test", O_RDWR);
212+
gup_fd = open(GUP_TEST_FILE, O_RDWR);
213213
if (gup_fd == -1) {
214214
switch (errno) {
215215
case EACCES:
@@ -224,7 +224,7 @@ int main(int argc, char **argv)
224224
printf("check if CONFIG_GUP_TEST is enabled in kernel config\n");
225225
break;
226226
default:
227-
perror("failed to open /sys/kernel/debug/gup_test");
227+
perror("failed to open " GUP_TEST_FILE);
228228
break;
229229
}
230230
exit(KSFT_SKIP);

0 commit comments

Comments
 (0)