From: Alan Maguire <alan.maguire@oracle.com>
To: Iurii Zaikin <yzaikin@google.com>
Cc: Alan Maguire <alan.maguire@oracle.com>,
"Theodore Y. Ts'o" <tytso@mit.edu>,
Brendan Higgins <brendanhiggins@google.com>,
David Gow <davidgow@google.com>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
KUnit Development <kunit-dev@googlegroups.com>,
Kees Cook <keescook@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
catalin.marinas@arm.com, joe.lawrence@redhat.com,
penguin-kernel@i-love.sakura.ne.jp, urezki@gmail.com,
andriy.shevchenko@linux.intel.com,
Jonathan Corbet <corbet@lwn.net>,
adilger.kernel@dilger.ca, Luis Chamberlain <mcgrof@kernel.org>,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
Knut Omang <knut.omang@oracle.com>
Subject: Re: [PATCH v5 linux-kselftest-test 3/6] kunit: allow kunit tests to be loaded as a module
Date: Fri, 6 Dec 2019 13:53:38 +0000 (GMT) [thread overview]
Message-ID: <alpine.LRH.2.20.1912061349001.28856@dhcp-10-175-208-120.vpn.oracle.com> (raw)
In-Reply-To: <CAAXuY3qekjWBUTxzAjCs+87nVXpigvzqm7TpG7MtJagTSG-xtg@mail.gmail.com>
On Wed, 4 Dec 2019, Iurii Zaikin wrote:
> > I've also got a patch that I was hoping to send out soon
> > that might help. The idea is that each test suite would create
> > a debugfs representation under /sys/kernel/debug/kunit;
> > specifically:
> >
> > /sys/kernel/debug/kunit/results/<suite>
> > /sys/kernel/debug/kunit/results/<suite>-tests
> >
> > ...where cat'ing the former shows the full set of results,
> > and the latter is a directory within which we can display
> > individual test results in test-case-specific files.
> >
> > This is all done by ensuring that when tests log information,
> > they log to a per-test-case log buffer as well as to dmesg.
> >
> > If the above sounds useful, I'll try and polish up the patch
> > for submission. Thanks!
> What would be the best way for kunit_tool to:
> 1. Know that the tests have completed as QEMU will be just sitting
> there with kernel complaining about the absence of init (or running
> whatever we give it as init)?
> 2. Read the test results from debugfs under QEMU virtual machine while
> the kernel is still there?
> I think supplying an init script/binary that copies the
> /sys/kernel/debug/kunit/results/* to a 9p shared dir set up by
> kunit_tool would work but it would add a step of cross-compiling and
> packaging a userspace binary.
>
I confess I'd only been thinking about supporting the case of a user
modprobe-ing a kunit test suite module directly and wanting a clean set
of results separated from other dmesg output. However the scheme you
describe does seem workable for the UML case also. With the
late_initcalls the builtin kunit suites will likely run early in boot but perhaps we could tweak the
semantics such that the full results debugfs file is not populated until
the tests have run to simplify script-based probing. I'll try some
experiments with the debugfs patch once it's ready. Thanks!
Alan
next prev parent reply other threads:[~2019-12-06 13:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-03 12:07 [PATCH v5 linux-kselftest-test 0/6] kunit: support building core/tests as modules Alan Maguire
2019-12-03 12:07 ` [PATCH v5 linux-kselftest-test 1/6] kunit: move string-stream.h to lib/kunit Alan Maguire
2019-12-03 12:07 ` [PATCH v5 linux-kselftest-test 2/6] kunit: hide unexported try-catch interface in try-catch-impl.h Alan Maguire
2019-12-03 12:07 ` [PATCH v5 linux-kselftest-test 3/6] kunit: allow kunit tests to be loaded as a module Alan Maguire
2019-12-03 17:54 ` Brendan Higgins
2019-12-04 0:38 ` Theodore Y. Ts'o
2019-12-04 0:42 ` Brendan Higgins
2019-12-04 0:51 ` Brendan Higgins
2019-12-04 15:41 ` Alan Maguire
2019-12-05 0:00 ` Iurii Zaikin
2019-12-06 13:53 ` Alan Maguire [this message]
2019-12-04 0:17 ` Iurii Zaikin
2019-12-04 15:30 ` Alan Maguire
2019-12-04 0:55 ` David Gow
2019-12-03 12:07 ` [PATCH v5 linux-kselftest-test 4/6] kunit: remove timeout dependence on sysctl_hung_task_timeout_seconds Alan Maguire
2019-12-03 22:45 ` Brendan Higgins
2019-12-03 12:07 ` [PATCH v5 linux-kselftest-test 5/6] kunit: allow kunit to be loaded as a module Alan Maguire
2019-12-03 22:47 ` Brendan Higgins
2019-12-03 12:07 ` [PATCH v5 linux-kselftest-test 6/6] kunit: update documentation to describe module-based build Alan Maguire
2019-12-03 22:50 ` Brendan Higgins
2019-12-03 23:06 ` [PATCH v5 linux-kselftest-test 0/6] kunit: support building core/tests as modules 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=alpine.LRH.2.20.1912061349001.28856@dhcp-10-175-208-120.vpn.oracle.com \
--to=alan.maguire@oracle.com \
--cc=adilger.kernel@dilger.ca \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=brendanhiggins@google.com \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=davidgow@google.com \
--cc=joe.lawrence@redhat.com \
--cc=keescook@chromium.org \
--cc=knut.omang@oracle.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=tytso@mit.edu \
--cc=urezki@gmail.com \
--cc=yamada.masahiro@socionext.com \
--cc=yzaikin@google.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).