tools/testing/nvdimm: unit test for acpi_nfit_notify()
authorDan Williams <dan.j.williams@intel.com>
Fri, 19 Aug 2016 05:15:04 +0000 (22:15 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 23 Aug 2016 14:49:42 +0000 (07:49 -0700)
commitc14a868a5a14f385059f012e54291de95a538a02
tree8a084782e9a79def7bc9d4a95ea4f6e7fb369cbd
parentc09f12186d6b03b798832d95289af76495990192
tools/testing/nvdimm: unit test for acpi_nfit_notify()

We have had a couple bugs in this implementation in the past and before
we add another ->notify() implementation for nvdimm devices, lets allow
this routine to be exercised via nfit_test.

Rewrite acpi_nfit_notify() in terms of a generic struct device and
acpi_handle parameter, and then implement a mock acpi_evaluate_object()
that returns a _FIT payload.

Cc: Vishal Verma <vishal.l.verma@intel.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
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