how to insert module nfit_test
foolstrong opened this issue · comments
I get a error with nfit_test as follows
[root@localhost home]# modprobe nfit_test
modprobe: ERROR: could not insert 'nfit_test': Unknown symbol in module, or unknown parameter (see dmesg)
[root@localhost home]# dmesg | tail -n 10
[64154.467593] nfit_test: Unknown symbol pmem_test (err -2)
[64154.467612] nfit_test: Unknown symbol dax_pmem_core_test (err -2)
[64154.467666] nfit_test: Unknown symbol device_dax_test (err -2)
[64154.467674] nfit_test: Unknown symbol dax_pmem_test (err -2)
[64173.472518] nfit_test: Unknown symbol libnvdimm_test (err -2)
[64173.472543] nfit_test: Unknown symbol acpi_nfit_test (err -2)
[64173.472589] nfit_test: Unknown symbol pmem_test (err -2)
[64173.472610] nfit_test: Unknown symbol dax_pmem_core_test (err -2)
[64173.472664] nfit_test: Unknown symbol device_dax_test (err -2)
[64173.472672] nfit_test: Unknown symbol dax_pmem_test (err -2)
I'm sure that these config has been set, then build and install the unit test enabled libnvdimm modules in the following order
CONFIG_X86_PMEM_LEGACY=m
CONFIG_ZONE_DEVICE=y
CONFIG_LIBNVDIMM=m
CONFIG_BLK_DEV_PMEM=m
CONFIG_ND_BLK=m
CONFIG_BTT=y
CONFIG_NVDIMM_PFN=y
CONFIG_NVDIMM_DAX=y
CONFIG_DEV_DAX_PMEM=m
CONFIG_ENCRYPTED_KEYS=y
make M=tools/testing/nvdimm
sudo make M=tools/testing/nvdimm modules_install
sudo make modules_install
nfit_test depends on replacing the "production" version of the drivers/nvdimm/ modules with the ones that tools/testing/nvdimm/Kbuild creates. Likely what is happening is that you have, for example, the original libnvdimm.ko already loaded, and then when nfit_test loads it does not find the modified libnvdimm.ko. Those "_test" symbols are there to catch those collisions.
When I test with nfit_test it is always on a throw away VM where all the replacement test modules in place before the VM boots.
my machine already load ko as follows
[root@localhost home]# lsmod | grep nfit
nfit 81920 0
libnvdimm 212992 1 nfit
I should remove the original ko already loaded,and insert these that tools/testing/nvdimm/Kbuild creates?
not problem