Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Bernatowicz, Marcin" <marcin.bernatowicz@linux.intel.com>
To: Jan Sokolowski <jan.sokolowski@intel.com>, igt-dev@lists.freedesktop.org
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Subject: Re: [PATCH i-g-t v2 6/8] tests/intel/xe_sriov*: fixup print/scan formatting for files in tests
Date: Fri, 23 May 2025 15:33:27 +0200	[thread overview]
Message-ID: <0ddec057-9ef8-48ff-a7fb-ceb736452531@linux.intel.com> (raw)
In-Reply-To: <20250519113010.125751-7-jan.sokolowski@intel.com>



On 5/19/2025 1:30 PM, Jan Sokolowski wrote:
> Compiling on other architectures than x86-64 causes a lot
> of print/scan formatting warnings.
> 
> Fix formatting by using proper formatters, eg. PRIu64.
> 
> Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
> Cc: Lukasz Laguna <lukasz.laguna@intel.com>
> Cc: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
> ---
>   tests/intel/xe_sriov_auto_provisioning.c |  6 +++---
>   tests/intel/xe_sriov_flr.c               | 12 ++++++------
>   tests/intel/xe_sriov_scheduling.c        |  4 ++--
>   3 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/tests/intel/xe_sriov_auto_provisioning.c b/tests/intel/xe_sriov_auto_provisioning.c
> index 9ef5ed79a..451c3c5ca 100644
> --- a/tests/intel/xe_sriov_auto_provisioning.c
> +++ b/tests/intel/xe_sriov_auto_provisioning.c
> @@ -58,7 +58,7 @@ static int ranges_fair_allocation(enum xe_sriov_shared_res res,
>   		uint64_t current_allocation = ranges[i].end - ranges[i].start + 1;
>   
>   		if (igt_debug_on_f(current_allocation != expected_allocation,
> -				   "%s: Allocation mismatch, expected=%lu VF%u=%lu\n",
> +				   "%s: Allocation mismatch, expected=%" PRIu64 " VF%u=%" PRIu64 "\n",
>   				   xe_sriov_debugfs_provisioned_attr_name(res),
>   				   expected_allocation, ranges[i].vf_id,
>   				   current_allocation)) {
> @@ -183,8 +183,8 @@ static int check_no_overlap(int pf_fd, unsigned int num_vfs, unsigned int gt_id,
>   	for (unsigned int i = 0; i < num_vfs - 1; i++)
>   		if (ranges[i].end >= ranges[i + 1].start) {
>   			igt_debug((res == XE_SRIOV_SHARED_RES_GGTT) ?
> -				  "Overlapping ranges: VF%u [%lx-%lx] and VF%u [%lx-%lx]\n" :
> -				  "Overlapping ranges: VF%u [%lu-%lu] and VF%u [%lu-%lu]\n",
> +				  "Overlapping ranges: VF%u [%" PRIx64 "-%" PRIx64 "] and VF%u [%" PRIx64 "-%" PRIx64 "]\n" :
> +				  "Overlapping ranges: VF%u [%" PRIu64 "-%" PRIu64 "] and VF%u [%" PRIu64 "-%" PRIu64 "]\n",
>   				  ranges[i].vf_id, ranges[i].start, ranges[i].end,
>   				  ranges[i + 1].vf_id, ranges[i + 1].start, ranges[i + 1].end);
>   			free(ranges);
> diff --git a/tests/intel/xe_sriov_flr.c b/tests/intel/xe_sriov_flr.c
> index a98d6ce70..91d9730fa 100644
> --- a/tests/intel/xe_sriov_flr.c
> +++ b/tests/intel/xe_sriov_flr.c
> @@ -562,7 +562,7 @@ static int populate_ggtt_pte_offsets(struct ggtt_data *gdata)
>   			continue;
>   
>   		if (vf_id < 1 || vf_id > num_vfs) {
> -			set_skip_reason(&gdata->base, "Unexpected VF%u at range entry %u [%#lx-%#lx], num_vfs=%u\n",
> +			set_skip_reason(&gdata->base, "Unexpected VF%u at range entry %u [%#" PRIx64 "-%#" PRIx64 "], num_vfs=%u\n",
>   					vf_id, i, ranges[i].start, ranges[i].end, num_vfs);
>   			free(ranges);
>   			return -1;
> @@ -634,7 +634,7 @@ static void ggtt_subcheck_prepare_vf(int vf_id, struct subcheck_data *data)
>   		if (!set_pte_gpa(&gdata->ggtt, gdata->mmio, data->gt, pte_offset,
>   				 (uint8_t)vf_id, &pte)) {
>   			set_skip_reason(data,
> -					"Prepare VF%u failed, unexpected gpa: Read PTE: %#lx at offset: %#x\n",
> +					"Prepare VF%u failed, unexpected gpa: Read PTE: %#" PRIx64 " at offset: %#x\n",
>   					vf_id, pte, pte_offset);
>   			return;
>   		}
> @@ -655,7 +655,7 @@ static void ggtt_subcheck_verify_vf(int vf_id, int flr_vf_id, struct subcheck_da
>   		if (!check_pte_gpa(&gdata->ggtt, gdata->mmio, data->gt, pte_offset,
>   				   expected, &pte)) {
>   			set_fail_reason(data,
> -					"GGTT check after VF%u FLR failed on VF%u: Read PTE: %#lx at offset: %#x\n",
> +					"GGTT check after VF%u FLR failed on VF%u: Read PTE: %#" PRIx64 " at offset: %#x\n",
>   					flr_vf_id, vf_id, pte, pte_offset);
>   			return;
>   		}
> @@ -712,7 +712,7 @@ static void *mmap_vf_lmem(int pf_fd, int vf_num, size_t length, int prot, off_t
>   	}
>   
>   	if (st.st_size < length) {
> -		igt_debug("Mapping length (%lu) exceeds BAR2 size (%lu)\n", length, st.st_size);
> +		igt_debug("Mapping length (%zu) exceeds BAR2 size (%" PRIo64 ")\n", length, st.st_size);

Why PRIo64 ?

>   		close(fd);
>   		return NULL;
>   	}
> @@ -750,7 +750,7 @@ static bool lmem_write_pattern(struct lmem_info *lmem, char value, size_t start,
>   
>   	for (; start < lmem->size; start += step) {
>   		read = lmem_write_readback(lmem->addr, start, value);
> -		if (igt_debug_on_f(read != value, "LMEM[%lu]=%u != %u\n", start, read, value))
> +		if (igt_debug_on_f(read != value, "LMEM[%zu]=%u != %u\n", start, read, value))
>   			return false;
>   	}
>   	return true;
> @@ -765,7 +765,7 @@ static bool lmem_contains_expected_values_(struct lmem_info *lmem,
>   	for (; start < lmem->size; start += step) {
>   		read = lmem_read(lmem->addr, start);
>   		if (igt_debug_on_f(read != expected,
> -				   "LMEM[%lu]=%u != %u\n", start, read, expected))
> +				   "LMEM[%zu]=%u != %u\n", start, read, expected))
>   			return false;
>   	}
>   	return true;
> diff --git a/tests/intel/xe_sriov_scheduling.c b/tests/intel/xe_sriov_scheduling.c
> index 2cd18c982..d69315690 100644
> --- a/tests/intel/xe_sriov_scheduling.c
> +++ b/tests/intel/xe_sriov_scheduling.c
> @@ -346,7 +346,7 @@ static void compute_common_time_frame_stats(struct subm_set *set)
>   			common_end = stats->end_timestamp;
>   	}
>   
> -	igt_info("common time frame: [%lu;%lu] %.2fms\n",
> +	igt_info("common time frame: [%" PRIu64 ";%" PRIu64 "] %.2fms\n",
>   		 common_start, common_end, (common_end - common_start) / 1e6);
>   
>   	if (igt_warn_on_f(common_end <= common_start, "No common time frame for all sets found\n"))
> @@ -671,7 +671,7 @@ static void nonpreempt_engine_resets(int pf_fd, int num_vfs,
>   	int preemptible_end = 1;
>   	uint8_t vf_ids[num_vfs + 1 /*PF*/];
>   
> -	igt_info("eq=%ums pt=%uus duration=%lums num_vfs=%d job_timeout=%ums\n",
> +	igt_info("eq=%ums pt=%uus duration=%" PRIu64 "ms num_vfs=%d job_timeout=%ums\n",
>   		 vf_sched_params.exec_quantum_ms, vf_sched_params.preempt_timeout_us,
>   		 duration_ms, num_vfs, job_timeout_ms);
>   

  reply	other threads:[~2025-05-23 13:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-19 11:30 [PATCH i-g-t v2 0/8] Print/scan formatting fixups Jan Sokolowski
2025-05-19 11:30 ` [PATCH i-g-t v2 1/8] lib/amdgpu: fixup print/scan formatting for files in lib Jan Sokolowski
2025-05-19 11:30 ` [PATCH i-g-t v2 2/8] tests/amdgpu: fixup print/scan formatting for files in tests Jan Sokolowski
2025-05-19 11:30 ` [PATCH i-g-t v2 3/8] lib/igt_nouveau: fixup print/scan formatting for files in lib Jan Sokolowski
2025-05-19 11:30 ` [PATCH i-g-t v2 4/8] lib/igt_perf: " Jan Sokolowski
2025-05-19 11:30 ` [PATCH i-g-t v2 5/8] lib/xe/xe_sriov*: " Jan Sokolowski
2025-05-23 13:21   ` Bernatowicz, Marcin
2025-05-19 11:30 ` [PATCH i-g-t v2 6/8] tests/intel/xe_sriov*: fixup print/scan formatting for files in tests Jan Sokolowski
2025-05-23 13:33   ` Bernatowicz, Marcin [this message]
2025-05-19 11:30 ` [PATCH i-g-t v2 7/8] runner: fixup print/scan formatting for files in runner Jan Sokolowski
2025-05-19 18:42   ` Kamil Konieczny
2025-05-19 11:30 ` [PATCH i-g-t v2 8/8] tests/intel: fixup print/scan formatting for files in intel tests Jan Sokolowski
2025-05-19 20:14 ` ✓ Xe.CI.BAT: success for Print/scan formatting fixups (rev2) Patchwork
2025-05-19 20:19 ` ✓ i915.CI.BAT: " Patchwork
2025-05-20  0:59 ` ✗ i915.CI.Full: failure " Patchwork
2025-05-20  2:38 ` ✗ Xe.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0ddec057-9ef8-48ff-a7fb-ceb736452531@linux.intel.com \
    --to=marcin.bernatowicz@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jan.sokolowski@intel.com \
    --cc=lukasz.laguna@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox