mbox series

[RFC,v5,0/7] PMEM device emulation without nfit depenency

Message ID 20201214103859.2409175-1-santosh@fossix.org (mailing list archive)
Headers show
Series PMEM device emulation without nfit depenency | expand

Message

Santosh Sivaraj Dec. 14, 2020, 10:38 a.m. UTC
The current test module cannot be used for testing platforms (make check)
that do not have support for NFIT. In order to get the ndctl tests working,
we need a module which can emulate NVDIMM devices without relying on
ACPI/NFIT.

The emulated PMEM device is made part of the PAPR family.

Corresponding changes for ndctl is also required, to add attributes needed
for the test, which will be sent as a reply to this patch.

The following is the test result, run on a x86 guest:

PASS: libndctl                                                                         
PASS: dsm-fail                                                                         
PASS: dpa-alloc                                                                        
PASS: parent-uuid                                                                      
PASS: multi-pmem                                                                       
PASS: create.sh                                                                        
FAIL: clear.sh                                                                         
FAIL: pmem-errors.sh                                                                   
FAIL: daxdev-errors.sh                                                                 
PASS: multi-dax.sh                                                                     
PASS: btt-check.sh                                                                     
FAIL: label-compat.sh                      
PASS: blk-exhaust.sh                       
PASS: sector-mode.sh                       
FAIL: inject-error.sh                      
SKIP: btt-errors.sh                        
PASS: hugetlb                              
PASS: btt-pad-compat.sh                                                                
SKIP: firmware-update.sh                                                               
FAIL: ack-shutdown-count-set                                                           
PASS: rescan-partitions.sh                                                             
FAIL: inject-smart.sh                      
FAIL: monitor.sh                           
PASS: max_available_extent_ns.sh                                                       
FAIL: pfn-meta-errors.sh                                                               
PASS: track-uuid.sh                        
============================================================================
Testsuite summary for ndctl 70.10.g7ecd11c                                              
============================================================================
# TOTAL: 26                                
# PASS:  15                                
# SKIP:  2                                 
# XFAIL: 0                                 
# FAIL:  9                                 
# XPASS: 0                                 
# ERROR: 0

The following is the test result from a PowerPC 64 guest.

PASS: libndctl
PASS: dsm-fail
PASS: dpa-alloc
PASS: parent-uuid
PASS: multi-pmem
PASS: create.sh
FAIL: clear.sh
FAIL: pmem-errors.sh
FAIL: daxdev-errors.sh
PASS: multi-dax.sh
PASS: btt-check.sh
FAIL: label-compat.sh
PASS: blk-exhaust.sh
PASS: sector-mode.sh
FAIL: inject-error.sh                       
SKIP: btt-errors.sh
SKIP: hugetlb
PASS: btt-pad-compat.sh
SKIP: firmware-update.sh
FAIL: ack-shutdown-count-set
PASS: rescan-partitions.sh
FAIL: inject-smart.sh
FAIL: monitor.sh
PASS: max_available_extent_ns.sh
FAIL: pfn-meta-errors.sh
PASS: track-uuid.sh
============================================================================  
Testsuite summary for ndctl 70.git94a00679
============================================================================
# TOTAL: 26
# PASS:  14
# SKIP:  3
# XFAIL: 0
# FAIL:  9
# XPASS: 0                                  
# ERROR: 0

Error injection tests and SMART are not yet implemented.

Changes from V4:
- Split the driver patches into smaller chunks for ease of review
- [ndctl] Adding dimm attributes for nfit and papr, make it into one function [Dan]
- [ndctl] If nfit modules are missing, check for acpi support before failing, slightly
  different approach   than what Dan commented.

Santosh Sivaraj (7):
  testing/nvdimm: Add test module for non-nfit platforms
  ndtest: Add compatability string to treat it as PAPR family
  ndtest: Add dimms to the two buses
  ndtest: Add dimm attributes
  ndtest: Add regions and mappings to the test buses
  ndtest: Add nvdimm control functions
  ndtest: Add papr health related flags

 tools/testing/nvdimm/config_check.c |    3 +-
 tools/testing/nvdimm/test/Kbuild    |    6 +-
 tools/testing/nvdimm/test/ndtest.c  | 1138 +++++++++++++++++++++++++++
 tools/testing/nvdimm/test/ndtest.h  |  109 +++
 4 files changed, 1254 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/nvdimm/test/ndtest.c
 create mode 100644 tools/testing/nvdimm/test/ndtest.h

