[igt-dev] [PATCH i-g-t] i915/gem_reset_stats: Call noop() with relevant params

apoorva1.singh at intel.com apoorva1.singh at intel.com
Mon Dec 28 09:52:07 UTC 2020


From: Apoorva Singh <apoorva1.singh at intel.com>

- Modify to use noop function in test_ban() and test_ban_ctx()
with relevant params after hang injection
- Add corresponding checks to verify return value of noop

Signed-off-by: Apoorva Singh <apoorva1.singh at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Melkaveri, Arjun <arjun.melkaveri at intel.com>
---
 tests/i915/gem_reset_stats.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/tests/i915/gem_reset_stats.c b/tests/i915/gem_reset_stats.c
index 4ba1ec8e..13f02ea8 100644
--- a/tests/i915/gem_reset_stats.c
+++ b/tests/i915/gem_reset_stats.c
@@ -341,8 +341,8 @@ static void test_ban(const struct intel_execution_engine *e)
 	assert_reset_status(fd_bad, fd_bad, 0, RS_NO_ERROR);
 	assert_reset_status(fd_good, fd_good, 0, RS_NO_ERROR);
 
-	noop(fd_bad, 0, e);
-	noop(fd_good, 0, e);
+	igt_assert(noop(fd_bad, 0, e) > 0);
+	igt_assert(noop(fd_good, 0, e) > 0);
 
 	assert_reset_status(fd_bad, fd_bad, 0, RS_NO_ERROR);
 	assert_reset_status(fd_good, fd_good, 0, RS_NO_ERROR);
@@ -350,8 +350,8 @@ static void test_ban(const struct intel_execution_engine *e)
 	inject_hang(fd_bad, 0, e, BAN | ASYNC);
 	active_count++;
 
-	noop(fd_good, 0, e);
-	noop(fd_good, 0, e);
+	igt_assert(noop(fd_bad, 0, e) > 0);
+	igt_assert(noop(fd_good, 0, e) > 0);
 
 	while (retry--) {
 		inject_hang(fd_bad, 0, e, BAN);
@@ -400,8 +400,8 @@ static void test_ban_ctx(const struct intel_execution_engine *e)
 	assert_reset_status(fd, fd, ctx_good, RS_NO_ERROR);
 	assert_reset_status(fd, fd, ctx_bad, RS_NO_ERROR);
 
-	noop(fd, ctx_bad, e);
-	noop(fd, ctx_good, e);
+	igt_assert(noop(fd, ctx_bad, e) > 0);
+	igt_assert(noop(fd, ctx_good, e) > 0);
 
 	assert_reset_status(fd, fd, ctx_good, RS_NO_ERROR);
 	assert_reset_status(fd, fd, ctx_bad, RS_NO_ERROR);
@@ -409,8 +409,8 @@ static void test_ban_ctx(const struct intel_execution_engine *e)
 	inject_hang(fd, ctx_bad, e, BAN | ASYNC);
 	active_count++;
 
-	noop(fd, ctx_good, e);
-	noop(fd, ctx_good, e);
+	igt_assert(noop(fd, ctx_bad, e) > 0);
+	igt_assert(noop(fd, ctx_good, e) > 0);
 
 	while (retry--) {
 		inject_hang(fd, ctx_bad, e, BAN);
-- 
2.25.1



More information about the igt-dev mailing list