ndctl icon indicating copy to clipboard operation
ndctl copied to clipboard

how to insert module nfit_test

Open foolstrong opened this issue 3 years ago • 2 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 

foolstrong avatar Aug 24 '22 01:08 foolstrong

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.

djbw avatar Aug 24 '22 04:08 djbw

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?

foolstrong avatar Aug 24 '22 06:08 foolstrong

not problem

foolstrong avatar Mar 28 '23 12:03 foolstrong