[PATCH i-g-t v6 2/2] tests/kms_atomic_transition: Reducing debug loglevel dynamically
Modem, Bhanuprakash
bhanuprakash.modem at intel.com
Fri Jul 12 09:15:23 UTC 2024
On 12-07-2024 01:59 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 13.
-------------------------------------------------^
Please fix this while merging the patch.
>
> v2:
> - Using "" for the defined header file (Bhanu)
> - Not using exit handler in this file (Bhanu)
> - Not using any magic number (Bhanu)
>
> v3:
> - Calling loglevel init functionality in lib file (Bhanu)
> - Here 2 means the log level will be reduced by 2 (Bhanu)
>
> v4:
> - Send the required debuglevel to directly to api only if debug
> log level is greater than 10 (Bhanu)
>
> v5:
> - Add a check to open_params function as it may return -1
> on failure (Bhanu)
>
> v6:
> - Editing the check added in v5 (Bhanu)
>
> Signed-off-by: Pranay Samala <pranay.samala at intel.com>
Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
> ---
> tests/kms_atomic_transition.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
> index 29dd8ac4e..89348f435 100644
> --- a/tests/kms_atomic_transition.c
> +++ b/tests/kms_atomic_transition.c
> @@ -34,6 +34,7 @@
> #include "igt_rand.h"
> #include "drmtest.h"
> #include "sw_sync.h"
> +#include "igt_sysfs.h"
> #include <errno.h>
> #include <pthread.h>
> #include <stdbool.h>
> @@ -1174,6 +1175,8 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
> int pipe_count = 0;
>
> igt_fixture {
> + int dir, current_log_level;
> +
> data.drm_fd = drm_open_driver_master(DRIVER_ANY);
>
> kmstest_set_vt_graphics_mode();
> @@ -1185,6 +1188,15 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
>
> for_each_connected_output(&data.display, output)
> count++;
> +
> + dir = igt_sysfs_drm_module_params_open();
> + if (dir >= 0) {
> + current_log_level = igt_drm_debug_level_get(dir);
> + close(dir);
> +
> + if (current_log_level > 10)
> + igt_drm_debug_level_update(10);
> + }
> }
>
> igt_describe("Check toggling of primary plane with vblank");
More information about the igt-dev
mailing list