[ndctl v2 3/4] inject-error: Remove assumptions on error injection support

2021-05-17 Thread Santosh Sivaraj
Currently the code assumes that only nfit supports error injection, remove those assumptions before error injection support for PAPR is added. Add bus operations similar to that of DIMM operations with injection operations in it. Signed-off-by: Santosh Sivaraj --- ndctl/lib/inject.c | 96

[ndctl v2 4/4] Error injection support for PAPR

2021-05-17 Thread Santosh Sivaraj
Add support for error injection on PAPR family of devices. This is particularly useful in running 'make check' on non-nfit platforms. Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 1 + ndctl/lib/papr.c | 134 ++ ndctl/lib/private.h

[ndctl v2 2/4] papr: ndtest: Enable smart test cases

2021-05-17 Thread Santosh Sivaraj
From: Shivaprasad G Bhat The patch implements all necessary smart APIs for the ndtest kernel driver. Both inject-smart.sh and monitor.sh tests pass with the patch. Signed-off-by: Shivaprasad G Bhat --- ndctl/lib/papr.c | 313 ++ ndctl/lib/papr.h

[ndctl v2 1/4] libndctl: Rename dimm property nfit_dsm_mask for generic use

2021-05-17 Thread Santosh Sivaraj
From: Shivaprasad G Bhat The dimm specific dsm masks can be used by different platforms. Rename it to dsm_mask to avoid confusion. Signed-off-by: Shivaprasad G Bhat --- ndctl/lib/libndctl.c | 4 ++-- ndctl/lib/private.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) Resending

[v2 2/2] nvdimm/ndtest: Add support for error injection tests

2021-05-17 Thread Santosh Sivaraj
Add necessary support for error injection family of tests on non-acpi platforms. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/test/ndtest.c | 455 - tools/testing/nvdimm/test/ndtest.h | 25 ++ 2 files changed, 477 insertions(+), 3 deletions(-) diff --git

[v2 1/2] tests/nvdimm/ndtest: Enable smart tests

2021-05-17 Thread Santosh Sivaraj
From: Shivaprasad G Bhat The patch adds necessary health related dsm command implementations for the ndctl inject-smart and monitor tests to pass. Signed-off-by: Shivaprasad G Bhat --- tools/testing/nvdimm/test/ndtest.c | 258 + tools/testing/nvdimm/test/ndtest.h |

[ndctl V5 4/4] Use page size as alignment value

2021-05-13 Thread Santosh Sivaraj
The alignment sizes passed to ndctl in the tests are all hardcoded to 4k, the default page size on x86. Change those to the default page size on that architecture (sysconf/getconf). No functional changes otherwise. Signed-off-by: Santosh Sivaraj --- test/dpa-alloc.c| 15

[ndctl V5 3/4] papr: Add support to parse save_fail flag for dimm

2021-05-13 Thread Santosh Sivaraj
This will help in getting the dimm fail tests to run on papr family too. Also add nvdimm_test compatibility string for recognizing the test module. Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ndctl/lib

[ndctl V5 2/4] test: Don't skip tests if nfit modules are missing

2021-05-13 Thread Santosh Sivaraj
For NFIT to be available ACPI is a must, so don't fail when nfit modules are missing on a platform that doesn't support ACPI. Signed-off-by: Santosh Sivaraj --- test.h| 2 +- test/ack-shutdown-count-set.c | 2 +- test/blk_namespaces.c | 2 +- test/core.c

[ndctl V5 1/4] libndctl: Unify adding dimms for papr and nfit families

