Skip to contentSkip to conversation

lib: add option for running generic tests cases only

PATCH In review Abdiel Janulgue 3 participants 4 messages Nov 28, 2016 – Nov 29, 2016 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib: add option for running generic tests cases only

Pretend to run on a non-intel machine even when running on i915.ko, so that we could run and gather passrate data.

---
 lib/drmtest.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
lib/drmtest.c +5 -1
index 44abc7e..a8b75e8 100644
@@ -254,8 +254,11 @@ int __drm_open_driver(int chipset)
 			continue;
 
 		if (chipset & DRIVER_INTEL && is_i915_device(fd) &&
-		    has_known_intel_chipset(fd))
+		    has_known_intel_chipset(fd)) {
+			igt_skip_on_f(getenv("IGT_GENERIC_ONLY"),
+				      "Generic tests only\n");
 			return fd;
+		}
 
 		if (chipset & DRIVER_VC4 &&
 		    is_vc4_device(fd))
@@ -415,5 +418,6 @@ int drm_open_driver_render(int chipset)
 
 void igt_require_intel(int fd)
 {
+	igt_skip_on_f(getenv("IGT_GENERIC_ONLY"), "Generic tests only\n");
 	igt_require(is_i915_device(fd) && has_known_intel_chipset(fd));
 }
Signature · 6 lines
2.7.4

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

Op 28-11-16 om 10:37 schreef Abdiel Janulgue:

Quoted 12 lines

Pretend to run on a non-intel machine even when running on i915.ko, so that we could run and gather passrate data.

---
 lib/drmtest.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
lib/drmtest.c +0 -0
index 44abc7e..a8b75e8 100644

lib/drmtest.c int __drm_open_driver(int chipset) · line 261

Quoted 9 lines
lib/drmtest.c +4 -1
@@ -254,8 +254,11 @@ int __drm_open_driver(int chipset)
 			continue;
 
 		if (chipset & DRIVER_INTEL && is_i915_device(fd) &&
-		    has_known_intel_chipset(fd))
+		    has_known_intel_chipset(fd)) {
+			igt_skip_on_f(getenv("IGT_GENERIC_ONLY"),
+				      "Generic tests only\n");
 			return fd;
+		}

This will make the passrate worse for any driver that has DRIVER_ANY set.

lib/drmtest.c int drm_open_driver_render(int chipset) · line 423

Quoted 11 lines
lib/drmtest.c +1 -0
 		if (chipset & DRIVER_VC4 &&
 		    is_vc4_device(fd))
@@ -415,5 +418,6 @@ int drm_open_driver_render(int chipset)
 
 void igt_require_intel(int fd)
 {
+	igt_skip_on_f(getenv("IGT_GENERIC_ONLY"), "Generic tests only\n");
 	igt_require(is_i915_device(fd) && has_known_intel_chipset(fd));
 }

Won't it be better to only put the hack in is_i915_device only? Some code in IGT checks that too.

~Maarten

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
Quoted 3 lines · Maarten Lankhorst

Op 28-11-16 om 10:37 schreef Abdiel Janulgue:

Quoted 2 lines

Pretend to run on a non-intel machine even when running on i915.ko, so that we could run and gather passrate data.

What exactly do you mean?

Quoted 12 lines
Quoted 12 lines
---
 lib/drmtest.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
lib/drmtest.c +0 -0
index 44abc7e..a8b75e8 100644
@@ -254,8 +254,11 @@ int __drm_open_driver(int chipset)
 			continue;
 
Quoted 9 lines

lib/drmtest.c int __drm_open_driver(int chipset) · line 261

Quoted 7 lines
lib/drmtest.c +4 -1
 		if (chipset & DRIVER_INTEL && is_i915_device(fd) &&
-		    has_known_intel_chipset(fd))
+		    has_known_intel_chipset(fd)) {
+			igt_skip_on_f(getenv("IGT_GENERIC_ONLY"),
+				      "Generic tests only\n");
 			return fd;
+		}

This will make the passrate worse for any driver that has DRIVER_ANY set.

DRIVER_ANY being the key here. It sounds like you should argue for doing that generic test first.
-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
#3 lore raw
Quoted 6 lines · Chris Wilson
Quoted 3 lines · Maarten Lankhorst

Op 28-11-16 om 10:37 schreef Abdiel Janulgue:

Quoted 2 lines

Pretend to run on a non-intel machine even when running on i915.ko, so that we could run and gather passrate data.

What exactly do you mean?

We need a list of generic test-cases that isn't dependent on i915. Would be good to have a subset of generic tests cases.

Quoted 23 lines
Quoted 13 lines
Quoted 13 lines
---
 lib/drmtest.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
lib/drmtest.c +0 -0
index 44abc7e..a8b75e8 100644
@@ -254,8 +254,11 @@ int __drm_open_driver(int chipset)
 			continue;
 
Quoted 9 lines

lib/drmtest.c int __drm_open_driver(int chipset) · line 261

Quoted 7 lines
lib/drmtest.c +4 -1
 		if (chipset & DRIVER_INTEL && is_i915_device(fd) &&
-		    has_known_intel_chipset(fd))
+		    has_known_intel_chipset(fd)) {
+			igt_skip_on_f(getenv("IGT_GENERIC_ONLY"),
+				      "Generic tests only\n");
 			return fd;
+		}

This will make the passrate worse for any driver that has DRIVER_ANY set.

Quoted 4 lines

DRIVER_ANY being the key here. It sounds like you should argue for doing that generic test first.
-Chris

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx