All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests: make use of GUP_TEST_FILE macro
@ 2022-06-09 20:32 Joel Savitz
  2022-06-09 21:12 ` Shuah Khan
  2022-06-09 21:50 ` Nico Pache
  0 siblings, 2 replies; 4+ messages in thread
From: Joel Savitz @ 2022-06-09 20:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Joel Savitz, Andrew Morton, Shuah Khan, linux-mm,
	linux-kselftest, Nico Pache

Commit 17de1e559cf1 ("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: 17de1e559cf1 ("selftests: clarify common error when running gup_test")

Signed-off-by: Joel Savitz <jsavitz@redhat.com>
---
 tools/testing/selftests/vm/gup_test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/vm/gup_test.c b/tools/testing/selftests/vm/gup_test.c
index 6bb36ca71cb5..a309876d832f 100644
--- a/tools/testing/selftests/vm/gup_test.c
+++ b/tools/testing/selftests/vm/gup_test.c
@@ -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:
@@ -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);
-- 
2.31.1


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

* Re: [PATCH] selftests: make use of GUP_TEST_FILE macro
  2022-06-09 20:32 [PATCH] selftests: make use of GUP_TEST_FILE macro Joel Savitz
@ 2022-06-09 21:12 ` Shuah Khan
  2022-06-09 21:50 ` Nico Pache
  1 sibling, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2022-06-09 21:12 UTC (permalink / raw)
  To: Joel Savitz, linux-kernel
  Cc: Andrew Morton, Shuah Khan, linux-mm, linux-kselftest, Nico Pache,
	Shuah Khan

On 6/9/22 2:32 PM, Joel Savitz wrote:
> Commit 17de1e559cf1 ("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: 17de1e559cf1 ("selftests: clarify common error when running gup_test")
> 
> Signed-off-by: Joel Savitz <jsavitz@redhat.com>
> ---
>   tools/testing/selftests/vm/gup_test.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/vm/gup_test.c b/tools/testing/selftests/vm/gup_test.c
> index 6bb36ca71cb5..a309876d832f 100644
> --- a/tools/testing/selftests/vm/gup_test.c
> +++ b/tools/testing/selftests/vm/gup_test.c
> @@ -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:
> @@ -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);
> 

Thank you for finding and fixing the problem.

Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah

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

* Re: [PATCH] selftests: make use of GUP_TEST_FILE macro
  2022-06-09 20:32 [PATCH] selftests: make use of GUP_TEST_FILE macro Joel Savitz
  2022-06-09 21:12 ` Shuah Khan
@ 2022-06-09 21:50 ` Nico Pache
  2022-06-16 23:07   ` Shuah Khan
  1 sibling, 1 reply; 4+ messages in thread
From: Nico Pache @ 2022-06-09 21:50 UTC (permalink / raw)
  To: Joel Savitz; +Cc: LKML, Andrew Morton, Shuah Khan, Linux MM, linux-kselftest

LGTM! Good catch :)

Acked-by: Nico Pache <npache@redhat.com>

On Thu, Jun 9, 2022 at 4:37 PM Joel Savitz <jsavitz@redhat.com> wrote:
>
> Commit 17de1e559cf1 ("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: 17de1e559cf1 ("selftests: clarify common error when running gup_test")
>
> Signed-off-by: Joel Savitz <jsavitz@redhat.com>
> ---
>  tools/testing/selftests/vm/gup_test.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/vm/gup_test.c b/tools/testing/selftests/vm/gup_test.c
> index 6bb36ca71cb5..a309876d832f 100644
> --- a/tools/testing/selftests/vm/gup_test.c
> +++ b/tools/testing/selftests/vm/gup_test.c
> @@ -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:
> @@ -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);
> --
> 2.31.1
>


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

* Re: [PATCH] selftests: make use of GUP_TEST_FILE macro
  2022-06-09 21:50 ` Nico Pache
@ 2022-06-16 23:07   ` Shuah Khan
  0 siblings, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2022-06-16 23:07 UTC (permalink / raw)
  To: Nico Pache, Joel Savitz
  Cc: LKML, Andrew Morton, Shuah Khan, Linux MM, linux-kselftest, Shuah Khan

On 6/9/22 3:50 PM, Nico Pache wrote:
> LGTM! Good catch :)
> 
> Acked-by: Nico Pache <npache@redhat.com>
> 
> On Thu, Jun 9, 2022 at 4:37 PM Joel Savitz <jsavitz@redhat.com> wrote:
>>
>> Commit 17de1e559cf1 ("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: 17de1e559cf1 ("selftests: clarify common error when running gup_test")
>>
>> Signed-off-by: Joel Savitz <jsavitz@redhat.com>
>> ---

Applied to linux-kselftest fixes for next rc

thanks,
-- Shuah

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

end of thread, other threads:[~2022-06-16 23:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 20:32 [PATCH] selftests: make use of GUP_TEST_FILE macro Joel Savitz
2022-06-09 21:12 ` Shuah Khan
2022-06-09 21:50 ` Nico Pache
2022-06-16 23:07   ` 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.