All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH igt] igt/drv_module_reload: Keep injecting load failures until it passes
@ 2017-12-08 22:50 Chris Wilson
  2017-12-09  0:28 ` ✗ Fi.CI.BAT: failure for " Patchwork
  2017-12-11  9:10 ` [PATCH igt] igt/drv_module_reload: Keep injecting load Joonas Lahtinen
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2017-12-08 22:50 UTC (permalink / raw)
  To: intel-gfx

Keep reloading the module with the next load failure until we run out of
injection sites and the module loads successfully. Or it goes boom.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/drv_module_reload.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/tests/drv_module_reload.c b/tests/drv_module_reload.c
index e812e5ec9..3046d8227 100644
--- a/tests/drv_module_reload.c
+++ b/tests/drv_module_reload.c
@@ -303,14 +303,12 @@ hda_dynamic_debug(bool enable)
 
 igt_main
 {
-	int i, err;
-	char buf[64];
+	int err;
 
 	igt_fixture
 		hda_dynamic_debug(true);
 
 	igt_subtest("basic-reload") {
-
 		if ((err = reload(NULL)))
 			igt_fail(err);
 
@@ -322,11 +320,12 @@ igt_main
 		igt_assert_eq(reload("disable_display=1"), 0);
 
 	igt_subtest("basic-reload-inject") {
-		for (i = 0; i < 4; i++) {
-			memset(buf, 0, sizeof(buf));
-			snprintf(buf, sizeof(buf), "inject_load_failure=%d", i);
-			reload(buf);
-		}
+		char buf[64];
+		int i = 0;
+		do {
+			snprintf(buf, sizeof(buf),
+				 "inject_load_failure=%d", ++i);
+		} while (reload(buf));
 	}
 
 	igt_fixture {
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-11  9:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-08 22:50 [PATCH igt] igt/drv_module_reload: Keep injecting load failures until it passes Chris Wilson
2017-12-09  0:28 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-12-11  9:10 ` [PATCH igt] igt/drv_module_reload: Keep injecting load Joonas Lahtinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.