wedge and loop

Submitted by Petri Latvala on June 3, 2019, 10:59 a.m.

Details

Message ID 20190603105907.28464-1-petri.latvala@intel.com
State New
Headers show
Series "wedge and loop" ( rev: 1 ) in IGT - Trybot

Not browsing as part of any series.

Commit Message

Petri Latvala June 3, 2019, 10:59 a.m.
---
 tests/meson.build  |  1 +
 tests/wedge_loop.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 tests/wedge_loop.c

Patch hide | download patch | download mbox

diff --git a/tests/meson.build b/tests/meson.build
index 806766e5..0a88fc32 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -94,6 +94,7 @@  test_progs = [
 	'vc4_wait_seqno',
 	'vgem_basic',
 	'vgem_slow',
+	'wedge_loop',
 ]
 
 i915_progs = [
diff --git a/tests/wedge_loop.c b/tests/wedge_loop.c
new file mode 100644
index 00000000..7e6339f4
--- /dev/null
+++ b/tests/wedge_loop.c
@@ -0,0 +1,28 @@ 
+#include "igt.h"
+#include "igt_core.h"
+#include "igt_sysfs.h"
+
+igt_main
+{
+	int render_fd, dir;
+	struct intel_execution_engine2 *e;
+
+	igt_fixture {
+		render_fd = drm_open_driver_render(DRIVER_INTEL);
+		dir = igt_debugfs_dir(render_fd);
+		igt_sysfs_set(dir, "i915_wedged", "-1");
+		igt_require_gem(render_fd);
+	}
+
+	__for_each_physical_engine(render_fd, e) {
+		igt_subtest_group {
+			igt_fixture {
+				gem_context_has_engine(render_fd,
+						       0, e->flags);
+			}
+
+			igt_subtest_f("render-node-busy-%s", e->name)
+				;
+		}
+	}
+}