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>
Showing
- drivers/acpi/nfit/core.c 14 additions, 11 deletionsdrivers/acpi/nfit/core.c
- drivers/acpi/nfit/nfit.h 1 addition, 0 deletionsdrivers/acpi/nfit/nfit.h
- tools/testing/nvdimm/Kbuild 1 addition, 0 deletionstools/testing/nvdimm/Kbuild
- tools/testing/nvdimm/test/iomap.c 17 additions, 0 deletionstools/testing/nvdimm/test/iomap.c
- tools/testing/nvdimm/test/nfit.c 15 additions, 6 deletionstools/testing/nvdimm/test/nfit.c
Loading
Please register or sign in to comment