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

Jake Freeland jake at technologyfriends.net
Wed Oct 12 13:27:26 UTC 2022


Kamil,

Understood. Thank you for clarifying that.

Jake Freeland

On Tue, Oct 11, 2022 at 3:52 AM Kamil Konieczny <
kamil.konieczny at linux.intel.com> wrote:

> Hi Jake,
>
> On 2022-10-07 at 16:01:12 -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>
>
> When I wrote about "adding r-b" that means you can add:
>
> Reviewed-by: Name of Reviewer <reviewer at address>
>
> after your s-b (signed-off-by) line, so it will look like:
>
> Signed-off-by: Jake Freeland <jfree at freebsd.org>
> 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
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/igt-dev/attachments/20221012/8914dd99/attachment.htm>


More information about the igt-dev mailing list