tools/testing/nvdimm: add watermarks for dax_pmem* modules
authorVishal Verma <vishal.l.verma@intel.com>
Tue, 19 Mar 2019 01:06:29 +0000 (19:06 -0600)
committerDan Williams <dan.j.williams@intel.com>
Mon, 22 Apr 2019 22:56:28 +0000 (15:56 -0700)
commit92f6f2d7f5c844faebf5b47d4a8f15de519b48c2
tree4c31d67c62837785990c96e6dd6edc8bf26fcd72
parentd521fbaeda726ef3a9dad91c0239e7207d9864b7
tools/testing/nvdimm: add watermarks for dax_pmem* modules

Add nfit_test 'watermarks' for the dax_pmem, dax_pmem_core, and
dax_pmem_compat modules. This causes the nfit_test module to fail
loading in case any of these modules are also not overridden with the
ldconfig wrapped modules. Without this, nfit_test would sometimes fail
creation of device-dax namespaces on the nfit_test_bus with an unhelpful
error log such as:

    dax_pmem dax5.0: could not reserve metadata
    dax_pmem: probe of dax5.0 failed with error -16

Which was caused due to the unwrapped version of
devm_request_mem_region() being called.

Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
tools/testing/nvdimm/Kbuild
tools/testing/nvdimm/dax_pmem_compat_test.c [new file with mode: 0644]
tools/testing/nvdimm/dax_pmem_core_test.c [new file with mode: 0644]
tools/testing/nvdimm/dax_pmem_test.c [new file with mode: 0644]
tools/testing/nvdimm/test/nfit.c
tools/testing/nvdimm/watermark.h