[i-g-t,2/3] tests/gem_exec_params: check the invalid flags for dual bsd ring
diff mbox

Message ID 1417571563-16004-3-git-send-email-zhipeng.gong@intel.com
State New, archived
Headers show

Commit Message

Zhipeng Gong Dec. 3, 2014, 1:52 a.m. UTC
Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Tested-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 tests/gem_exec_params.c | 7 +++++++
 1 file changed, 7 insertions(+)

Patch
diff mbox

diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
index f63eda9..ab19482 100644
--- a/tests/gem_exec_params.c
+++ b/tests/gem_exec_params.c
@@ -45,6 +45,7 @@ 
 #include "igt_aux.h"
 
 #define LOCAL_I915_EXEC_VEBOX (4<<0)
+#define LOCAL_I915_EXEC_BSD_MASK (3<<13)
 
 struct drm_i915_gem_execbuffer2 execbuf;
 struct drm_i915_gem_exec_object2 gem_exec[1];
@@ -126,6 +127,12 @@  igt_main
 		RUN_FAIL(EINVAL);
 	}
 
+	igt_subtest("invalid-bsd-ring") {
+		igt_require(gem_has_bsd2(fd));
+		execbuf.flags = I915_EXEC_BSD | LOCAL_I915_EXEC_BSD_MASK;
+		RUN_FAIL(EINVAL);
+	}
+
 	igt_subtest("rel-constants-invalid-ring") {
 		igt_require(gem_has_bsd(fd));
 		execbuf.flags = I915_EXEC_BSD | I915_EXEC_CONSTANTS_ABSOLUTE;