From: "Modem, Bhanuprakash" <bhanuprakash.modem@intel.com>
To: Pranay Samala <pranay.samala@intel.com>, <igt-dev@lists.freedesktop.org>
Cc: <karthik.b.s@intel.com>, <kunal1.joshi@intel.com>,
<sameer.lattannavar@intel.com>
Subject: Re: [PATCH i-g-t v4 2/2] tests/kms_atomic_transition: Reducing debug loglevel dynamically
Date: Thu, 11 Jul 2024 17:07:25 +0530 [thread overview]
Message-ID: <33cb38b9-da99-471f-b79e-051859402d9e@intel.com> (raw)
In-Reply-To: <20240711101843.760796-3-pranay.samala@intel.com>
Hi Pranay,
On 11-07-2024 03:48 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.
>
> 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)
>
> Signed-off-by: Pranay Samala <pranay.samala@intel.com>
> ---
> tests/kms_atomic_transition.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
> index 29dd8ac4e..618fef8dc 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,13 @@ 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();
----------------------^
In case of failure, this function may return -1. Please add a check for
that.
Otherwise this patch LGTM.
- Bhanu
> + 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");
next prev parent reply other threads:[~2024-07-11 11:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-11 10:18 [PATCH i-g-t v4 0/2] Runtime alteration of debuglog level Pranay Samala
2024-07-11 10:18 ` [PATCH i-g-t v4 1/2] lib/igt_sysfs: Implement dynamic adjustment of debug log level Pranay Samala
2024-07-11 11:27 ` Modem, Bhanuprakash
2024-07-11 10:18 ` [PATCH i-g-t v4 2/2] tests/kms_atomic_transition: Reducing debug loglevel dynamically Pranay Samala
2024-07-11 11:37 ` Modem, Bhanuprakash [this message]
2024-07-11 11:58 ` ✓ CI.xeBAT: success for Runtime alteration of debuglog level (rev4) Patchwork
2024-07-11 12:06 ` ✓ Fi.CI.BAT: " Patchwork
2024-07-11 14:02 ` ✗ CI.xeFULL: failure " Patchwork
2024-07-11 19:46 ` ✗ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=33cb38b9-da99-471f-b79e-051859402d9e@intel.com \
--to=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=karthik.b.s@intel.com \
--cc=kunal1.joshi@intel.com \
--cc=pranay.samala@intel.com \
--cc=sameer.lattannavar@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox