From 1c13f1084db7cd9029f33a5648da2cf65b7f3656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Plewa?= <lukasz.plewa@intel.com> Date: Tue, 13 Oct 2020 13:34:55 +0200 Subject: [PATCH] common: revert Disable SDS if is not supported #4896 this commit reverts all changes from: revert Disable SDS if is not supported #4896 and all previous reverts/fixes to this feature: test: fix sds support check in pmempool_feature #4995 pool: remove sds extraneous #4996 Support for SDS in powerpc should be implemented by modifying pmem2_source_device_usc() function to return PMEM2_E_NOSUPP on powerpc platform. Revert "pool: remove sds extraneous" This reverts commit 493ee83f0a0b7020b6701c96e3a23f260c13bbe3. Revert "test: fix sds support check in pmempool_feature" This reverts commit 11318a9299ce2223007fcf793fbc34a091f8200c. Revert "test: Fix pmempool_sync_remote/TEST21 when SDS is not supported" This reverts commit 8c9361e1d16d3f3577caccbcd39f3854b87ad99e. Revert "test: fix pmempool_check/TEST33 when sds is not supported" This reverts commit 0d98c1dfae36f74bc39c2d28cd3e79a2fe798776. Revert "test: add SDS not supported optional line on pmempool check tests" This reverts commit 3b4d752982fb60d05005ddf5f1dd56ad8f33aa4d. Revert "pool: disable SDS check if not supported" This reverts commit eb7822f510d27d602110d40661bc27d295c92682. Revert "test: fix util_pooset tests to work without SDS" This reverts commit d29eb2ede6475e3546bd08a2b67a1519b256c6bc. Revert "test: fix pmempool_info/TEST14 to work without SDS" This reverts commit fb6445d2833078ed0968b3bc72172fa9a9b75cd2. Revert "test: Fix obj_sds to always have SDS" This reverts commit a6d76e263b1fb575c0ec689bef5745a87a04ae72. Revert "test: skip pmempool_feature if SDS cannot be enabled" This reverts commit d4b31aa992397bd2f6c58d9d417c1375f6faa95d. Revert "common: Add runtime SDS check and disable" This reverts commit ac3da3a2b2b3aecfccf62bc70ea8d0e82b9e3960. --- src/common/set.c | 8 - src/common/shutdown_state.c | 27 +--- src/common/shutdown_state.h | 1 - src/libpmempool/check_pool_hdr.c | 5 - src/libpmempool/check_sds.c | 8 - src/test/libpmempool_api/out0.log.match | 3 +- src/test/libpmempool_api/out1.log.match | 3 +- src/test/libpmempool_api/out10.log.match | 6 +- src/test/libpmempool_api/out13.log.match | 3 +- src/test/libpmempool_api/out9.log.match | 6 +- src/test/libpmempool_backup/out0.log.match | 9 +- src/test/libpmempool_backup/out6.log.match | 18 +-- src/test/libpmempool_backup/out7.log.match | 9 +- src/test/libpmempool_feature/TEST1.PS1 | 10 +- src/test/libpmempool_feature/TEST2w.PS1 | 10 +- src/test/libpmempool_feature/common.PS1 | 10 -- src/test/obj_sds/mocks_windows_sds.h | 10 -- src/test/obj_sds/obj_sds.c | 7 +- src/test/obj_sds/obj_sds.vcxproj | 4 +- src/test/pmempool_check/TEST1.PS1 | 2 +- src/test/pmempool_check/TEST9.PS1 | 2 +- src/test/pmempool_check/common.sh | 21 +-- src/test/pmempool_check/out1.log.match | 6 +- src/test/pmempool_check/out10.log.match | 7 +- src/test/pmempool_check/out13.log.match | 3 +- src/test/pmempool_check/out14.log.match | 9 +- src/test/pmempool_check/out15.log.match | 168 +++++++++------------ src/test/pmempool_check/out16.log.match | 9 +- src/test/pmempool_check/out17.log.match | 9 +- src/test/pmempool_check/out18.log.match | 3 +- src/test/pmempool_check/out19.log.match | 15 +- src/test/pmempool_check/out20.log.match | 9 +- src/test/pmempool_check/out22.log.match | 3 +- src/test/pmempool_check/out23.log.match | 9 +- src/test/pmempool_check/out25.log.match | 9 +- src/test/pmempool_check/out27.log.match | 9 +- src/test/pmempool_check/out4.log.match | 6 +- src/test/pmempool_check/out5.log.match | 6 +- src/test/pmempool_check/out7.log.match | 24 +-- src/test/pmempool_check/out8.log.match | 3 +- src/test/pmempool_check/out9.log.match | 6 +- src/test/pmempool_feature/TEST1.PS1 | 10 +- src/test/pmempool_feature/TEST15.PS1 | 10 +- src/test/pmempool_feature/TEST2.PS1 | 10 +- src/test/pmempool_feature/common.PS1 | 9 -- src/test/pmempool_feature/common.sh | 23 --- src/test/pmempool_info/out14.log.match | 12 +- src/test/pmempool_sync/out27.log.match | 7 +- src/test/pmempool_sync/out28.log.match | 7 +- src/test/pmempool_sync/out29.log.match | 14 +- src/test/pmempool_sync/out30.log.match | 7 +- src/test/pmempool_sync/out31.log.match | 7 +- src/test/pmempool_sync/out38.log.match | 7 +- src/test/pmempool_sync/out39.log.match | 7 +- src/test/pmempool_sync/out40.log.match | 7 +- src/test/pmempool_sync/out41.log.match | 7 +- src/test/pmempool_sync/out42.log.match | 7 +- src/test/pmempool_sync/out44.log.match | 11 +- src/test/pmempool_sync/out45.log.match | 11 +- src/test/pmempool_sync/out46.log.match | 11 +- src/test/pmempool_sync/out47.log.match | 11 +- src/test/pmempool_sync/out48.log.match | 11 +- src/test/pmempool_sync/out49.log.match | 11 +- src/test/pmempool_sync/out50.log.match | 11 +- src/test/pmempool_sync/out51.log.match | 11 +- src/test/pmempool_sync/out52.log.match | 11 +- src/test/pmempool_sync/out53.log.match | 11 +- src/test/pmempool_sync_remote/TEST21 | 4 +- src/test/pmempool_sync_remote/common.sh | 12 +- src/test/util_poolset/grep0.log.match | 19 --- src/test/util_poolset/grep0w.log.match | 19 --- src/test/util_poolset/grep9.log.match | 19 --- 72 files changed, 242 insertions(+), 587 deletions(-) delete mode 100644 src/test/obj_sds/mocks_windows_sds.h diff --git a/src/common/set.c b/src/common/set.c index 60cf16e77..e3f8b6f63 100644 --- a/src/common/set.c +++ b/src/common/set.c @@ -71,7 +71,6 @@ #include "fs.h" #include "os_deep.h" #include "set_badblocks.h" -#include "shutdown_state.h" #define LIBRARY_REMOTE "librpmem.so.1" #define SIZE_AUTODETECT_STR "AUTO" @@ -2254,13 +2253,6 @@ util_header_create(struct pool_set *set, unsigned repidx, unsigned partidx, if (set->options & OPTION_SINGLEHDR) hdrp->features.incompat |= POOL_FEAT_SINGLEHDR; - /* Update SDS feature if the device don't supports it */ - if (!shutdown_state_is_supported(rep->part[partidx].fd)) { - hdrp->features.incompat &= ~POOL_FEAT_SDS; - set->ignore_sds |= IGNORE_SDS(HDR(rep, 0)); - LOG(3, "SDS disabled at runtime"); - } - memcpy(hdrp->poolset_uuid, set->uuid, POOL_HDR_UUID_LEN); memcpy(hdrp->uuid, PART(rep, partidx)->uuid, POOL_HDR_UUID_LEN); diff --git a/src/common/shutdown_state.c b/src/common/shutdown_state.c index d6d719002..3a2bb11fa 100644 --- a/src/common/shutdown_state.c +++ b/src/common/shutdown_state.c @@ -20,29 +20,6 @@ #define FLUSH_SDS(sds, rep) \ if ((rep) != NULL) os_part_deep_common(rep, 0, sds, sizeof(*(sds)), 1) -/* - * shutdown_state_is_supported -- (internal) check if device supports SDS - * - * Returns 1 if supports and 0 if not. - */ -int -shutdown_state_is_supported(int fd) -{ - uint64_t usc; - struct pmem2_source *src; - - if (pmem2_source_from_fd(&src, fd)) - return 0; - - if (pmem2_source_device_usc(src, &usc) == PMEM2_E_NOSUPP) { - pmem2_source_delete(&src); - return 0; - } - - pmem2_source_delete(&src); - return 1; -} - /* * shutdown_state_checksum -- (internal) counts SDS checksum and flush it */ @@ -94,7 +71,9 @@ shutdown_state_add_part(struct shutdown_state *sds, int fd, int ret = pmem2_source_device_usc(src, &usc); - if (ret != 0) { + if (ret == PMEM2_E_NOSUPP) { + usc = 0; + } else if (ret != 0) { if (ret == -EPERM) { /* overwrite error message */ ERR( diff --git a/src/common/shutdown_state.h b/src/common/shutdown_state.h index 147cd1f40..60031bb5c 100644 --- a/src/common/shutdown_state.h +++ b/src/common/shutdown_state.h @@ -33,7 +33,6 @@ void shutdown_state_clear_dirty(struct shutdown_state *sds, int shutdown_state_check(struct shutdown_state *curr_sds, struct shutdown_state *pool_sds, struct pool_replica *rep); -int shutdown_state_is_supported(int fd); #ifdef __cplusplus } diff --git a/src/libpmempool/check_pool_hdr.c b/src/libpmempool/check_pool_hdr.c index e9cf7173d..9d24855b0 100644 --- a/src/libpmempool/check_pool_hdr.c +++ b/src/libpmempool/check_pool_hdr.c @@ -234,11 +234,6 @@ pool_hdr_default_fix(PMEMpoolcheck *ppc, location *loc, uint32_t question, loc->hdr.features.compat = def_hdr.features.compat; break; case Q_DEFAULT_INCOMPAT_FEATURES: - /* Check if SDS is supported */ - if (!shutdown_state_is_supported( - PART(REP(ppc->pool->set_file->poolset, 0), 0)->fd)) { - def_hdr.features.incompat &= ~POOL_FEAT_SDS; - } CHECK_INFO(ppc, "%ssetting pool_hdr.features.incompat to 0x%x", loc->prefix, def_hdr.features.incompat); loc->hdr.features.incompat = def_hdr.features.incompat; diff --git a/src/libpmempool/check_sds.c b/src/libpmempool/check_sds.c index 3eaf7414b..520421ea8 100644 --- a/src/libpmempool/check_sds.c +++ b/src/libpmempool/check_sds.c @@ -245,14 +245,6 @@ check_sds(PMEMpoolcheck *ppc) const unsigned nreplicas = ppc->pool->set_file->poolset->nreplicas; location *loc = check_get_step_data(ppc->data); - /* - * SDS check can be made before header repair so header features can be - * corrupted at this point. - */ - /* initialize replica 0 for sds check */ - loc->replica = 0; - init_location_data(ppc, loc); - if (!loc->init_done) { sds_get_healthy_replicas_num(ppc, loc); diff --git a/src/test/libpmempool_api/out0.log.match b/src/test/libpmempool_api/out0.log.match index c8deb1909..d2561a339 100644 --- a/src/test/libpmempool_api/out0.log.match +++ b/src/test/libpmempool_api/out0.log.match @@ -1,8 +1,7 @@ libpmempool_api$(nW)TEST0: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -d 1 -a 0 -r 1 $(nW) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct checking pmemlog header diff --git a/src/test/libpmempool_api/out1.log.match b/src/test/libpmempool_api/out1.log.match index 2a70b5a03..100b0c9d8 100644 --- a/src/test/libpmempool_api/out1.log.match +++ b/src/test/libpmempool_api/out1.log.match @@ -1,8 +1,7 @@ libpmempool_api$(nW)TEST1: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -d 0 -a 1 -r 1 $(*) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct checking pmemlog header diff --git a/src/test/libpmempool_api/out10.log.match b/src/test/libpmempool_api/out10.log.match index 6e76c1ce2..7fdeff216 100644 --- a/src/test/libpmempool_api/out10.log.match +++ b/src/test/libpmempool_api/out10.log.match @@ -1,8 +1,7 @@ libpmempool_api$(nW)TEST10: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -d 0 -r 0 -y 0 $(nW) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header status = not consistent @@ -10,8 +9,7 @@ libpmempool_api$(nW)TEST10: DONE libpmempool_api$(nW)TEST10: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -d 0 -r 1 -y 1 $(nW) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header pool_hdr.major is not valid diff --git a/src/test/libpmempool_api/out13.log.match b/src/test/libpmempool_api/out13.log.match index 5829456fd..cc449af26 100644 --- a/src/test/libpmempool_api/out13.log.match +++ b/src/test/libpmempool_api/out13.log.match @@ -5,8 +5,7 @@ libpmempool_api$(nW)TEST13: DONE libpmempool_api$(nW)TEST13: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -s 999999 $(nW) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct checking pmemlog header diff --git a/src/test/libpmempool_api/out9.log.match b/src/test/libpmempool_api/out9.log.match index 3590d89b8..e5824c147 100644 --- a/src/test/libpmempool_api/out9.log.match +++ b/src/test/libpmempool_api/out9.log.match @@ -2,8 +2,7 @@ Pool type: log Params: log libpmempool_api$(nW)TEST9: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -d 1 -r 1 -y 1 -t log $(nW) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header pool_hdr.major is not valid @@ -16,8 +15,7 @@ Pool type: blk Params: blk 512 libpmempool_api$(nW)TEST9: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -d 1 -r 1 -y 1 -t blk $(nW) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header pool_hdr.major is not valid diff --git a/src/test/libpmempool_backup/out0.log.match b/src/test/libpmempool_backup/out0.log.match index 8b7304afa..d918f4b77 100644 --- a/src/test/libpmempool_backup/out0.log.match +++ b/src/test/libpmempool_backup/out0.log.match @@ -5,8 +5,7 @@ creating backup file: $(nW)pool.part2_backup creating backup file: $(nW)pool.part3_backup creating backup file: $(nW)pool.part4_backup checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -30,8 +29,7 @@ creating backup file: $(nW)pool.part2_backup creating backup file: $(nW)pool.part3_backup creating backup file: $(nW)pool.part4_backup checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -51,8 +49,7 @@ creating backup file: $(nW)pool.part2_backup creating backup file: $(nW)pool.part3_backup creating backup file: $(nW)pool.part4_backup checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/libpmempool_backup/out6.log.match b/src/test/libpmempool_backup/out6.log.match index 34102e991..05610fa1b 100644 --- a/src/test/libpmempool_backup/out6.log.match +++ b/src/test/libpmempool_backup/out6.log.match @@ -2,8 +2,7 @@ libpmempool_backup/TEST6: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -b $(nW)pool.set_backup -t blk -r 1 $(nW)pool.set part files of the destination poolset of the backup already exist. Do you want to overwrite them? checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -30,8 +29,7 @@ libpmempool_backup/TEST6: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -b $(nW)pool.set_backup -t blk -r 1 $(nW)pool.set part files of the destination poolset of the backup already exist. Do you want to overwrite them? checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -52,8 +50,7 @@ libpmempool_backup/TEST6: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -b $(nW)pool.set_backup -t log -r 1 $(nW)pool.set part files of the destination poolset of the backup already exist. Do you want to overwrite them? checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -76,8 +73,7 @@ libpmempool_backup/TEST6: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -b $(nW)pool.set_backup -t log -r 1 $(nW)pool.set part files of the destination poolset of the backup already exist. Do you want to overwrite them? checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -94,8 +90,7 @@ libpmempool_backup/TEST6: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -b $(nW)pool.set_backup -t obj -r 1 $(nW)pool.set part files of the destination poolset of the backup already exist. Do you want to overwrite them? checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -116,8 +111,7 @@ libpmempool_backup/TEST6: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -b $(nW)pool.set_backup -t obj -r 1 $(nW)pool.set part files of the destination poolset of the backup already exist. Do you want to overwrite them? checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/libpmempool_backup/out7.log.match b/src/test/libpmempool_backup/out7.log.match index d59d40b99..51f16ea87 100644 --- a/src/test/libpmempool_backup/out7.log.match +++ b/src/test/libpmempool_backup/out7.log.match @@ -2,8 +2,7 @@ libpmempool_backup/TEST7: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -b $(nW)pool.blk_backup -t blk -r 1 $(nW)pool.blk destination of the backup already exists. Do you want to overwrite it? checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct checking pmemblk header @@ -23,8 +22,7 @@ libpmempool_backup/TEST7: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -b $(nW)pool.log_backup -t log -r 1 $(nW)pool.log destination of the backup already exists. Do you want to overwrite it? checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct checking pmemlog header @@ -40,8 +38,7 @@ libpmempool_backup/TEST7: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -b $(nW)pool.obj_backup -t obj -r 1 $(nW)pool.obj destination of the backup already exists. Do you want to overwrite it? checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct status = consistent diff --git a/src/test/libpmempool_feature/TEST1.PS1 b/src/test/libpmempool_feature/TEST1.PS1 index 41accdf32..166e3e78d 100644 --- a/src/test/libpmempool_feature/TEST1.PS1 +++ b/src/test/libpmempool_feature/TEST1.PS1 @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2018-2019, Intel Corporation +# Copyright 2018-2020, Intel Corporation # # libpmempool_feature/TEST1 -- unit test for PMEMPOOL_FEAT_CHCKSUM_2K @@ -22,14 +22,6 @@ expect_normal_exit $PMEMPOOL create obj $POOL # PMEMPOOL_FEAT_CHCKSUM_2K is enabled by default libpmempool_feature_query "CKSUM_2K" -# If SDS is not enabled at this point is because SDS is not available for -# this device -$ret = pmempool_feature_query_return "SHUTDOWN_STATE" -if ( $ret -eq "0" ) { - msg "${Env:UNITTEST_NAME}: SKIP: SDS is not available" - exit 0 -} - # disable PMEMPOOL_FEAT_SHUTDOWN_STATE prior to success $exit_func="expect_abnormal_exit" libpmempool_feature_disable "CKSUM_2K" # should fail diff --git a/src/test/libpmempool_feature/TEST2w.PS1 b/src/test/libpmempool_feature/TEST2w.PS1 index fc66cd36d..f6441a57c 100644 --- a/src/test/libpmempool_feature/TEST2w.PS1 +++ b/src/test/libpmempool_feature/TEST2w.PS1 @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2018, Intel Corporation +# Copyright 2018-2020, Intel Corporation # # libpmempool_feature/TEST2 -- unit test for PMEMPOOL_FEAT_SHUTDOWN_STATE @@ -19,14 +19,6 @@ expect_normal_exit $PMEMPOOL create obj $POOL # PMEMPOOL_FEAT_SHUTDOWN_STATE is enabled by default libpmempool_feature_query "SHUTDOWN_STATE" -# If SDS is not enabled at this point is because SDS is not available for -# this device -$ret = pmempool_feature_query_return "SHUTDOWN_STATE" -if ( $ret -eq "0" ) { - msg "${Env:UNITTEST_NAME}: SKIP: SDS is not available" - exit 0 -} - libpmempool_feature_disable "SHUTDOWN_STATE" # PMEMPOOL_FEAT_SHUTDOWN_STATE requires PMEMPOOL_FEAT_CHCKSUM_2K diff --git a/src/test/libpmempool_feature/common.PS1 b/src/test/libpmempool_feature/common.PS1 index 7c22e0e1c..917f43971 100644 --- a/src/test/libpmempool_feature/common.PS1 +++ b/src/test/libpmempool_feature/common.PS1 @@ -16,16 +16,6 @@ $ERROR_PATTERN="<1> \[feature.c:.*\]" $exit_func="expect_normal_exit" -# pmempool_feature_query_return -- query a feature and return -# the value. -# -# usage: pmempool_feature_query_return <feature> -function pmempool_feature_query_return($arg1) { - # verify query by pmempool info - $count=(expect_normal_exit $PMEMPOOL info $POOL | Select-String "$arg1").length - return $count -} - # libpmempool_feature_query_abnormal -- query feature with expected # abnormal result # diff --git a/src/test/obj_sds/mocks_windows_sds.h b/src/test/obj_sds/mocks_windows_sds.h deleted file mode 100644 index 05f3cf887..000000000 --- a/src/test/obj_sds/mocks_windows_sds.h +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -/* Copyright 2018-2020, Intel Corporation */ - -/* - * mocks_windows.h -- redefinitions of dimm functions - */ - -#ifndef WRAP_REAL -#define shutdown_state_is_supported __wrap_shutdown_state_is_supported -#endif diff --git a/src/test/obj_sds/obj_sds.c b/src/test/obj_sds/obj_sds.c index acd09eb05..7d3a8a179 100644 --- a/src/test/obj_sds/obj_sds.c +++ b/src/test/obj_sds/obj_sds.c @@ -2,7 +2,7 @@ /* Copyright 2017-2020, Intel Corporation */ /* - * obj_sds.c -- unit test for shutdown status functions + * util_sds.c -- unit test for shutdown status functions */ #include "unittest.h" @@ -102,11 +102,6 @@ FUNC_MOCK(pmem2_source_device_usc, int, const struct pmem2_source *src, return 0; } FUNC_MOCK_END -FUNC_MOCK(shutdown_state_is_supported, int, int fd) - FUNC_MOCK_RUN_DEFAULT { - return 1; - } -FUNC_MOCK_END #ifdef _MSC_VER /* diff --git a/src/test/obj_sds/obj_sds.vcxproj b/src/test/obj_sds/obj_sds.vcxproj index 985eede72..c3da8b6ec 100644 --- a/src/test/obj_sds/obj_sds.vcxproj +++ b/src/test/obj_sds/obj_sds.vcxproj @@ -79,9 +79,7 @@ <ClCompile Include="..\..\core\os_windows.c" /> <ClCompile Include="..\..\core\out.c" /> <ClCompile Include="..\..\common\pool_hdr.c" /> - <ClCompile Include="..\..\common\set.c" > - <ForcedIncludeFiles>mocks_windows_sds.h;%(ForcedIncludeFiles)</ForcedIncludeFiles> - </ClCompile> + <ClCompile Include="..\..\common\set.c" /> <ClCompile Include="..\..\common\shutdown_state.c" /> <ClCompile Include="..\..\core\util.c" /> <ClCompile Include="..\..\core\util_windows.c" /> diff --git a/src/test/pmempool_check/TEST1.PS1 b/src/test/pmempool_check/TEST1.PS1 index 56bc1d978..aaf263e46 100644 --- a/src/test/pmempool_check/TEST1.PS1 +++ b/src/test/pmempool_check/TEST1.PS1 @@ -20,7 +20,7 @@ echo "PMEMLOG: pool_hdr" > $LOG expect_normal_exit $PMEMPOOL create log $POOL check_file $POOL -Invoke-Expression "$PMEMSPOIL -v $POOL pool_hdr.major=0x0 pool_hdr.features.compat=0xfe pool_hdr.features.incompat=0xfb pool_hdr.features.ro_compat=0xff pool_hdr.shutdown_state.usc=0 pool_hdr.shutdown_state.uuid=0 'pool_hdr.shutdown_state.f:checksum_gen' pool_hdr.unused=ERROR >> $LOG" +Invoke-Expression "$PMEMSPOIL -v $POOL pool_hdr.major=0x0 pool_hdr.features.compat=0xfe pool_hdr.features.incompat=0xfe pool_hdr.features.ro_compat=0xfb pool_hdr.shutdown_state.usc=0 pool_hdr.shutdown_state.uuid=0 'pool_hdr.shutdown_state.f:checksum_gen' pool_hdr.unused=ERROR >> $LOG" expect_normal_exit $PMEMPOOL check -vry $POOL >> $LOG echo "PMEMLOG: pmemlog" >> $LOG diff --git a/src/test/pmempool_check/TEST9.PS1 b/src/test/pmempool_check/TEST9.PS1 index 1d1e2ef3f..0ecb60561 100644 --- a/src/test/pmempool_check/TEST9.PS1 +++ b/src/test/pmempool_check/TEST9.PS1 @@ -23,7 +23,7 @@ expect_normal_exit $PMEMPOOL check -vyr $POOL >> $LOG &$PMEMSPOIL -v $POOL ` pool_hdr.major=0x0 ` pool_hdr.features.compat=0xfe ` - pool_hdr.features.incompat=0xfb ` + pool_hdr.features.incompat=0xfe ` pool_hdr.features.ro_compat=0xff ` pool_hdr.shutdown_state.usc=0 ` pool_hdr.shutdown_state.uuid=0 ` diff --git a/src/test/pmempool_check/common.sh b/src/test/pmempool_check/common.sh index 720b7814b..f6ead5770 100644 --- a/src/test/pmempool_check/common.sh +++ b/src/test/pmempool_check/common.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2018-2019, Intel Corporation +# Copyright 2018-2020, Intel Corporation # # # pmempool_check/common.sh -- checking pools helpers @@ -12,16 +12,6 @@ rm -f $LOG && touch $LOG LAYOUT=OBJ_LAYOUT$SUFFIX POOLSET=$DIR/poolset -pmempool_exe=$PMEMPOOL$EXESUFFIX - -# pmempool_feature_query_return -- query a feature and return -# the value. -# -# usage: pmempool_feature_query_return <feature> -function pmempool_feature_query_return() { - return $($pmempool_exe feature -q $1 $POOLSET 2>> $LOG) -} - # pmemspoil_corrupt_replica_sds -- corrupt shutdown state # # usage: pmemspoil_corrupt_replica_sds <replica> @@ -49,15 +39,6 @@ function pmempool_check_sds_init() { PMEMOBJ_CONF="${PMEMOBJ_CONF}$conf;" expect_normal_exit $PMEMPOOL$EXESUFFIX create --layout=$LAYOUT obj $POOLSET - - # If SDS is not enabled at this point is because SDS is not available for - # this device - pmempool_feature_query_return "SHUTDOWN_STATE" - if [[ $? -eq 0 ]]; then - msg "$UNITTEST_NAME: SKIP: SDS is not available" - exit 0 - fi - } # pmempool_check_sds -- perform shutdown state unittest diff --git a/src/test/pmempool_check/out1.log.match b/src/test/pmempool_check/out1.log.match index 154046c35..70a8708f7 100644 --- a/src/test/pmempool_check/out1.log.match +++ b/src/test/pmempool_check/out1.log.match @@ -8,8 +8,7 @@ $(nW): spoil: pool_hdr.shutdown_state.uuid=0 $(nW): spoil: pool_hdr.shutdown_state.f:checksum_gen $(nW): spoil: pool_hdr.unused=$(*) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header pool_hdr.major is not valid @@ -29,8 +28,7 @@ PMEMLOG: pmemlog $(nW): spoil: pmemlog.start_offset=$(*) $(nW): spoil: pmemlog.end_offset=$(*) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct checking pmemlog header diff --git a/src/test/pmempool_check/out10.log.match b/src/test/pmempool_check/out10.log.match index 299c687e4..82019390e 100644 --- a/src/test/pmempool_check/out10.log.match +++ b/src/test/pmempool_check/out10.log.match @@ -1,9 +1,8 @@ $(nW)pool.replica2.part1: spoil: pool_hdr.uuid=ERROR replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_check/out13.log.match b/src/test/pmempool_check/out13.log.match index d06f451f1..d451d3ed6 100644 --- a/src/test/pmempool_check/out13.log.match +++ b/src/test/pmempool_check/out13.log.match @@ -1,6 +1,5 @@ checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header pool_hdr.major is not valid diff --git a/src/test/pmempool_check/out14.log.match b/src/test/pmempool_check/out14.log.match index 3171e9181..7d7153455 100644 --- a/src/test/pmempool_check/out14.log.match +++ b/src/test/pmempool_check/out14.log.match @@ -1,20 +1,17 @@ checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct $(nW) consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct checking pmemlog header pmemlog header correct $(nW) consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct checking pmemblk header diff --git a/src/test/pmempool_check/out15.log.match b/src/test/pmempool_check/out15.log.match index 62ab867b7..0dbfd0aac 100644 --- a/src/test/pmempool_check/out15.log.match +++ b/src/test/pmempool_check/out15.log.match @@ -2,8 +2,7 @@ Arguments: create log Input: two parts per poolset Output: four parts in poolset checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -15,8 +14,7 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -28,8 +26,7 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -44,8 +41,7 @@ Arguments: create blk 512 Input: two parts per poolset Output: four parts in poolset checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -57,8 +53,7 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -70,8 +65,7 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -86,8 +80,7 @@ Arguments: create obj Input: two parts per poolset Output: four parts in poolset checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -99,8 +92,7 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -112,8 +104,7 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -126,10 +117,9 @@ the poolset contains part files from various poolsets $(nW)pool.set: not consistent Output: two replicas with two parts each in poolset replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -141,10 +131,9 @@ replica 1 part 1: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -156,10 +145,9 @@ replica 1 part 1: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -172,14 +160,13 @@ the poolset contains part files from various poolsets $(nW)pool.set: not consistent Output: four replicas in poolset replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct -$(OPT)replica 3: checking shutdown state -$(OPT)replica 3: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct +replica 3: checking shutdown state +replica 3: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 1 part 0: checking pool header @@ -191,14 +178,13 @@ replica 3 part 0: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct -$(OPT)replica 3: checking shutdown state -$(OPT)replica 3: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct +replica 3: checking shutdown state +replica 3: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 1 part 0: checking pool header @@ -210,14 +196,13 @@ replica 3 part 0: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct -$(OPT)replica 3: checking shutdown state -$(OPT)replica 3: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct +replica 3: checking shutdown state +replica 3: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 1 part 0: checking pool header @@ -231,8 +216,7 @@ $(nW)pool.set: not consistent Input: two replicas per poolset Output: four parts in poolset checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -244,8 +228,7 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -257,8 +240,7 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -271,10 +253,9 @@ the poolset contains part files from various poolsets $(nW)pool.set: not consistent Output: two replicas with two parts each in poolset replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -286,10 +267,9 @@ replica 1 part 1: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -301,10 +281,9 @@ replica 1 part 1: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -317,14 +296,13 @@ the poolset contains part files from various poolsets $(nW)pool.set: not consistent Output: four replicas in poolset replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct -$(OPT)replica 3: checking shutdown state -$(OPT)replica 3: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct +replica 3: checking shutdown state +replica 3: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 1 part 0: checking pool header @@ -336,14 +314,13 @@ replica 3 part 0: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct -$(OPT)replica 3: checking shutdown state -$(OPT)replica 3: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct +replica 3: checking shutdown state +replica 3: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 1 part 0: checking pool header @@ -355,14 +332,13 @@ replica 3 part 0: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct -$(OPT)replica 3: checking shutdown state -$(OPT)replica 3: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct +replica 3: checking shutdown state +replica 3: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 1 part 0: checking pool header diff --git a/src/test/pmempool_check/out16.log.match b/src/test/pmempool_check/out16.log.match index 9ae7ea815..69ad39713 100644 --- a/src/test/pmempool_check/out16.log.match +++ b/src/test/pmempool_check/out16.log.match @@ -1,21 +1,18 @@ $(nW)pool.p1: spoil: pool_hdr.crtime=$(nW) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header $(nW)pool.set: not consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header replica 0 part 0: the following error can be fixed using PMEMPOOL_CHECK_ADVANCED flag replica 0 part 0: pool_hdr.crtime is not valid $(nW)pool.set: cannot repair checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header replica 0 part 0: pool_hdr.crtime is not valid diff --git a/src/test/pmempool_check/out17.log.match b/src/test/pmempool_check/out17.log.match index 5103f3ba6..aec35d6c4 100644 --- a/src/test/pmempool_check/out17.log.match +++ b/src/test/pmempool_check/out17.log.match @@ -1,7 +1,6 @@ $(nW)pool.p1: spoil: pool_hdr.checksum=$(nW) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header replica 0 part 1: checking pool header @@ -11,8 +10,7 @@ replica 0 part 0: invalid pool_hdr.checksum $(nW)pool.set: cannot repair $(nW)pool.p1: spoil: pool_hdr.uuid=$(nW) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header replica 0 part 1: checking pool header @@ -23,8 +21,7 @@ replica 0 part 0: the following error can be fixed using PMEMPOOL_CHECK_ADVANCED replica 0 part 0: invalid pool_hdr.checksum $(nW)pool.set: cannot repair checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header replica 0 part 1: checking pool header diff --git a/src/test/pmempool_check/out18.log.match b/src/test/pmempool_check/out18.log.match index 0ac6f3187..1cfa675e1 100644 --- a/src/test/pmempool_check/out18.log.match +++ b/src/test/pmempool_check/out18.log.match @@ -2,8 +2,7 @@ $(nW)pool.p1: spoil: pool_hdr.major=$(nW) $(nW)pool.p1: spoil: pool_hdr.poolset_uuid=$(nW) $(nW)pool.p1: spoil: pool_hdr.uuid=$(nW) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header replica 0 part 0: pool_hdr.major is not valid diff --git a/src/test/pmempool_check/out19.log.match b/src/test/pmempool_check/out19.log.match index 43c7ca68e..fbd8e914c 100644 --- a/src/test/pmempool_check/out19.log.match +++ b/src/test/pmempool_check/out19.log.match @@ -1,13 +1,11 @@ $(nW)pool.p1: spoil: pool_hdr.arch_flags=$(nW) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header $(nW)pool.set: not consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header replica 0 part 0: pool_hdr.arch_flags is not valid @@ -20,14 +18,12 @@ $(nW)pool.set: repaired $(nW)pool.p1: spoil: pool_hdr.arch_flags=$(nW) $(nW)pool.p2: spoil: pool_hdr.arch_flags=$(nW) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header $(nW)pool.set: not consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header replica 0 part 1: checking pool header @@ -36,8 +32,7 @@ replica 0 part 0: the following error can be fixed using PMEMPOOL_CHECK_ADVANCED replica 0 part 0: invalid pool_hdr.checksum $(nW)pool.set: cannot repair checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header replica 0 part 1: checking pool header diff --git a/src/test/pmempool_check/out20.log.match b/src/test/pmempool_check/out20.log.match index 6adb515d9..f8fd6192a 100644 --- a/src/test/pmempool_check/out20.log.match +++ b/src/test/pmempool_check/out20.log.match @@ -6,8 +6,7 @@ $(nW)file.pool: cannot repair $(nW)file.pool: spoil: pool_hdr.features.compat=0x00 $(nW)file.pool: spoil: pool_hdr.f:checksum_gen checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct checking pmemlog header @@ -21,8 +20,7 @@ $(nW)file.pool: cannot repair $(nW)file.pool: spoil: pool_hdr.features.compat=0x00 $(nW)file.pool: spoil: pool_hdr.f:checksum_gen checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct checking pmemblk header @@ -40,8 +38,7 @@ $(nW)file.pool: cannot repair $(nW)file.pool: spoil: pool_hdr.features.compat=0x00 $(nW)file.pool: spoil: pool_hdr.f:checksum_gen checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct $(nW)file.pool: consistent diff --git a/src/test/pmempool_check/out22.log.match b/src/test/pmempool_check/out22.log.match index d06f451f1..d451d3ed6 100644 --- a/src/test/pmempool_check/out22.log.match +++ b/src/test/pmempool_check/out22.log.match @@ -1,6 +1,5 @@ checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header pool_hdr.major is not valid diff --git a/src/test/pmempool_check/out23.log.match b/src/test/pmempool_check/out23.log.match index 3171e9181..7d7153455 100644 --- a/src/test/pmempool_check/out23.log.match +++ b/src/test/pmempool_check/out23.log.match @@ -1,20 +1,17 @@ checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct $(nW) consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct checking pmemlog header pmemlog header correct $(nW) consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct checking pmemblk header diff --git a/src/test/pmempool_check/out25.log.match b/src/test/pmempool_check/out25.log.match index 66fcfceb0..90e9d57ca 100644 --- a/src/test/pmempool_check/out25.log.match +++ b/src/test/pmempool_check/out25.log.match @@ -1,14 +1,12 @@ checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header replica 0 part 1: pool header correct $(nW) consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -17,8 +15,7 @@ checking pmemlog header pmemlog header correct $(nW) consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_check/out27.log.match b/src/test/pmempool_check/out27.log.match index 2ccbb2239..9fe38c512 100644 --- a/src/test/pmempool_check/out27.log.match +++ b/src/test/pmempool_check/out27.log.match @@ -1,20 +1,17 @@ checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct $(nW) consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct checking pmemlog header pmemlog header correct $(nW) consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct checking pmemblk header diff --git a/src/test/pmempool_check/out4.log.match b/src/test/pmempool_check/out4.log.match index 03a317dc8..841153b77 100644 --- a/src/test/pmempool_check/out4.log.match +++ b/src/test/pmempool_check/out4.log.match @@ -1,15 +1,13 @@ $(nW): spoil: pool_hdr.checksum=$(nW) checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header the following error can be fixed using PMEMPOOL_CHECK_ADVANCED flag invalid pool_hdr.checksum $(nW)file.pool: cannot repair checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header invalid pool_hdr.checksum diff --git a/src/test/pmempool_check/out5.log.match b/src/test/pmempool_check/out5.log.match index 98a94eaf4..53848539c 100644 --- a/src/test/pmempool_check/out5.log.match +++ b/src/test/pmempool_check/out5.log.match @@ -1,14 +1,12 @@ checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header the following error can be fixed using PMEMPOOL_CHECK_ADVANCED flag invalid pool_hdr.checksum $(nW)file.pool: cannot repair checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header invalid pool_hdr.checksum diff --git a/src/test/pmempool_check/out7.log.match b/src/test/pmempool_check/out7.log.match index 673f17ca8..ff51dde78 100644 --- a/src/test/pmempool_check/out7.log.match +++ b/src/test/pmempool_check/out7.log.match @@ -2,8 +2,7 @@ $(nW)file.pool: spoil: pool_hdr.uuid=ERROR incorrect pool header $(nW)file.pool: not consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header invalid pool_hdr.uuid @@ -14,8 +13,7 @@ checking BTT Info headers BTT Layout not written $(nW)file.pool: repaired checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct checking pmemblk header @@ -28,16 +26,14 @@ $(nW)file.pool: spoil: pool_hdr.next_part_uuid=ERROR_NEXT incorrect pool header $(nW)file.pool: not consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header the following error can be fixed using PMEMPOOL_CHECK_ADVANCED flag invalid pool_hdr.uuid $(nW)file.pool: cannot repair checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header invalid pool_hdr.uuid @@ -58,8 +54,7 @@ checking BTT Info headers BTT Layout not written $(nW)file.pool: repaired checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct checking pmemblk header @@ -74,16 +69,14 @@ $(nW)file.pool: spoil: pool_hdr.next_repl_uuid=ERROR_RNEXT incorrect pool header $(nW)file.pool: not consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header the following error can be fixed using PMEMPOOL_CHECK_ADVANCED flag invalid pool_hdr.uuid $(nW)file.pool: cannot repair checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header invalid pool_hdr.uuid @@ -104,8 +97,7 @@ checking BTT Info headers BTT Layout not written $(nW)file.pool: repaired checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct checking pmemblk header diff --git a/src/test/pmempool_check/out8.log.match b/src/test/pmempool_check/out8.log.match index 3ee0d7314..3184d01d2 100644 --- a/src/test/pmempool_check/out8.log.match +++ b/src/test/pmempool_check/out8.log.match @@ -6,8 +6,7 @@ $(nW)pool.p1: spoil: pool_hdr.poolset_uuid=ERROR replica 0 part 0: incorrect pool header $(nW)pool.set: not consistent checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header replica 0 part 1: checking pool header diff --git a/src/test/pmempool_check/out9.log.match b/src/test/pmempool_check/out9.log.match index be170dbb5..d180c92cf 100644 --- a/src/test/pmempool_check/out9.log.match +++ b/src/test/pmempool_check/out9.log.match @@ -1,6 +1,5 @@ checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header pool header correct $(nW)file.pool: consistent @@ -14,8 +13,7 @@ $(nW): spoil: pool_hdr.shutdown_state.uuid=0 $(nW): spoil: pool_hdr.shutdown_state.f:checksum_gen $(nW)file.pool: spoil: pool_hdr.unused=ERROR checking shutdown state -$(OPT)shutdown state correct -$(OPX)shutdown state not supported +shutdown state correct checking pool header incorrect pool header the repair of pmemobj pools is not supported diff --git a/src/test/pmempool_feature/TEST1.PS1 b/src/test/pmempool_feature/TEST1.PS1 index 5bf1a9aca..1bf8a020b 100755 --- a/src/test/pmempool_feature/TEST1.PS1 +++ b/src/test/pmempool_feature/TEST1.PS1 @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2018, Intel Corporation +# Copyright 2018-2020, Intel Corporation # # # pmempool_feature/TEST1 -- unit test for CKSUM_2K @@ -19,14 +19,6 @@ expect_normal_exit $PMEMPOOL create obj $POOLSET # PMEMPOOL_FEAT_CHCKSUM_2K is enabled by default pmempool_feature_query "CKSUM_2K" -# If SDS is not enabled at this point is because SDS is not available for -# this device -$ret = pmempool_feature_query_return "SHUTDOWN_STATE" -if ( $ret -eq "0" ) { - msg "${Env:UNITTEST_NAME}: SKIP: SDS is not available" - exit 0 -} - # disable PMEMPOOL_FEAT_SHUTDOWN_STATE prior to success $exit_func="expect_abnormal_exit" pmempool_feature_disable "CKSUM_2K" # should fail diff --git a/src/test/pmempool_feature/TEST15.PS1 b/src/test/pmempool_feature/TEST15.PS1 index 2d520a4d8..454ae9e7b 100755 --- a/src/test/pmempool_feature/TEST15.PS1 +++ b/src/test/pmempool_feature/TEST15.PS1 @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2018-2019, Intel Corporation +# Copyright 2018-2020, Intel Corporation # # # pmempool_feature/TEST15 -- unit test for SHUTDOWN_STATE + ctl @@ -17,14 +17,6 @@ setup $Env:PMEMOBJ_CONF += "sds.at_create=1" expect_normal_exit $PMEMPOOL create obj $POOLSET -# If SDS is not enabled at this point is because SDS is not available for -# this device -$ret = pmempool_feature_query_return "SHUTDOWN_STATE" -if ( $ret -eq "0" ) { - msg "${Env:UNITTEST_NAME}: SKIP: SDS is not available" - exit 0 -} - pmempool_feature_query "SHUTDOWN_STATE" check diff --git a/src/test/pmempool_feature/TEST2.PS1 b/src/test/pmempool_feature/TEST2.PS1 index 019fcc614..85f56bbcf 100755 --- a/src/test/pmempool_feature/TEST2.PS1 +++ b/src/test/pmempool_feature/TEST2.PS1 @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2018-2019, Intel Corporation +# Copyright 2018-2020, Intel Corporation # # # pmempool_feature/TEST2 -- unit test for SHUTDOWN_STATE @@ -19,14 +19,6 @@ expect_normal_exit $PMEMPOOL create obj $POOLSET # PMEMPOOL_FEAT_SHUTDOWN_STATE is enabled by default pmempool_feature_query "SHUTDOWN_STATE" -# If SDS is not enabled at this point is because SDS is not available for -# this device -$ret = pmempool_feature_query_return "SHUTDOWN_STATE" -if ( $ret -eq "0" ) { - msg "${Env:UNITTEST_NAME}: SKIP: SDS is not available" - exit 0 -} - pmempool_feature_disable "SHUTDOWN_STATE" # PMEMPOOL_FEAT_SHUTDOWN_STATE requires PMEMPOOL_FEAT_CHCKSUM_2K diff --git a/src/test/pmempool_feature/common.PS1 b/src/test/pmempool_feature/common.PS1 index 77ac52639..7c64fb255 100644 --- a/src/test/pmempool_feature/common.PS1 +++ b/src/test/pmempool_feature/common.PS1 @@ -20,15 +20,6 @@ remove_files $LOG $exit_func="expect_normal_exit" -# pmempool_feature_query_return -- query a feature and return -# the value. -# -# usage: pmempool_feature_query_return <feature> -function pmempool_feature_query_return($arg1) { - $count=$(expect_normal_exit $PMEMPOOL feature -q $arg1 $POOLSET) - return $count -} - # pmempool_feature_query -- query feature # # usage: pmempool_feature_query <feature> diff --git a/src/test/pmempool_feature/common.sh b/src/test/pmempool_feature/common.sh index 7a2c32130..833984cac 100644 --- a/src/test/pmempool_feature/common.sh +++ b/src/test/pmempool_feature/common.sh @@ -21,14 +21,6 @@ pmempool_exe=$PMEMPOOL$EXESUFFIX exit_func=expect_normal_exit sds_enabled=$(is_ndctl_enabled $pmempool_exe; echo $?) -# pmempool_feature_query_return -- query a feature and return -# the value. -# -# usage: pmempool_feature_query_return <feature> -function pmempool_feature_query_return() { - echo $($pmempool_exe feature -q $1 $POOLSET 2>> $LOG) -} - # pmempool_feature_query -- query feature # # usage: pmempool_feature_query <feature> [<query-exit-type>] @@ -130,14 +122,6 @@ function pmempool_feature_test_CKSUM_2K() { pmempool_feature_enable SHUTDOWN_STATE "no-query" fi - # If SDS is not enabled at this point is because SDS is not available for - # this device - ret=$(pmempool_feature_query_return "SHUTDOWN_STATE") - if [[ $ret -eq 0 ]]; then - msg "$UNITTEST_NAME: SKIP: SDS is not available" - exit 0 - fi - # disable PMEMPOOL_FEAT_SHUTDOWN_STATE prior to success exit_func=expect_abnormal_exit pmempool_feature_disable "CKSUM_2K" # should fail @@ -152,13 +136,6 @@ function pmempool_feature_test_CKSUM_2K() { function pmempool_feature_test_SHUTDOWN_STATE() { pmempool_feature_query "SHUTDOWN_STATE" - # If SDS is not enabled at this point is because SDS is not available for - # this device - ret=$(pmempool_feature_query_return "SHUTDOWN_STATE") - if [[ $ret -eq 0 ]]; then - msg "$UNITTEST_NAME: SKIP: SDS is not available" - exit 0 - fi if [ $sds_enabled -eq 0 ]; then pmempool_feature_disable SHUTDOWN_STATE fi diff --git a/src/test/pmempool_info/out14.log.match b/src/test/pmempool_info/out14.log.match index e376da792..fa9ba097d 100644 --- a/src/test/pmempool_info/out14.log.match +++ b/src/test/pmempool_info/out14.log.match @@ -20,8 +20,7 @@ Alignment Descriptor : $(*) Class : $(*) Data : $(*) Machine : $(*) -$(OPT)Last shutdown : dirty -$(OPX)Last shutdown : clean +Last shutdown : dirty Checksum : $(*) [OK] PMEM OBJ Header: @@ -55,8 +54,7 @@ Alignment Descriptor : $(*) Class : $(*) Data : $(*) Machine : $(*) -$(OPT)Last shutdown : dirty -$(OPX)Last shutdown : clean +Last shutdown : dirty Checksum : $(*) [OK] PMEM OBJ Header: @@ -105,8 +103,7 @@ Alignment Descriptor : $(*) Class : $(*) Data : $(*) Machine : $(*) -$(OPT)Last shutdown : dirty -$(OPX)Last shutdown : clean +Last shutdown : dirty Checksum : $(*) [OK] PMEM OBJ Header: @@ -155,8 +152,7 @@ Alignment Descriptor : $(*) Class : $(*) Data : $(*) Machine : $(*) -$(OPT)Last shutdown : dirty -$(OPX)Last shutdown : clean +Last shutdown : dirty Checksum : $(*) [OK] PMEM OBJ Header: diff --git a/src/test/pmempool_sync/out27.log.match b/src/test/pmempool_sync/out27.log.match index 92889289b..fcf7fa64a 100644 --- a/src/test/pmempool_sync/out27.log.match +++ b/src/test/pmempool_sync/out27.log.match @@ -9,10 +9,9 @@ verify($(nW)/testset1): pool file successfully verified ($(N) records of size $( "length":16, $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out28.log.match b/src/test/pmempool_sync/out28.log.match index d169a0c89..40196c454 100644 --- a/src/test/pmempool_sync/out28.log.match +++ b/src/test/pmempool_sync/out28.log.match @@ -10,10 +10,9 @@ verify($(nW)/testset1): pool file successfully verified ($(N) records of size $( $(nW)/testset1: synchronized No bad blocks found replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 1 part 0: checking pool header diff --git a/src/test/pmempool_sync/out29.log.match b/src/test/pmempool_sync/out29.log.match index 77f0c1420..beaeacfe4 100644 --- a/src/test/pmempool_sync/out29.log.match +++ b/src/test/pmempool_sync/out29.log.match @@ -2,10 +2,9 @@ create($(nW)/testset1): allocating records in the pool ... create($(nW)/testset1): allocated $(N) records (of size $(N)) verify($(nW)/testset1): pool file successfully verified ($(N) records of size $(N)) replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -13,10 +12,9 @@ replica 0 part 1: empty pool hdr $(nW)/testset1: not consistent $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out30.log.match b/src/test/pmempool_sync/out30.log.match index a795dd78c..cf8e313bf 100644 --- a/src/test/pmempool_sync/out30.log.match +++ b/src/test/pmempool_sync/out30.log.match @@ -64,10 +64,9 @@ Root offset : $(nW) "length":8, $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out31.log.match b/src/test/pmempool_sync/out31.log.match index dbe3e2839..a930f6272 100644 --- a/src/test/pmempool_sync/out31.log.match +++ b/src/test/pmempool_sync/out31.log.match @@ -58,10 +58,9 @@ Root offset : $(nW) $(nW)/testset1: synchronized No bad blocks found replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 1 part 0: checking pool header diff --git a/src/test/pmempool_sync/out38.log.match b/src/test/pmempool_sync/out38.log.match index 1ec8253b9..f0ed872d3 100644 --- a/src/test/pmempool_sync/out38.log.match +++ b/src/test/pmempool_sync/out38.log.match @@ -65,10 +65,9 @@ Root offset : $(nW) $(nW)/testset1: pmemobj_open: error: a bad block recovery file exists, run 'pmempool sync --bad-blocks' utility to try to recover the pool: Invalid argument $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out39.log.match b/src/test/pmempool_sync/out39.log.match index a2152758f..7438695b9 100644 --- a/src/test/pmempool_sync/out39.log.match +++ b/src/test/pmempool_sync/out39.log.match @@ -65,10 +65,9 @@ Root offset : $(nW) $(nW)/testset1: pmemobj_open: error: a bad block recovery file exists, run 'pmempool sync --bad-blocks' utility to try to recover the pool: Invalid argument $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out40.log.match b/src/test/pmempool_sync/out40.log.match index 11a231ae2..da9b663d0 100644 --- a/src/test/pmempool_sync/out40.log.match +++ b/src/test/pmempool_sync/out40.log.match @@ -65,10 +65,9 @@ Root offset : $(nW) $(nW)/testset1: pmemobj_open: error: a bad block recovery file exists, run 'pmempool sync --bad-blocks' utility to try to recover the pool: Invalid argument $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out41.log.match b/src/test/pmempool_sync/out41.log.match index a2152758f..7438695b9 100644 --- a/src/test/pmempool_sync/out41.log.match +++ b/src/test/pmempool_sync/out41.log.match @@ -65,10 +65,9 @@ Root offset : $(nW) $(nW)/testset1: pmemobj_open: error: a bad block recovery file exists, run 'pmempool sync --bad-blocks' utility to try to recover the pool: Invalid argument $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out42.log.match b/src/test/pmempool_sync/out42.log.match index 3acf449bd..6887b88d6 100644 --- a/src/test/pmempool_sync/out42.log.match +++ b/src/test/pmempool_sync/out42.log.match @@ -6,10 +6,9 @@ verify($(nW)/testset1): incorrect number of records (is: $(N), should be: $(N)) verify($(nW)/testset1): pool file contains error $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out44.log.match b/src/test/pmempool_sync/out44.log.match index e0266c716..48d3b9a1c 100644 --- a/src/test/pmempool_sync/out44.log.match +++ b/src/test/pmempool_sync/out44.log.match @@ -4,12 +4,11 @@ verify($(nW)/testset1): pool file successfully verified ($(N) records of size $( $(nW)testset1: pmemobj_open: error: a bad block recovery file exists, run 'pmempool sync --bad-blocks' utility to try to recover the pool: Invalid argument $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out45.log.match b/src/test/pmempool_sync/out45.log.match index e0266c716..48d3b9a1c 100644 --- a/src/test/pmempool_sync/out45.log.match +++ b/src/test/pmempool_sync/out45.log.match @@ -4,12 +4,11 @@ verify($(nW)/testset1): pool file successfully verified ($(N) records of size $( $(nW)testset1: pmemobj_open: error: a bad block recovery file exists, run 'pmempool sync --bad-blocks' utility to try to recover the pool: Invalid argument $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out46.log.match b/src/test/pmempool_sync/out46.log.match index e0266c716..48d3b9a1c 100644 --- a/src/test/pmempool_sync/out46.log.match +++ b/src/test/pmempool_sync/out46.log.match @@ -4,12 +4,11 @@ verify($(nW)/testset1): pool file successfully verified ($(N) records of size $( $(nW)testset1: pmemobj_open: error: a bad block recovery file exists, run 'pmempool sync --bad-blocks' utility to try to recover the pool: Invalid argument $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out47.log.match b/src/test/pmempool_sync/out47.log.match index a3feea855..d74b615aa 100644 --- a/src/test/pmempool_sync/out47.log.match +++ b/src/test/pmempool_sync/out47.log.match @@ -4,12 +4,11 @@ verify($(nW)/testset1): pool file successfully verified ($(N) records of size $( $(nW)testset1: pmemobj_open: error: a bad block recovery file exists, run 'pmempool sync --bad-blocks' utility to try to recover the pool: Invalid argument $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out48.log.match b/src/test/pmempool_sync/out48.log.match index a3feea855..d74b615aa 100644 --- a/src/test/pmempool_sync/out48.log.match +++ b/src/test/pmempool_sync/out48.log.match @@ -4,12 +4,11 @@ verify($(nW)/testset1): pool file successfully verified ($(N) records of size $( $(nW)testset1: pmemobj_open: error: a bad block recovery file exists, run 'pmempool sync --bad-blocks' utility to try to recover the pool: Invalid argument $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out49.log.match b/src/test/pmempool_sync/out49.log.match index a3feea855..d74b615aa 100644 --- a/src/test/pmempool_sync/out49.log.match +++ b/src/test/pmempool_sync/out49.log.match @@ -4,12 +4,11 @@ verify($(nW)/testset1): pool file successfully verified ($(N) records of size $( $(nW)testset1: pmemobj_open: error: a bad block recovery file exists, run 'pmempool sync --bad-blocks' utility to try to recover the pool: Invalid argument $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out50.log.match b/src/test/pmempool_sync/out50.log.match index a3feea855..d74b615aa 100644 --- a/src/test/pmempool_sync/out50.log.match +++ b/src/test/pmempool_sync/out50.log.match @@ -4,12 +4,11 @@ verify($(nW)/testset1): pool file successfully verified ($(N) records of size $( $(nW)testset1: pmemobj_open: error: a bad block recovery file exists, run 'pmempool sync --bad-blocks' utility to try to recover the pool: Invalid argument $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out51.log.match b/src/test/pmempool_sync/out51.log.match index a3feea855..d74b615aa 100644 --- a/src/test/pmempool_sync/out51.log.match +++ b/src/test/pmempool_sync/out51.log.match @@ -4,12 +4,11 @@ verify($(nW)/testset1): pool file successfully verified ($(N) records of size $( $(nW)testset1: pmemobj_open: error: a bad block recovery file exists, run 'pmempool sync --bad-blocks' utility to try to recover the pool: Invalid argument $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out52.log.match b/src/test/pmempool_sync/out52.log.match index a3feea855..d74b615aa 100644 --- a/src/test/pmempool_sync/out52.log.match +++ b/src/test/pmempool_sync/out52.log.match @@ -4,12 +4,11 @@ verify($(nW)/testset1): pool file successfully verified ($(N) records of size $( $(nW)testset1: pmemobj_open: error: a bad block recovery file exists, run 'pmempool sync --bad-blocks' utility to try to recover the pool: Invalid argument $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync/out53.log.match b/src/test/pmempool_sync/out53.log.match index a3feea855..d74b615aa 100644 --- a/src/test/pmempool_sync/out53.log.match +++ b/src/test/pmempool_sync/out53.log.match @@ -4,12 +4,11 @@ verify($(nW)/testset1): pool file successfully verified ($(N) records of size $( $(nW)testset1: pmemobj_open: error: a bad block recovery file exists, run 'pmempool sync --bad-blocks' utility to try to recover the pool: Invalid argument $(nW)/testset1: synchronized replica 0: checking shutdown state -$(OPT)replica 0: shutdown state correct -$(OPX)replica 0: shutdown state not supported -$(OPT)replica 1: checking shutdown state -$(OPT)replica 1: shutdown state correct -$(OPT)replica 2: checking shutdown state -$(OPT)replica 2: shutdown state correct +replica 0: shutdown state correct +replica 1: checking shutdown state +replica 1: shutdown state correct +replica 2: checking shutdown state +replica 2: shutdown state correct replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header diff --git a/src/test/pmempool_sync_remote/TEST21 b/src/test/pmempool_sync_remote/TEST21 index 16a3fdc55..5b9bf3d7b 100755 --- a/src/test/pmempool_sync_remote/TEST21 +++ b/src/test/pmempool_sync_remote/TEST21 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2019, Intel Corporation +# Copyright 2016-2020, Intel Corporation # # # pmempool_sync_remote/TEST21 -- pmempool sync with remote replication @@ -17,8 +17,6 @@ require_sds $PMEMPOOL configure_poolsets 0 1 -require_sds_support ${NODE_DIR[1]}pool.part.1 - # XXX: we are using pmemspoil to turn on shutdown state run_on_node 0 ../pmemspoil ${NODE_DIR[0]}remote.0.part.1 \ diff --git a/src/test/pmempool_sync_remote/common.sh b/src/test/pmempool_sync_remote/common.sh index df4faef96..8d341e981 100644 --- a/src/test/pmempool_sync_remote/common.sh +++ b/src/test/pmempool_sync_remote/common.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2018, Intel Corporation +# Copyright 2016-2020, Intel Corporation # # # pmempool_sync_remote/common.sh -- pmempool sync with remote replication @@ -24,16 +24,6 @@ copy_files_to_node 1 ${NODE_TEST_DIR[1]} $PMEMOBJCLI_SCRIPT POOLSET_LOCAL="local_pool.set" -pmempool_exe=$PMEMPOOL$EXESUFFIX - -function require_sds_support() { - $pmempool_exe feature -q "SHUTDOWN_STATE" $1 2>> /dev/null - if [[ $? -eq 0 ]]; then - msg "$UNITTEST_NAME: SKIP: SDS is not available" - exit 0 - fi -} - # # configure_poolsets -- configure pool set files for test # usage: configure_poolsets <local replicas> <remote replicas> diff --git a/src/test/util_poolset/grep0.log.match b/src/test/util_poolset/grep0.log.match index c47bb9380..7b434ff16 100644 --- a/src/test/util_poolset/grep0.log.match +++ b/src/test/util_poolset/grep0.log.match @@ -8,11 +8,6 @@ $(OPT)compiled with support for Valgrind drd $(OPT)compiled with support for shutdown state $(OPT)compiled with libndctl 63+ open "$(nW)/testset0": No such file or directory -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source size 1000000 smaller than 2097152 size 1000000 smaller than 2097152 open "$(nW)/nodir/testfile62": No such file or directory @@ -24,21 +19,7 @@ size 12288 smaller than 2097152 size 12288 smaller than 2097152 file size does not match config: $(nW)testfile142, 4194304 != 8388608 file size does not match config: $(nW)testfile152, 3145728 != 4194304 -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source Non-empty file detected Non-empty file detected -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source open "$(nW)/testset23": Permission denied -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source reservation pool size 1048576 smaller than 4194304 -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source diff --git a/src/test/util_poolset/grep0w.log.match b/src/test/util_poolset/grep0w.log.match index d86cfec9c..c1756cd8b 100644 --- a/src/test/util_poolset/grep0w.log.match +++ b/src/test/util_poolset/grep0w.log.match @@ -3,11 +3,6 @@ ut version 1.0 src version: $(nW) $(OPT)compiled with support for shutdown state open "$(nW)testset0": No such file or directory -$(OPT)Getting unsafe shutdown count is not supported on this system -$(OPT)Getting unsafe shutdown count is not supported on this system -$(OPT)Getting unsafe shutdown count is not supported on this system -$(OPT)Getting unsafe shutdown count is not supported on this system -$(OPT)Getting unsafe shutdown count is not supported on this system size 131072 smaller than 2097152 size 131072 smaller than 2097152 open "$(nW)testfile62": No such file or directory @@ -19,21 +14,7 @@ size 1048576 smaller than 2097152 size 1048576 smaller than 2097152 file size does not match config: $(nW)testfile142, 4194304 != 8388608 file size does not match config: $(nW)testfile152, 4194303 != 4194304 -$(OPT)Getting unsafe shutdown count is not supported on this system -$(OPT)Getting unsafe shutdown count is not supported on this system -$(OPT)Getting unsafe shutdown count is not supported on this system Non-empty file detected Non-empty file detected -$(OPT)Getting unsafe shutdown count is not supported on this system -$(OPT)Getting unsafe shutdown count is not supported on this system open "$(nW)testset23": Permission denied -$(OPT)Getting unsafe shutdown count is not supported on this system -$(OPT)Getting unsafe shutdown count is not supported on this system -$(OPT)Getting unsafe shutdown count is not supported on this system -$(OPT)Getting unsafe shutdown count is not supported on this system -$(OPT)Getting unsafe shutdown count is not supported on this system reservation pool size 3145728 smaller than 4194304 -$(OPT)Getting unsafe shutdown count is not supported on this system -$(OPT)Getting unsafe shutdown count is not supported on this system -$(OPT)Getting unsafe shutdown count is not supported on this system -$(OPT)Getting unsafe shutdown count is not supported on this system diff --git a/src/test/util_poolset/grep9.log.match b/src/test/util_poolset/grep9.log.match index 7ad3bf3cf..01ff834b3 100644 --- a/src/test/util_poolset/grep9.log.match +++ b/src/test/util_poolset/grep9.log.match @@ -8,11 +8,6 @@ $(OPT)compiled with support for Valgrind drd $(OPT)compiled with support for shutdown state $(OPT)compiled with libndctl 63+ open "$(nW)/testset0": No such file or directory -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source size 1000000 smaller than 2097152 size 1000000 smaller than 2097152 open "$(nW)/nodir/testfile62": No such file or directory @@ -24,21 +19,7 @@ size 199680 smaller than 2097152 size 199680 smaller than 2097152 file size does not match config: $(nW)testfile142, 4194304 != 8388608 file size does not match config: $(nW)testfile152, 3145728 != 4194304 -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source Non-empty file detected Non-empty file detected -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source open "$(nW)/testset23": Permission denied -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source reservation pool size 1048576 smaller than 4194304 -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -$(OPT)Unsafe shutdown count is not supported for this source -- GitLab