From: Alan Maguire <alan.maguire@oracle.com>
To: David Gow <davidgow@google.com>
Cc: kernel test robot <yidingx.liu@intel.com>,
KUnit Development <kunit-dev@googlegroups.com>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
"Li, Philip" <philip.li@intel.com>
Subject: Re: Kunit get 0 tests when run defconfig in Debian9
Date: Fri, 22 May 2020 12:42:16 +0100 (BST) [thread overview]
Message-ID: <alpine.LRH.2.21.2005221239330.26762@localhost> (raw)
In-Reply-To: <CABVgOSnj6H5UXNGktT2NAHPF1KxAu5=Mg0hyuBu+NpjAdh+Q4A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4508 bytes --]
On Fri, 22 May 2020, David Gow wrote:
> Thanks for checking KUnit out — it's a shame it hasn't worked
> out-of-the-box here.
>
> I'm not sure off the top of my head what could be wrong here: as you
> note, there are no obvious errors. My suspicion is that it's either
> some strange incompatibility with UML, or something is not quite right
> with the config being generated and used.
>
> A few questions/suggestions:
> - Are there any test results visible when running
> ./tools/testing/kunit/kunit.py run --raw_output (older versions of
> the KUnit parser may not work well if the kernel log is decorated,
> e.g. with timestamps, etc — this should be largely fixed for 5.7).
> - If not, does running the built UML kernel manually work, and if so
> does it print any test results? This should be as simple as running
> "./vmlinux". On some older host kernels, UML may not boot if built
> statically and KASLR is in its strictest mode. This shouldn't be the
> case here, but running "setarch `uname -m` -R ./vmlinux" may help if
> some weirder issues show up.
> - Does the .config actually have CONFIG_KUNIT_TEST=y and
> CONFIG_KUNIT_EXAMPLE_TEST=y? kunit.py will keep its .config around, so
> you can check it after running kunit.py run. It'll also preserve any
> config changes you make that don't conflict with the .kunitconfig, so
> you could try (for example), also enabling CONFIG_LIST_KUNIT_TEST to
> see if it's a problem specific to those tests.
> - Finally, running 'make ARCH=um defconfig' before running kunit.py
> run may help clean up any residual config that could be causing
> problems.
> - Otherwise, I'm not sure what could be going wrong. Are you running
> on x86_64? UML doesn't support non-x86 architectures, and while the
> 32-bit stuff worked last I checked, it's not tested as regularly at
> present.
>
> Of course, it's also possible to run tests without UML or the kunit.py
> script as well, by either building them into a kernel, and reading the
> results from the log on startup, or building the tests as modules,
> modprobing them, and reading the results from
> /sys/kernel/debug/kunit/<test-suite>/results. That's obviously a bit
> less convenient than the script, but may fit better into existing test
> infrastructure, and can sidestep any UML issues.
>
This is all great advice; I wonder if we should add a "Troubleshooting"
section to the KUnit documentation's start.rst file? A slightly-edited
(to be more general) version of the above would be really helpful there
I think. Thanks!
Alan
> Hope that helps!
>
> Cheers,
> -- David
>
> On Thu, May 21, 2020 at 1:57 PM kernel test robot <yidingx.liu@intel.com> wrote:
> >
> > Hi, all.
> >
> >
> > I met a strange problem that kunit run 0 tests in Debian9.
> >
> >
> > Env:
> >
> > ```
> >
> > root@lkp-hsw-ep4 ~/linus# head /etc/os-release
> > PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
> > NAME="Debian GNU/Linux"
> > VERSION_ID="9"
> > VERSION="9 (stretch)"
> > ID=debian
> >
> > root@lkp-hsw-ep4 ~/linus# uname -r
> > 5.6.0
> >
> > ```
> >
> >
> > Reproduce: Just run `./tools/testing/kunit/kunit.py run --defconfig`
> >
> > ```
> >
> > root@lkp-hsw-ep4 ~/linus# ./tools/testing/kunit/kunit.py run --defconfig
> > [13:41:30] Building KUnit Kernel ...
> > [13:41:33] Starting KUnit Kernel ...
> > [13:41:33] ============================================================
> > [13:41:33] Testing complete. 0 tests run. 0 failed. 0 crashed.
> > [13:41:33] Elapsed time: 2.619s total, 0.002s configuring, 2.610s
> > building, 0.007s running
> >
> > root@lkp-hsw-ep4 ~/linus# cat .kunitconfig
> > CONFIG_KUNIT=y
> > CONFIG_KUNIT_TEST=y
> > CONFIG_KUNIT_EXAMPLE_TEST=y
> >
> > ```
> >
> >
> > As doc said, looks like everything worked correctly. But kunit run 0 tests.
> >
> > ```
> >
> > If everything worked correctly, you should see the following:
> >
> > Generating .config ...
> > Building KUnit Kernel ...
> > Starting KUnit Kernel ...
> >
> > ```
> >
> >
> >
> > --
> > Best regards.
> > Liu Yiding
> >
> > --
> > You received this message because you are subscribed to the Google Groups "KUnit Development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to kunit-dev+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/kunit-dev/ef994ce9-ccd8-e9c9-9838-049a62a3a561%40intel.com.
>
next prev parent reply other threads:[~2020-05-22 11:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-21 5:56 Kunit get 0 tests when run defconfig in Debian9 kernel test robot
2020-05-22 2:33 ` David Gow
2020-05-22 11:42 ` Alan Maguire [this message]
2020-05-27 1:59 ` Liu Yiding
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=alpine.LRH.2.21.2005221239330.26762@localhost \
--to=alan.maguire@oracle.com \
--cc=davidgow@google.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=philip.li@intel.com \
--cc=yidingx.liu@intel.com \
/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).