Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Senna Tschudin <peter.senna@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Peter Senna Tschudin <peter.senna@linux.intel.com>,
	Gustavo Sousa <gustavo.sousa@intel.com>,
	Kamil Konieczny <kamil.konieczny@linux.intel.com>
Subject: [PATCH v4 i-g-t 3/3] lib/tests: Update hook unit testing
Date: Wed, 23 Jul 2025 12:44:06 +0200	[thread overview]
Message-ID: <20250723104406.58784-4-peter.senna@linux.intel.com> (raw)
In-Reply-To: <20250723104406.58784-1-peter.senna@linux.intel.com>

The unit testing for hooks checks env vars created by the hooks
infrastructure.  Update unit testing to account for the new
IGT_HOOK_KMOD_UNBIND_MODULE_NAME env var.

Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@linux.intel.com>
---
v4:
 - Introduced in v4

 lib/tests/igt_hook.c             | 1 +
 lib/tests/igt_hook_integration.c | 9 +++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/tests/igt_hook.c b/lib/tests/igt_hook.c
index 676c6eb7a..420a19c72 100644
--- a/lib/tests/igt_hook.c
+++ b/lib/tests/igt_hook.c
@@ -16,6 +16,7 @@ static const char *env_var_names[] = {
 	"IGT_HOOK_TEST",
 	"IGT_HOOK_SUBTEST",
 	"IGT_HOOK_DYN_SUBTEST",
+	"IGT_HOOK_KMOD_UNBIND_MODULE_NAME",
 	"IGT_HOOK_RESULT",
 };
 
diff --git a/lib/tests/igt_hook_integration.c b/lib/tests/igt_hook_integration.c
index 8525c6a3f..3b35065ab 100644
--- a/lib/tests/igt_hook_integration.c
+++ b/lib/tests/igt_hook_integration.c
@@ -16,24 +16,25 @@ char fake_argv_buffer[1024];
 char *fake_argv[64];
 int fake_argc;
 
-#define ENV_ARRAY(evt_name, fullname_suffix, subtest, dyn_subtest, result) \
+#define ENV_ARRAY(evt_name, fullname_suffix, subtest, dyn_subtest, unbind_module_name, result) \
 { \
 	"IGT_HOOK_EVENT=" evt_name, \
 	"IGT_HOOK_TEST_FULLNAME=igt@igt_hook_integration" fullname_suffix, \
 	"IGT_HOOK_TEST=igt_hook_integration", \
 	"IGT_HOOK_SUBTEST=" subtest, \
 	"IGT_HOOK_DYN_SUBTEST=" dyn_subtest, \
+	"IGT_HOOK_KMOD_UNBIND_MODULE_NAME=" unbind_module_name, \
 	"IGT_HOOK_RESULT=" result, \
 }
 
 #define TEST_ENV(evt_name, result) \
-	ENV_ARRAY(evt_name, "", "", "", result)
+	ENV_ARRAY(evt_name, "", "", "", "", result)
 
 #define SUBTEST_ENV(evt_name, subtest, result) \
-	ENV_ARRAY(evt_name, "@" subtest, subtest, "", result)
+	ENV_ARRAY(evt_name, "@" subtest, subtest, "", "", result)
 
 #define DYN_SUBTEST_ENV(evt_name, subtest, dyn_subtest, result) \
-	ENV_ARRAY(evt_name, "@" subtest "@" dyn_subtest, subtest, dyn_subtest, result)
+	ENV_ARRAY(evt_name, "@" subtest "@" dyn_subtest, subtest, dyn_subtest, "", result)
 
 const char *pre_test_env[] = TEST_ENV("pre-test", "");
 const char *pre_subtest_a_env[] = SUBTEST_ENV("pre-subtest", "a", "");
-- 
2.43.0


  parent reply	other threads:[~2025-07-23 10:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-23 10:44 [PATCH v4 i-g-t 0/3] Add post-kmod-unbind igt_hook Peter Senna Tschudin
2025-07-23 10:44 ` [PATCH v4 i-g-t 1/3] lib/igt_core: Expose igt_hook pointer for other libs Peter Senna Tschudin
2025-07-23 10:44 ` [PATCH v4 i-g-t 2/3] lib/igt_kmod: Add IGT_HOOK_POST_KMOD_UNBIND Peter Senna Tschudin
2025-07-23 17:01   ` Kamil Konieczny
2025-07-25 10:13     ` Peter Senna Tschudin
2025-07-23 10:44 ` Peter Senna Tschudin [this message]
2025-07-23 16:58   ` [PATCH v4 i-g-t 3/3] lib/tests: Update hook unit testing Kamil Konieczny
2025-07-23 16:27 ` ✓ i915.CI.BAT: success for Add post-kmod-unbind igt_hook (rev2) Patchwork
2025-07-23 16:41 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-07-25 10:15   ` Peter Senna Tschudin
2025-07-23 22:07 ` ✗ Xe.CI.Full: " Patchwork
2025-07-25 10:15   ` Peter Senna Tschudin
2025-07-24  6:53 ` ✓ i915.CI.Full: success " 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=20250723104406.58784-4-peter.senna@linux.intel.com \
    --to=peter.senna@linux.intel.com \
    --cc=gustavo.sousa@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.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