linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Latypov <dlatypov@google.com>
To: David Gow <davidgow@google.com>
Cc: Brendan Higgins <brendanhiggins@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	KUnit Development <kunit-dev@googlegroups.com>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] kunit: tool: refactor internal kconfig handling, allow overriding
Date: Fri, 20 May 2022 15:35:13 -0700	[thread overview]
Message-ID: <CAGS_qxpF338dvbB+6QW1n8_agddeS10+nkTQNmT+0UcvoE1gBw@mail.gmail.com> (raw)
In-Reply-To: <CAGS_qxrvR+xxfmzz92rYYW=VzG1kyycn1EuaJxdNSMd_L5afFQ@mail.gmail.com>

On Fri, May 20, 2022 at 3:13 PM Daniel Latypov <dlatypov@google.com> wrote:
> Talking offline with David, we've come up with a small example.
>
> If we add this kconfig somewhere
> +config X
> +       bool "X"
> +       default y
> +
> +config Y
> +       bool "Y"
> +       default y
> +       depends on X
> +
>
> Then running this will fail
> $ ./tools/testing/kunit/kunit.py config --kunitconfig xy_kunitconfig
> --kconfig_add=CONFIG_X=n --kconfig_add=CONFIG_Y=n
>
> It will fail with this
> This is probably due to unsatisfied dependencies.
> Missing: # CONFIG_Y is not set
>
> The problem is that kunit.py is looking for an explicit line saying
> CONFIG_Y is not set.
> But CONFIG_Y's dependencies are not met, so Kconfig doesn't write it out.
>
> I assume we can treat the absence of it in the file as proof that it's not set.
> I.e. the bug lies in the is_subset() logic we have in kunit.py?

Ah no, this is just me trying to be clever and avoid a call to this logic.
I tried to use set_diff() and check if that's empty as an alternative.
But the set_diff() logic is not aware of how to treat the absence of
options properly.

I'll send a v2 w/ a fix.

      reply	other threads:[~2022-05-20 22:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 16:45 [PATCH] kunit: tool: refactor internal kconfig handling, allow overriding Daniel Latypov
2022-05-20  6:12 ` David Gow
2022-05-20 18:13   ` Daniel Latypov
2022-05-20 22:13     ` Daniel Latypov
2022-05-20 22:35       ` Daniel Latypov [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=CAGS_qxpF338dvbB+6QW1n8_agddeS10+nkTQNmT+0UcvoE1gBw@mail.gmail.com \
    --to=dlatypov@google.com \
    --cc=brendanhiggins@google.com \
    --cc=davidgow@google.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).