[PATCH i-g-t 2/2] tests/kms_atomic_transition: Reducing debug loglevel dynamically

Modem, Bhanuprakash bhanuprakash.modem at intel.com
Mon Jul 8 11:01:59 UTC 2024


Hi Pranay,

Please follow [1] to write good commit subject/message.

[1]: https://cbea.ms/git-commit/

On 07-07-2024 08:34 pm, Pranay Samala wrote:
> This test is debug logs are too much and was killed
> due to exceeding disk usage limit on the less disk
> space machines.
> 
> So dynamically reducing the debug log level to
> enable on less disk space machines.
> 
> Signed-off-by: Pranay Samala <pranay.samala at intel.com>
> ---
>   tests/kms_atomic_transition.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
> index 29dd8ac4e..b0339f57d 100644
> --- a/tests/kms_atomic_transition.c
> +++ b/tests/kms_atomic_transition.c
> @@ -41,6 +41,7 @@
>   #include <string.h>
>   #include <time.h>
>   #include <poll.h>
> +#include <igt_sysfs.h>

Please use "" to include defined header files.

#include "igt_sysfs.h"

>   
>   /**
>    * SUBTEST: plane-primary-toggle-with-vblank-wait
> @@ -1176,6 +1177,8 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
>   	igt_fixture {
>   		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
>   
> +		igt_set_debug_value(data.drm_fd, 13);

Why this magic number 13?

If drm debug level is already less than 13, then what is the 
expectation? If we still update the value with 13, then the purpose of 
this patch itself is not fulfilled.

> +
>   		kmstest_set_vt_graphics_mode();
>   
>   		igt_display_require(&data.display, data.drm_fd);
> @@ -1258,6 +1261,7 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
>   
>   	igt_fixture {
>   		igt_display_fini(&data.display);
> +		igt_debug_reset(data.drm_fd);

Do we need to call this helper explicitly, as igt_exit_handler will call 
this function on exit?

- Bhanu

>   		drm_close_driver(data.drm_fd);
>   	}
>   }


More information about the igt-dev mailing list