Skip to contentSkip to conversation

tests: Mark some tests fail instead of skip

PATCH In review Gabriel Feceoru 3 participants 3 messages Apr 21, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests: Mark some tests fail instead of skip

These checks may fail in runtime and will cause confusing flipping skip/pass results.

---
 tests/gem_exec_suspend.c     | 2 +-
 tests/gem_exec_whisper.c     | 2 +-
 tests/gem_reloc_overflow.c   | 2 +-
 tests/gem_ringfill.c         | 2 +-
 tests/gem_streaming_writes.c | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
tests/gem_exec_suspend.c +1 -1
index cd133cc..1d03b4d 100644
@@ -154,7 +154,7 @@ static void run_test(int fd, unsigned engine, unsigned flags)
 	obj[0].flags |= EXEC_OBJECT_WRITE;
 	obj[1].handle = gem_create(fd, 4096);
 	gem_write(fd, obj[1].handle, 0, &bbe, sizeof(bbe));
-	igt_require(__gem_execbuf(fd, &execbuf) == 0);
+	igt_assert(__gem_execbuf(fd, &execbuf) == 0);
 	gem_close(fd, obj[1].handle);
 
 	memset(&reloc, 0, sizeof(reloc));
tests/gem_exec_whisper.c +1 -1
index 8db475e..c55ee9c 100644
@@ -181,7 +181,7 @@ static void whisper(int fd, unsigned engine, unsigned flags)
 		execbuf.flags |= LOCAL_I915_EXEC_NO_RELOC;
 		if (gen < 6)
 			execbuf.flags |= I915_EXEC_SECURE;
-		igt_require(__gem_execbuf(fd, &execbuf) == 0);
+		igt_assert(__gem_execbuf(fd, &execbuf) == 0);
 		scratch = tmp[0];
 		store = tmp[1];
 	}
tests/gem_reloc_overflow.c +1 -1
index d60bec9..dbff126 100644
@@ -208,7 +208,7 @@ static void reloc_tests(const char *suffix)
 
 		/* Make sure the batch would succeed except for the thing we're
 		 * testing. */
-		igt_require(__gem_execbuf(fd, &execbuf) == 0);
+		igt_assert(__gem_execbuf(fd, &execbuf) == 0);
 	}
 
 	igt_subtest_f("batch-start-unaligned%s", suffix) {
tests/gem_ringfill.c +1 -1
index f2dc803..1f53aac 100644
@@ -113,7 +113,7 @@ static void run_test(int fd, unsigned ring, unsigned flags)
 	obj[0].flags |= EXEC_OBJECT_WRITE;
 	obj[1].handle = gem_create(fd, 1024*16 + 4096);
 	gem_write(fd, obj[1].handle, 0, &bbe, sizeof(bbe));
-	igt_require(__gem_execbuf(fd, &execbuf) == 0);
+	igt_assert(__gem_execbuf(fd, &execbuf) == 0);
 
 	obj[1].relocs_ptr = (uintptr_t)reloc;
 	obj[1].relocation_count = 1024;
tests/gem_streaming_writes.c +1 -1
index 5d0014a..d084454 100644
@@ -106,7 +106,7 @@ static void test_streaming(int fd, int mode, int sync)
 	execbuf.flags = LOCAL_I915_EXEC_HANDLE_LUT;
 	if (__gem_execbuf(fd, &execbuf)) {
 		execbuf.flags = 0;
-		igt_require(__gem_execbuf(fd, &execbuf) == 0);
+		igt_assert(__gem_execbuf(fd, &execbuf) == 0);
 	}
 	/* We assume that the active objects are fixed to avoid relocations */
 	__src_offset = src_offset;
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 17 lines · Gabriel Feceoru

These checks may fail in runtime and will cause confusing flipping skip/pass results.

---
 tests/gem_exec_suspend.c     | 2 +-
 tests/gem_exec_whisper.c     | 2 +-
 tests/gem_reloc_overflow.c   | 2 +-
 tests/gem_ringfill.c         | 2 +-
 tests/gem_streaming_writes.c | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
tests/gem_exec_suspend.c +0 -0
index cd133cc..1d03b4d 100644

tests/gem_exec_suspend.c static void run_test(int fd, unsigned engine, unsigned flags) · line 158

Quoted 6 lines
tests/gem_exec_suspend.c +1 -1
@@ -154,7 +154,7 @@ static void run_test(int fd, unsigned engine, unsigned flags)
 	obj[0].flags |= EXEC_OBJECT_WRITE;
 	obj[1].handle = gem_create(fd, 4096);
 	gem_write(fd, obj[1].handle, 0, &bbe, sizeof(bbe));
-	igt_require(__gem_execbuf(fd, &execbuf) == 0);
+	igt_assert(__gem_execbuf(fd, &execbuf) == 0);
 	gem_close(fd, obj[1].handle);

Nope, here were are testing for kernel NORELOC support.

Quoted 6 lines
tests/gem_exec_suspend.c +0 -0
 	memset(&reloc, 0, sizeof(reloc));
tests/gem_exec_whisper.c +0 -0
index 8db475e..c55ee9c 100644

tests/gem_exec_whisper.c static void whisper(int fd, unsigned engine, unsigned flags) · line 187

Quoted 8 lines
tests/gem_exec_whisper.c +1 -1
@@ -181,7 +181,7 @@ static void whisper(int fd, unsigned engine, unsigned flags)
 		execbuf.flags |= LOCAL_I915_EXEC_NO_RELOC;
 		if (gen < 6)
 			execbuf.flags |= I915_EXEC_SECURE;
-		igt_require(__gem_execbuf(fd, &execbuf) == 0);
+		igt_assert(__gem_execbuf(fd, &execbuf) == 0);
 		scratch = tmp[0];
 		store = tmp[1];
 	}

