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] drm/tests: Add back seed value information
Date: Wed, 26 Oct 2022 18:34:41 -0300	[thread overview]
Message-ID: <6bd861cb-1eae-7f02-719b-8babfe7185dc@riseup.net> (raw)
In-Reply-To: <20221026211458.68432-1-arthurgrillo@riseup.net>

Hi Arthur,

On 10/26/22 18:14, Arthur Grillo wrote:
> As reported by Michał the drm_mm and drm_buddy unit tests lost the
> printk with seed value after they being refactored into kunit. This

Some grammar nits:
- s/being/were
- s/kunit/KUnit

> patch adds back this important information to assure reproducibility
> converting them to use the kunit api.
> 
> Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
> Reported-by: Michał Winiarski <michal.winiarski@intel.com>

I believe that Michał's should come before your tag, as the SoB chain
should reflect the real route a patch took as it was propagated to the
maintainers [1].

> ---
>  drivers/gpu/drm/tests/drm_buddy_test.c | 3 +++
>  drivers/gpu/drm/tests/drm_mm_test.c    | 4 +++-
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c
> index 62f69589a72d..83c8863bc643 100644
> --- a/drivers/gpu/drm/tests/drm_buddy_test.c
> +++ b/drivers/gpu/drm/tests/drm_buddy_test.c
> @@ -731,6 +731,9 @@ static int drm_buddy_init_test(struct kunit *test)
>  	while (!random_seed)
>  		random_seed = get_random_u32();
>  
> +	kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
> +		random_seed);

I'm getting some compiling errors here:

ERROR:root:../drivers/gpu/drm/tests/drm_buddy_test.c:735:3: error:
expected ')'
                random_seed);
                ^
../drivers/gpu/drm/tests/drm_buddy_test.c:734:2: note: to match this '('
        kunit_info("Testing DRM buddy manager (struct drm_buddy), with
random_seed=0x%x\n",
        ^

You can reproduce it by running:

$ ./tools/testing/kunit/kunit.py --kunitconfig=drivers/gpu/drm/tests

Moreover, could you address the checkpatch issues? There are some
misaligned parenthesis and the line are too big.

> +
>  	return 0;
>  }
>  
> diff --git a/drivers/gpu/drm/tests/drm_mm_test.c b/drivers/gpu/drm/tests/drm_mm_test.c
> index c4b66eeae203..492347069d58 100644
> --- a/drivers/gpu/drm/tests/drm_mm_test.c
> +++ b/drivers/gpu/drm/tests/drm_mm_test.c
> @@ -2214,6 +2214,9 @@ static int drm_mm_init_test(struct kunit *test)
>  	while (!random_seed)
>  		random_seed = get_random_u32();
>  
> +	kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
> +	random_seed, max_iterations, max_prime);
> +

Same here.

>  	return 0;
>  }
>  
> @@ -2251,6 +2254,5 @@ static struct kunit_suite drm_mm_test_suite = {
>  };
>  
>  kunit_test_suite(drm_mm_test_suite);
> -

There is no need to change this line.

Thanks for your patch!

[1]
https://docs.kernel.org/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin

Best Regards,
- Maíra Canal


>  MODULE_AUTHOR("Intel Corporation");
>  MODULE_LICENSE("GPL");

  reply	other threads:[~2022-10-26 21:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26 21:14 Arthur Grillo
2022-10-26 21:34 ` Maíra Canal [this message]
2022-10-26 21:38 ` André Almeida
2022-10-27  0:44 ` kernel test robot
2022-10-27  8:29 ` kernel test robot

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=6bd861cb-1eae-7f02-719b-8babfe7185dc@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®