diff mbox

[i-g-t,v6,18/21] tests/sw_sync: Add igt_require check for sw_sync feature

Message ID 20161117150209.14810-19-robert.foss@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Robert Foss Nov. 17, 2016, 3:02 p.m. UTC
From: Robert Foss <robert.foss@collabora.com>

Make sure that this test is skipped if the sw_sync feature is missing from
the host system.

Signed-off-by: Robert Foss <robert.foss@collabora.com>
---
 lib/sw_sync.c   | 1 +
 tests/sw_sync.c | 3 +++
 2 files changed, 4 insertions(+)
diff mbox

Patch

diff --git a/lib/sw_sync.c b/lib/sw_sync.c
index 38fe670..ac793ad 100644
--- a/lib/sw_sync.c
+++ b/lib/sw_sync.c
@@ -38,6 +38,7 @@ 
 #include <linux/sync_file.h>
 #include <sys/ioctl.h>
 
+#include "igt_debugfs.h"
 #include "sw_sync.h"
 #include "drmtest.h"
 #include "ioctl_wrappers.h"
diff --git a/tests/sw_sync.c b/tests/sw_sync.c
index c885199..0aae4dc 100644
--- a/tests/sw_sync.c
+++ b/tests/sw_sync.c
@@ -708,6 +708,9 @@  static void test_sync_random_merge(void)
 
 igt_main
 {
+	igt_fixture
+		igt_require_sw_sync();
+
 	igt_subtest("alloc_timeline")
 		test_alloc_timeline();