Compare commits

...

No commits in common. "c8" and "imports/c9-beta/ndctl-71.1-7.el9" have entirely different histories.

13 changed files with 117 additions and 3229 deletions

1
.ndctl.metadata Normal file
View File

@ -0,0 +1 @@
f8266aca55afba19aad91626a6da60e88dba0577 SOURCES/ndctl-71.1.tar.gz

View File

@ -1,201 +0,0 @@
test: Don't skip tests if nfit modules are missing
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2141031
commit 1649ad9c3e2c6e9c47870c8d3b54f10b24177bc7
Author: Santosh Sivaraj <santosh@fossix.org>
Date: Thu May 13 11:42:16 2021 +0530
test: Don't skip tests if nfit modules are missing
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.
Link: https://lore.kernel.org/r/20210513061218.760322-2-santosh@fossix.org
Signed-off-by: Santosh Sivaraj <santosh@fossix.org>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
diff --git a/test.h b/test.h
index cba8d41..7de13fe 100644
--- a/test.h
+++ b/test.h
@@ -20,7 +20,7 @@ void builtin_xaction_namespace_reset(void);
struct kmod_ctx;
struct kmod_module;
-int nfit_test_init(struct kmod_ctx **ctx, struct kmod_module **mod,
+int ndctl_test_init(struct kmod_ctx **ctx, struct kmod_module **mod,
struct ndctl_ctx *nd_ctx, int log_level,
struct ndctl_test *test);
diff --git a/test/ack-shutdown-count-set.c b/test/ack-shutdown-count-set.c
index fb1d82b..c561ff3 100644
--- a/test/ack-shutdown-count-set.c
+++ b/test/ack-shutdown-count-set.c
@@ -99,7 +99,7 @@ static int test_ack_shutdown_count_set(int loglevel, struct ndctl_test *test,
int result = EXIT_FAILURE, err;
ndctl_set_log_priority(ctx, loglevel);
- err = nfit_test_init(&kmod_ctx, &mod, NULL, loglevel, test);
+ err = ndctl_test_init(&kmod_ctx, &mod, NULL, loglevel, test);
if (err < 0) {
result = 77;
ndctl_test_skip(test);
diff --git a/test/blk_namespaces.c b/test/blk_namespaces.c
index d7f00cb..f076e85 100644
--- a/test/blk_namespaces.c
+++ b/test/blk_namespaces.c
@@ -228,7 +228,7 @@ int test_blk_namespaces(int log_level, struct ndctl_test *test,
if (!bus) {
fprintf(stderr, "ACPI.NFIT unavailable falling back to nfit_test\n");
- rc = nfit_test_init(&kmod_ctx, &mod, NULL, log_level, test);
+ rc = ndctl_test_init(&kmod_ctx, &mod, NULL, log_level, test);
ndctl_invalidate(ctx);
bus = ndctl_bus_get_by_provider(ctx, "nfit_test.0");
if (rc < 0 || !bus) {
diff --git a/test/core.c b/test/core.c
index cc7d8d9..2b03aa9 100644
--- a/test/core.c
+++ b/test/core.c
@@ -11,6 +11,7 @@
#include <util/log.h>
#include <util/sysfs.h>
#include <ndctl/libndctl.h>
+#include <ndctl/ndctl.h>
#include <ccan/array_size/array_size.h>
#define KVER_STRLEN 20
@@ -106,11 +107,11 @@ int ndctl_test_get_skipped(struct ndctl_test *test)
return test->skip;
}
-int nfit_test_init(struct kmod_ctx **ctx, struct kmod_module **mod,
+int ndctl_test_init(struct kmod_ctx **ctx, struct kmod_module **mod,
struct ndctl_ctx *nd_ctx, int log_level,
struct ndctl_test *test)
{
- int rc;
+ int rc, family = -1;
unsigned int i;
const char *name;
struct ndctl_bus *bus;
@@ -127,10 +128,28 @@ int nfit_test_init(struct kmod_ctx **ctx, struct kmod_module **mod,
"nd_e820",
"nd_pmem",
};
+ char *test_env;
log_init(&log_ctx, "test/init", "NDCTL_TEST");
log_ctx.log_priority = log_level;
+ /*
+ * The following two checks determine the platform family. For
+ * Intel/platforms which support ACPI, check sysfs; for other platforms
+ * determine from the environment variable NVDIMM_TEST_FAMILY
+ */
+ if (access("/sys/bus/acpi", F_OK) == 0)
+ family = NVDIMM_FAMILY_INTEL;
+
+ test_env = getenv("NDCTL_TEST_FAMILY");
+ if (test_env && strcmp(test_env, "PAPR") == 0)
+ family = NVDIMM_FAMILY_PAPR;
+
+ if (family == -1) {
+ log_err(&log_ctx, "Cannot determine NVDIMM family\n");
+ return -ENOTSUP;
+ }
+
*ctx = kmod_new(NULL, NULL);
if (!*ctx)
return -ENXIO;
@@ -185,6 +204,11 @@ retry:
path = kmod_module_get_path(*mod);
if (!path) {
+ if (family != NVDIMM_FAMILY_INTEL &&
+ (strcmp(name, "nfit") == 0 ||
+ strcmp(name, "nd_e820") == 0))
+ continue;
+
log_err(&log_ctx, "%s.ko: failed to get path\n", name);
break;
}
diff --git a/test/dpa-alloc.c b/test/dpa-alloc.c
index e922009..0b3bb7a 100644
--- a/test/dpa-alloc.c
+++ b/test/dpa-alloc.c
@@ -289,7 +289,7 @@ int test_dpa_alloc(int loglevel, struct ndctl_test *test, struct ndctl_ctx *ctx)
return 77;
ndctl_set_log_priority(ctx, loglevel);
- err = nfit_test_init(&kmod_ctx, &mod, NULL, loglevel, test);
+ err = ndctl_test_init(&kmod_ctx, &mod, NULL, loglevel, test);
if (err < 0) {
ndctl_test_skip(test);
fprintf(stderr, "nfit_test unavailable skipping tests\n");
diff --git a/test/dsm-fail.c b/test/dsm-fail.c
index 9dfd8b0..0a6383d 100644
--- a/test/dsm-fail.c
+++ b/test/dsm-fail.c
@@ -346,7 +346,7 @@ int test_dsm_fail(int loglevel, struct ndctl_test *test, struct ndctl_ctx *ctx)
int result = EXIT_FAILURE, err;
ndctl_set_log_priority(ctx, loglevel);
- err = nfit_test_init(&kmod_ctx, &mod, NULL, loglevel, test);
+ err = ndctl_test_init(&kmod_ctx, &mod, NULL, loglevel, test);
if (err < 0) {
result = 77;
ndctl_test_skip(test);
diff --git a/test/libndctl.c b/test/libndctl.c
index c42f785..d9b50f4 100644
--- a/test/libndctl.c
+++ b/test/libndctl.c
@@ -2708,7 +2708,7 @@ int test_libndctl(int loglevel, struct ndctl_test *test, struct ndctl_ctx *ctx)
daxctl_set_log_priority(daxctl_ctx, loglevel);
ndctl_set_private_data(ctx, test);
- err = nfit_test_init(&kmod_ctx, &mod, ctx, loglevel, test);
+ err = ndctl_test_init(&kmod_ctx, &mod, ctx, loglevel, test);
if (err < 0) {
ndctl_test_skip(test);
fprintf(stderr, "nfit_test unavailable skipping tests\n");
diff --git a/test/multi-pmem.c b/test/multi-pmem.c
index 3d10952..3ea08cc 100644
--- a/test/multi-pmem.c
+++ b/test/multi-pmem.c
@@ -249,7 +249,7 @@ int test_multi_pmem(int loglevel, struct ndctl_test *test, struct ndctl_ctx *ctx
ndctl_set_log_priority(ctx, loglevel);
- err = nfit_test_init(&kmod_ctx, &mod, NULL, loglevel, test);
+ err = ndctl_test_init(&kmod_ctx, &mod, NULL, loglevel, test);
if (err < 0) {
result = 77;
ndctl_test_skip(test);
diff --git a/test/parent-uuid.c b/test/parent-uuid.c
index 6424e9f..bded33a 100644
--- a/test/parent-uuid.c
+++ b/test/parent-uuid.c
@@ -218,7 +218,7 @@ int test_parent_uuid(int loglevel, struct ndctl_test *test, struct ndctl_ctx *ct
return 77;
ndctl_set_log_priority(ctx, loglevel);
- err = nfit_test_init(&kmod_ctx, &mod, NULL, loglevel, test);
+ err = ndctl_test_init(&kmod_ctx, &mod, NULL, loglevel, test);
if (err < 0) {
ndctl_test_skip(test);
fprintf(stderr, "nfit_test unavailable skipping tests\n");
diff --git a/test/pmem_namespaces.c b/test/pmem_namespaces.c
index f0f2edd..a4db1ae 100644
--- a/test/pmem_namespaces.c
+++ b/test/pmem_namespaces.c
@@ -191,7 +191,7 @@ int test_pmem_namespaces(int log_level, struct ndctl_test *test,
if (!bus) {
fprintf(stderr, "ACPI.NFIT unavailable falling back to nfit_test\n");
- rc = nfit_test_init(&kmod_ctx, &mod, NULL, log_level, test);
+ rc = ndctl_test_init(&kmod_ctx, &mod, NULL, log_level, test);
ndctl_invalidate(ctx);
bus = ndctl_bus_get_by_provider(ctx, "nfit_test.0");
if (rc < 0 || !bus) {

File diff suppressed because it is too large Load Diff

View File

@ -1,72 +0,0 @@
test/libndctl: Use ndctl_region_set_ro() to change disk read-only state
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=
commit 43e48c0d2f271cba4237f6eefc3e4912a74c102b
Author: Dan Williams <dan.j.williams@intel.com>
Date: Tue Mar 9 22:09:49 2021 -0800
test/libndctl: Use ndctl_region_set_ro() to change disk read-only state
Kernel commit 52f019d43c22 ("block: add a hard-readonly flag to struct
gendisk") broke the read-only management test, by fixing the broken
behavior that BLKROSET could make a block device read-write even when the
disk is read-only. The fix [1] propagates changes of the region
read-only state to the underlying disk. Add ndctl_region_set_ro() ahead of
BLKROSET so that BLKROSET does not conflict the block_device state with the
disk state.
[1]: http://lore.kernel.org/r/161534060720.528671.2341213328968989192.stgit@dwillia2-desk3.amr.corp.intel.com
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Link: https://lore.kernel.org/r/161535658913.530219.12194565167385663385.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
diff --git a/test/libndctl.c b/test/libndctl.c
index fc65149..c42f785 100644
--- a/test/libndctl.c
+++ b/test/libndctl.c
@@ -1541,6 +1541,7 @@ static int validate_bdev(const char *devname, struct ndctl_btt *btt,
struct ndctl_pfn *pfn, struct ndctl_namespace *ndns,
struct namespace *namespace, void *buf)
{
+ struct ndctl_region *region = ndctl_namespace_get_region(ndns);
char bdevpath[50];
int fd, rc, ro;
@@ -1578,6 +1579,13 @@ static int validate_bdev(const char *devname, struct ndctl_btt *btt,
}
ro = 0;
+ rc = ndctl_region_set_ro(region, ro);
+ if (rc < 0) {
+ fprintf(stderr, "%s: ndctl_region_set_ro failed\n", devname);
+ rc = -errno;
+ goto out;
+ }
+
rc = ioctl(fd, BLKROSET, &ro);
if (rc < 0) {
fprintf(stderr, "%s: BLKROSET failed\n",
@@ -1605,8 +1613,16 @@ static int validate_bdev(const char *devname, struct ndctl_btt *btt,
rc = -ENXIO;
goto out;
}
+
+ rc = ndctl_region_set_ro(region, namespace->ro);
+ if (rc < 0) {
+ fprintf(stderr, "%s: ndctl_region_set_ro reset failed\n", devname);
+ rc = -errno;
+ goto out;
+ }
+
rc = 0;
- out:
+out:
close(fd);
return rc;
}

View File

@ -1,46 +0,0 @@
ndctl/test: make inject-smart.sh more tolerant of decimal fields
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=
commit 4921c0c2040ffbe10facd320f6a718a3d42ad815
Author: Vishal Verma <vishal.l.verma@intel.com>
Date: Thu Feb 17 22:42:29 2022 -0700
ndctl/test: make inject-smart.sh more tolerant of decimal fields
Some combinations of json-c/jq/other libraries seem to produce differing
outputs for the final jq-filtered smart fields, in that some have a
decimal "42.0" numeric field, where as in other combinations it is a
simple "42" (still a numeric field, not string).
This shouldn't matter in practice, but for this contrived test case, we
need to make sure that "42" is treated the same as "42.0"
Normalize all fields before comparing them to "%0.0f" so that the
comparison doesn't result in superfluous failures.
Reported-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
diff --git a/test/inject-smart.sh b/test/inject-smart.sh
index 8b91360..046322b 100755
--- a/test/inject-smart.sh
+++ b/test/inject-smart.sh
@@ -105,13 +105,13 @@ get_field()
json="$($NDCTL list -b $bus -d $dimm -H)"
val="$(jq -r ".[].dimms[].health.$smart_listing" <<< $json)"
val="$(translate_val $val)"
- echo $val
+ printf "%0.0f\n" "$val"
}
verify()
{
local field="$1"
- local val="$2"
+ local val="$(printf "%0.0f\n" "$2")"
[[ "$val" == "$(get_field $field)" ]]
}

View File

@ -1,409 +0,0 @@
ndctl/test: Move 'reset()' to function in 'common'
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2141031
commit 6538529be5738f06543a0d7178f97e0b0e6b63c2
Author: Dan Williams <dan.j.williams@intel.com>
Date: Wed Jan 5 13:31:55 2022 -0800
ndctl/test: Move 'reset()' to function in 'common'
When BLK mode is removed, tests that expect the nfit_test region to allow
pmem namespace creation will need to 'init' rather than 'zero' labels. In
preparation, take the time opportunity to move reset() to a common
function. So that 'ndctl zero-labels' can be replaced with 'ndctl
init-labels' in one central location.
Link: https://lore.kernel.org/r/164141831509.3990253.14783946910211635678.stgit@dwillia2-desk3.amr.corp.intel.com
Tested-by: Alison Schofield <alison.schofield@intel.com>
Tested-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
diff --git a/test/blk-exhaust.sh b/test/blk-exhaust.sh
index 09c4aae..b6d3808 100755
--- a/test/blk-exhaust.sh
+++ b/test/blk-exhaust.sh
@@ -14,9 +14,7 @@ trap 'err $LINENO' ERR
# setup (reset nfit_test dimms)
modprobe nfit_test
-$NDCTL disable-region -b $NFIT_TEST_BUS0 all
-$NDCTL zero-labels -b $NFIT_TEST_BUS0 all
-$NDCTL enable-region -b $NFIT_TEST_BUS0 all
+reset
# if the kernel accounting is correct we should be able to create two
# pmem and two blk namespaces on nfit_test.0
diff --git a/test/btt-check.sh b/test/btt-check.sh
index 8e0b489..65b5c58 100755
--- a/test/btt-check.sh
+++ b/test/btt-check.sh
@@ -39,13 +39,6 @@ create()
[ $size -gt 0 ] || err "$LINENO"
}
-reset()
-{
- $NDCTL disable-region -b $NFIT_TEST_BUS0 all
- $NDCTL zero-labels -b $NFIT_TEST_BUS0 all
- $NDCTL enable-region -b $NFIT_TEST_BUS0 all
-}
-
# re-enable the BTT namespace, and do IO to it in an attempt to
# verify it still comes up ok, and functions as expected
post_repair_test()
diff --git a/test/btt-errors.sh b/test/btt-errors.sh
index 4e59f57..5a20d26 100755
--- a/test/btt-errors.sh
+++ b/test/btt-errors.sh
@@ -45,9 +45,7 @@ trap 'err $LINENO cleanup' ERR
# setup (reset nfit_test dimms)
modprobe nfit_test
-$NDCTL disable-region -b $NFIT_TEST_BUS0 all
-$NDCTL zero-labels -b $NFIT_TEST_BUS0 all
-$NDCTL enable-region -b $NFIT_TEST_BUS0 all
+reset
rc=1
@@ -126,9 +124,7 @@ dd if=$MNT/$FILE of=/dev/null iflag=direct bs=4096 count=1
# reset everything to get a clean log
if grep -q "$MNT" /proc/mounts; then umount $MNT; fi
-$NDCTL disable-region -b $NFIT_TEST_BUS0 all
-$NDCTL zero-labels -b $NFIT_TEST_BUS0 all
-$NDCTL enable-region -b $NFIT_TEST_BUS0 all
+reset
dev="x"
json=$($NDCTL create-namespace -b $NFIT_TEST_BUS0 -t pmem -m sector)
eval "$(echo "$json" | json2var)"
@@ -148,9 +144,7 @@ force_raw 0
dd if=/dev/$blockdev of=/dev/null iflag=direct bs=4096 count=1 && err $LINENO || true
# done, exit
-$NDCTL disable-region -b $NFIT_TEST_BUS0 all
-$NDCTL zero-labels -b $NFIT_TEST_BUS0 all
-$NDCTL enable-region -b $NFIT_TEST_BUS0 all
+reset
cleanup
_cleanup
exit 0
diff --git a/test/btt-pad-compat.sh b/test/btt-pad-compat.sh
index bf1ea54..be538b7 100755
--- a/test/btt-pad-compat.sh
+++ b/test/btt-pad-compat.sh
@@ -37,13 +37,6 @@ create()
fi
}
-reset()
-{
- $NDCTL disable-region -b $NFIT_TEST_BUS0 all
- $NDCTL zero-labels -b $NFIT_TEST_BUS0 all
- $NDCTL enable-region -b $NFIT_TEST_BUS0 all
-}
-
verify_idx()
{
idx0="$1"
diff --git a/test/clear.sh b/test/clear.sh
index fb9d52c..c4d02d5 100755
--- a/test/clear.sh
+++ b/test/clear.sh
@@ -14,9 +14,7 @@ trap 'err $LINENO' ERR
# setup (reset nfit_test dimms)
modprobe nfit_test
-$NDCTL disable-region -b $NFIT_TEST_BUS0 all
-$NDCTL zero-labels -b $NFIT_TEST_BUS0 all
-$NDCTL enable-region -b $NFIT_TEST_BUS0 all
+reset
rc=1
diff --git a/test/common b/test/common
index 6bcefca..3c54d63 100644
--- a/test/common
+++ b/test/common
@@ -46,6 +46,21 @@ err()
exit $rc
}
+reset()
+{
+ $NDCTL disable-region -b $NFIT_TEST_BUS0 all
+ $NDCTL zero-labels -b $NFIT_TEST_BUS0 all
+ $NDCTL enable-region -b $NFIT_TEST_BUS0 all
+}
+
+reset1()
+{
+ $NDCTL disable-region -b $NFIT_TEST_BUS1 all
+ $NDCTL zero-labels -b $NFIT_TEST_BUS1 all
+ $NDCTL enable-region -b $NFIT_TEST_BUS1 all
+}
+
+
# check_min_kver
# $1: Supported kernel version. format: X.Y
#
diff --git a/test/create.sh b/test/create.sh
index b0fd99f..e9baaa0 100755
--- a/test/create.sh
+++ b/test/create.sh
@@ -15,9 +15,7 @@ trap 'err $LINENO' ERR
# setup (reset nfit_test dimms)
modprobe nfit_test
-$NDCTL disable-region -b $NFIT_TEST_BUS0 all
-$NDCTL zero-labels -b $NFIT_TEST_BUS0 all
-$NDCTL enable-region -b $NFIT_TEST_BUS0 all
+reset
rc=1
diff --git a/test/daxctl-create.sh b/test/daxctl-create.sh
index 198779a..d319a39 100755
--- a/test/daxctl-create.sh
+++ b/test/daxctl-create.sh
@@ -10,7 +10,7 @@ trap 'cleanup $LINENO' ERR
cleanup()
{
printf "Error at line %d\n" "$1"
- [[ $testdev ]] && reset
+ [[ $testdev ]] && reset_dax
exit $rc
}
@@ -70,7 +70,7 @@ reset_dev()
"$DAXCTL" enable-device "$testdev"
}
-reset()
+reset_dax()
{
test -n "$testdev"
diff --git a/test/daxdev-errors.sh b/test/daxdev-errors.sh
index 9547d78..e13453d 100755
--- a/test/daxdev-errors.sh
+++ b/test/daxdev-errors.sh
@@ -15,9 +15,7 @@ trap 'err $LINENO' ERR
# setup (reset nfit_test dimms)
modprobe nfit_test
-$NDCTL disable-region -b $NFIT_TEST_BUS0 all
-$NDCTL zero-labels -b $NFIT_TEST_BUS0 all
-$NDCTL enable-region -b $NFIT_TEST_BUS0 all
+reset
rc=1
diff --git a/test/firmware-update.sh b/test/firmware-update.sh
index 8cc9c41..93ce166 100755
--- a/test/firmware-update.sh
+++ b/test/firmware-update.sh
@@ -10,11 +10,9 @@ image="update-fw.img"
trap 'err $LINENO' ERR
-reset()
+fwupd_reset()
{
- $NDCTL disable-region -b $NFIT_TEST_BUS0 all
- $NDCTL zero-labels -b $NFIT_TEST_BUS0 all
- $NDCTL enable-region -b $NFIT_TEST_BUS0 all
+ reset
if [ -f $image ]; then
rm -f $image
fi
@@ -73,7 +71,7 @@ do_tests()
check_min_kver "4.16" || do_skip "may lack firmware update test handling"
modprobe nfit_test
-reset
+fwupd_reset
detect
rc=1
do_tests
diff --git a/test/inject-error.sh b/test/inject-error.sh
index 7d0b826..fd823b6 100755
--- a/test/inject-error.sh
+++ b/test/inject-error.sh
@@ -37,13 +37,6 @@ create()
[ $size -gt 0 ] || err "$LINENO"
}
-reset()
-{
- $NDCTL disable-region -b $NFIT_TEST_BUS0 all
- $NDCTL zero-labels -b $NFIT_TEST_BUS0 all
- $NDCTL enable-region -b $NFIT_TEST_BUS0 all
-}
-
check_status()
{
local sector="$1"
diff --git a/test/max_available_extent_ns.sh b/test/max_available_extent_ns.sh
index 343f3c9..47a921f 100755
--- a/test/max_available_extent_ns.sh
+++ b/test/max_available_extent_ns.sh
@@ -11,13 +11,6 @@ trap 'err $LINENO' ERR
check_min_kver "4.19" || do_skip "kernel $KVER may not support max_available_size"
check_prereq "jq"
-init()
-{
- $NDCTL disable-region -b $NFIT_TEST_BUS0 all
- $NDCTL zero-labels -b $NFIT_TEST_BUS0 all
- $NDCTL enable-region -b $NFIT_TEST_BUS0 all
-}
-
do_test()
{
region=$($NDCTL list -b $NFIT_TEST_BUS0 -R -t pmem | jq -r 'sort_by(-.size) | .[].dev' | head -1)
@@ -40,7 +33,7 @@ do_test()
modprobe nfit_test
rc=1
-init
+reset
do_test
_cleanup
exit 0
diff --git a/test/monitor.sh b/test/monitor.sh
index c015c11..6aa4196 100755
--- a/test/monitor.sh
+++ b/test/monitor.sh
@@ -19,13 +19,6 @@ trap 'err $LINENO' ERR
check_min_kver "4.15" || do_skip "kernel $KVER may not support monitor service"
-init()
-{
- $NDCTL disable-region -b $NFIT_TEST_BUS0 all
- $NDCTL zero-labels -b $NFIT_TEST_BUS0 all
- $NDCTL enable-region -b $NFIT_TEST_BUS0 all
-}
-
start_monitor()
{
logfile=$(mktemp)
@@ -112,7 +105,7 @@ test_filter_region()
test_filter_namespace()
{
- init
+ reset
monitor_namespace=$($NDCTL create-namespace -b $smart_supported_bus | jq -r .dev)
monitor_dimms=$(get_monitor_dimm "-n $monitor_namespace")
start_monitor "-n $monitor_namespace"
@@ -170,7 +163,7 @@ do_tests()
modprobe nfit_test
rc=1
-init
+reset
set_smart_supported_bus
do_tests
_cleanup
diff --git a/test/multi-dax.sh b/test/multi-dax.sh
index b343a38..04070ad 100755
--- a/test/multi-dax.sh
+++ b/test/multi-dax.sh
@@ -17,9 +17,7 @@ ALIGN_SIZE=`getconf PAGESIZE`
# setup (reset nfit_test dimms)
modprobe nfit_test
-$NDCTL disable-region -b $NFIT_TEST_BUS0 all
-$NDCTL zero-labels -b $NFIT_TEST_BUS0 all
-$NDCTL enable-region -b $NFIT_TEST_BUS0 all
+reset
rc=1
query=". | sort_by(.available_size) | reverse | .[0].dev"
diff --git a/test/pfn-meta-errors.sh b/test/pfn-meta-errors.sh
index 0ade2e5..6314897 100755
--- a/test/pfn-meta-errors.sh
+++ b/test/pfn-meta-errors.sh
@@ -29,9 +29,7 @@ trap 'err $LINENO' ERR
# setup (reset nfit_test dimms)
modprobe nfit_test
-$NDCTL disable-region -b $NFIT_TEST_BUS0 all
-$NDCTL zero-labels -b $NFIT_TEST_BUS0 all
-$NDCTL enable-region -b $NFIT_TEST_BUS0 all
+reset
rc=1
diff --git a/test/pmem-errors.sh b/test/pmem-errors.sh
index 4225c3b..2065780 100755
--- a/test/pmem-errors.sh
+++ b/test/pmem-errors.sh
@@ -28,9 +28,7 @@ trap 'err $LINENO cleanup' ERR
# setup (reset nfit_test dimms)
modprobe nfit_test
-$NDCTL disable-region -b $NFIT_TEST_BUS0 all
-$NDCTL zero-labels -b $NFIT_TEST_BUS0 all
-$NDCTL enable-region -b $NFIT_TEST_BUS0 all
+reset
rc=1
diff --git a/test/rescan-partitions.sh b/test/rescan-partitions.sh
index 1686de3..51bbd73 100755
--- a/test/rescan-partitions.sh
+++ b/test/rescan-partitions.sh
@@ -25,13 +25,6 @@ check_min_kver "4.16" || do_skip "may not contain fixes for partition rescanning
check_prereq "parted"
check_prereq "blockdev"
-reset()
-{
- $NDCTL disable-region -b $NFIT_TEST_BUS0 all
- $NDCTL zero-labels -b $NFIT_TEST_BUS0 all
- $NDCTL enable-region -b $NFIT_TEST_BUS0 all
-}
-
test_mode()
{
local mode="$1"
diff --git a/test/sector-mode.sh b/test/sector-mode.sh
index 7a2faea..439ef33 100755
--- a/test/sector-mode.sh
+++ b/test/sector-mode.sh
@@ -15,13 +15,8 @@ ALIGN_SIZE=`getconf PAGESIZE`
# setup (reset nfit_test dimms)
modprobe nfit_test
-$NDCTL disable-region -b $NFIT_TEST_BUS0 all
-$NDCTL zero-labels -b $NFIT_TEST_BUS0 all
-$NDCTL enable-region -b $NFIT_TEST_BUS0 all
-
-$NDCTL disable-region -b $NFIT_TEST_BUS1 all
-$NDCTL zero-labels -b $NFIT_TEST_BUS1 all
-$NDCTL enable-region -b $NFIT_TEST_BUS1 all
+reset
+reset1
rc=1
query=". | sort_by(.size) | reverse | .[0].dev"
diff --git a/test/track-uuid.sh b/test/track-uuid.sh
index be3cf9c..3bacd2c 100755
--- a/test/track-uuid.sh
+++ b/test/track-uuid.sh
@@ -12,9 +12,7 @@ trap 'err $LINENO' ERR
# setup (reset nfit_test dimms)
modprobe nfit_test
-$NDCTL disable-region -b $NFIT_TEST_BUS0 all
-$NDCTL zero-labels -b $NFIT_TEST_BUS0 all
-$NDCTL enable-region -b $NFIT_TEST_BUS0 all
+reset
rc=1

View File

@ -1,42 +0,0 @@
ndctl/test: Skip BLK flags checks
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2141031
commit 756a6598a0fa6cebdd0e98564af089ca6b463fb1
Author: Dan Williams <dan.j.williams@intel.com>
Date: Wed Jan 5 13:32:05 2022 -0800
ndctl/test: Skip BLK flags checks
With the removal of BLK-mode support, test/libndctl will fail to detect the
JEDEC format on the nfit_test bus. Report + skip that check rather than
fail the test when that happens.
Link: https://lore.kernel.org/r/164141832529.3990253.16538298357542644310.stgit@dwillia2-desk3.amr.corp.intel.com
Tested-by: Alison Schofield <alison.schofield@intel.com>
Tested-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
diff --git a/test/libndctl.c b/test/libndctl.c
index c0e4b4c..1e97926 100644
--- a/test/libndctl.c
+++ b/test/libndctl.c
@@ -2535,7 +2535,7 @@ static int check_dimms(struct ndctl_bus *bus, struct dimm *dimms, int n,
fprintf(stderr, "dimm%d expected formats: %d got: %d\n",
i, dimms[i].formats,
ndctl_dimm_get_formats(dimm));
- return -ENXIO;
+ fprintf(stderr, "continuing...\n");
}
for (j = 0; j < dimms[i].formats; j++) {
if (ndctl_dimm_get_formatN(dimm, j) != dimms[i].format[j]) {
@@ -2543,7 +2543,7 @@ static int check_dimms(struct ndctl_bus *bus, struct dimm *dimms, int n,
"dimm%d expected format[%d]: %d got: %d\n",
i, j, dimms[i].format[j],
ndctl_dimm_get_formatN(dimm, j));
- return -ENXIO;
+ fprintf(stderr, "continuing...\n");
}
}
}

View File

@ -1,118 +0,0 @@
ndctl/test: add checking the presence of jq command ahead
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2141031
commit 7ce2fddfa3f108036a2d81de4d2e66ac29e4631e
Author: QI Fuli <qi.fuli@fujitsu.com>
Date: Wed Feb 3 22:21:08 2021 +0900
ndctl/test: add checking the presence of jq command ahead
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 <qi.fuli@fujitsu.com>
Link: https://github.com/pmem/ndctl/issues/141
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Link: https://lore.kernel.org/r/20210203132108.6246-1-qi.fuli@fujitsu.com
diff --git a/test/daxdev-errors.sh b/test/daxdev-errors.sh
index 6281f32..9547d78 100755
--- a/test/daxdev-errors.sh
+++ b/test/daxdev-errors.sh
@@ -9,6 +9,7 @@ rc=77
. $(dirname $0)/common
check_min_kver "4.12" || do_skip "lacks dax dev error handling"
+check_prereq "jq"
trap 'err $LINENO' ERR
diff --git a/test/inject-error.sh b/test/inject-error.sh
index c636033..7d0b826 100755
--- a/test/inject-error.sh
+++ b/test/inject-error.sh
@@ -11,6 +11,8 @@ err_count=8
. $(dirname $0)/common
+check_prereq "jq"
+
trap 'err $LINENO' ERR
# sample json:
diff --git a/test/inject-smart.sh b/test/inject-smart.sh
index 94705df..4ca83b8 100755
--- a/test/inject-smart.sh
+++ b/test/inject-smart.sh
@@ -166,6 +166,7 @@ do_tests()
}
check_min_kver "4.19" || do_skip "kernel $KVER may not support smart (un)injection"
+check_prereq "jq"
modprobe nfit_test
rc=1
diff --git a/test/label-compat.sh b/test/label-compat.sh
index 340b93d..8ab2858 100755
--- a/test/label-compat.sh
+++ b/test/label-compat.sh
@@ -10,6 +10,7 @@ BASE=$(dirname $0)
. $BASE/common
check_min_kver "4.11" || do_skip "may not provide reliable isetcookie values"
+check_prereq "jq"
trap 'err $LINENO' ERR
diff --git a/test/max_available_extent_ns.sh b/test/max_available_extent_ns.sh
index 14d741d..343f3c9 100755
--- a/test/max_available_extent_ns.sh
+++ b/test/max_available_extent_ns.sh
@@ -9,6 +9,7 @@ rc=77
trap 'err $LINENO' ERR
check_min_kver "4.19" || do_skip "kernel $KVER may not support max_available_size"
+check_prereq "jq"
init()
{
diff --git a/test/monitor.sh b/test/monitor.sh
index cdab5e1..28c5541 100755
--- a/test/monitor.sh
+++ b/test/monitor.sh
@@ -13,6 +13,8 @@ smart_supported_bus=""
. $(dirname $0)/common
+check_prereq "jq"
+
trap 'err $LINENO' ERR
check_min_kver "4.15" || do_skip "kernel $KVER may not support monitor service"
diff --git a/test/multi-dax.sh b/test/multi-dax.sh
index e932569..8496619 100755
--- a/test/multi-dax.sh
+++ b/test/multi-dax.sh
@@ -9,6 +9,7 @@ rc=77
. $(dirname $0)/common
check_min_kver "4.13" || do_skip "may lack multi-dax support"
+check_prereq "jq"
trap 'err $LINENO' ERR
diff --git a/test/sector-mode.sh b/test/sector-mode.sh
index dd7013e..54fa806 100755
--- a/test/sector-mode.sh
+++ b/test/sector-mode.sh
@@ -6,6 +6,8 @@ rc=77
. $(dirname $0)/common
+check_prereq "jq"
+
set -e
trap 'err $LINENO' ERR

View File

@ -1,42 +0,0 @@
ndctl/test: Move sector-mode to a different region
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2143636
commit b787320498508192f1e04ac38d39da4eb3ca26e9
Author: Dan Williams <dan.j.williams@intel.com>
Date: Wed Jan 5 13:32:10 2022 -0800
ndctl/test: Move sector-mode to a different region
Previously the largest region on the nfit_test.1 bus belonged to a BLK-mode
region. With the removal of BLK-mode support update the test to instead
find a suitable PMEM region to perform the checkout.
Link: https://lore.kernel.org/r/164141833068.3990253.15694496866707006837.stgit@dwillia2-desk3.amr.corp.intel.com
Tested-by: Alison Schofield <alison.schofield@intel.com>
Tested-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
diff --git a/test/sector-mode.sh b/test/sector-mode.sh
index 439ef33..f70b0f1 100755
--- a/test/sector-mode.sh
+++ b/test/sector-mode.sh
@@ -19,11 +19,11 @@ reset
reset1
rc=1
-query=". | sort_by(.size) | reverse | .[0].dev"
-NAMESPACE=$($NDCTL list -b $NFIT_TEST_BUS1 -N | jq -r "$query")
-REGION=$($NDCTL list -R --namespace=$NAMESPACE | jq -r "(.[]) | .dev")
+query=". | sort_by(.available_size) | reverse | .[0].dev"
+REGION=$($NDCTL list -R -b $NFIT_TEST_BUS1 | jq -r "$query")
echo 0 > /sys/bus/nd/devices/$REGION/read_only
-$NDCTL create-namespace --no-autolabel -e $NAMESPACE -m sector -f -l 4K
+echo $ALIGN_SIZE > /sys/bus/nd/devices/$REGION/align
+NAMESPACE=$($NDCTL create-namespace --no-autolabel -r $REGION -m sector -f -l 4K | jq -r ".dev")
$NDCTL create-namespace --no-autolabel -e $NAMESPACE -m dax -f -a $ALIGN_SIZE
$NDCTL create-namespace --no-autolabel -e $NAMESPACE -m sector -f -l 4K

View File

@ -1,169 +0,0 @@
ndctl/test: Prepare for BLK-aperture support removal
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2141031
commit e423b467e10e3405e6e09260b7669e7022b5f5f7
Author: Dan Williams <dan.j.williams@intel.com>
Date: Wed Jan 5 13:31:50 2022 -0800
ndctl/test: Prepare for BLK-aperture support removal
The kernel is dropping its support for the BLK-aperture access method. The
primary side effect of this for nfit_test is that NVDIMM namespace labeling
will not be enabled by default. Update the unit tests to initialize the
label index area in this scenario.
Link: https://lore.kernel.org/r/164141830999.3990253.5021445352398348657.stgit@dwillia2-desk3.amr.corp.intel.com
Tested-by: Alison Schofield <alison.schofield@intel.com>
Tested-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
diff --git a/test/core.c b/test/core.c
index 2b03aa9..93e1dae 100644
--- a/test/core.c
+++ b/test/core.c
@@ -261,8 +261,8 @@ retry:
ndctl_bus_foreach(nd_ctx, bus) {
struct ndctl_region *region;
- if (strncmp(ndctl_bus_get_provider(bus),
- "nfit_test", 9) != 0)
+ if (strcmp(ndctl_bus_get_provider(bus),
+ "nfit_test.0") != 0)
continue;
ndctl_region_foreach(bus, region)
ndctl_region_disable_invalidate(region);
@@ -280,5 +280,30 @@ retry:
NULL, NULL, NULL, NULL);
if (rc)
kmod_unref(*ctx);
- return rc;
+
+ if (!nd_ctx)
+ return rc;
+
+ ndctl_bus_foreach (nd_ctx, bus) {
+ struct ndctl_region *region;
+ struct ndctl_dimm *dimm;
+
+ if (strcmp(ndctl_bus_get_provider(bus), "nfit_test.0") != 0)
+ continue;
+
+ ndctl_region_foreach (bus, region)
+ ndctl_region_disable_invalidate(region);
+
+ ndctl_dimm_foreach (bus, dimm) {
+ ndctl_dimm_read_label_index(dimm);
+ ndctl_dimm_init_labels(dimm, NDCTL_NS_VERSION_1_2);
+ ndctl_dimm_disable(dimm);
+ ndctl_dimm_enable(dimm);
+ }
+
+ ndctl_region_foreach (bus, region)
+ ndctl_region_enable(region);
+ }
+
+ return 0;
}
diff --git a/test/libndctl.c b/test/libndctl.c
index d9b50f4..c0e4b4c 100644
--- a/test/libndctl.c
+++ b/test/libndctl.c
@@ -2587,17 +2587,41 @@ static int check_dimms(struct ndctl_bus *bus, struct dimm *dimms, int n,
return 0;
}
-static void reset_bus(struct ndctl_bus *bus)
+enum dimm_reset {
+ DIMM_INIT,
+ DIMM_ZERO,
+};
+
+static int reset_dimms(struct ndctl_bus *bus, enum dimm_reset reset)
{
- struct ndctl_region *region;
struct ndctl_dimm *dimm;
+ int rc = 0;
+
+ ndctl_dimm_foreach(bus, dimm) {
+ if (reset == DIMM_ZERO)
+ ndctl_dimm_zero_labels(dimm);
+ else {
+ ndctl_dimm_read_label_index(dimm);
+ ndctl_dimm_init_labels(dimm, NDCTL_NS_VERSION_1_2);
+ }
+ ndctl_dimm_disable(dimm);
+ rc = ndctl_dimm_enable(dimm);
+ if (rc)
+ break;
+ }
+
+ return rc;
+}
+
+static void reset_bus(struct ndctl_bus *bus, enum dimm_reset reset)
+{
+ struct ndctl_region *region;
/* disable all regions so that set_config_data commands are permitted */
ndctl_region_foreach(bus, region)
ndctl_region_disable_invalidate(region);
- ndctl_dimm_foreach(bus, dimm)
- ndctl_dimm_zero_labels(dimm);
+ reset_dimms(bus, reset);
/* set regions back to their default state */
ndctl_region_foreach(bus, region)
@@ -2608,7 +2632,6 @@ static int do_test0(struct ndctl_ctx *ctx, struct ndctl_test *test)
{
struct ndctl_bus *bus = ndctl_bus_get_by_provider(ctx, NFIT_PROVIDER0);
struct ndctl_region *region;
- struct ndctl_dimm *dimm;
int rc;
if (!bus)
@@ -2625,13 +2648,10 @@ static int do_test0(struct ndctl_ctx *ctx, struct ndctl_test *test)
if (rc)
return rc;
- ndctl_dimm_foreach(bus, dimm) {
- rc = ndctl_dimm_zero_labels(dimm);
- if (rc < 0) {
- fprintf(stderr, "failed to zero %s\n",
- ndctl_dimm_get_devname(dimm));
- return rc;
- }
+ rc = reset_dimms(bus, DIMM_INIT);
+ if (rc < 0) {
+ fprintf(stderr, "failed to reset dimms\n");
+ return rc;
}
/*
@@ -2649,14 +2669,14 @@ static int do_test0(struct ndctl_ctx *ctx, struct ndctl_test *test)
rc = check_regions(bus, regions0, ARRAY_SIZE(regions0), DAX);
if (rc)
return rc;
- reset_bus(bus);
+ reset_bus(bus, DIMM_INIT);
}
if (ndctl_test_attempt(test, KERNEL_VERSION(4, 8, 0))) {
rc = check_regions(bus, regions0, ARRAY_SIZE(regions0), PFN);
if (rc)
return rc;
- reset_bus(bus);
+ reset_bus(bus, DIMM_INIT);
}
return check_regions(bus, regions0, ARRAY_SIZE(regions0), BTT);
@@ -2671,6 +2691,7 @@ static int do_test1(struct ndctl_ctx *ctx, struct ndctl_test *test)
return -ENXIO;
ndctl_bus_wait_probe(bus);
+ reset_bus(bus, DIMM_ZERO);
/*
* Starting with v4.10 the dimm on nfit_test.1 gets a unique

View File

@ -1,102 +0,0 @@
ndctl/test: Initialize the label area by default
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2143636
commit fe37c85f1ffb0b2d04ef60e8ece6a9a44a145cc5
Author: Dan Williams <dan.j.williams@intel.com>
Date: Wed Jan 5 13:32:00 2022 -0800
ndctl/test: Initialize the label area by default
The removal of BLK-mode support causes nfit_test regions to not be
'aliased' by default, which means that the only way to enable labels is to
initialize the namespace label index block. In support of that the common
'reset()' helper is updated to initialize v1.1 labels instead of zero them.
Additionally, it highlighted that some btt tests have silent assumptions of
v1.1 vs v1.2 label support. Add a 'resetV()' alternative to the common
'reset()' function that initializes the label area to v1.2.
Link: https://lore.kernel.org/r/164141832017.3990253.10383328274835531066.stgit@dwillia2-desk3.amr.corp.intel.com
Tested-by: Alison Schofield <alison.schofield@intel.com>
Tested-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
diff --git a/test/btt-errors.sh b/test/btt-errors.sh
index 5a20d26..6e69178 100755
--- a/test/btt-errors.sh
+++ b/test/btt-errors.sh
@@ -45,7 +45,7 @@ trap 'err $LINENO cleanup' ERR
# setup (reset nfit_test dimms)
modprobe nfit_test
-reset
+resetV
rc=1
@@ -124,7 +124,7 @@ dd if=$MNT/$FILE of=/dev/null iflag=direct bs=4096 count=1
# reset everything to get a clean log
if grep -q "$MNT" /proc/mounts; then umount $MNT; fi
-reset
+resetV
dev="x"
json=$($NDCTL create-namespace -b $NFIT_TEST_BUS0 -t pmem -m sector)
eval "$(echo "$json" | json2var)"
diff --git a/test/btt-pad-compat.sh b/test/btt-pad-compat.sh
index be538b7..005316a 100755
--- a/test/btt-pad-compat.sh
+++ b/test/btt-pad-compat.sh
@@ -148,7 +148,7 @@ do_tests()
verify_idx 0 1
# do the same with an old format namespace
- reset
+ resetV
create_oldfmt_ns
verify_idx 0 2
diff --git a/test/common b/test/common
index 3c54d63..b6d4712 100644
--- a/test/common
+++ b/test/common
@@ -49,14 +49,21 @@ err()
reset()
{
$NDCTL disable-region -b $NFIT_TEST_BUS0 all
- $NDCTL zero-labels -b $NFIT_TEST_BUS0 all
+ $NDCTL init-labels -f -b $NFIT_TEST_BUS0 all
+ $NDCTL enable-region -b $NFIT_TEST_BUS0 all
+}
+
+resetV()
+{
+ $NDCTL disable-region -b $NFIT_TEST_BUS0 all
+ $NDCTL init-labels -f -V 1.2 -b $NFIT_TEST_BUS0 all
$NDCTL enable-region -b $NFIT_TEST_BUS0 all
}
reset1()
{
$NDCTL disable-region -b $NFIT_TEST_BUS1 all
- $NDCTL zero-labels -b $NFIT_TEST_BUS1 all
+ $NDCTL init-labels -f -b $NFIT_TEST_BUS1 all
$NDCTL enable-region -b $NFIT_TEST_BUS1 all
}
diff --git a/test/label-compat.sh b/test/label-compat.sh
index 8ab2858..7ae4d5e 100755
--- a/test/label-compat.sh
+++ b/test/label-compat.sh
@@ -17,7 +17,7 @@ trap 'err $LINENO' ERR
# setup (reset nfit_test dimms)
modprobe nfit_test
$NDCTL disable-region -b $NFIT_TEST_BUS0 all
-$NDCTL zero-labels -b $NFIT_TEST_BUS0 all
+$NDCTL init-labels -f -b $NFIT_TEST_BUS0 all
# grab the largest pmem region on -b $NFIT_TEST_BUS0
query=". | sort_by(.available_size) | reverse | .[0].dev"

View File

@ -1,6 +0,0 @@
diff -up ndctl-67/contrib/nvdimm-security.conf.orig ndctl-67/contrib/nvdimm-security.conf
--- ndctl-67/contrib/nvdimm-security.conf.orig 2019-11-01 13:21:04.669374133 -0400
+++ ndctl-67/contrib/nvdimm-security.conf 2019-11-01 13:21:04.669374133 -0400
@@ -1 +1 @@
-install libnvdimm /usr/bin/ndctl load-keys ; /sbin/modprobe --ignore-install libnvdimm $CMDLINE_OPTS
+install libnvdimm keyctl link @u @s; /usr/bin/ndctl load-keys; /sbin/modprobe --ignore-install libnvdimm $CMDLINE_OPTS

View File

@ -3,40 +3,35 @@ Version: 71.1
Release: 7%{?dist}
Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory)
License: GPLv2
Group: System Environment/Base
Url: https://github.com/pmem/ndctl
Source0: https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: modprobe-link-user-keyring-before-loadkeys.patch
Patch1: fb13dfb-zero_info_block-skip-seed-devices.patch
Patch2: daef3a3-libndctl-Unify-adding-dimms-for-papr-and-nfit-families.patch
Patch3: f081f30-papr-Add-support-to-parse-save_fail-flag-for-dimm.patch
Patch4: fe831b5-Use-page-size-as-alignment-value.patch
Patch5: e086106-libndctl-papr-Fix-probe-for-papr-scm-compatible-nvdimms.patch
Patch6: c521093-ndctl-scrub-Stop-translating-return-values.patch
Patch7: 4e646fa-ndctl-scrub-Reread-scrub-engine-status-at-start.patch
Patch8: 9bd2994-ndctl-namespace-Skip-seed-namespaces-when-processing-all-namespaces.patch
Patch9: 07011a3-ndctl-namespace-Suppress-ENXIO-when-processing-all-namespaces.patch
Patch10: 80e0d88-namespace-action-Drop-zero-namespace-checks.patch
Patch11: aa99000-libndctl-papr-Add-support-for-reporting-shutdown-count.patch
Patch12: edcd9b7-libndctl-intel-Indicate-supported-smart-inject-types.patch
Patch13: 9ef460e-libndctl-papr-Add-limited-support-for-inject-smart.patch
Patch14: 6e85cac-ndtest-ack-shutdown-count-Skip-the-test-on-ndtest.patch
Patch15: 7ce2fdd-ndctl-test-add-checking-the-presence-of-jq-command-ahead.patch
Patch16: 43e48c0-test-libndctl-Use-ndctl_region_set_ro-to-change-disk-read-only-state.patch
Patch17: 1649ad9-test-Don-t-skip-tests-if-nfit-modules-are-missing.patch
Patch18: e423b46-ndctl-test-Prepare-for-BLK-aperture-support-removal.patch
Patch19: 6538529-ndctl-test-Move-reset-to-function-in-common.patch
Patch20: fe37c85-ndctl-test-Initialize-the-label-area-by-default.patch
Patch21: 756a659-ndctl-test-Skip-BLK-flags-checks.patch
Patch22: b787320-ndctl-test-Move-sector-mode-to-a-different-region.patch
Patch23: 2e05cd6-ndctl-Deprecate-BLK-aperture-support.patch
Patch24: 4921c0c-ndctl-test-make-inject-smart.sh-more-tolerant-of-decimal-fields.patch
Patch0: fb13dfb-zero_info_block-skip-seed-devices.patch
Patch1: daef3a3-libndctl-Unify-adding-dimms-for-papr-and-nfit-families.patch
Patch2: f081f30-papr-Add-support-to-parse-save_fail-flag-for-dimm.patch
Patch3: fe831b5-Use-page-size-as-alignment-value.patch
Patch4: e086106-libndctl-papr-Fix-probe-for-papr-scm-compatible-nvdimms.patch
Patch5: c521093-ndctl-scrub-Stop-translating-return-values.patch
Patch6: 4e646fa-ndctl-scrub-Reread-scrub-engine-status-at-start.patch
Patch7: 9bd2994-ndctl-namespace-Skip-seed-namespaces-when-processing-all-namespaces.patch
Patch8: 07011a3-ndctl-namespace-Suppress-ENXIO-when-processing-all-namespaces.patch
Patch9: 80e0d88-namespace-action-Drop-zero-namespace-checks.patch
Patch10: aa99000-libndctl-papr-Add-support-for-reporting-shutdown-count.patch
Patch11: edcd9b7-libndctl-intel-Indicate-supported-smart-inject-types.patch
Patch12: 9ef460e-libndctl-papr-Add-limited-support-for-inject-smart.patch
Patch13: 6e85cac-ndtest-ack-shutdown-count-Skip-the-test-on-ndtest.patch
Requires: ndctl-libs%{?_isa} = %{version}-%{release}
Requires: daxctl-libs%{?_isa} = %{version}-%{release}
BuildRequires: make
BuildRequires: autoconf
%if 0%{?rhel} < 9
BuildRequires: asciidoc
%define asciidoc --disable-asciidoctor
%else
BuildRequires: rubygem-asciidoctor
%endif
BuildRequires: xmlto
BuildRequires: automake
BuildRequires: libtool
@ -46,7 +41,7 @@ BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(json-c)
BuildRequires: pkgconfig(bash-completion)
BuildRequires: systemd
BuildRequires: pkgconfig(systemd)
BuildRequires: keyutils-libs-devel
%description
@ -59,7 +54,6 @@ Firmware Interface Table).
%package -n ndctl-devel
Summary: Development files for libndctl
License: LGPLv2
Group: Development/Libraries
Requires: ndctl-libs%{?_isa} = %{version}-%{release}
%description -n ndctl-devel
@ -69,7 +63,6 @@ developing applications that use %{name}.
%package -n daxctl
Summary: Manage Device-DAX instances
License: GPLv2
Group: System Environment/Base
Requires: daxctl-libs%{?_isa} = %{version}-%{release}
%description -n daxctl
@ -81,7 +74,6 @@ filesystem.
%package -n daxctl-devel
Summary: Development files for libdaxctl
License: LGPLv2
Group: Development/Libraries
Requires: daxctl-libs%{?_isa} = %{version}-%{release}
%description -n daxctl-devel
@ -94,7 +86,6 @@ mappings of performance / feature-differentiated memory.
%package -n ndctl-libs
Summary: Management library for "libnvdimm" subsystem devices (Non-volatile Memory)
License: LGPLv2
Group: System Environment/Libraries
Requires: daxctl-libs%{?_isa} = %{version}-%{release}
@ -104,7 +95,6 @@ Libraries for %{name}.
%package -n daxctl-libs
Summary: Management library for "Device DAX" devices
License: LGPLv2
Group: System Environment/Libraries
%description -n daxctl-libs
Device DAX is a facility for establishing DAX mappings of performance /
@ -118,7 +108,7 @@ control API for these devices.
%build
echo %{version} > version
./autogen.sh
%configure --disable-static --disable-silent-rules --disable-asciidoctor
%configure --disable-static --disable-silent-rules %{?asciidoc}
make %{?_smp_mflags}
%install
@ -128,13 +118,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%check
make check
%post -n ndctl-libs -p /sbin/ldconfig
%ldconfig_scriptlets -n ndctl-libs
%postun -n ndctl-libs -p /sbin/ldconfig
%post -n daxctl-libs -p /sbin/ldconfig
%postun -n daxctl-libs -p /sbin/ldconfig
%ldconfig_scriptlets -n daxctl-libs
%define bashcompdir %(pkg-config --variable=completionsdir bash-completion)
@ -179,59 +165,107 @@ make check
%changelog
* Mon Jun 05 2023 Jeff Moyer <jmoyer@redhat.com> - 71.1-7.el8
- Another bump to fix gating tests
- Resolves: rhbz#2141031
* Mon Jun 05 2023 Jeff Moyer <jmoyer@redhat.com> - 71.1-6.el8
- Bump release for a rebuild
- Resolves: rhbz#2141031
* Fri Jun 02 2023 Jeff Moyer <jmoyer@redhat.com> - 71.1-5.el8
- Sync test harness with kernel updates. (Jeff Moyer)
- Resolves: rhbz#2141031
* Tue Jun 14 2022 Jeff Moyer <jmoyer@redhat.com> - 71.1-4.el8
* Tue Jun 14 2022 Bryan Gurney <bgurney@redhat.com> - 71.1-7
- Pull in fixes from upstream v72 and v73 (Jeff Moyer)
- Fix enable-namespace all reporting errors incorrectly
- Add support for inject-smart on papr scm
- Related: bz#2090190 bz#1986185 bz#2040074
- Fix enable-namespace all reporting errors incorrectly
- Add support for inject-smart on papr scm
- Related: rhbz#2040075
- Related: rhbz#1873851
- Related: rhbz#1880578
- Related: rhbz#1922538
- Related: rhbz#2087707
* Mon Nov 29 2021 Bryan Gurney <bgurney@redhat.com> - 71.1-3.el8
* Wed Dec 1 2021 Bryan Gurney <bgurney@redhat.com> - 71.1-6
- Add gating test
- Related: rhbz#2028152
* Mon Nov 29 2021 Bryan Gurney <bgurney@redhat.com> - 71.1-5
- Rebuild with latest json-c version
- Related: bz#2021816
- Related: rhbz#2023317
* Thu Feb 11 2021 Jeff Moyer <jmoyer@redhat.com> - 71.1-2.el8
- Get rid of confusing message when deleting all namespaces
- Related: bz#1782182
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 71.1-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Feb 5 2021 Jeff Moyer <jmoyer@redhat.com> - 71.1-1.el8
- Update to v71.1 to pull in ppc support.
- Related: bz#1782182
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 71.1-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Fri Nov 1 2019 Jeff Moyer <jmoyer@redhat.com> - 67-2.el8
- Fix up botched change to nvdimm-security.conf (Jeff Moyer)
- Related: bz#1724531
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 71.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Oct 28 2019 Jeff Moyer <jmoyer@redhat.com> - 67-1.el8
- Rebase to v67. This brings in the following features:
- support for the 'security frozen' sysfs attribute
- support for using pmem as system ram
- various cleanup and bug fixes
- Fix load-keys failure in initramfs (Jeff Moyer)
- Resolves: bz#1724531 bz#1730673 bz#1741164 bz#1741165 bz#1749888 bz#1749889
* Tue Dec 22 2020 Vishal Verma <vishal.l.verma@intel.com> - 71.1-1
- release v71.1
* Mon Jun 3 2019 Jeff Moyer <jmoyer@redhat.com> - 65-1.el8
- Rebase to v65.
- Resolves: bz#1665407 bz#1634349
* Sat Dec 19 2020 Vishal Verma <vishal.l.verma@intel.com> - 71-1
- release v71
* Tue Oct 09 2018 Jeff Moyer <jmoyer@redhat.com - 62-2.el8
- Remove faulty udev rule
- Resolves: bz#1637624
* Sat Oct 10 2020 Vishal Verma <vishal.l.verma@intel.com> - 70.1-1
- release v70.1
* Thu Aug 23 2018 Jeff Moyer <jmoyer@redhat.com> - 62-1
- rebase to v62
- Resolves: bz#1567756 bz#1497651 bz#1610650 bz#1511774 bz#1570548
* Tue Oct 06 2020 Vishal Verma <vishal@stellar.sh> - 70-1
- release v70
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 69-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jul 23 2020 Vishal Verma <vishal.l.verma@intel.com> - 69-1
- release v69
* Tue Apr 21 2020 Björn Esser <besser82@fedoraproject.org> - 68-2
- Rebuild (json-c)
* Tue Mar 24 2020 Vishal Verma <vishal@stellar.sh> - 68-1
- release v68
* Fri Jan 31 2020 Vishal Verma <vishal.l.verma@intel.com> - 67-3
- Add fix for GCC10 builds
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 67-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Oct 28 2019 Vishal Verma <vishal.l.verma@intel.com> - 67-1
- release v67
* Wed Aug 07 2019 Vishal Verma <vishal.l.verma@intel.com> - 66-1
- release v66
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 65-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat May 11 2019 Vishal Verma <vishal.l.verma@intel.com> - 65-1
- release v65
* Wed Feb 06 2019 Vishal Verma <vishal.l.verma@intel.com> - 64.1-1
- release v64.1
* Mon Feb 04 2019 Vishal Verma <vishal.l.verma@intel.com> - 64-1
- release v64
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 63-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Oct 05 2018 Vishal Verma <vishal.l.verma@intel.com> - 63-1
- release v63
- remove ndctl-udev and related files
* Tue Aug 14 2018 Vishal Verma <vishal@stellar.sh> - 62-1
- release v62
- Add files for udev and ndctl-monitor
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 61.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jul 11 2018 Vishal Verma <vishal.l.verma@intel.com> - 61.2-1
- release v61.2
* Tue Jun 26 2018 Vishal Verma <vishal@stellar.sh> - 61.1-1
- release v61.1
* Tue Jun 26 2018 Vishal Verma <vishal@stellar.sh> - 61-1
- new version
* Thu May 17 2018 Dan Williams <dan.j.williams@intel.com> - 60.3-1
- release v60.3
* Mon Apr 23 2018 Dan Williams <dan.j.williams@intel.com> - 60.1-1
- release v60.1