[igt-dev] [PATCH i-g-t 07/10] tests/i915/gem_mmap_*: Add NULL to ptrace() calls

Kamil Konieczny kamil.konieczny at linux.intel.com
Fri Oct 7 11:19:48 UTC 2022


Hi Jake,

On 2022-10-06 at 23:07:15 -0500, Jake Freeland wrote:
> In FreeBSD, the ptrace() function cannot take a variable
> length list of arguments. This patch adds NULL in the @data
> parameter to allow for compilation on FreeBSD systems.
> 
> Signed-off-by: Jake Freeland <jfree at freebsd.org>

Please send this outside of your series, it can be merged as is.

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

Regards,
Kamil

> ---
>  tests/i915/gem_mmap_gtt.c    | 2 +-
>  tests/i915/gem_mmap_offset.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
> index e39b9047..4f05eb18 100644
> --- a/tests/i915/gem_mmap_gtt.c
> +++ b/tests/i915/gem_mmap_gtt.c
> @@ -566,7 +566,7 @@ test_ptrace(int fd)
>  	for (int i = 0; i < sz / sizeof(long); i++) {
>  		long ret;
>  
> -		ret = ptrace(PTRACE_PEEKDATA, pid, gtt + i);
> +		ret = ptrace(PTRACE_PEEKDATA, pid, gtt + i, NULL);
>  		igt_assert_eq_u64(ret, CC);
>  		cpy[i] = ret;
>  
> diff --git a/tests/i915/gem_mmap_offset.c b/tests/i915/gem_mmap_offset.c
> index 2b416edd..d1a67f45 100644
> --- a/tests/i915/gem_mmap_offset.c
> +++ b/tests/i915/gem_mmap_offset.c
> @@ -520,7 +520,7 @@ static void test_ptrace(int i915)
>  				for (int i = 0; i < SZ / sizeof(long); i++) {
>  					long ret;
>  
> -					ret = ptrace(PTRACE_PEEKDATA, pid, ptr + i);
> +					ret = ptrace(PTRACE_PEEKDATA, pid, ptr + i, NULL);
>  					igt_assert_eq_u64(ret, CC);
>  					cpy[i] = ret;
>  
> -- 
> 2.37.3
> 


More information about the igt-dev mailing list