summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Wood <thomas.wood@intel.com>2015-03-27 14:30:06 +0000
committerThomas Wood <thomas.wood@intel.com>2015-03-30 17:09:22 +0100
commitea453dbb4aaed2a4e59b608b0af0fd41916bf256 (patch)
treecf6bd80af7059fbff0adaf959afa6ce9b596695a
parentaf3e32cee27e99e461e727bdfb6127421ef09fbc (diff)
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. Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
-rw-r--r--tests/gem_exec_blt.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/gem_exec_blt.c b/tests/gem_exec_blt.c
index 8f03b20b..820478c9 100644
--- a/tests/gem_exec_blt.c
+++ b/tests/gem_exec_blt.c
@@ -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();
}