summaryrefslogtreecommitdiff
path: root/tests/intel/xe_intel_bb.c
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2024-07-29 15:02:51 -0700
committerMatt Roper <matthew.d.roper@intel.com>2024-08-01 09:10:30 -0700
commitdd461382e7fa723385f848391618c079f04a231f (patch)
tree449988c1c30d6ec02f4567bddef20ab8693e3e85 /tests/intel/xe_intel_bb.c
parentd34cc2a5fe9162ae27b25b5aebcbf66f9d8ce63e (diff)
tests/intel: Apply igt.cocci transforms
A number of Intel tests are using checks like "igt_assert(x < y)" rather than using the dedicated comparison assertions that print the actual values on assertion failure. Run the Intel test directory through Coccinelle to apply these conversions and also apply some other general coding style cleanup: spatch --in-place --sp-file lib/igt.cocci tests/intel Reviewed-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com> Link: https://lore.kernel.org/r/20240729220251.3353533-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Diffstat (limited to 'tests/intel/xe_intel_bb.c')
-rw-r--r--tests/intel/xe_intel_bb.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/intel/xe_intel_bb.c b/tests/intel/xe_intel_bb.c
index 647fd64e7..845052bf2 100644
--- a/tests/intel/xe_intel_bb.c
+++ b/tests/intel/xe_intel_bb.c
@@ -674,11 +674,11 @@ static int __do_intel_bb_blit(struct buf_ops *bops, uint32_t tiling)
/* We'll fail on src <-> final compare so just warn */
if (tiling == I915_TILING_NONE) {
- if (compare_bufs(&src, &dst, false) > 0)
- igt_warn("none->none blit failed!");
+ igt_warn_on_f(compare_bufs(&src, &dst, false) > 0,
+ "none->none blit failed!");
} else {
- if (compare_bufs(&src, &dst, false) == 0)
- igt_warn("none->tiled blit failed!");
+ igt_warn_on_f(compare_bufs(&src, &dst, false) == 0,
+ "none->tiled blit failed!");
}
fails = compare_bufs(&src, &final, true);
@@ -925,11 +925,11 @@ static int render(struct buf_ops *bops, uint32_t tiling,
/* We'll fail on src <-> final compare so just warn */
if (tiling == I915_TILING_NONE) {
- if (compare_bufs(&src, &dst, false) > 0)
- igt_warn("%s: none->none failed!\n", __func__);
+ igt_warn_on_f(compare_bufs(&src, &dst, false) > 0,
+ "%s: none->none failed!\n", __func__);
} else {
- if (compare_bufs(&src, &dst, false) == 0)
- igt_warn("%s: none->tiled failed!\n", __func__);
+ igt_warn_on_f(compare_bufs(&src, &dst, false) == 0,
+ "%s: none->tiled failed!\n", __func__);
}
fails = compare_bufs(&src, &final, true);