From: Shuah Khan <skhan@linuxfoundation.org>
To: Brendan Higgins <brendanhiggins@google.com>,
shuah@kernel.org, davidgow@google.com
Cc: linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
linux-kernel@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v1] kunit: tool: fix --alltests flag
Date: Wed, 23 Sep 2020 15:53:39 -0600 [thread overview]
Message-ID: <3fbc056e-6baa-a457-cc5f-058606903fe3@linuxfoundation.org> (raw)
In-Reply-To: <20200923211938.3727976-1-brendanhiggins@google.com>
On 9/23/20 3:19 PM, Brendan Higgins wrote:
> Alltests flag evidently stopped working when run from outside of the
> root of the source tree, so fix that. Also add an additional broken
> config to the broken_on_uml config.
>
> Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
> ---
> tools/testing/kunit/configs/broken_on_uml.config | 1 +
> tools/testing/kunit/kunit_kernel.py | 15 ++++++++++-----
> 2 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/tools/testing/kunit/configs/broken_on_uml.config b/tools/testing/kunit/configs/broken_on_uml.config
> index 239b9f03da2c..a7f0603d33f6 100644
> --- a/tools/testing/kunit/configs/broken_on_uml.config
> +++ b/tools/testing/kunit/configs/broken_on_uml.config
> @@ -39,3 +39,4 @@
> # CONFIG_QCOM_CPR is not set
> # CONFIG_RESET_BRCMSTB_RESCAL is not set
> # CONFIG_RESET_INTEL_GW is not set
> +# CONFIG_ADI_AXI_ADC is not set
> diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py
> index e20e2056cb38..1b1826500f61 100644
> --- a/tools/testing/kunit/kunit_kernel.py
> +++ b/tools/testing/kunit/kunit_kernel.py
> @@ -53,18 +53,23 @@ class LinuxSourceTreeOperations(object):
> except subprocess.CalledProcessError as e:
> raise ConfigError(e.output)
>
> - def make_allyesconfig(self):
> + def make_allyesconfig(self, build_dir, make_options):
> kunit_parser.print_with_timestamp(
> 'Enabling all CONFIGs for UML...')
> + command = ['make', 'ARCH=um', 'allyesconfig']
> + if make_options:
> + command.extend(make_options)
> + if build_dir:
> + command += ['O=' + build_dir]
> process = subprocess.Popen(
> - ['make', 'ARCH=um', 'allyesconfig'],
> + command,
> stdout=subprocess.DEVNULL,
> stderr=subprocess.STDOUT)
> process.wait()
> kunit_parser.print_with_timestamp(
> 'Disabling broken configs to run KUnit tests...')
> with ExitStack() as es:
> - config = open(KCONFIG_PATH, 'a')
> + config = open(get_kconfig_path(build_dir), 'a')
> disable = open(BROKEN_ALLCONFIG_PATH, 'r').read()
> config.write(disable)
> kunit_parser.print_with_timestamp(
> @@ -161,9 +166,9 @@ class LinuxSourceTree(object):
> return self.build_config(build_dir, make_options)
>
> def build_um_kernel(self, alltests, jobs, build_dir, make_options):
> - if alltests:
> - self._ops.make_allyesconfig()
> try:
> + if alltests:
> + self._ops.make_allyesconfig(build_dir, make_options)
> self._ops.make_olddefconfig(build_dir, make_options)
> self._ops.make(jobs, build_dir, make_options)
> except (ConfigError, BuildError) as e:
>
> base-commit: 92a2b470086f68bf35eb9f94b6cb5ebdfac41b25
>
Thanks. Applied to linux-kselftest kunit-fiex for 5.10-rc1
thanks,
-- Shuah
prev parent reply other threads:[~2020-09-23 21:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-23 21:19 Brendan Higgins
2020-09-23 21:53 ` Shuah Khan [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=3fbc056e-6baa-a457-cc5f-058606903fe3@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--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=shuah@kernel.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
all inboxes | Powered by JetHome®