Comments

Dan Williams Dec. 15, 2020, 11:21 p.m. UTC | #1
Typically RFC means "not ready to apply, still seeking fundamental
approach feedback". Should I be looking to consider this for
v5.11-rc1, or is this still RFC / should wait for v5.12?

On Mon, Dec 14, 2020 at 2:39 AM Santosh Sivaraj <santosh@fossix.org> wrote:
>
> The current test module cannot be used for testing platforms (make check)
> that do not have support for NFIT. In order to get the ndctl tests working,
> we need a module which can emulate NVDIMM devices without relying on
> ACPI/NFIT.
>
> The emulated PMEM device is made part of the PAPR family.
>
> Corresponding changes for ndctl is also required, to add attributes needed
> for the test, which will be sent as a reply to this patch.
>
> The following is the test result, run on a x86 guest:
>
> PASS: libndctl
> PASS: dsm-fail
> PASS: dpa-alloc
> PASS: parent-uuid
> PASS: multi-pmem
> PASS: create.sh
> FAIL: clear.sh
> FAIL: pmem-errors.sh
> FAIL: daxdev-errors.sh
> PASS: multi-dax.sh
> PASS: btt-check.sh
> FAIL: label-compat.sh
> PASS: blk-exhaust.sh
> PASS: sector-mode.sh
> FAIL: inject-error.sh
> SKIP: btt-errors.sh
> PASS: hugetlb
> PASS: btt-pad-compat.sh
> SKIP: firmware-update.sh
> FAIL: ack-shutdown-count-set
> PASS: rescan-partitions.sh
> FAIL: inject-smart.sh
> FAIL: monitor.sh
> PASS: max_available_extent_ns.sh
> FAIL: pfn-meta-errors.sh
> PASS: track-uuid.sh
> ============================================================================
> Testsuite summary for ndctl 70.10.g7ecd11c
> ============================================================================
> # TOTAL: 26
> # PASS:  15
> # SKIP:  2
> # XFAIL: 0
> # FAIL:  9
> # XPASS: 0
> # ERROR: 0
>
> The following is the test result from a PowerPC 64 guest.
>
> PASS: libndctl
> PASS: dsm-fail
> PASS: dpa-alloc
> PASS: parent-uuid
> PASS: multi-pmem
> PASS: create.sh
> FAIL: clear.sh
> FAIL: pmem-errors.sh
> FAIL: daxdev-errors.sh
> PASS: multi-dax.sh
> PASS: btt-check.sh
> FAIL: label-compat.sh
> PASS: blk-exhaust.sh
> PASS: sector-mode.sh
> FAIL: inject-error.sh
> SKIP: btt-errors.sh
> SKIP: hugetlb
> PASS: btt-pad-compat.sh
> SKIP: firmware-update.sh
> FAIL: ack-shutdown-count-set
> PASS: rescan-partitions.sh
> FAIL: inject-smart.sh
> FAIL: monitor.sh
> PASS: max_available_extent_ns.sh
> FAIL: pfn-meta-errors.sh
> PASS: track-uuid.sh
> ============================================================================
> Testsuite summary for ndctl 70.git94a00679
> ============================================================================
> # TOTAL: 26
> # PASS:  14
> # SKIP:  3
> # XFAIL: 0
> # FAIL:  9
> # XPASS: 0
> # ERROR: 0

With these run reports are you trying to demonstrate the improvement,
or the future work?

I think it's sufficient to say that no tests ran with nfit_test
previously, but now 26 pass. Extra interesting would be to determine
if any current papr regression fixes in the tree would have been
caught by an ndtest run.
Santosh Sivaraj Dec. 17, 2020, 7:23 a.m. UTC | #2
Dan Williams <dan.j.williams@intel.com> writes:

> Typically RFC means "not ready to apply, still seeking fundamental
> approach feedback". Should I be looking to consider this for
> v5.11-rc1, or is this still RFC / should wait for v5.12?

I would like this to go in, after your comments to the previously RFC, I guess
this has moved beyond the RFC tag. I will re-send the series without the RFC
tag. Meanwhile I will continue to work on getting both modules to co-exist and
be exercised in the same build apart from getting SMART and error injection
tests.

