From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t 2/2] tests/intel/kms_ccs: add hiberbate test
Date: Thu, 5 Dec 2024 16:52:33 -0500 [thread overview]
Message-ID: <Z1Igoelq7HqHlv3X@intel.com> (raw)
In-Reply-To: <20241203092418.3454357-3-juhapekka.heikkila@gmail.com>
On Tue, Dec 03, 2024 at 11:24:18AM +0200, Juha-Pekka Heikkila wrote:
> Add hibernate test which bring entire system down for short
> hibernate. This mode is added to suspend tests to be run
> manually with '-r' flag because this is not ci friendly test,
> on hibernate ci would lose connection to the hibernated box.
>
> For this test to work kernel resume point need to be set, from
> kernel command line is checked if there is found something along
> the lines of "resume=/dev/nvme0n1p2" or so to verify hibernate
> will be successful.
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
> tests/intel/kms_ccs.c | 20 +++++++++++++++++---
> 1 file changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/tests/intel/kms_ccs.c b/tests/intel/kms_ccs.c
> index 3e9a57863..d720de04a 100644
> --- a/tests/intel/kms_ccs.c
> +++ b/tests/intel/kms_ccs.c
> @@ -190,6 +190,7 @@ typedef struct {
> bool user_seed;
> enum igt_commit_style commit;
> int fb_list_length;
> + bool do_hibernate;
> struct {
> struct igt_fb fb;
> int width, height;
> @@ -839,8 +840,17 @@ static bool try_config(data_t *data, enum test_fb_flags fb_flags,
>
> if (ret == 0 && !(fb_flags & TEST_BAD_ROTATION_90) && crc) {
> if (data->flags & TEST_SUSPEND && fb_flags & FB_COMPRESSED) {
> - igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
> - SUSPEND_TEST_NONE);
> + if (data->do_hibernate) {
> + igt_require_f(igt_pm_check_hibernation_support(),
> + "Kernel is not cofigured for resume\n");
> + igt_require_f(igt_pm_ensure_grub_boots_same_kernel(),
supposing we find a better more generic way for the grub:
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
and no luck with the SUSPEND_STATE_DISK, USPEND_TEST_MEM automatic case?
> + "Couldn't find correct kernel in grub.cfg\n");
> + igt_system_suspend_autoresume(SUSPEND_STATE_DISK,
> + SUSPEND_TEST_NONE);
> + } else {
> + igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
> + SUSPEND_TEST_NONE);
> + }
>
> /* on resume check flat ccs is still compressed */
> if (is_xe_device(data->drm_fd) &&
> @@ -1044,6 +1054,9 @@ static int opt_handler(int opt, int opt_index, void *opt_data)
> data->user_seed = true;
> data->seed = strtoul(optarg, NULL, 0);
> break;
> + case 'r':
> + data->do_hibernate = true;
> + break;
> default:
> return IGT_OPT_HANDLER_ERROR;
> }
> @@ -1056,9 +1069,10 @@ static data_t data;
> static const char *help_str =
> " -c\t\tCheck the presence of compression meta-data\n"
> " -s <seed>\tSeed for random number generator\n"
> +" -r\t\tOn suspend test do full hibernate with reboot\n"
> ;
>
> -igt_main_args("cs:", NULL, help_str, opt_handler, &data)
> +igt_main_args("csr:", NULL, help_str, opt_handler, &data)
> {
> igt_fixture {
> data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
> --
> 2.45.2
>
next prev parent reply other threads:[~2024-12-05 21:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 9:24 [PATCH i-g-t 0/2] Add hibernate helpers and kms_ccs hibernate test Juha-Pekka Heikkila
2024-12-03 9:24 ` [PATCH i-g-t 1/2] lib/igt_pm: Add helpers for hibernating kernel Juha-Pekka Heikkila
2024-12-05 21:49 ` Rodrigo Vivi
2024-12-03 9:24 ` [PATCH i-g-t 2/2] tests/intel/kms_ccs: add hiberbate test Juha-Pekka Heikkila
2024-12-05 21:52 ` Rodrigo Vivi [this message]
2024-12-03 13:41 ` ✗ i915.CI.BAT: failure for Add hibernate helpers and kms_ccs hibernate test Patchwork
2024-12-03 14:26 ` ✓ Xe.CI.BAT: success " Patchwork
2024-12-03 15:32 ` ✗ Xe.CI.Full: failure " Patchwork
2024-12-03 19:41 ` ✓ i915.CI.BAT: success for Add hibernate helpers and kms_ccs hibernate test (rev2) Patchwork
2024-12-03 19:52 ` ✗ Xe.CI.BAT: failure " Patchwork
2024-12-03 20:57 ` ✗ i915.CI.Full: " Patchwork
2024-12-03 21:05 ` ✗ Xe.CI.Full: " 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=Z1Igoelq7HqHlv3X@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=juhapekka.heikkila@gmail.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