Commit 3a999957 authored by Chris Wilson's avatar Chris Wilson 😣

igt/drv_module_reload: Keep injecting load failures until it passes

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's avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen's avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
parent f7ac0ea5
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment