From: Dan Williams <dan.j.williams@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: "linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
Jens Axboe <axboe@kernel.dk>,
Stephen Rothwell <sfr@canb.auug.org.au>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Neil Brown <neilb@suse.de>, Greg KH <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Linux ACPI <linux-acpi@vger.kernel.org>,
jmoyer <jmoyer@redhat.com>,
linux-api@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v5 20/21] tools/testing/nvdimm: manufactured NFITs for interface development
Date: Thu, 11 Jun 2015 13:12:32 -0700 [thread overview]
Message-ID: <CAPcyv4j8pTGZF_4vubPBTRDHwo=JSmq=mnZ5bhMpEhy7uYj7nw@mail.gmail.com> (raw)
In-Reply-To: <20150609064811.GG9804@lst.de>
On Mon, Jun 8, 2015 at 11:48 PM, Christoph Hellwig <hch@lst.de> wrote:
> The description fails to mention the hacks how this is archived. I don't
> think the include hackery and otherwise needed exports are acceptable
> if with an explanation, though.
I've killed the include hackery.
> Really - get your fake hardware into qemu right now and don't bother
> with trying to hack the subsystem like this.
Rest assured that NFIT enabling for QEMU/KVM is well under way, but I
disagree that QEMU is the right place to enable unit tests. Here is
the updated changelog that appears in "[PATCH v6 20/21]
tools/testing/nvdimm: libnvdimm unit test infrastructure":
---
tools/testing/nvdimm: libnvdimm unit test infrastructure
'libnvdimm' is the first driver sub-system in the kernel to implement
mocking for unit test coverage. The nfit_test module gets built as an
external module and arranges for external module replacements of nfit,
libnvdimm, nd_pmem, and nd_blk. These replacements use the linker
--wrap option to redirect calls to ioremap() + request_mem_region() to
custom defined unit test resources. The end result is a fully
functional nvdimm_bus, as far as userspace is concerned, but with the
capability to perform otherwise destructive tests on emulated
resources.
Q: Why not use QEMU for this emulation?
QEMU is not suitable for unit testing. QEMU's role is to faithfully
emulate the platform. A unit test's role is to unfaithfully implement
the platform with the goal of triggering bugs in the corners of the
sub-system implementation. As bugs are discovered in platforms, or
the sub-system itself, the unit tests are extended to backstop a fix
with a reproducer unit test.
Another problem with QEMU is that it would require coordination of 3
software projects instead of 2 (kernel + libndctl [1]) to maintain and
execute the tests. The chances for bit rot and the difficulty of
getting the tests running goes up non-linearly the more components
involved.
Q: Why submit this to the kernel tree instead of external modules in libndctl?
Simple, to alleviate the same risk that out-of-tree external modules
face. Updates to drivers/nvdimm/ can be immediately evaluated to see
if they have any impact on tools/testing/nvdimm/.
[1]: https://github.com/pmem/ndctl
next prev parent reply other threads:[~2015-06-11 20:12 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 0:14 [PATCH v5 00/21] libnvdimm: non-volatile memory devices Dan Williams
2015-06-02 0:14 ` [PATCH v5 01/21] e820, efi: add ACPI 6.0 persistent memory types Dan Williams
2015-06-02 0:14 ` [PATCH v5 02/21] libnvdimm, nfit: initial libnvdimm infrastructure and NFIT support Dan Williams
2015-06-03 14:57 ` Christoph Hellwig
2015-06-03 19:24 ` Williams, Dan J
2015-06-09 6:33 ` hch
2015-06-09 22:27 ` Dan Williams
2015-06-02 0:14 ` [PATCH v5 03/21] libnvdimm: control character device and libnvdimm bus sysfs attributes Dan Williams
2015-06-02 0:14 ` [PATCH v5 04/21] libnvdimm, nfit: dimm/memory-devices Dan Williams
2015-06-02 0:14 ` [PATCH v5 05/21] libnvdimm: control (ioctl) messages for libnvdimm bus and dimm devices Dan Williams
2015-06-09 6:34 ` Christoph Hellwig
2015-06-09 6:57 ` Dan Williams
2015-06-10 7:33 ` Christoph Hellwig
2015-06-02 0:14 ` [PATCH v5 06/21] libnvdimm, nvdimm: dimm driver and base libnvdimm device-driver infrastructure Dan Williams
2015-06-02 0:14 ` [PATCH v5 07/21] libnvdimm, nfit: regions (block-data-window, persistent memory, volatile memory) Dan Williams
2015-06-02 0:14 ` [PATCH v5 08/21] libnvdimm: support for legacy (non-aliasing) nvdimms Dan Williams
2015-06-02 0:14 ` [PATCH v5 09/21] libnvdimm, nd_pmem: add libnvdimm support to the pmem driver Dan Williams
2015-06-03 7:44 ` Christoph Hellwig
2015-06-03 19:31 ` Williams, Dan J
2015-06-09 6:36 ` hch
2015-06-02 0:15 ` [PATCH v5 10/21] pmem: Dynamically allocate partition numbers Dan Williams
2015-06-02 0:15 ` [PATCH v5 11/21] libnvdimm, nfit: add interleave-set state-tracking infrastructure Dan Williams
2015-06-02 0:15 ` [PATCH v5 12/21] libnvdimm: namespace indices: read and validate Dan Williams
2015-06-09 6:39 ` Christoph Hellwig
2015-06-10 15:54 ` Dan Williams
2015-06-02 0:15 ` [PATCH v5 13/21] libnvdimm: pmem label sets and namespace instantiation Dan Williams
2015-06-02 0:15 ` [PATCH v5 14/21] libnvdimm: blk labels " Dan Williams
2015-06-02 0:15 ` [PATCH v5 15/21] libnvdimm: write pmem label set Dan Williams
2015-06-02 0:15 ` [PATCH v5 16/21] libnvdimm: write blk " Dan Williams
2015-06-02 0:15 ` [PATCH v5 17/21] libnvdimm: infrastructure for btt devices Dan Williams
2015-06-09 6:42 ` Christoph Hellwig
2015-06-10 18:46 ` Matthew Wilcox
2015-06-11 7:28 ` Christoph Hellwig
2015-06-17 16:47 ` Jeff Moyer
2015-06-17 16:50 ` Dan Williams
2015-06-17 16:57 ` Jeff Moyer
2015-06-17 17:09 ` Dan Williams
2015-06-02 0:15 ` [PATCH v5 18/21] nd_btt: atomic sector updates Dan Williams
2015-06-09 6:44 ` Christoph Hellwig
2015-06-09 18:27 ` Vishal Verma
2015-06-10 7:34 ` Christoph Hellwig
2015-06-10 18:24 ` Vishal Verma
2015-06-02 0:15 ` [PATCH v5 19/21] libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory Dan Williams
2015-06-02 0:15 ` [PATCH v5 20/21] tools/testing/nvdimm: manufactured NFITs for interface development Dan Williams
2015-06-09 6:48 ` Christoph Hellwig
2015-06-11 20:12 ` Dan Williams [this message]
2015-06-02 0:16 ` [PATCH v5 21/21] libnvdimm: Non-Volatile Devices Dan Williams
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='CAPcyv4j8pTGZF_4vubPBTRDHwo=JSmq=mnZ5bhMpEhy7uYj7nw@mail.gmail.com' \
--to=dan.j.williams@intel.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=jmoyer@redhat.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@ml01.01.org \
--cc=mingo@kernel.org \
--cc=neilb@suse.de \
--cc=rafael@kernel.org \
--cc=sfr@canb.auug.org.au \
/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).