summaryrefslogtreecommitdiff
path: root/tests/intel/kms_psr.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/kms_psr.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/kms_psr.c')
-rw-r--r--tests/intel/kms_psr.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/intel/kms_psr.c b/tests/intel/kms_psr.c
index f3caa9ecc..cf0ce4bb8 100644
--- a/tests/intel/kms_psr.c
+++ b/tests/intel/kms_psr.c
@@ -499,27 +499,27 @@ static void fill_render(data_t *data, const struct igt_fb *fb,
static bool psr_wait_entry_if_enabled(data_t *data)
{
- if (!is_psr_enable_possible(data->drm_fd, data->op_psr_mode))
- igt_skip("enable_psr modparam doesn't allow psr mode %d\n",
- data->op_psr_mode);
+ igt_skip_on_f(!is_psr_enable_possible(data->drm_fd, data->op_psr_mode),
+ "enable_psr modparam doesn't allow psr mode %d\n",
+ data->op_psr_mode);
return psr_wait_entry(data->debugfs_fd, data->op_psr_mode, data->output);
}
static bool psr_wait_update_if_enabled(data_t *data)
{
- if (!is_psr_enable_possible(data->drm_fd, data->op_psr_mode))
- igt_skip("enable_psr modparam doesn't allow psr mode %d\n",
- data->op_psr_mode);
+ igt_skip_on_f(!is_psr_enable_possible(data->drm_fd, data->op_psr_mode),
+ "enable_psr modparam doesn't allow psr mode %d\n",
+ data->op_psr_mode);
return psr_wait_update(data->debugfs_fd, data->op_psr_mode, data->output);
}
static bool psr_enable_if_enabled(data_t *data)
{
- if (!is_psr_enable_possible(data->drm_fd, data->op_psr_mode))
- igt_skip("enable_psr modparam doesn't allow psr mode %d\n",
- data->op_psr_mode);
+ igt_skip_on_f(!is_psr_enable_possible(data->drm_fd, data->op_psr_mode),
+ "enable_psr modparam doesn't allow psr mode %d\n",
+ data->op_psr_mode);
return psr_enable(data->drm_fd, data->debugfs_fd, data->op_psr_mode, data->output);
}