libnvdimm/nfit_test: add firmware download emulation
authorDave Jiang <dave.jiang@intel.com>
Fri, 2 Feb 2018 00:41:57 +0000 (17:41 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 2 Feb 2018 00:49:18 +0000 (16:49 -0800)
commitbfbaa952d1232c6199cdeb4896da67e02a13326d
tree4df44082a9add16f88f4fa1d29720c93f63e4de5
parent1c47a645ba48508dd641315ba01a949bea979e8e
libnvdimm/nfit_test: add firmware download emulation

Adding support in nfit_test for DSM v1.6 firmware update sequence. The test
will simulate the flashing of firmware to the DIMM. A bogus version string
will be returned as the test has no idea how to parse the firmware binary.
Any bogus binary can be used to "update" as the actual binary is not copied
into the kernel.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
[ vishal: also move smart calls into the nd_cmd_call block ]
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
tools/testing/nvdimm/test/nfit.c
tools/testing/nvdimm/test/nfit_test.h