diff options
author | Mika Kuoppala <mika.kuoppala@intel.com> | 2016-07-19 15:53:05 +0300 |
---|---|---|
committer | Mika Kuoppala <mika.kuoppala@intel.com> | 2016-07-19 16:13:46 +0300 |
commit | 1c62e60d72469882e3a36820b23a45305cfdf492 (patch) | |
tree | 0863b92df1bccb07180cbd0333a3641f9ce8cf45 | |
parent | 4d034675083ccd8fd06c1861a30a8981b4e66078 (diff) |
tests/gem_workarounds: Fix assertion of num of regs
As we now allow zero as number of workarounds for older gens,
without lri workarounds, change the assert to allow equality.
Also move it out from loop.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
-rw-r--r-- | tests/gem_workarounds.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/gem_workarounds.c b/tests/gem_workarounds.c index af993b0c..d15cf913 100644 --- a/tests/gem_workarounds.c +++ b/tests/gem_workarounds.c @@ -153,7 +153,6 @@ igt_main i = 0; while (getline(&line, &line_size, file) > 0) { igt_debug("%s", line); - igt_assert(i < num_wa_regs); if (sscanf(line, "0x%X: 0x%08X, mask: 0x%08X", &wa_regs[i].addr, &wa_regs[i].value, @@ -161,6 +160,8 @@ igt_main i++; } + igt_assert_lte(i, num_wa_regs); + free(line); fclose(file); } |