From: "Laguna, Lukasz" <lukasz.laguna@intel.com>
To: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>,
<igt-dev@lists.freedesktop.org>
Cc: <kamil.konieczny@linux.intel.com>,
<adam.miszczak@linux.intel.com>, <jakub1.kolakowski@intel.com>,
<michal.wajdeczko@intel.com>, <michal.winiarski@intel.com>,
<narasimha.c.v@intel.com>, <piotr.piorkowski@intel.com>,
<satyanarayana.k.v.p@intel.com>, <tomasz.lis@intel.com>
Subject: Re: [PATCH v3 i-g-t 3/4] tests/xe/xe_sriov_flr: Use SKIP for unmet subcheck prerequisites
Date: Fri, 22 Nov 2024 11:39:15 +0100 [thread overview]
Message-ID: <dd49b6a0-4039-4ea3-b34b-be1f10d25ecf@intel.com> (raw)
In-Reply-To: <20241121141851.631877-4-marcin.bernatowicz@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 4156 bytes --]
On 11/21/2024 15:18, Marcin Bernatowicz wrote:
> Handle missing prerequisites by marking subchecks as SKIP instead of FAIL.
> This avoids misleading results suggesting FLR issues when tests haven't
> started or conditions aren't met.
>
> Signed-off-by: Marcin Bernatowicz<marcin.bernatowicz@linux.intel.com>
> Cc: Adam Miszczak<adam.miszczak@linux.intel.com>
> Cc: C V Narasimha<narasimha.c.v@intel.com>
> Cc: Jakub Kolakowski<jakub1.kolakowski@intel.com>
> Cc: K V P Satyanarayana<satyanarayana.k.v.p@intel.com>
> Cc: Lukasz Laguna<lukasz.laguna@intel.com>
> Cc: Michał Wajdeczko<michal.wajdeczko@intel.com>
> Cc: Michał Winiarski<michal.winiarski@intel.com>
> Cc: Piotr Piórkowski<piotr.piorkowski@intel.com>
> Cc: Tomasz Lis<tomasz.lis@intel.com>
> ---
> tests/intel/xe_sriov_flr.c | 21 +++++++++++++--------
> 1 file changed, 13 insertions(+), 8 deletions(-)
>
> diff --git a/tests/intel/xe_sriov_flr.c b/tests/intel/xe_sriov_flr.c
> index 1049cffec..550d58bb9 100644
> --- a/tests/intel/xe_sriov_flr.c
> +++ b/tests/intel/xe_sriov_flr.c
> @@ -393,7 +393,12 @@ static int populate_ggtt_pte_offsets(struct ggtt_data *gdata)
> if (vf_id == 0)
> continue;
>
> - igt_assert(vf_id >= 1 && vf_id <= num_vfs);
> + 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",
> + vf_id, i, ranges[i].start, ranges[i].end, num_vfs);
> + free(ranges);
> + return -1;
> + }
>
> if (gdata->pte_offsets[vf_id].end) {
> set_skip_reason(&gdata->base, "Duplicate GGTT PTE offset range for VF%u\n",
> @@ -410,7 +415,7 @@ static int populate_ggtt_pte_offsets(struct ggtt_data *gdata)
>
> for (int vf_id = 1; vf_id <= num_vfs; ++vf_id)
> if (!gdata->pte_offsets[vf_id].end) {
> - set_fail_reason(&gdata->base,
> + set_skip_reason(&gdata->base,
> "Failed to find VF%u provisioned GGTT PTE offset range\n",
> vf_id);
> return -1;
> @@ -440,7 +445,7 @@ static void ggtt_subcheck_init(struct subcheck_data *data)
>
> populate_ggtt_pte_offsets(gdata);
> } else {
> - set_fail_reason(data, "xe_mmio is NULL\n");
> + set_skip_reason(data, "xe_mmio is NULL\n");
> }
> }
>
> @@ -460,7 +465,7 @@ static void ggtt_subcheck_prepare_vf(int vf_id, struct subcheck_data *data)
> for_each_pte_offset(pte_offset, &gdata->pte_offsets[vf_id]) {
> if (!set_pte_gpa(&gdata->ggtt, gdata->mmio, data->gt, pte_offset,
> (uint8_t)vf_id, &pte)) {
> - set_fail_reason(data,
> + set_skip_reason(data,
> "Prepare VF%u failed, unexpected gpa: Read PTE: %#lx at offset: %#x\n",
> vf_id, pte, pte_offset);
> return;
> @@ -696,7 +701,7 @@ static void lmem_subcheck_prepare_vf(int vf_id, struct subcheck_data *data)
>
> if (!lmem_mmap_write_munmap(data->pf_fd, vf_id,
> ldata->vf_lmem_size[vf_id], vf_id)) {
> - set_fail_reason(data, "LMEM write failed on VF%u\n", vf_id);
> + set_skip_reason(data, "LMEM write failed on VF%u\n", vf_id);
> }
> }
>
> @@ -758,12 +763,12 @@ static void regs_subcheck_prepare_vf(int vf_id, struct subcheck_data *data)
> struct pci_device *pci_dev = __igt_device_get_pci_device(data->pf_fd, vf_id);
>
> if (!pci_dev) {
> - set_fail_reason(data, "No PCI device found for VF%u\n", vf_id);
> + set_skip_reason(data, "No PCI device found for VF%u\n", vf_id);
> return;
> }
>
> if (intel_register_access_init(&rdata->mmio[vf_id], pci_dev, false)) {
> - set_fail_reason(data, "Failed to get access to VF%u MMIO\n", vf_id);
> + set_skip_reason(data, "Failed to get access to VF%u MMIO\n", vf_id);
> return;
> }
> }
> @@ -773,7 +778,7 @@ static void regs_subcheck_prepare_vf(int vf_id, struct subcheck_data *data)
>
> intel_register_write(&rdata->mmio[vf_id], reg, vf_id);
> if (intel_register_read(&rdata->mmio[vf_id], reg) != vf_id) {
> - set_fail_reason(data, "Registers write/read check failed on VF%u\n", vf_id);
> + set_skip_reason(data, "Registers write/read check failed on VF%u\n", vf_id);
> return;
> }
> }
LGTM,
Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com>
[-- Attachment #2: Type: text/html, Size: 5551 bytes --]
next prev parent reply other threads:[~2024-11-22 10:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 14:18 [PATCH v3 i-g-t 0/4] Improvements for xe_sriov_flr test and xe_mmio lib Marcin Bernatowicz
2024-11-21 14:18 ` [PATCH v3 i-g-t 1/4] lib/xe/xe_mmio: Replace open-coded init/cleanup with existing functions Marcin Bernatowicz
2024-11-21 14:18 ` [PATCH v3 i-g-t 2/4] lib/xe/xe_sriov_provisioning: Refactor range handling and logging Marcin Bernatowicz
2024-11-21 14:18 ` [PATCH v3 i-g-t 3/4] tests/xe/xe_sriov_flr: Use SKIP for unmet subcheck prerequisites Marcin Bernatowicz
2024-11-22 10:39 ` Laguna, Lukasz [this message]
2024-11-21 14:18 ` [PATCH v3 i-g-t 4/4] lib/xe/xe_sriov_provisioning: Iterate only within valid PTE offsets Marcin Bernatowicz
2024-11-22 10:43 ` Laguna, Lukasz
2024-11-21 17:31 ` ✓ Xe.CI.BAT: success for Improvements for xe_sriov_flr test and xe_mmio lib (rev3) Patchwork
2024-11-21 17:44 ` ✗ i915.CI.BAT: failure " Patchwork
2024-11-22 2:31 ` ✗ Xe.CI.Full: " Patchwork
2024-11-22 13:29 ` Bernatowicz, Marcin
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=dd49b6a0-4039-4ea3-b34b-be1f10d25ecf@intel.com \
--to=lukasz.laguna@intel.com \
--cc=adam.miszczak@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jakub1.kolakowski@intel.com \
--cc=kamil.konieczny@linux.intel.com \
--cc=marcin.bernatowicz@linux.intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=michal.winiarski@intel.com \
--cc=narasimha.c.v@intel.com \
--cc=piotr.piorkowski@intel.com \
--cc=satyanarayana.k.v.p@intel.com \
--cc=tomasz.lis@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