[igt-dev] [PATCH i-g-t] i915_pm_dc: Use igt_main

Kamil Konieczny kamil.konieczny at linux.intel.com
Tue Sep 13 12:15:24 UTC 2022


On 2022-09-13 at 12:17:59 +0300, Petri Latvala wrote:
> Tests should never have an "int main".
> 
> Signed-off-by: Petri Latvala <petri.latvala at intel.com>

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

> ---
>  tests/i915/i915_pm_dc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
> index f664a2a2..c862ae39 100644
> --- a/tests/i915/i915_pm_dc.c
> +++ b/tests/i915/i915_pm_dc.c
> @@ -474,11 +474,10 @@ static void kms_poll_state_restore(int sig)
>  }
>  
>  IGT_TEST_DESCRIPTION("These tests validate Display Power DC states");
> -int main(int argc, char *argv[])
> +igt_main
>  {
>  	data_t data = {};
>  
> -	igt_subtest_init(argc, argv);
>  	igt_fixture {
>  		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
>  		data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
> -- 
> 2.30.2
> 


More information about the igt-dev mailing list