[PATCH i-g-t 2/2] tests/intel/xe_eudebug_online: Fix 32b compilation warnings/errors
Grzegorzek, Dominik
dominik.grzegorzek at intel.com
Wed Jan 22 13:11:53 UTC 2025
On Tue, 2025-01-21 at 17:17 +0100, Kamil Konieczny wrote:
> Hi Dominik,
> On 2025-01-20 at 14:13:38 +0100, Dominik Grzegorzek wrote:
> > Fix metadata allocation so it is properly sized on 32b and
> > correct all debug prints which were causing compilation warnings.
> >
> > Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
> > ---
> > tests/intel/xe_eudebug_online.c | 10 +++++-----
> > 1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/tests/intel/xe_eudebug_online.c b/tests/intel/xe_eudebug_online.c
> > index f532387af..41a01c02f 100644
> > --- a/tests/intel/xe_eudebug_online.c
> > +++ b/tests/intel/xe_eudebug_online.c
> > @@ -569,7 +569,7 @@ static void get_aips_offset_table(struct online_debug_data *data, int threads)
> >
> > igt_debug("AIPs offset table:\n");
> > for (int i = 0; i < threads; i++)
> > - igt_debug("%lx\n", data->aips_offset_table[i]);
> > + igt_debug("%" PRIx64 "\n", data->aips_offset_table[i]);
> > }
> >
> > static int get_stepped_threads_count(struct online_debug_data *data, int threads)
> > @@ -1063,8 +1063,8 @@ static void run_online_client(struct xe_eudebug_client *c)
> > uint32_t *ptr;
> > int fd, vm_flags;
> >
> > - metadata[0] = calloc(2, sizeof(*metadata));
> > - metadata[1] = calloc(2, sizeof(*metadata));
> > + metadata[0] = calloc(2, sizeof(**metadata));
> > + metadata[1] = calloc(2, sizeof(**metadata));
>
> There are other places with similar pattern 'sizeof(*metadata)'
> If they are also bugs, imho this patch should be splitted into
> PRIu64/other prints and other one for fixing those sizeof.
>
> Regards,
> Kamil
Good catch! Sure, I will send v2.
Regards,
Dominik
>
> > igt_assert(metadata[0]);
> > igt_assert(metadata[1]);
> >
> > @@ -2328,11 +2328,11 @@ static void test_many_sessions_on_tiles(int fd, bool multi_tile)
> >
> > if (multi_tile)
> > igt_assert_f(diff < WORKLOAD_DELAY_US,
> > - "Expected to execute workloads concurrently. Actual delay: %lu ms\n",
> > + "Expected to execute workloads concurrently. Actual delay: %" PRIu64 " ms\n",
> > diff);
> > else
> > igt_assert_f(diff >= WORKLOAD_DELAY_US,
> > - "Expected a serialization of workloads. Actual delay: %lu ms\n",
> > + "Expected a serialization of workloads. Actual delay: %" PRIu64 " ms\n",
> > diff);
> > }
> >
> > --
> > 2.34.1
> >
More information about the igt-dev
mailing list