linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Brendan Higgins <brendanhiggins@google.com>,
	Kent Overstreet <kent.overstreet@gmail.com>,
	Eryu Guan <guaneryu@gmail.com>,
	Eric Sandeen <sandeen@sandeen.net>,
	jeffm@suse.com, Sasha Levin <Alexander.Levin@microsoft.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	Kees Cook <keescook@google.com>,
	shuah@kernel.org, Joel Stanley <joel@jms.id.au>,
	mpe@ellerman.id.au, joe@perches.com, brakmo@fb.com,
	rostedt@goodmis.org, Tim.Bird@sony.com, khilman@baylibre.com,
	Julia Lawall <julia.lawall@lip6.fr>,
	linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	jdike@addtoit.com, richard@nod.at, linux-um@lists.infradead.org,
	Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org, Rob Herring <robh@kernel.org>,
	dan.j.williams@intel.com, linux-nvdimm@lists.01.org,
	Frank Rowand <frowand.list@gmail.com>,
	Knut Omang <knut.omang@oracle.com>,
	Felix Guo <felixguoxiuping@gmail.com>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [RFC v3 11/19] kunit: add Python libraries for handing KUnit config and kernel
Date: Tue, 11 Dec 2018 15:09:26 +0100	[thread overview]
Message-ID: <20181211140926.7wzd5jh6klcfsfgz@pathway.suse.cz> (raw)
In-Reply-To: <20181206153718.GD24603@bombadil.infradead.org>

On Thu 2018-12-06 07:37:18, Matthew Wilcox wrote:
> On Thu, Dec 06, 2018 at 12:32:47PM +0000, Kieran Bingham wrote:
> > On 04/12/2018 20:47, Luis Chamberlain wrote:
> > > On Mon, Dec 03, 2018 at 03:48:15PM -0800, Brendan Higgins wrote:
> > >> On Thu, Nov 29, 2018 at 5:54 AM Kieran Bingham
> > >> <kieran.bingham@ideasonboard.com> wrote:
> > > Developers working upstream do modify their kernels a lot, so we'd have
> > > to update such libraries quite a bit, but I think that's fine too. The
> > > *real* value I think from the above suggestion would be enterprise /
> > > mobile distros or stable kernel maintainers which have a static kernel
> > > they need to support for a relatively *long time*, consider a 10 year
> > > time frame. Running unit tests without qemu with uml and libraries for
> > > respective kernels seems real worthy.
> > 
> > I think any such library might be something generated by the kernel
> > build system, so if someone makes substantial changes to a core
> > component provided by the library - it can be up to them to build a
> > corresponding userspace library as well.
> > 
> > My main initial idea for a libumlinux is to provide infrastructure such
> > as our linked-lists and other kernel formatting so that we can take
> > kernel code directly to userspace for test and debug (assuming that
> > there are no hardware dependencies or things that we can't mock out)
> 
> We have liburcu already, which is good.  The main sticking points are:
> 
>  - printk has started adding a lot of %pX enhancements which printf
>    obviously doesn't know about.

I wonder how big problem it is and if it is worth using another
approach.

An alternative would be to replace them with helper functions
the would produce the same string. The meaning would be easier
to understand. But concatenating with the surrounding text
would be less elegant. People might start using pr_cont()
that is problematic (mixed lines).

Also the %pX formats are mostly used to print context of some
structures. Even the helper functions would need some maintenance
to keep them compatible.

BTW: The printk() feature has been introduced 10 years ago by
the commit 4d8a743cdd2690c0bc8 ("vsprintf: add infrastructure
support for extended '%p' specifiers").

Best Regards,
Petr

  parent reply	other threads:[~2018-12-11 14:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181128193636.254378-1-brendanhiggins@google.com>
     [not found] ` <20181128193636.254378-12-brendanhiggins@google.com>
     [not found]   ` <841cf4ae-501b-05ae-5863-a51010709b67@ideasonboard.com>
     [not found]     ` <CAFd5g47x-UNja72k-CWPmWz9+LTn8pF8Wj5Poq+2FJ93E=vymA@mail.gmail.com>
     [not found]       ` <20181204204701.GT28501@garbanzo.do-not-panic.com>
     [not found]         ` <f8722f4a-44c8-24c2-c433-5178f9f40b82@ideasonboard.com>
2018-12-06 15:37           ` [RFC v3 11/19] kunit: add Python libraries for handing KUnit config and kernel Matthew Wilcox
2018-12-07 11:30             ` Kieran Bingham
2018-12-11 14:09             ` Petr Mladek [this message]
2018-12-11 14:41               ` Steven Rostedt
2018-12-11 17:01                 ` Anton Ivanov
2019-02-09  0:40                   ` 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=20181211140926.7wzd5jh6klcfsfgz@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=Alexander.Levin@microsoft.com \
    --cc=Tim.Bird@sony.com \
    --cc=brakmo@fb.com \
    --cc=brendanhiggins@google.com \
    --cc=dan.j.williams@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=felixguoxiuping@gmail.com \
    --cc=frowand.list@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=guaneryu@gmail.com \
    --cc=jdike@addtoit.com \
    --cc=jeffm@suse.com \
    --cc=joe@perches.com \
    --cc=joel@jms.id.au \
    --cc=julia.lawall@lip6.fr \
    --cc=keescook@google.com \
    --cc=kent.overstreet@gmail.com \
    --cc=khilman@baylibre.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=knut.omang@oracle.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=linux-um@lists.infradead.org \
    --cc=mcgrof@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=richard@nod.at \
    --cc=robh@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sandeen@sandeen.net \
    --cc=shuah@kernel.org \
    --cc=willy@infradead.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).