2021-05-13 Thread Santosh Sivaraj
only part of the DIMM attributes are provided (This doesn't mean that all of the DIMM attributes can be missing). Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 103 --- 1 file changed, 38 insertions(+), 65 deletions(-) diff --git a/ndctl/lib

Re: [PATCH 2/4] test: Don't skip tests if nfit modules are missing

2021-05-12 Thread Santosh Sivaraj
Santosh Sivaraj writes: > "Verma, Vishal L" writes: > > Hi Vishal, > >> On Sat, 2021-05-01 at 11:57 +0530, Santosh Sivaraj wrote: >>> "Verma, Vishal L" writes: >>> >>> Hi Vishal, >>> >>> > On Sun, 2

Re: [PATCH 2/4] test: Don't skip tests if nfit modules are missing

2021-05-12 Thread Santosh Sivaraj
"Verma, Vishal L" writes: Hi Vishal, > On Sat, 2021-05-01 at 11:57 +0530, Santosh Sivaraj wrote: >> "Verma, Vishal L" writes: >> >> Hi Vishal, >> >> > On Sun, 2021-03-28 at 07:39 +0530, Santosh Sivaraj wrote: >> > > For

Re: [PATCH 2/4] test: Don't skip tests if nfit modules are missing

2021-05-01 Thread Santosh Sivaraj
Santosh Sivaraj writes: > "Verma, Vishal L" writes: > > Hi Vishal, > >> On Sun, 2021-03-28 at 07:39 +0530, Santosh Sivaraj wrote: >>> For NFIT to be available ACPI is a must, so don't fail when nfit modules >>> are missing on a platform that doesn't

Re: [PATCH 2/4] test: Don't skip tests if nfit modules are missing

2021-05-01 Thread Santosh Sivaraj
"Verma, Vishal L" writes: Hi Vishal, > On Sun, 2021-03-28 at 07:39 +0530, Santosh Sivaraj wrote: >> For NFIT to be available ACPI is a must, so don't fail when nfit modules >> are missing on a platform that doesn't support ACPI. >> >> Signed-off-b

Re: [PATCH] libnvdimm.h: Remove duplicate struct declaration

2021-04-20 Thread Santosh Sivaraj
Hi Ira, Ira Weiny writes: > On Mon, Apr 19, 2021 at 07:27:25PM +0800, Wan Jiabing wrote: >> struct device is declared at 133rd line. >> The declaration here is unnecessary. Remove it. >> >> Signed-off-by: Wan Jiabing >> --- >> include/linux/libnvdimm.h | 1 - >> 1 file changed, 1 deletion(-)

Re: [PATCH -next] tools/testing/nvdimm: Make symbol '__nfit_test_ioremap' static

2021-04-20 Thread Santosh Sivaraj
Hi Zou, Zou Wei writes: > The sparse tool complains as follows: > > tools/testing/nvdimm/test/iomap.c:65:14: warning: > symbol '__nfit_test_ioremap' was not declared. Should it be static? > > This symbol is not used outside of security.c, so this s/security.c/iomap.c/ Thanks, Santosh >

[ndctl PATCH 2/2] Error injection support for PAPR

2021-04-19 Thread Santosh Sivaraj
Add support for error injection on PAPR family of devices. This is particularly useful in running 'make check' on non-nfit platforms. Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 1 + ndctl/lib/papr.c | 134 ++ ndctl/lib/private.h

[ndctl PATCH 1/2] inject-error: Remove assumptions on error injection support

2021-04-19 Thread Santosh Sivaraj
Currently the code assumes that only nfit supports error injection, remove those assumptions before error injection support for PAPR is added. Add bus operations similar to that of DIMM operations with injection operations in it. Signed-off-by: Santosh Sivaraj --- This patch series is on top

[PATCH] nvdimm/ndtest: Add support for error injection tests

2021-04-18 Thread Santosh Sivaraj
Add necessary support for error injection family of tests on non-acpi platforms. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/test/ndtest.c | 455 - tools/testing/nvdimm/test/ndtest.h | 25 ++ 2 files changed, 477 insertions(+), 3 deletions(-) This patch

Re: [PATCH 2/4] test: Don't skip tests if nfit modules are missing

2021-04-06 Thread Santosh Sivaraj
"Aneesh Kumar K.V" writes: > Santosh Sivaraj writes: > >> For NFIT to be available ACPI is a must, so don't fail when nfit modules >> are missing on a platform that doesn't support ACPI. >> >> Signed-off-by: Santosh Sivaraj >> --- >> test.h

Re: [PATCH 1/4] libndctl: Unify adding dimms for papr and nfit families

2021-03-27 Thread Santosh Sivaraj
Sorry, I missed to provide the version in the subject, this is v4 of the series. Santosh Sivaraj writes: > In preparation for enabling tests on non-nfit devices, unify both, already > very > similar, functions into one. This will help in adding all attributes needed > for >

[PATCH 2/4] test: Don't skip tests if nfit modules are missing

2021-03-27 Thread Santosh Sivaraj
For NFIT to be available ACPI is a must, so don't fail when nfit modules are missing on a platform that doesn't support ACPI. Signed-off-by: Santosh Sivaraj --- test.h| 2 +- test/ack-shutdown-count-set.c | 2 +- test/blk_namespaces.c | 2 +- test/core.c

[PATCH 4/4] Use page size as alignment value

2021-03-27 Thread Santosh Sivaraj
The alignment sizes passed to ndctl in the tests are all hardcoded to 4k, the default page size on x86. Change those to the default page size on that architecture (sysconf/getconf). No functional changes otherwise. Signed-off-by: Santosh Sivaraj --- test/dpa-alloc.c| 15

[PATCH 3/4] papr: Add support to parse save_fail flag for dimm

2021-03-27 Thread Santosh Sivaraj
This will help in getting the dimm fail tests to run on papr family too. Also add nvdimm_test compatibility string for recognizing the test module. Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ndctl/lib

[PATCH 1/4] libndctl: Unify adding dimms for papr and nfit families

2021-03-27 Thread Santosh Sivaraj
only part of the DIMM attributes are provided (This doesn't mean that all of the DIMM attributes can be missing). Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 103 --- 1 file changed, 38 insertions(+), 65 deletions(-) diff --git a/ndctl/lib

[PATCH] libndctl: Remove redundant checks and assignments

2021-03-27 Thread Santosh Sivaraj
check_udev already checks for udev allocation failure, remove the redundant check. Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c index 36fb6fe..262d758 100644

Re: [ndctl PATCH v3 2/4] test: Don't skip tests if nfit modules are missing

2021-03-25 Thread Santosh Sivaraj
"Verma, Vishal L" writes: > On Fri, 2021-03-19 at 11:20 +0530, Santosh Sivaraj wrote: >> "Verma, Vishal L" writes: > > [..] > >> > >> > fix multi line comment to the right formatting: >> > /* >> >  * line 1, etc >>

Re: [PATCH] ndtest: Remove redundant NULL check

2021-03-22 Thread Santosh Sivaraj
Hi Ira, Ira Weiny writes: > On Mon, Mar 22, 2021 at 06:00:40PM +0800, Jiapeng Chong wrote: >> Fix the following coccicheck warnings: >> >> ./tools/testing/nvdimm/test/ndtest.c:491:2-7: WARNING: NULL check before >> some freeing functions is not needed. > > I don't think there is anything

Re: [ndctl PATCH v3 1/4] libndctl: test enablement for non-nfit devices

2021-03-18 Thread Santosh Sivaraj
"Verma, Vishal L" writes: Hi Vishal, > On Thu, 2021-03-11 at 13:16 +0530, Santosh Sivaraj wrote: >> Unify adding dimms for papr and nfit families, this will help in adding > > Minor nit, but it seems like the subject line and the first sentence in > the body sho

Re: [ndctl PATCH v3 2/4] test: Don't skip tests if nfit modules are missing

2021-03-18 Thread Santosh Sivaraj
"Verma, Vishal L" writes: > On Thu, 2021-03-11 at 13:16 +0530, Santosh Sivaraj wrote: >> For NFIT to be available ACPI is a must, so don't fail when nfit modules >> are missing on a platform that doesn't support ACPI. >> >> Signed-off-b

[ndctl PATCH v3 4/4] Use page size as alignment value

2021-03-10 Thread Santosh Sivaraj
The alignment sizes passed to ndctl in the tests are all hardcoded to 4k, the default page size on x86. Change those to the default page size on that architecture (sysconf/getconf). No functional changes otherwise. Signed-off-by: Santosh Sivaraj --- test/dpa-alloc.c| 15

[ndctl PATCH v3 3/4] papr: Add support to parse save_fail flag for dimm

2021-03-10 Thread Santosh Sivaraj
This will help in getting the dimm fail tests to run on papr family too. Also add nvdimm_test compatibility string for recognizing the test module. Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ndctl/lib

[ndctl PATCH v3 2/4] test: Don't skip tests if nfit modules are missing

2021-03-10 Thread Santosh Sivaraj
For NFIT to be available ACPI is a must, so don't fail when nfit modules are missing on a platform that doesn't support ACPI. Signed-off-by: Santosh Sivaraj --- test.h| 2 +- test/ack-shutdown-count-set.c | 2 +- test/blk_namespaces.c | 2 +- test/core.c

[ndctl PATCH v3 1/4] libndctl: test enablement for non-nfit devices

2021-03-10 Thread Santosh Sivaraj
Unify adding dimms for papr and nfit families, this will help in adding all attributes needed for the unit tests too. We don't fail adding a dimm if some of the dimm attributes are missing, so this will work fine on PAPR platforms where most dimm attributes are provided. Signed-off-by: Santosh

Re: [ndctl PATCH 2/2] ndctl/test: add checking the presence of jq command ahead

2021-03-01 Thread Santosh Sivaraj
hub.com/pmem/ndctl/issues/141 Though it looks slightly redundant after having the check in configure.ac, not against having additional checks. Reviewed-by: Santosh Sivaraj Thanks, Santosh > --- > test/daxdev-errors.sh | 1 + > test/inject-error.sh| 2 ++ > test/

Re: [ndctl PATCH 1/2] configure: add checking jq command

2021-03-01 Thread Santosh Sivaraj
Hi Qi, QI Fuli writes: > Add checking jq command since it is needed to validate tests > > Cc: Santosh Sivaraj > Signed-off-by: QI Fuli > Link: https://github.com/pmem/ndctl/issues/141 > --- > configure.ac | 6 ++ > 1 file changed, 6 insertions(+) > &g

Re: [ndctl PATCH] ndctl/test: add checking the presence of jq command ahead

2021-02-25 Thread Santosh Sivaraj
Hi QI, QI Fuli writes: > Due to the lack of jq command, the result of the test will be 'fail'. > This patch adds checking the presence of jq commmand ahead. > If there is no jq command in the system, the test will be marked as 'skip'. > > Signed-off-by: QI Fuli > Link:

[PATCH v2 4/4] Use page size as alignment value

2021-02-24 Thread Santosh Sivaraj
The alignment sizes passed to ndctl in the tests are all hardcoded to 4k, the default page size on x86. Change those to the default page size on that architecture (sysconf/getconf). No functional changes otherwise. Signed-off-by: Santosh Sivaraj --- test/dpa-alloc.c| 15

[PATCH v2 3/4] test/libndctl: skip SMART tests on non-nfit devices

2021-02-24 Thread Santosh Sivaraj
This is just a temporary check till the new module has SMART capabilities emulated. Signed-off-by: Santosh Sivaraj --- test/libndctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/libndctl.c b/test/libndctl.c index 5043ae0..001f78a 100644 --- a/test/libndctl.c

[PATCH v2 2/4] papr: Add support to parse save_fail flag for dimm

2021-02-24 Thread Santosh Sivaraj
This will help in getting the dimm fail tests to run on papr family too. Also add nvdimm_test compatibility string for recognizing the test module. Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ndctl/lib

[PATCH v2 1/4] test: Don't skip tests if nfit modules are missing

2021-02-24 Thread Santosh Sivaraj
For NFIT to be available ACPI is a must, so don't fail when nfit modules are missing on a platform that doesn't support ACPI. Signed-off-by: Santosh Sivaraj --- test.h| 2 +- test/ack-shutdown-count-set.c | 2 +- test/blk_namespaces.c | 2 +- test/core.c

Re: [ndctl 5/5] Use page size as alignment value

2021-02-24 Thread Santosh Sivaraj
Dan Williams writes: > On Mon, Dec 21, 2020 at 8:26 PM Santosh Sivaraj wrote: >> >> The alignment sizes passed to ndctl in the tests are all hardcoded to 4k, >> the default page size on x86. Change those to the default page size on that >> architecture (sysconf/getc

Re: [ndctl 3/5] papr: Add support to parse save_fail flag for dimm

2021-02-24 Thread Santosh Sivaraj
Dan Williams writes: > On Mon, Dec 21, 2020 at 8:26 PM Santosh Sivaraj wrote: >> >> This will help in getting the dimm fail tests to run on papr family too. >> Also add nvdimm_test compatibility string for recognizing the test module. >> >> Signed-off-by: Sant

Re: [ndctl 5/5] Use page size as alignment value

2021-01-28 Thread Santosh Sivaraj
Dan Williams writes: > On Mon, Dec 21, 2020 at 8:26 PM Santosh Sivaraj wrote: >> >> The alignment sizes passed to ndctl in the tests are all hardcoded to 4k, >> the default page size on x86. Change those to the default page size on that >> architecture (sysconf/getc

[ndctl 5/5] Use page size as alignment value

2020-12-21 Thread Santosh Sivaraj
The alignment sizes passed to ndctl in the tests are all hardcoded to 4k, the default page size on x86. Change those to the default page size on that architecture (sysconf/getconf). No functional changes otherwise. Signed-off-by: Santosh Sivaraj --- test/dpa-alloc.c| 23

[ndctl 4/5] test/libndctl: skip SMART tests on non-nfit devices

2020-12-21 Thread Santosh Sivaraj
This is just a temporary check till the new module has SMART capabilities emulated. Signed-off-by: Santosh Sivaraj --- test/libndctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/libndctl.c b/test/libndctl.c index 5043ae0..001f78a 100644 --- a/test/libndctl.c

[ndctl 3/5] papr: Add support to parse save_fail flag for dimm

2020-12-21 Thread Santosh Sivaraj
This will help in getting the dimm fail tests to run on papr family too. Also add nvdimm_test compatibility string for recognizing the test module. Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ndctl/lib

[ndctl 2/5] test: Don't skip tests if nfit modules are missing

2020-12-21 Thread Santosh Sivaraj
For NFIT to be available ACPI is a must, so don't fail when nfit modules are missing on a platform that doesn't support ACPI. Signed-off-by: Santosh Sivaraj --- test.h| 2 +- test/ack-shutdown-count-set.c | 2 +- test/blk_namespaces.c | 2 +- test/core.c

[ndctl 1/5] libndctl: test enablement for non-nfit devices

2020-12-21 Thread Santosh Sivaraj
Unify adding dimms for papr and nfit families, this will help in adding all attributes needed for the unit tests too. We don't fail adding a dimm if some of the dimm attributes are missing, so this will work fine on PAPR platforms where most dimm attributes are provided. Signed-off-by: Santosh

[PATCH 7/7] ndtest: Add papr health related flags

2020-12-21 Thread Santosh Sivaraj
sysfs attibutes to show health related flags are added. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/test/ndtest.c | 41 ++ tools/testing/nvdimm/test/ndtest.h | 31 ++ 2 files changed, 72 insertions(+) diff --git a/tools/testing/nvdimm

[PATCH 6/7] ndtest: Add nvdimm control functions

2020-12-21 Thread Santosh Sivaraj
Add functions to support ND_CMD_GET_CONFIG_SIZE, ND_CMD_SET_CONFIG_DATA and ND_CMD_GET_CONFIG_DATA. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/test/ndtest.c | 51 ++ 1 file changed, 51 insertions(+) diff --git a/tools/testing/nvdimm/test/ndtest.c b

[PATCH 5/7] ndtest: Add regions and mappings to the test buses

2020-12-21 Thread Santosh Sivaraj
The bus config array is used to hold the regions and the respective mappings. This config based interface enables to change the dimm/region/namespace layouts easily. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/test/ndtest.c | 352 + tools/testing/nvdimm

[PATCH 4/7] ndtest: Add dimm attributes

2020-12-21 Thread Santosh Sivaraj
This patch adds sysfs attributes for nvdimm and the dimm device. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/test/ndtest.c | 202 - 1 file changed, 200 insertions(+), 2 deletions(-) diff --git a/tools/testing/nvdimm/test/ndtest.c b/tools/testing/nvdimm

[PATCH 3/7] ndtest: Add dimms to the two buses

2020-12-21 Thread Santosh Sivaraj
A config array is used to hold the dimms for each bus. These dimms are registered with nvdimm, and new nvdimms are created on the buses. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/test/ndtest.c | 258 + tools/testing/nvdimm/test/ndtest.h | 36 2

[PATCH 2/7] ndtest: Add compatability string to treat it as PAPR family

2020-12-21 Thread Santosh Sivaraj
Since this module is written to be platform agnostic, the module is made part of the PAPR_FAMILY. ndctl identifies the family using the compatible string inside of_node dir-entry. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/test/ndtest.c | 23 +++ 1 file changed

[PATCH 1/7] testing/nvdimm: Add test module for non-nfit platforms

2020-12-21 Thread Santosh Sivaraj
functionality to the existing module but without the ACPI dependencies. This RFC series is split into reviewable and compilable chunks. This patch adds a new driver and registers two nvdimm bus needed for ndctl make check. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/config_check.c | 3

[0/7] PMEM device emulation without nfit depenency

2020-12-21 Thread Santosh Sivaraj
. Corresponding changes for ndctl is also required, to add attributes needed for the test, which will be sent as a reply to this patch. None of tests passed on PAPR before, now there are 16 test that pass. Error injection tests and SMART are not yet implemented. Santosh Sivaraj (7): testing/nvdimm: Add

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

2020-12-16 Thread Santosh Sivaraj
iously 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

Re: [RFC v5 1/7] testing/nvdimm: Add test module for non-nfit platforms

2020-12-16 Thread Santosh Sivaraj
Dan Williams writes: > On Mon, Dec 14, 2020 at 2:39 AM Santosh Sivaraj 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

[ndctl RFC v5 5/5] Use page size as alignment value

2020-12-14 Thread Santosh Sivaraj
The alignment sizes passed to ndctl in the tests are all hardcoded to 4k, the default page size on x86. Change those to the default page size on that architecture (sysconf/getconf). No functional changes otherwise. Signed-off-by: Santosh Sivaraj --- test/dpa-alloc.c| 23

[ndctl RFC v5 4/5] test/libndctl: skip SMART tests on non-nfit devices

2020-12-14 Thread Santosh Sivaraj
This is just a temporary check till the new module has SMART capabilities emulated. Signed-off-by: Santosh Sivaraj --- test/libndctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/libndctl.c b/test/libndctl.c index 5043ae0..001f78a 100644 --- a/test/libndctl.c

[ndctl RFC v5 3/5] papr: Add support to parse save_fail flag for dimm

2020-12-14 Thread Santosh Sivaraj
This will help in getting the dimm fail tests to run on papr family too. Also add nvdimm_test compatibility string for recognizing the test module. Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ndctl/lib

[ndctl RFC v5 2/5] test: Don't skip tests if nfit modules are missing

2020-12-14 Thread Santosh Sivaraj
For NFIT to be available ACPI is a must, so don't fail when nfit modules are missing on a platform that doesn't support ACPI. Signed-off-by: Santosh Sivaraj --- test.h| 2 +- test/ack-shutdown-count-set.c | 2 +- test/blk_namespaces.c | 2 +- test/core.c

[ndctl RFC v5 1/5] libndctl: test enablement for non-nfit devices

2020-12-14 Thread Santosh Sivaraj
Unify adding dimms for papr and nfit families, this will help in adding all attributes needed for the unit tests too. We don't fail adding a dimm if some of the dimm attributes are missing, so this will work fine on PAPR platforms where most dimm attributes are provided. Signed-off-by: Santosh

[RFC v5 7/7] ndtest: Add papr health related flags

2020-12-14 Thread Santosh Sivaraj
sysfs attibutes to show health related flags are added. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/test/ndtest.c | 41 ++ tools/testing/nvdimm/test/ndtest.h | 31 ++ 2 files changed, 72 insertions(+) diff --git a/tools/testing/nvdimm

[RFC v5 6/7] ndtest: Add nvdimm control functions

2020-12-14 Thread Santosh Sivaraj
Add functions to support ND_CMD_GET_CONFIG_SIZE, ND_CMD_SET_CONFIG_DATA and ND_CMD_GET_CONFIG_DATA. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/test/ndtest.c | 51 ++ 1 file changed, 51 insertions(+) diff --git a/tools/testing/nvdimm/test/ndtest.c b

[RFC v5 5/7] ndtest: Add regions and mappings to the test buses

2020-12-14 Thread Santosh Sivaraj
The bus config array is used to hold the regions and the respective mappings. This config based interface enables to change the dimm/region/namespace layouts easily. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/test/ndtest.c | 352 + tools/testing/nvdimm

[RFC v5 4/7] ndtest: Add dimm attributes

2020-12-14 Thread Santosh Sivaraj
This patch adds sysfs attributes for nvdimm and the dimm device. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/test/ndtest.c | 202 - 1 file changed, 200 insertions(+), 2 deletions(-) diff --git a/tools/testing/nvdimm/test/ndtest.c b/tools/testing/nvdimm

[RFC v5 3/7] ndtest: Add dimms to the two buses

2020-12-14 Thread Santosh Sivaraj
A config array is used to hold the dimms for each bus. These dimms are registered with nvdimm, and new nvdimms are created on the buses. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/test/ndtest.c | 258 + tools/testing/nvdimm/test/ndtest.h | 36 2

[RFC v5 2/7] ndtest: Add compatability string to treat it as PAPR family

2020-12-14 Thread Santosh Sivaraj
Since this module is written to be platform agnostic, the module is made part of the PAPR_FAMILY. ndctl identifies the family using the compatible string inside of_node dir-entry. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/test/ndtest.c | 23 +++ 1 file changed

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

2020-12-14 Thread Santosh Sivaraj
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

[RFC v5 1/7] testing/nvdimm: Add test module for non-nfit platforms

2020-12-14 Thread Santosh Sivaraj
functionality to the existing module but without the ACPI dependencies. This RFC series is split into reviewable and compilable chunks. This patch adds a new driver and registers two nvdimm bus needed for ndctl make check. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/config_check.c | 3

Re: [ndctl RFC v4 1/3] libndctl: test enablement for non-nfit devices

2020-12-08 Thread Santosh Sivaraj
Dan Williams writes: > On Sun, Nov 8, 2020 at 4:21 AM Santosh Sivaraj wrote: >> >> Don't fail is nfit module is missing, this will happen in >> platforms that don't have ACPI support. Add attributes to >> PAPR dimm family that are independent of platforms like the

[ndctl RFC v4 3/3] Use page size as alignment value

2020-11-08 Thread Santosh Sivaraj
Signed-off-by: Santosh Sivaraj --- test/dpa-alloc.c| 23 ++- test/multi-dax.sh | 6 -- test/sector-mode.sh | 4 +++- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/test/dpa-alloc.c b/test/dpa-alloc.c index b757b9a..dff9b62 100644 --- a/test/dpa

[ndctl RFC v4 2/3] Skip smart tests when non nfit devices present

2020-11-08 Thread Santosh Sivaraj
Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 34 ++ test/libndctl.c | 3 ++- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c index d1f8e4e..26fc14c 100644 --- a/ndctl/lib/libndctl.c

[ndctl RFC v4 1/3] libndctl: test enablement for non-nfit devices

2020-11-08 Thread Santosh Sivaraj
Don't fail is nfit module is missing, this will happen in platforms that don't have ACPI support. Add attributes to PAPR dimm family that are independent of platforms like the test dimms. Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 52

[RFC v4 0/1] PMEM device emulation without nfit depenency

2020-11-08 Thread Santosh Sivaraj
. To run the tests disable CONFIG_ACPI_NFIT, the kernel will pick the new driver. Santosh Sivaraj (1): testing/nvdimm: Add test module for non-nfit platforms drivers/nvdimm/region_devs.c|5 + tools/testing/nvdimm/config_check.c |3 +- tools/testing/nvdimm/test/Kbuild|6

[RFC v4 1/1] testing/nvdimm: Add test module for non-nfit platforms

2020-11-08 Thread Santosh Sivaraj
functionality to the existing module but without the ACPI dependencies. Signed-off-by: Santosh Sivaraj --- drivers/nvdimm/bus.c|1 + drivers/nvdimm/region_devs.c|5 + tools/testing/nvdimm/config_check.c |3 +- tools/testing/nvdimm/test/Kbuild|6 +- tools/testing

Re: [ndctl PATCH] libndctl: Fix probe of non-nfit nvdimms

2020-10-11 Thread Santosh Sivaraj
Vaibhav Jain writes: > Hi Dan and Vishal, > > Thanks so much for quick turnaround on this. > > Dan Williams writes: > >> On Fri, Oct 9, 2020 at 11:36 AM Verma, Vishal L >> wrote: >>> >>> On Fri, 2020-10-09 at 17:30 +0530, Vaibhav Jain wrote: >>> > commit 107a24ff429f ("ndctl/list: Add firmware

[PATCH RFC ndctl 9/9] test: Disable paths which are possibly wrong

2020-10-06 Thread Santosh Sivaraj
Signed-off-by: Santosh Sivaraj --- test/dpa-alloc.c | 9 - test/dsm-fail.c | 8 +++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/test/dpa-alloc.c b/test/dpa-alloc.c index b757b9a..a933b54 100644 --- a/test/dpa-alloc.c +++ b/test/dpa-alloc.c @@ -277,11 +277,18

[PATCH RFC ndctl 8/9] test/multi-pmem: fix for no-interleave support

2020-10-06 Thread Santosh Sivaraj
Signed-off-by: Santosh Sivaraj --- test/multi-pmem.c | 9 + 1 file changed, 9 insertions(+) diff --git a/test/multi-pmem.c b/test/multi-pmem.c index 668662c..ef4fec0 100644 --- a/test/multi-pmem.c +++ b/test/multi-pmem.c @@ -208,6 +208,14 @@ static int do_multi_pmem(struct ndctl_ctx

[PATCH RFC ndctl 7/9] test/libndctl: Don't check for error flags on non-nfit dimms

2020-10-06 Thread Santosh Sivaraj
Signed-off-by: Santosh Sivaraj --- test/libndctl.c | 61 +++-- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/test/libndctl.c b/test/libndctl.c index aaa72dc..ae87807 100644 --- a/test/libndctl.c +++ b/test/libndctl.c @@ -575,7 +575,8

[PATCH RFC ndctl 6/9] test/libndctl: Don't check for two formats on a dimm

2020-10-06 Thread Santosh Sivaraj
The number of formats is itself populated only when there is a nfit bus present. So skip this sub-test for all other platforms. Signed-off-by: Santosh Sivaraj --- test/libndctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/libndctl.c b/test/libndctl.c index

[PATCH RFC ndctl 3/9] test/libndctl: Don't compare phys-id if no-interleave support

2020-10-06 Thread Santosh Sivaraj
The tests expect some regions to have the same physical id, but that will not be the case if there is no interleave support. Signed-off-by: Santosh Sivaraj --- test/libndctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/libndctl.c b/test/libndctl.c index 994e0fa

[PATCH RFC ndctl 5/9] test/libndctl: skip smart tests for non-nfit platforms

2020-10-06 Thread Santosh Sivaraj
Signed-off-by: Santosh Sivaraj --- test/libndctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/libndctl.c b/test/libndctl.c index 1a5a267..93cbc7a 100644 --- a/test/libndctl.c +++ b/test/libndctl.c @@ -2451,7 +2451,7 @@ static int check_commands(struct ndctl_bus *bus

[PATCH RFC ndctl 1/9] libndctl: test enablement for non-nfit devices

2020-10-06 Thread Santosh Sivaraj
Add attributes to generic dimms that are independent of platforms like the test dimms. Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 51 1 file changed, 51 insertions(+) diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c index

[PATCH RFC ndctl 4/9] test/libndctl: search by handle instead of range index

2020-10-06 Thread Santosh Sivaraj
When there is no-interleave support, there is no range index. Signed-off-by: Santosh Sivaraj --- test/libndctl.c | 32 ++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/test/libndctl.c b/test/libndctl.c index d508948..1a5a267 100644 --- a/test

[PATCH RFC ndctl 2/9] test/core: Don't fail is nfit module is missing

2020-10-06 Thread Santosh Sivaraj
This will happen in platforms that don't have ACPI support. Signed-off-by: Santosh Sivaraj --- test/core.c | 5 + 1 file changed, 5 insertions(+) diff --git a/test/core.c b/test/core.c index 5118d86..e3e93ff 100644 --- a/test/core.c +++ b/test/core.c @@ -195,6 +195,11 @@ retry

[PATCH RFC v3] testing/nvdimm: Add test module for non-nfit platforms

2020-10-05 Thread Santosh Sivaraj
functionality to the existing module but without the ACPI dependencies. Currently interleaving and error injection are not implemented. Corresponding changes for ndctl is also required, to skip tests that depend on nfit attributes, which will be sent as a reply to this. Signed-off-by: Santosh Sivaraj

Re: [PATCH 2/2] ndctl/namespace: Suppress ENODEV when processing all namespaces.

2020-08-28 Thread Santosh Sivaraj
Michal Suchanek writes: > When processing all namespaces and no namespaces exist user gets the > default -ENOENT. Set default rc to 0 when processing all namespaces. > This avoids confusing error message printed in addition to the message > saying 0 namespaces were affected. > > Before: > > #

[ndctl PATCH v2] namespace-action: Don't act on any seed namespaces

2020-08-26 Thread Santosh Sivaraj
Catch seed namespaces early on. This will prevent checking for sizes in enable, disable and destroy namespace code path, which in turn prevents the inconsistent reporting in count of enabled/disabled namespaces. Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 5 ndctl

[PATCH] error-inject: Remove redundant has_nfit check

2020-08-16 Thread Santosh Sivaraj
ndctl_bus_has_error_injection already has the ndctl_bus_has_nfit check. Remove the redundant checks. Signed-off-by: Santosh Sivaraj --- ndctl/lib/inject.c | 73 +- 1 file changed, 33 insertions(+), 40 deletions(-) diff --git a/ndctl/lib/inject.c b

[PATCH] Don't treat DSM commands as NFIT specific

2020-08-16 Thread Santosh Sivaraj
The DSM commands are treated exclusively as NFIT commands, remove NFIT dependency on using DSM commands. Signed-off-by: Santosh Sivaraj --- ndctl/lib/inject.c | 6 +++--- ndctl/lib/libndctl.c | 29 ++--- ndctl/lib/libndctl.sym | 4 ndctl/lib/nfit.c

[ndctl PATCH trivial] test: Remove a redundant ndctl_namespace_foreach

2020-08-06 Thread Santosh Sivaraj
I don't think this was intended to be in the code. Signed-off-by: Santosh Sivaraj --- test/multi-pmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/test/multi-pmem.c b/test/multi-pmem.c index 668662c..cb7cd40 100644 --- a/test/multi-pmem.c +++ b/test/multi-pmem.c @@ -162,7 +162,6

Re: [PATCH] libnvdimm: call devm_namespace_disable() on error

2020-07-08 Thread Santosh Sivaraj
Hi! Hannes, Hannes Reinecke writes: > Once devm_namespace_enable() has been called the error path in the > calling function will not call devm_namespace_disable(), leaving the > namespace enabled on error. > > Signed-off-by: Hannes Reinecke > --- > drivers/dax/pmem/core.c | 2 +- >

Re: [PATCH] libnvdimm: call devm_namespace_disable() on error

2020-07-08 Thread Santosh Sivaraj
Hi Hannes, Hannes Reinecke writes: > Once devm_namespace_enable() has been called the error path in the > calling function will not call devm_namespace_disable(), leaving the > namespace enabled on error. > > Signed-off-by: Hannes Reinecke > --- > drivers/dax/pmem/core.c | 2 +- >

[RFC v2] tools/testing/nvdimm: Add generic test module for non-nfit platforms

2020-07-08 Thread Santosh Sivaraj
of 'nfit'. Signed-off-by: Santosh Sivaraj --- tools/testing/nvdimm/config_check.c | 3 +- tools/testing/nvdimm/test/Kbuild| 6 +- tools/testing/nvdimm/test/ndtest.c | 768 tools/testing/nvdimm/test/ndtest.h | 63 +++ 4 files changed, 838 insertions(+), 2 deletions

[PATCH ndctl v2] infoblock: Set the default alignment to the platform alignment

2020-07-08 Thread Santosh Sivaraj
The default alignment for write-infoblock command is set to 2M. Change that to use the platform's supported alignment or PAGE_SIZE. The first supported alignment is taken as the default. Signed-off-by: Santosh Sivaraj --- ndctl/namespace.c | 69 ++- 1

Re: [ndctl PATCH] Documentation: write-infoblock namespace as mutually exclusive

2020-07-08 Thread Santosh Sivaraj
Hi, Harish writes: > The write-infoblock command allows user to write to only one of > namespace, stdout or to a file. Document that explicitly and also > change the usage string to indicate mutual exclusion. > > Signed-off-by: Harish > --- > Documentation/ndctl/ndctl-write-infoblock.txt |

Re: [PATCH ndctl] infoblock: Set the default alignment to the platform alignment

2020-07-08 Thread Santosh Sivaraj
Ira Weiny writes: > On Tue, Jul 07, 2020 at 06:26:41AM +0530, Santosh Sivaraj wrote: >> The default alignment for write-infoblock command is set to 2M. Change >> that to use the platform's supported alignment or PAGE_SIZE. The first >> supported alignment is taken as the d

  1   2   >