linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brendan Higgins <brendanhiggins@google.com>
To: Daniel Latypov <dlatypov@google.com>
Cc: David Gow <davidgow@google.com>, Marco Elver <elver@google.com>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Dmitry Vyukov <dvyukov@google.com>,
	KUnit Development <kunit-dev@googlegroups.com>,
	kasan-dev <kasan-dev@googlegroups.com>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] kunit: tool: Add x86_64-smp architecture for SMP testing
Date: Wed, 6 Jul 2022 15:43:09 -0400	[thread overview]
Message-ID: <CAFd5g44dp05DaEot23_a2QdOGfmg=eehtoe24=6yo_UKiGNukA@mail.gmail.com> (raw)
In-Reply-To: <CAGS_qxqsF-soqSM7-cO+tRD1Rg5fqrA07TGLRruxPE4i_rLdJw@mail.gmail.com>

On Thu, May 19, 2022 at 1:11 PM Daniel Latypov <dlatypov@google.com> wrote:
>
> On Thu, May 19, 2022 at 6:15 AM David Gow <davidgow@google.com> wrote:
> >
> > I tend to agree that having both would be nice: I think there are
> > enough useful "machine configs" that trying to maintain, e.g, a 1:1
> > mapping with kernel architectures is going to leave a bunch of things
> > on the table, particularly as we add more tests for, e.g., drivers and
> > specific CPU models.
>
> I agree that we don't necessarily need to maintain a 1:1 mapping.
> But I feel like we should have a pretty convincing reason for doing
> so, e.g. support for a CPU that requires we add in a bunch of
> kconfigs.

Agreed. That being said, if we have a good convention for archs that
are not in arch/, then it should be OK. The biggest thing is that all
archs passed into ARCH=, if supported, should have a default with the
same value for kunittool; as long as that is the case, I don't think
anyone will get confused.

> This particular one feels simple enough to me.
> Given we already have to put specific instructions in the
> kcsan/.kunitconfig, I don't know if there's much of a difference in
> cost between these two commands
>
> $ ./tools/testing/kunit/kunit.py run --kunitconfig=kernel/kcsan
> --arch=x86_64-smp
> $ ./tools/testing/kunit/kunit.py run --kunitconfig=kernel/kcsan
> --arch=x86_64 --kconfig_add CONFIG_SMP=y --qemu_args "-smp 8"

Also agree.

> I've generally learned to prefer more explicit commands like the
> second, even if they're quite a bit longer.

I agree, but I think I learned this from you :-)

> But I have the following biases
> * I use FZF heavily, so I don't re-type long commands much

Same.

> * I'm the person who proposed --kconfig_add and --qemu_args, so of
> course I'd think the longer form is easy to understand.
> so I'm not in a position to object to this change.

Yeah, I think I am a bit biased on this too, but I don't terribly care
one way or the other.

> Changing topics:
> Users can overwrite the '-smp 8' here via --qemu_args [1], so I'm much
> less worried about hard-coding any specific value in this file
> anymore.
> And given that, I think a more "natural" value for this file would be "-smp 2".
> I think anything that needs more than that should explicitly should --qemu_args.
>
> Thoughts?

If we have time, we could bring this topic up at LPC?

> [1] tested with --qemu_args='-smp 4' --qemu_args='-smp 8'
> and I see the following in the test.log
>  smpboot: Allowing 8 CPUs, 0 hotplug CPUs
> so QEMU respects the last value passed in, as expected.
>
> >
> > The problem, of course, is that the --kconfig_add flags don't allow us
> > to override anything explicitly stated in either the kunitconfig or
> > qemu_config (and I imagine there could be problems with --qemu_config,
> > too).
>
> This patch would fix that.
> https://lore.kernel.org/linux-kselftest/20220519164512.3180360-1-dlatypov@google.com
>
> It introduces an overwriting priority of
> * --kconfig_add
> * kunitconfig / --kunitconfig
> * qemu_config

  reply	other threads:[~2022-07-06 19:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18  7:32 [PATCH 1/2] kunit: tool: Add x86_64-smp architecture for SMP testing David Gow
2022-05-18  7:32 ` [PATCH 2/2] kcsan: test: Add a .kunitconfig to run KCSAN tests David Gow
2022-05-18  9:21   ` Marco Elver
2022-05-19 13:08     ` David Gow
2022-05-19 13:24       ` Marco Elver
2022-07-14 20:22         ` Daniel Latypov
2022-07-14 21:40           ` Marco Elver
2022-07-14 23:45             ` Daniel Latypov
2022-07-14 23:47               ` Daniel Latypov
2022-07-15  6:49                 ` David Gow
2022-05-18 17:12   ` Daniel Latypov
2022-07-06 19:53   ` Brendan Higgins
2022-05-18  9:22 ` [PATCH 1/2] kunit: tool: Add x86_64-smp architecture for SMP testing Marco Elver
2022-05-18 15:31 ` Daniel Latypov
2022-05-18 15:35   ` Marco Elver
2022-05-18 15:39     ` Daniel Latypov
2022-05-18 17:05       ` Daniel Latypov
2022-05-19 13:15     ` David Gow
2022-05-19 17:11       ` Daniel Latypov
2022-07-06 19:43         ` Brendan Higgins [this message]
2022-07-06 19:44 ` Brendan Higgins

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='CAFd5g44dp05DaEot23_a2QdOGfmg=eehtoe24=6yo_UKiGNukA@mail.gmail.com' \
    --to=brendanhiggins@google.com \
    --cc=davidgow@google.com \
    --cc=dlatypov@google.com \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    /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;
as well as URLs for NNTP newsgroup(s).