Nope, here were are testing for kernel NORELOC support.

tests/gem_reloc_overflow.c static void reloc_tests(const char *suffix) · line 211

Quoted 10 lines
tests/gem_reloc_overflow.c +1 -1
index d60bec9..dbff126 100644
@@ -208,7 +208,7 @@ static void reloc_tests(const char *suffix)
 
 		/* Make sure the batch would succeed except for the thing we're
 		 * testing. */
-		igt_require(__gem_execbuf(fd, &execbuf) == 0);
+		igt_assert(__gem_execbuf(fd, &execbuf) == 0);

This one! This one looks ok to be assert.

tests/gem_ringfill.c static void run_test(int fd, unsigned ring, unsigned flags) · line 116

Quoted 11 lines
tests/gem_reloc_overflow.c +0 -0
 	igt_subtest_f("batch-start-unaligned%s", suffix) {
tests/gem_ringfill.c +1 -1
index f2dc803..1f53aac 100644
@@ -113,7 +113,7 @@ static void run_test(int fd, unsigned ring, unsigned flags)
 	obj[0].flags |= EXEC_OBJECT_WRITE;
 	obj[1].handle = gem_create(fd, 1024*16 + 4096);
 	gem_write(fd, obj[1].handle, 0, &bbe, sizeof(bbe));
-	igt_require(__gem_execbuf(fd, &execbuf) == 0);
+	igt_assert(__gem_execbuf(fd, &execbuf) == 0);

Nope, here were are testing for kernel NORELOC support.

tests/gem_streaming_writes.c static void test_streaming(int fd, int mode, int sync) · line 109

Quoted 12 lines
tests/gem_ringfill.c +0 -0
 	obj[1].relocs_ptr = (uintptr_t)reloc;
 	obj[1].relocation_count = 1024;
tests/gem_streaming_writes.c +1 -1
index 5d0014a..d084454 100644
@@ -106,7 +106,7 @@ static void test_streaming(int fd, int mode, int sync)
 	execbuf.flags = LOCAL_I915_EXEC_HANDLE_LUT;
 	if (__gem_execbuf(fd, &execbuf)) {
 		execbuf.flags = 0;
-		igt_require(__gem_execbuf(fd, &execbuf) == 0);
+		igt_assert(__gem_execbuf(fd, &execbuf) == 0);

Nope, here were are testing for kernel NORELOC support.

Flip/flop in these should be showing up as CI fail, but that is both correct and no reason to drop backwards compatibility? -Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 13 lines · Chris Wilson
Quoted 12 lines · Gabriel Feceoru

These checks may fail in runtime and will cause confusing flipping skip/pass results.

---
 tests/gem_exec_suspend.c     | 2 +-
 tests/gem_exec_whisper.c     | 2 +-
 tests/gem_reloc_overflow.c   | 2 +-
 tests/gem_ringfill.c         | 2 +-
 tests/gem_streaming_writes.c | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
Quoted 13 lines

tests/gem_exec_suspend.c static void run_test(int fd, unsigned engine, unsigned flags) · line 158

Quoted 11 lines
tests/gem_exec_suspend.c +1 -1
index cd133cc..1d03b4d 100644
@@ -154,7 +154,7 @@ static void run_test(int fd, unsigned engine, unsigned flags)
 	obj[0].flags |= EXEC_OBJECT_WRITE;
 	obj[1].handle = gem_create(fd, 4096);
 	gem_write(fd, obj[1].handle, 0, &bbe, sizeof(bbe));
-	igt_require(__gem_execbuf(fd, &execbuf) == 0);
+	igt_assert(__gem_execbuf(fd, &execbuf) == 0);
 	gem_close(fd, obj[1].handle);

Nope, here were are testing for kernel NORELOC support.

For these cases, care to do a new patch to convert these to

	igt_assert_f(...,
		     "Kernel has no NORELOC support\n");

Would avoid confusion in the future.

Thanks, Daniel

Quoted 71 lines
Quoted 7 lines
tests/gem_exec_suspend.c +0 -0
 	memset(&reloc, 0, sizeof(reloc));
tests/gem_exec_whisper.c +0 -0
index 8db475e..c55ee9c 100644

tests/gem_exec_whisper.c static void whisper(int fd, unsigned engine, unsigned flags) · line 187

Quoted 8 lines
tests/gem_exec_whisper.c +1 -1
@@ -181,7 +181,7 @@ static void whisper(int fd, unsigned engine, unsigned flags)
 		execbuf.flags |= LOCAL_I915_EXEC_NO_RELOC;
 		if (gen < 6)
 			execbuf.flags |= I915_EXEC_SECURE;
-		igt_require(__gem_execbuf(fd, &execbuf) == 0);
+		igt_assert(__gem_execbuf(fd, &execbuf) == 0);
 		scratch = tmp[0];
 		store = tmp[1];
 	}

Nope, here were are testing for kernel NORELOC support.

tests/gem_reloc_overflow.c static void reloc_tests(const char *suffix) · line 211

Quoted 10 lines
tests/gem_reloc_overflow.c +1 -1
index d60bec9..dbff126 100644
@@ -208,7 +208,7 @@ static void reloc_tests(const char *suffix)
 
 		/* Make sure the batch would succeed except for the thing we're
 		 * testing. */
-		igt_require(__gem_execbuf(fd, &execbuf) == 0);
+		igt_assert(__gem_execbuf(fd, &execbuf) == 0);

This one! This one looks ok to be assert.

tests/gem_ringfill.c static void run_test(int fd, unsigned ring, unsigned flags) · line 116

Quoted 11 lines
tests/gem_reloc_overflow.c +0 -0
 	igt_subtest_f("batch-start-unaligned%s", suffix) {
tests/gem_ringfill.c +1 -1
index f2dc803..1f53aac 100644
@@ -113,7 +113,7 @@ static void run_test(int fd, unsigned ring, unsigned flags)
 	obj[0].flags |= EXEC_OBJECT_WRITE;
 	obj[1].handle = gem_create(fd, 1024*16 + 4096);
 	gem_write(fd, obj[1].handle, 0, &bbe, sizeof(bbe));
-	igt_require(__gem_execbuf(fd, &execbuf) == 0);
+	igt_assert(__gem_execbuf(fd, &execbuf) == 0);

Nope, here were are testing for kernel NORELOC support.

tests/gem_streaming_writes.c static void test_streaming(int fd, int mode, int sync) · line 109

Quoted 12 lines
tests/gem_ringfill.c +0 -0
 	obj[1].relocs_ptr = (uintptr_t)reloc;
 	obj[1].relocation_count = 1024;
tests/gem_streaming_writes.c +1 -1
index 5d0014a..d084454 100644
@@ -106,7 +106,7 @@ static void test_streaming(int fd, int mode, int sync)
 	execbuf.flags = LOCAL_I915_EXEC_HANDLE_LUT;
 	if (__gem_execbuf(fd, &execbuf)) {
 		execbuf.flags = 0;
-		igt_require(__gem_execbuf(fd, &execbuf) == 0);
+		igt_assert(__gem_execbuf(fd, &execbuf) == 0);

Nope, here were are testing for kernel NORELOC support.

Flip/flop in these should be showing up as CI fail, but that is both correct and no reason to drop backwards compatibility? -Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx