[v1,4/9] selftests/mm: Enable mrelease_test for arm64

Message ID 20230713135440.3651409-5-ryan.roberts@arm.com
State New
Headers
Series selftests/mm fixes for arm64 |

Commit Message

Ryan Roberts July 13, 2023, 1:54 p.m. UTC
  mrelease_test defaults to defining __NR_pidfd_open and
__NR_process_mrelease syscall numbers to -1, if they are not defined
anywhere else, and the suite would then be marked as skipped as a
result.

arm64 (at least the stock debian toolchain that I'm using) requires
including <sys/syscall.h> to pull in the defines for these syscalls. So
let's add this header. With this in place, the test is passing on arm64.

Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
---
 tools/testing/selftests/mm/mrelease_test.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

David Hildenbrand July 13, 2023, 2:32 p.m. UTC | #1
On 13.07.23 15:54, Ryan Roberts wrote:
> mrelease_test defaults to defining __NR_pidfd_open and
> __NR_process_mrelease syscall numbers to -1, if they are not defined
> anywhere else, and the suite would then be marked as skipped as a
> result.
> 
> arm64 (at least the stock debian toolchain that I'm using) requires
> including <sys/syscall.h> to pull in the defines for these syscalls. So
> let's add this header. With this in place, the test is passing on arm64.
> 
> Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
> ---
>   tools/testing/selftests/mm/mrelease_test.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/mm/mrelease_test.c b/tools/testing/selftests/mm/mrelease_test.c
> index dca21042b679..d822004a374e 100644
> --- a/tools/testing/selftests/mm/mrelease_test.c
> +++ b/tools/testing/selftests/mm/mrelease_test.c
> @@ -7,6 +7,7 @@
>   #include <stdbool.h>
>   #include <stdio.h>
>   #include <stdlib.h>
> +#include <sys/syscall.h>
>   #include <sys/wait.h>
>   #include <unistd.h>
>   #include <asm-generic/unistd.h>

Reviewed-by: David Hildenbrand <david@redhat.com>
  

Patch

diff --git a/tools/testing/selftests/mm/mrelease_test.c b/tools/testing/selftests/mm/mrelease_test.c
index dca21042b679..d822004a374e 100644
--- a/tools/testing/selftests/mm/mrelease_test.c
+++ b/tools/testing/selftests/mm/mrelease_test.c
@@ -7,6 +7,7 @@ 
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <sys/syscall.h>
 #include <sys/wait.h>
 #include <unistd.h>
 #include <asm-generic/unistd.h>