Skip to contentSkip to conversation

gem_exec_blt: fix subtest enumeration

PATCH New Thomas Wood 1 participant 2 messages Mar 30, 2015 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 gem_exec_blt: fix subtest enumeration

Wrap the sysfs_read and sysfs_write calls in an igt_fixture block so they are not executed during subtest enumeration.

---
 tests/gem_exec_blt.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
tests/gem_exec_blt.c +10 -6
index 8f03b20..820478c 100644
@@ -384,8 +384,10 @@ int main(int argc, char **argv)
 		return 0;
 	}
 
-	min = sysfs_read("gt_min_freq_mhz");
-	max = sysfs_read("gt_max_freq_mhz");
+	igt_fixture {
+		min = sysfs_read("gt_min_freq_mhz");
+		max = sysfs_read("gt_max_freq_mhz");
+	}
 
 	for (r = rps; r->suffix; r++) {
 		igt_fixture r->func();
@@ -400,10 +402,12 @@ int main(int argc, char **argv)
 			run(OBJECT_SIZE, true);
 	}
 
-	if (min > 0)
-		sysfs_write("gt_min_freq_mhz", min);
-	if (max > 0)
-		sysfs_write("gt_max_freq_mhz", max);
+	igt_fixture {
+		if (min > 0)
+			sysfs_write("gt_min_freq_mhz", min);
+		if (max > 0)
+			sysfs_write("gt_max_freq_mhz", max);
+	}
 
 	igt_exit();
 }
Signature · 6 lines
2.1.0

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

PATCH 2/2 lib: add debug flags

---
 lib/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/Makefile.am +1 -1
index 4db90d4..870b1a1 100644
@@ -9,7 +9,7 @@ noinst_LTLIBRARIES = libintel_tools.la
 noinst_HEADERS = check-ndebug.h
 
 AM_CPPFLAGS = -I$(top_srcdir)
-AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(LIBUNWIND_CFLAGS) \
+AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(LIBUNWIND_CFLAGS) $(DEBUG_CFLAGS) \
 	    -DIGT_DATADIR=\""$(abs_top_srcdir)/tests"\" \
 	    -DIGT_LOG_DOMAIN=\""$(subst _,-,$*)"\" \
 	    -pthread
Signature · 6 lines
2.1.0

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