]> git.baikalelectronics.ru Git - kernel.git/commit
tools/testing/nvdimm: unit test acpi_nfit_ctl()
authorDan Williams <dan.j.williams@intel.com>
Mon, 5 Dec 2016 21:43:25 +0000 (13:43 -0800)
committerDan Williams <dan.j.williams@intel.com>
Wed, 7 Dec 2016 01:42:36 +0000 (17:42 -0800)
commitd628b746c9702a594594d0bd6e6bc032ce15dc93
treeb1cc2c95f2094ea4ab5b508d49fbbd65fabd5048
parent537562926e73dc14e840f3b50f4b284c246ddbc1
tools/testing/nvdimm: unit test acpi_nfit_ctl()

A recent flurry of bug discoveries in the nfit driver's DSM marshalling
routine has highlighted the fact that we do not have unit test coverage
for this routine. Add a self-test of acpi_nfit_ctl() routine before
probing the "nfit_test.0" device. This mocks stimulus to acpi_nfit_ctl()
and if any of the tests fail "nfit_test.0" will be unavailable causing
the rest of the tests to not run / fail.

This unit test will also be a place to land reproductions of quirky BIOS
behavior discovered in the field and ensure the kernel does not regress
against implementations it has seen in practice.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/acpi/nfit/core.c
drivers/acpi/nfit/nfit.h
tools/testing/nvdimm/Kbuild
tools/testing/nvdimm/test/iomap.c
tools/testing/nvdimm/test/nfit.c
tools/testing/nvdimm/test/nfit_test.h