summaryrefslogtreecommitdiff
path: root/tests/gem_exec_reloc.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_reloc.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_reloc.c')
-rw-r--r--tests/gem_exec_reloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/gem_exec_reloc.c b/tests/gem_exec_reloc.c
index 213de1d7..91c6691a 100644
--- a/tests/gem_exec_reloc.c
+++ b/tests/gem_exec_reloc.c
@@ -257,7 +257,7 @@ static void active(int fd, unsigned engine)
int pass;
nengine = 0;
- if (engine == -1) {
+ if (engine == ALL_ENGINES) {
for_each_physical_engine(fd, engine) {
if (gem_can_store_dword(fd, engine))
engines[nengine++] = engine;
@@ -746,7 +746,7 @@ igt_main
from_gpu(fd);
igt_subtest("active")
- active(fd, -1);
+ active(fd, ALL_ENGINES);
for (const struct intel_execution_engine *e = intel_execution_engines;
e->name; e++) {
igt_subtest_f("active-%s", e->name)