mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Maíra Canal" <mairacanal@riseup.net>
To: "Arthur Grillo" <arthurgrillo@riseup.net>,
	"David Airlie" <airlied@gmail.com>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Javier Martinez Canillas" <javierm@redhat.com>,
	"Toke Høiland-Jørgensen" <toke@toke.dk>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	"David Gow" <davidgow@google.com>,
	"Daniel Latypov" <dlatypov@google.com>,
	andrealmeid@riseup.net, melissa.srw@gmail.com,
	"Michał Winiarski" <michal.winiarski@intel.com>
Subject: Re: [PATCH v4] drm/tests: Add back seed value information
Date: Fri, 28 Oct 2022 17:54:42 -0300	[thread overview]
Message-ID: <97fb8a27-e547-5bbb-f148-5d3d7630749f@riseup.net> (raw)
In-Reply-To: <20221028141715.290903-1-arthurgrillo@riseup.net>

Hi Arthur,

Just a small nit below, but besides that:

Reviewed-by: Maíra Canal <mairacanal@riseup.net>

On 10/28/22 11:17, Arthur Grillo wrote:
> As reported by Michał the drm_mm and drm_buddy unit tests lost the
> printk with seed value after they were refactored into KUnit.
> 
> Add kunit_info with seed value information to assure reproducibility.
> 
> Reported-by: Michał Winiarski <michal.winiarski@intel.com>
> Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
> ---
> v1->v2: https://lore.kernel.org/all/20221026211458.68432-1-arthurgrillo@riseup.net/
> - Correct compilation issues
> - Change tags order
> - Remove useless line change
> - Write commit message in imperative form
> - Remove redundant message part
> - Correct some grammars nits
> - Correct checkpatch issues
> 
> v2->v3: https://lore.kernel.org/all/20221027142903.200169-1-arthurgrillo@riseup.net/
> - Change .init to .suite_init
> - Correct some grammars nits
> 
> v3->v4:
> - Correct compilation issues
> 
> ---
>  drivers/gpu/drm/tests/drm_buddy_test.c | 6 ++++--
>  drivers/gpu/drm/tests/drm_mm_test.c    | 8 ++++++--
>  2 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c
> index 62f69589a72d..90ec5e8a485b 100644
> --- a/drivers/gpu/drm/tests/drm_buddy_test.c
> +++ b/drivers/gpu/drm/tests/drm_buddy_test.c
> @@ -726,11 +726,13 @@ static void drm_test_buddy_alloc_limit(struct kunit *test)
>  	drm_buddy_fini(&mm);
>  }
>  
> -static int drm_buddy_init_test(struct kunit *test)
> +static int drm_buddy_init_suite(struct kunit_suite *suite)

Just to keep complaint to the rest of the KUnit tests (such as kcsan,
kfence, kmsan), could you change "init_suite" to "suite_init"? Same
thing for the drm_mm test.

Thanks for the quick respin of the patch!

Best Regards,
- Maíra Canal

>  {
>  	while (!random_seed)
>  		random_seed = get_random_u32();
>  
> +	kunit_info(suite, "Testing DRM buddy manager, with random_seed=0x%x\n", random_seed);
> +
>  	return 0;
>  }
>  
> @@ -746,7 +748,7 @@ static struct kunit_case drm_buddy_tests[] = {
>  
>  static struct kunit_suite drm_buddy_test_suite = {
>  	.name = "drm_buddy",
> -	.init = drm_buddy_init_test,
> +	.suite_init = drm_buddy_init_suite,
>  	.test_cases = drm_buddy_tests,
>  };
>  

      reply	other threads:[~2022-10-28 20:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28 14:17 Arthur Grillo
2022-10-28 20:54 ` Maíra Canal [this message]

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=97fb8a27-e547-5bbb-f148-5d3d7630749f@riseup.net \
    --to=mairacanal@riseup.net \
    --cc=Jason@zx2c4.com \
    --cc=airlied@gmail.com \
    --cc=andrealmeid@riseup.net \
    --cc=arthurgrillo@riseup.net \
    --cc=daniel@ffwll.ch \
    --cc=davidgow@google.com \
    --cc=dlatypov@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=melissa.srw@gmail.com \
    --cc=michal.winiarski@intel.com \
    --cc=toke@toke.dk \
    /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

all inboxes | Powered by JetHome®