From: Peter Senna Tschudin <peter.senna@linux.intel.com>
To: "Kamil Konieczny" <kamil.konieczny@linux.intel.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"Ryszard Knop" <ryszard.knop@intel.com>,
"Janusz Krzysztofik" <janusz.krzysztofik@linux.intel.com>,
"Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
"Lucas De Marchi" <lucas.demarchi@intel.com>,
luciano.coelho@intel.com, nirmoy.das@intel.com,
stuart.summers@intel.com, himal.prasad.ghimiray@intel.com,
dominik.karol.piatkowski@intel.com,
katarzyna.piecielska@intel.com,
"Petri Latvala" <adrinael@adrinael.net>,
"Juha-Pekka Heikkila" <juhapekka.heikkila@gmail.com>,
"Juha-Pekka Heikkila" <juha-pekka.heikkila@intel.com>,
"Swati Sharma" <swati2.sharma@intel.com>,
"Jani Saarinen" <jani.saarinen@intel.com>,
"Jani Nikula" <jani.nikula@linux.intel.com>,
"Rob Clark" <robdclark@gmail.com>,
"Rob Clark" <robdclark@chromium.org>,
"Helen Koike" <helen.koike@collabora.com>,
"Melissa Wen" <mwen@igalia.com>,
"Maíra Canal" <mcanal@igalia.com>
Subject: Re: [PATCH i-g-t v10] igt-runner fact checking
Date: Fri, 6 Dec 2024 14:16:27 +0100 [thread overview]
Message-ID: <1ee3fa1d-144a-49f5-8bf3-4fa00929894b@linux.intel.com> (raw)
In-Reply-To: <20241206114250.h53jleknj4kgrpri@kamilkon-desk.igk.intel.com>
Hi Kamil,
Thank you for your comments. I appreciate the opportunity to clarify and address
your concerns.
On 06.12.2024 12:42, Kamil Konieczny wrote:
> Hi Peter,
> On 2024-12-05 at 05:54:26 +0100, Peter Senna Tschudin wrote:
>
> overall looks good, I have few nits, see below.
Thank you! Our CI tested it thoroughly, it creates value, and it works well.
It is time to merge it.
>
> As for subject, it usally informs what changed, so "igt-runner fact checking"
> is a little misleading. Please see my ask about that below.
Please explain what is misleading about the subject. It looks good to me.
>
>> When using igt-runner, collect facts before each test and after the
>> last test, and report when facts change. The facts are:
>> - GPUs on PCI bus: hardware.pci.gpu_at_addr.0000:03:00.0: 8086:e20b Intel Battlemage (Gen20)
>> - Associations between PCI GPU and DRM card: hardware.pci.drm_card_at_addr.0000:03:00.0: card1
>> - Kernel taints: kernel.is_tainted.taint_warn: true
>> - GPU kernel modules loaded: kernel.kmod_is_loaded.i915: true
>>
>> This change imposes little execution overhead and adds just a few
>
> imho 'little overhead' is beause facts are only four but I agree
> we could change implementation when its number grows.
Little overhead is because of how I implemented the code. The execution
is efficient and produces as little text output as possible.
>
>> lines of logging. The facts will be printed on normal igt-runner
>> output. Here is a real example from our CI showing
>> hotreplug-lateclose changing the DRM card number and tainting the
>> kernel on the abort path:
>>
>> [245.316207] [056/121] (816s left) core_hotunplug (hotreplug-lateclose)
>> [245.383596] Starting subtest: hotreplug-lateclose
>> [249.843361] Aborting: Lockdep not active
>> [249.858249] [FACT core_hotunplug (hotreplug-lateclose)] changed: hardware.pci.drm_card_at_addr.0000:00:02.0: card0 -> card1
>> [249.858392] [FACT core_hotunplug (hotreplug-lateclose)] new: kernel.is_tainted.taint_die: true
>> [249.859075] Closing watchdogs
>>
>> CC: Ryszard Knop <ryszard.knop@intel.com>
>> CC: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
>> CC: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
>> CC: Lucas De Marchi <lucas.demarchi@intel.com>
>> CC: luciano.coelho@intel.com
>> CC: nirmoy.das@intel.com
>> CC: stuart.summers@intel.com
>> CC: himal.prasad.ghimiray@intel.com
>> CC: dominik.karol.piatkowski@intel.com
>> CC: katarzyna.piecielska@intel.com
>
> +cc Petri + kms devs
> Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> Cc: Juha-Pekka Heikkila <juha-pekka.heikkila@intel.com>
> Cc: Swati Sharma <swati2.sharma@intel.com>
> Cc: Jani Saarinen <jani.saarinen@intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
>
> +other gpu devs
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: Rob Clark <robdclark@chromium.org>
> Cc: Helen Koike <helen.koike@collabora.com>
>
> +drm ci dev
> Cc: Melissa Wen <mwen@igalia.com>
> Cc: Maíra Canal <mcanal@igalia.com>
That is a lot of people to CC, but ok.
>
>> Signed-off-by: Peter Senna Tschudin <peter.senna@linux.intel.com>
>> ---
>> Re-sending as the mailing list server rejected the message
>> yesterday due to a probably full disk...
>>
>> v10:
>> - fix memory leaks from asprintf (Thank you Dominik Karol!)
>> - fix comments for consistency (Thank you Dominik Karol!)
>>
>> v9:
>> - do not report new hardware when loading/unloading kmod changes
>> the string of the GPU name. I accidentally reintroduced this
>> issue when refactoring to use linked lists.
>> - add tools/lsfacts: 9 lines of code that print either the facts
>> or that no facts were found.
>> - fix code comments describing functions
>> - fix white space issues
>>
>> v8:
>> - fix white space issues
>>
>> v7:
>> - refactor to use linked lists provided by igt_lists
>> - Added function arguments to code comments
>> - updated commit message
>>
>> v6:
>> - sort includes in igt_facts.c alphabetically
>> - add facts for kernel taints using igt_kernel_tainted() and
>> igt_explain_taints()
>>
>> v5:
>> - fix the broken patch format from v4
>>
>> v4:
>> - fix a bug on delete_fact()
>> - drop glib and calls to g_ functions
>> - change commit message to indicate that report only on fact changes
>> - use consistent format for reporting changes
>> - fix SPDX header format
>>
>> v3:
>> - refreshed commit message
>> - changed format SPDX string
>> - removed license text
>> - replace last_test assignment when null by two ternary operators
>> - added function descriptions following example found elsewhere in
>> the code
>> - added igt_assert to catch failures to realloc()
>>
>> v2:
>> - add lib/tests/igt_facts.c for basic unit testing
>> - bugfix: do not report a new gpu when the driver changes the gpu name
>> - bugfix: do not report the pci_id twice on the gpu name
>>
>> lib/igt_facts.c | 755 ++++++++++++++++++++++++++++++++++++++++++
>> lib/igt_facts.h | 47 +++
>> lib/meson.build | 1 +
>> lib/tests/igt_facts.c | 15 +
>> lib/tests/meson.build | 1 +
>
> Please split your patchset into three, add above files to
> first patch:
>
> [PATCH i-g-t v11 1/3] lib/igt_facts: add fact checking lib
>
>> runner/executor.c | 10 +
>
> [PATCH i-g-t v11 2/3] runner/executor: Check facts at tests run
>
>> tools/lsfacts.c | 25 ++
>> tools/meson.build | 1 +
>
> [PATCH i-g-t v11 3/3] tools/lsfacts: Add facts listing tool
>
> and it all with cover letter.
No. Why would I do that? Both the change to runner/executor.c and
the new tool are very small, not justifying a separate patch. They
also match well in functionality also not justifying a different
patch. What gain are you trying to achieve here? I really like a
single patch in this case.
>
>> 8 files changed, 855 insertions(+)
>> create mode 100644 lib/igt_facts.c
>> create mode 100644 lib/igt_facts.h
>> create mode 100644 lib/tests/igt_facts.c
>> create mode 100644 tools/lsfacts.c
>>
>> diff --git a/lib/igt_facts.c b/lib/igt_facts.c
>> new file mode 100644
>> index 000000000..4749d3417
>> --- /dev/null
>> +++ b/lib/igt_facts.c
>> @@ -0,0 +1,755 @@
>> +// SPDX-License-Identifier: MIT
>> +// Copyright © 2024 Intel Corporation
>
> Copyright is usally formatted in C-comment style /* comment */
> to allow extending it (or adding Author: fields, etc) See other
> C files for example tests/device_reset.c
> So here:
>
> /*
> * Copyright © 2024 Intel Corporation
> */
>
> Do the same in other new files.
No sorry, this is because of you asked me to please kernel's
checkpatch.pl. I am not sending another revision for this nit
that changes the comment style. Have you seen how the comment
style varies in our code base, including recent commits? Why
being so picky with my patch?
That being said, if you want to implement these changes yourself
please go for it.
Thank you,
Peter
>
> Regards,
> Kamil
>
>> +
>> +#include <ctype.h>
>> +#include <libudev.h>
>> +#include <stdio.h>
>> +#include <sys/time.h>
>> +#include <time.h>
>> +
>> +#include "igt_core.h"
>> +#include "igt_device_scan.h"
>> +#include "igt_facts.h"
>> +#include "igt_kmod.h"
>> +#include "igt_list.h"
>> +#include "igt_taints.h"
>> +
>> +static struct igt_list_head igt_facts_list_drm_card_head;
>> +static struct igt_list_head igt_facts_list_kmod_head;
>> +static struct igt_list_head igt_facts_list_ktaint_head;
>> +static struct igt_list_head igt_facts_list_pci_gpu_head;
>> +
>> +
>> +/**
>> + * igt_facts_lists_init:
>> + *
>> + * Initialize igt_facts linked lists.
>> + *
>> + * Returns: void
>> + */
>> +void igt_facts_lists_init(void)
>> +{
>> + IGT_INIT_LIST_HEAD(&igt_facts_list_drm_card_head);
>> + IGT_INIT_LIST_HEAD(&igt_facts_list_kmod_head);
>> + IGT_INIT_LIST_HEAD(&igt_facts_list_ktaint_head);
>> + IGT_INIT_LIST_HEAD(&igt_facts_list_pci_gpu_head);
>> +}
>> +
>> +
>> +/**
>> + * igt_facts_log:
>> + * @last_test: name of the test that triggered the fact
>> + * @name: name of the fact
>> + * @new_value: new value of the fact
>> + * @old_value: old value of the fact
>> + *
>> + * Reports fact changes:
>> + * - new fact: if old_value is NULL and new_value is not NULL
>> + * - deleted fact: if new_value is NULL and old_value is not NULL
>> + * - changed fact: if new_value is different from old_value
>> + *
>> + * Returns: void
>> + */
>> +static void igt_facts_log(const char *last_test, const char *name,
>> + const char *new_value, const char *old_value)
>> +{
>
> ...cut...
>
>> --
>> 2.34.1
>>
next prev parent reply other threads:[~2024-12-06 13:16 UTC|newest]
Thread overview: 121+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-02 11:37 [PATCH i-g-t] igt-runner fact checking Peter Senna Tschudin
2024-11-04 19:27 ` ✓ CI.xeBAT: success for " Patchwork
2024-11-05 5:09 ` [PATCH i-g-t] " Peter Senna Tschudin
2024-11-05 8:18 ` ✗ CI.xeFULL: failure for " Patchwork
2024-11-06 9:28 ` [PATCH i-g-t v2] " Peter Senna Tschudin
2024-11-06 12:44 ` Kamil Konieczny
2024-11-07 7:03 ` Peter Senna Tschudin
2024-11-07 17:44 ` Kamil Konieczny
2024-11-06 11:15 ` ✗ Fi.CI.BAT: failure for igt-runner fact checking (rev2) Patchwork
2024-11-06 11:23 ` ✓ CI.xeBAT: success " Patchwork
2024-11-06 14:13 ` [PATCH i-g-t] igt-runner fact checking Lucas De Marchi
2024-11-07 6:57 ` [PATCH i-g-t v3] " Peter Senna Tschudin
2024-11-07 7:13 ` ✗ GitLab.Pipeline: warning for igt-runner fact checking (rev3) Patchwork
2024-11-07 7:18 ` [PATCH i-g-t] igt-runner fact checking Peter Senna Tschudin
2024-11-07 15:55 ` Lucas De Marchi
2024-11-07 17:48 ` Peter Senna Tschudin
2024-11-07 19:29 ` Lucas De Marchi
2024-11-08 5:30 ` Peter Senna Tschudin
2024-11-08 16:24 ` Lucas De Marchi
2024-11-08 1:15 ` Knop, Ryszard
2024-11-08 6:51 ` Peter Senna Tschudin
2024-11-08 13:41 ` Knop, Ryszard
2024-11-07 7:26 ` ✓ CI.xeBAT: success for igt-runner fact checking (rev3) Patchwork
2024-11-07 7:30 ` [PATCH i-g-t v3] igt-runner fact checking Peter Senna Tschudin
2024-11-07 17:39 ` Kamil Konieczny
2024-11-07 7:51 ` ✓ Fi.CI.BAT: success for igt-runner fact checking (rev3) Patchwork
2024-11-07 8:40 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-11-07 13:21 ` ✗ CI.xeFULL: failure for igt-runner fact checking (rev2) Patchwork
2024-11-08 12:54 ` ✗ CI.xeFULL: failure for igt-runner fact checking (rev3) Patchwork
2024-11-09 7:15 ` [PATCH i-g-t v4] igt-runner fact checking Peter Senna Tschudin
2024-11-09 7:46 ` [PATCH i-g-t v5] " Peter Senna Tschudin
2024-11-09 8:33 ` ✓ Fi.CI.BAT: success for igt-runner fact checking (rev5) Patchwork
2024-11-09 8:36 ` ✗ CI.xeBAT: failure " Patchwork
2024-11-11 5:55 ` Peter Senna Tschudin
2024-11-09 9:33 ` ✗ Fi.CI.IGT: " Patchwork
2024-11-11 5:54 ` Peter Senna Tschudin
2024-11-10 5:09 ` ✗ CI.xeFULL: " Patchwork
2024-11-11 5:53 ` Peter Senna Tschudin
2024-11-18 8:24 ` [PATCH i-g-t v6] igt-runner fact checking Peter Senna Tschudin
2024-11-18 13:07 ` Luca Coelho
2024-11-18 16:03 ` Peter Senna Tschudin
2024-11-19 8:19 ` Luca Coelho
2024-11-19 10:07 ` Peter Senna Tschudin
2024-11-19 10:24 ` Luca Coelho
2024-11-20 6:09 ` Peter Senna Tschudin
2024-11-18 20:45 ` ✓ CI.xeBAT: success for igt-runner fact checking (rev6) Patchwork
2024-11-18 21:00 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-11-19 5:31 ` Peter Senna Tschudin
2024-11-19 5:08 ` ✗ CI.xeFULL: " Patchwork
2024-11-19 6:15 ` Peter Senna Tschudin
2024-11-21 12:35 ` [PATCH i-g-t v7] igt-runner fact checking Peter Senna Tschudin
2024-11-21 14:22 ` [PATCH i-g-t v8] " Peter Senna Tschudin
2024-11-25 9:49 ` Zbigniew Kempczyński
2024-11-25 10:21 ` Peter Senna Tschudin
2024-11-25 11:32 ` Zbigniew Kempczyński
2024-11-21 20:48 ` ✓ Xe.CI.BAT: success for igt-runner fact checking (rev8) Patchwork
2024-11-21 20:57 ` ✗ i915.CI.BAT: failure " Patchwork
2024-11-22 6:36 ` Peter Senna Tschudin
2024-11-22 8:08 ` Illipilli, TejasreeX
2024-11-22 8:06 ` ✓ i915.CI.BAT: success " Patchwork
2024-11-22 8:11 ` ✗ Xe.CI.Full: failure " Patchwork
2024-11-22 8:27 ` Peter Senna Tschudin
2024-11-25 7:15 ` Peter Senna Tschudin
2024-11-25 7:20 ` Musial, Ewelina
2024-11-25 7:27 ` Musial, Ewelina
2024-11-25 10:54 ` Illipilli, TejasreeX
2024-11-24 15:01 ` ✗ i915.CI.Full: " Patchwork
2024-11-25 6:57 ` Peter Senna Tschudin
2024-11-25 10:54 ` Illipilli, TejasreeX
2024-11-25 10:39 ` ✓ i915.CI.Full: success " Patchwork
2024-11-29 7:08 ` [PATCH i-g-t v9] igt-runner fact checking Peter Senna Tschudin
2024-12-04 13:17 ` Piatkowski, Dominik Karol
2024-11-29 7:45 ` ✓ Xe.CI.BAT: success for igt-runner fact checking (rev9) Patchwork
2024-11-29 8:07 ` ✗ i915.CI.BAT: failure " Patchwork
2024-11-29 8:16 ` Peter Senna Tschudin
2024-11-29 13:48 ` Illipilli, TejasreeX
2024-11-29 13:42 ` ✓ i915.CI.BAT: success " Patchwork
2024-11-29 17:26 ` ✗ Xe.CI.Full: failure " Patchwork
2024-12-02 5:01 ` Peter Senna Tschudin
2024-11-29 17:28 ` ✗ i915.CI.Full: " Patchwork
2024-12-02 5:07 ` Peter Senna Tschudin
2024-12-03 6:43 ` Illipilli, TejasreeX
2024-12-02 14:29 ` ✓ i915.CI.Full: success " Patchwork
2024-12-05 4:54 ` [PATCH i-g-t v10] igt-runner fact checking Peter Senna Tschudin
2024-12-05 9:08 ` Piatkowski, Dominik Karol
2024-12-06 11:42 ` Kamil Konieczny
2024-12-06 13:16 ` Peter Senna Tschudin [this message]
2024-12-06 16:46 ` Kamil Konieczny
2024-12-05 5:41 ` ✓ i915.CI.BAT: success for igt-runner fact checking (rev10) Patchwork
2024-12-05 6:07 ` ✓ Xe.CI.BAT: " Patchwork
2024-12-05 6:58 ` ✗ i915.CI.Full: failure " Patchwork
2024-12-05 8:15 ` Peter Senna Tschudin
2024-12-05 13:01 ` Illipilli, TejasreeX
2024-12-05 8:02 ` ✗ Xe.CI.Full: " Patchwork
2024-12-05 8:35 ` Peter Senna Tschudin
2024-12-05 10:51 ` [PATCH i-g-t v11] igt-runner fact checking Peter Senna Tschudin
2024-12-09 10:53 ` Zbigniew Kempczyński
2024-12-09 17:16 ` Kamil Konieczny
2024-12-10 12:00 ` Knop, Ryszard
2024-12-10 14:14 ` Knop, Ryszard
2024-12-05 12:59 ` ✓ i915.CI.Full: success for igt-runner fact checking (rev10) Patchwork
2024-12-12 7:15 ` [PATCH i-g-t v12 0/3] igt_facts for fact tracking Peter Senna Tschudin
2024-12-12 7:15 ` [PATCH i-g-t v12 1/3] lib/igt_facts: Library and unit testing " Peter Senna Tschudin
2024-12-12 16:19 ` Zbigniew Kempczyński
2024-12-12 7:15 ` [PATCH i-g-t v12 2/3] tools/lsfacts: Add tool for listing facts Peter Senna Tschudin
2024-12-12 16:20 ` Zbigniew Kempczyński
2024-12-12 7:15 ` [PATCH i-g-t v12 3/3] runner/executor: Integrate igt_facts functionality Peter Senna Tschudin
2024-12-12 16:23 ` Zbigniew Kempczyński
2024-12-12 17:33 ` Kamil Konieczny
2024-12-12 8:16 ` ✓ Xe.CI.BAT: success for igt-runner fact checking (rev12) Patchwork
2024-12-12 8:43 ` ✓ i915.CI.BAT: " Patchwork
2024-12-12 12:57 ` ✗ i915.CI.Full: failure " Patchwork
2024-12-12 14:30 ` ✗ Xe.CI.Full: " Patchwork
[not found] <5a111c35-7245-4ada-a2a0-3fd0fd5bbeab@linux.intel.com>
2024-12-05 14:05 ` [PATCH i-g-t v10] igt-runner fact checking Janusz Krzysztofik
2024-12-06 5:45 ` Peter Senna Tschudin
2024-12-09 9:17 ` Janusz Krzysztofik
2024-12-09 11:06 ` Peter Senna Tschudin
2024-12-09 13:50 ` Janusz Krzysztofik
2024-12-10 8:38 ` Peter Senna Tschudin
2024-12-10 9:50 ` Janusz Krzysztofik
2024-12-10 13:41 ` Knop, Ryszard
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=1ee3fa1d-144a-49f5-8bf3-4fa00929894b@linux.intel.com \
--to=peter.senna@linux.intel.com \
--cc=adrinael@adrinael.net \
--cc=dominik.karol.piatkowski@intel.com \
--cc=helen.koike@collabora.com \
--cc=himal.prasad.ghimiray@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=jani.saarinen@intel.com \
--cc=janusz.krzysztofik@linux.intel.com \
--cc=juha-pekka.heikkila@intel.com \
--cc=juhapekka.heikkila@gmail.com \
--cc=kamil.konieczny@linux.intel.com \
--cc=katarzyna.piecielska@intel.com \
--cc=lucas.demarchi@intel.com \
--cc=luciano.coelho@intel.com \
--cc=mcanal@igalia.com \
--cc=mwen@igalia.com \
--cc=nirmoy.das@intel.com \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.com \
--cc=ryszard.knop@intel.com \
--cc=stuart.summers@intel.com \
--cc=swati2.sharma@intel.com \
--cc=zbigniew.kempczynski@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