>
> On Mon, Dec 14, 2020 at 2:39 AM Santosh Sivaraj <santosh@fossix.org> wrote:
>>
>> The current test module cannot be used for testing platforms (make check)
>> that do not have support for NFIT. In order to get the ndctl tests working,
>> we need a module which can emulate NVDIMM devices without relying on
>> ACPI/NFIT.
>>
>> The emulated PMEM device is made part of the PAPR family.
>>
>> Corresponding changes for ndctl is also required, to add attributes needed
>> for the test, which will be sent as a reply to this patch.
>>
>> The following is the test result, run on a x86 guest:
>>
>> PASS: libndctl
>> PASS: dsm-fail
>> PASS: dpa-alloc
>> PASS: parent-uuid
>> PASS: multi-pmem
>> PASS: create.sh
>> FAIL: clear.sh
>> FAIL: pmem-errors.sh
>> FAIL: daxdev-errors.sh
>> PASS: multi-dax.sh
>> PASS: btt-check.sh
>> FAIL: label-compat.sh
>> PASS: blk-exhaust.sh
>> PASS: sector-mode.sh
>> FAIL: inject-error.sh
>> SKIP: btt-errors.sh
>> PASS: hugetlb
>> PASS: btt-pad-compat.sh
>> SKIP: firmware-update.sh
>> FAIL: ack-shutdown-count-set
>> PASS: rescan-partitions.sh
>> FAIL: inject-smart.sh
>> FAIL: monitor.sh
>> PASS: max_available_extent_ns.sh
>> FAIL: pfn-meta-errors.sh
>> PASS: track-uuid.sh
>> ============================================================================
>> Testsuite summary for ndctl 70.10.g7ecd11c
>> ============================================================================
>> # TOTAL: 26
>> # PASS:  15
>> # SKIP:  2
>> # XFAIL: 0
>> # FAIL:  9
>> # XPASS: 0
>> # ERROR: 0
>>
>> The following is the test result from a PowerPC 64 guest.
>>
>> PASS: libndctl
>> PASS: dsm-fail
>> PASS: dpa-alloc
>> PASS: parent-uuid
>> PASS: multi-pmem
>> PASS: create.sh
>> FAIL: clear.sh
>> FAIL: pmem-errors.sh
>> FAIL: daxdev-errors.sh
>> PASS: multi-dax.sh
>> PASS: btt-check.sh
>> FAIL: label-compat.sh
>> PASS: blk-exhaust.sh
>> PASS: sector-mode.sh
>> FAIL: inject-error.sh
>> SKIP: btt-errors.sh
>> SKIP: hugetlb
>> PASS: btt-pad-compat.sh
>> SKIP: firmware-update.sh
>> FAIL: ack-shutdown-count-set
>> PASS: rescan-partitions.sh
>> FAIL: inject-smart.sh
>> FAIL: monitor.sh
>> PASS: max_available_extent_ns.sh
>> FAIL: pfn-meta-errors.sh
>> PASS: track-uuid.sh
>> ============================================================================
>> Testsuite summary for ndctl 70.git94a00679
>> ============================================================================
>> # TOTAL: 26
>> # PASS:  14
>> # SKIP:  3
>> # XFAIL: 0
>> # FAIL:  9
>> # XPASS: 0
>> # ERROR: 0
>
> With these run reports are you trying to demonstrate the improvement,
> or the future work?

This shows what work still needs to be done. As of now there is SMART and error
injection which I am working on right now.
>
> I think it's sufficient to say that no tests ran with nfit_test
> previously, but now 26 pass. Extra interesting would be to determine
> if any current papr regression fixes in the tree would have been
> caught by an ndtest run.

So far there is are no regressions caught.

Thanks,
Santosh
Dan Williams Jan. 28, 2021, 8:12 a.m. UTC | #3
On Mon, Dec 14, 2020 at 2:39 AM Santosh Sivaraj <santosh@fossix.org> wrote:
>
> The current test module cannot be used for testing platforms (make check)
> that do not have support for NFIT. In order to get the ndctl tests working,
> we need a module which can emulate NVDIMM devices without relying on
> ACPI/NFIT.
>
> The emulated PMEM device is made part of the PAPR family.
>
> Corresponding changes for ndctl is also required, to add attributes needed
> for the test, which will be sent as a reply to this patch.
>
> The following is the test result, run on a x86 guest:

Ok, these kernel changes look fine to me. So, I'll go ahead and merge
these. The ndctl changes need the documentation update and the other
fixup about a generic way to signal support for the common error
flags.