summaryrefslogtreecommitdiff
path: root/tests/gem_exec_suspend.c
diff options
context:
space:
mode:
authorAntonio Argenziano <antonio.argenziano@intel.com>2018-03-19 15:30:38 -0700
committerAntonio Argenziano <antonio.argenziano@intel.com>2018-03-20 10:44:10 -0700
commit94e886203a99ef19b8319489a45cd348e76e8ccd (patch)
treec26a1fe72268b6049b1aa5b3ffb256e1edc1ef7d /tests/gem_exec_suspend.c
parent178e7f3da66cd02660a86257df75708a0efa3bbc (diff)
igt: Replace 'all-engines' magic numbers with macro
In interfaces where a parameter allow to select an engine, we usually use '-1' or '~0u' to select all engines. This patch replaces magic numbers with a named constant. Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_exec_suspend.c')
-rw-r--r--tests/gem_exec_suspend.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/gem_exec_suspend.c b/tests/gem_exec_suspend.c
index 351347cb..db2bca26 100644
--- a/tests/gem_exec_suspend.c
+++ b/tests/gem_exec_suspend.c
@@ -98,7 +98,7 @@ static void run_test(int fd, unsigned engine, unsigned flags)
igt_spin_t *spin = NULL;
nengine = 0;
- if (engine == -1) {
+ if (engine == ALL_ENGINES) {
/* If we don't have semaphores, then every ring switch
* will result in a CPU stall until the previous write
* has finished. This is likely to hide any issue with
@@ -254,15 +254,15 @@ igt_main
}
igt_subtest("basic")
- run_test(fd, -1, NOSLEEP);
+ run_test(fd, ALL_ENGINES, NOSLEEP);
igt_subtest("basic-S3-devices")
- run_test(fd, -1, SUSPEND_DEVICES);
+ run_test(fd, ALL_ENGINES, SUSPEND_DEVICES);
igt_subtest("basic-S3")
- run_test(fd, -1, SUSPEND);
+ run_test(fd, ALL_ENGINES, SUSPEND);
igt_subtest("basic-S4-devices")
- run_test(fd, -1, HIBERNATE_DEVICES);
+ run_test(fd, ALL_ENGINES, HIBERNATE_DEVICES);
igt_subtest("basic-S4")
- run_test(fd, -1, HIBERNATE);
+ run_test(fd, ALL_ENGINES, HIBERNATE);
for (e = intel_execution_engines; e->name; e++) {
for (m = modes; m->suffix; m++) {