diff --git a/.cirrus.yml b/.cirrus.yml index 1ea58906cc816ba419e4f37e618f3075492c6aae..caabe833e1d026ba62e6c037ea0807a8ef314578 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -7,4 +7,4 @@ task: autoconf bash binutils coreutils e2fsprogs-libuuid git gmake libunwind ncurses pkgconf hs-pandoc - script: CFLAGS="-Wno-unused-value" gmake + script: CFLAGS="-Wno-unused-value" gmake \ No newline at end of file diff --git a/src/common.inc b/src/common.inc index 6c0d174904b1974cae3d288753236adda4d7ebe7..8112512aed06dc13605b0fb55bebab71e6b4c574 100644 --- a/src/common.inc +++ b/src/common.inc @@ -311,6 +311,7 @@ LIBFABRIC_MIN_VERSION := 1.4.2 # utils/docker/images/install-libfabric.sh. ifeq ($(BUILD_RPMEM),) BUILD_RPMEM := $(call check_package, libfabric --atleast-version=$(LIBFABRIC_MIN_VERSION)) +endif ifneq ($(BUILD_RPMEM),y) export BUILD_RPMEM_INFO := libfabric (version >= $(LIBFABRIC_MIN_VERSION)) is missing -- \ see src/librpmem/README for details @@ -320,7 +321,6 @@ LIBFABRIC_LD_LIBRARY_PATHS := $(shell $(PKG_CONFIG) --variable=libdir libfabric) LIBFABRIC_LIBS := $(shell $(PKG_CONFIG) --libs libfabric) LIBFABRIC_PATH := $(shell $(PKG_CONFIG) --variable=exec_prefix libfabric)/bin endif -endif export BUILD_RPMEM export LIBFABRIC_CFLAGS export LIBFABRIC_LD_LIBRARY_PATHS diff --git a/src/common/set.c b/src/common/set.c index e3f8b6f63f8502ee2deec23ba713309f2c65dd8f..60cf16e770697c1ffb170b89e914791d949c7413 100644 --- a/src/common/set.c +++ b/src/common/set.c @@ -71,6 +71,7 @@ #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" @@ -2253,6 +2254,13 @@ 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 3a2bb11fa2e2906ff4eed37b4afe911e09457783..d6d7190020871f56fb7b70cc2c0de3dc10d43811 100644 --- a/src/common/shutdown_state.c +++ b/src/common/shutdown_state.c @@ -20,6 +20,29 @@ #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 */ @@ -71,9 +94,7 @@ shutdown_state_add_part(struct shutdown_state *sds, int fd, int ret = pmem2_source_device_usc(src, &usc); - if (ret == PMEM2_E_NOSUPP) { - usc = 0; - } else if (ret != 0) { + 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 1f9fa4ce8ba912aa355e513f64e166ee575d26b6..7b9e48d60f0641f1672f836f3bdce1841de0eb68 100644 --- a/src/common/shutdown_state.h +++ b/src/common/shutdown_state.h @@ -33,6 +33,7 @@ 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/libpmemobj/heap.c b/src/libpmemobj/heap.c index 12be8724df521a31504f352f7f39190da1720a1e..13fb4b57e8c2820c65ce386a11fd1cbedbc1fbdc 100644 --- a/src/libpmemobj/heap.c +++ b/src/libpmemobj/heap.c @@ -953,11 +953,11 @@ heap_split_block(struct palloc_heap *heap, struct bucket *b, uint32_t new_chunk_id = m->chunk_id + units; uint32_t new_size_idx = m->size_idx - units; - *m = memblock_huge_init(heap, m->chunk_id, m->zone_id, units); - struct memory_block n = memblock_huge_init(heap, new_chunk_id, m->zone_id, new_size_idx); + *m = memblock_huge_init(heap, m->chunk_id, m->zone_id, units); + if (bucket_insert_block(b, &n) != 0) LOG(2, "failed to allocate memory block runtime tracking info"); diff --git a/src/libpmemobj/memops.c b/src/libpmemobj/memops.c index 65fd2ff80dfa3c9ca3c40b3bb727e90a293c9df1..81464e66336f0c4674c69ac5ea7910a3c42a6e09 100644 --- a/src/libpmemobj/memops.c +++ b/src/libpmemobj/memops.c @@ -137,6 +137,14 @@ operation_transient_clean(void *base, const void *addr, size_t len, return 0; } +/* + * operation_transient_drain -- noop + */ +static void +operation_transient_drain(void *base) +{ +} + /* * operation_transient_memcpy -- transient memcpy wrapper */ @@ -181,10 +189,12 @@ operation_new(struct ulog *ulog, size_t ulog_base_nbytes, ctx->t_ops.base = NULL; ctx->t_ops.flush = operation_transient_clean; ctx->t_ops.memcpy = operation_transient_memcpy; + ctx->t_ops.drain = operation_transient_drain; ctx->s_ops.base = p_ops->base; ctx->s_ops.flush = operation_transient_clean; ctx->s_ops.memcpy = operation_transient_memcpy; + ctx->s_ops.drain = operation_transient_drain; VECQ_INIT(&ctx->merge_entries); diff --git a/src/libpmemobj/tx.c b/src/libpmemobj/tx.c index b22f93171d079331dedfdd2f12297c1f2de39cbc..2213dd04abc1a0e2a77c0aec0be4844e751faaf1 100644 --- a/src/libpmemobj/tx.c +++ b/src/libpmemobj/tx.c @@ -388,6 +388,7 @@ tx_abort_set(PMEMobjpool *pop, struct lane *lane) ulog_foreach_entry((struct ulog *)&lane->layout->undo, tx_undo_entry_apply, NULL, &pop->p_ops); + pmemops_drain(&pop->p_ops); operation_finish(lane->undo, ULOG_INC_FIRST_GEN_NUM); } diff --git a/src/libpmemobj/ulog.c b/src/libpmemobj/ulog.c index 74eb15b43eddcd1c784823fb476fda4ec0c5751f..1f03e2c0148338c522910f64408592189b258fc5 100644 --- a/src/libpmemobj/ulog.c +++ b/src/libpmemobj/ulog.c @@ -9,6 +9,7 @@ #include <string.h> #include "libpmemobj.h" +#include "pmemops.h" #include "ulog.h" #include "obj.h" #include "out.h" @@ -791,6 +792,7 @@ ulog_process(struct ulog *ulog, ulog_check_offset_fn check, #endif ulog_foreach_entry(ulog, ulog_process_entry, NULL, p_ops); + pmemops_drain(p_ops); } /* diff --git a/src/libpmempool/check_pool_hdr.c b/src/libpmempool/check_pool_hdr.c index 9d24855b0a3342bc96da1ba6bb92ebfcc04d1179..e9cf7173d026efc90e7e0c5ab25339d23c24eb5c 100644 --- a/src/libpmempool/check_pool_hdr.c +++ b/src/libpmempool/check_pool_hdr.c @@ -234,6 +234,11 @@ 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 520421ea859463cf253ead6977c32e6cda3c4cea..8685ef97a9aef84f29b92e2dfd4b6099661b1777 100644 --- a/src/libpmempool/check_sds.c +++ b/src/libpmempool/check_sds.c @@ -26,6 +26,7 @@ enum question { #define SDS_CHECK_STR "checking shutdown state" #define SDS_OK_STR "shutdown state correct" #define SDS_DIRTY_STR "shutdown state is dirty" +#define SDS_NOT_SUPP "shutdown state not supported" #define ADR_FAILURE_STR \ "an ADR failure was detected - your pool might be corrupted" @@ -46,6 +47,22 @@ enum question { ? SDS_DIRTY_STR ".|" ZERO_SDS_STR \ : ADR_FAILURE_STR ".|" RESET_SDS_STR +/* + * + */ +static int +sds_is_supported(location *loc) +{ + LOG(3, NULL); + + ASSERTne(loc, NULL); + struct pool_replica *rep = REP(loc->set, 0); + ASSERTne(rep, NULL); + ASSERTne(PART(rep, 0)->fd, 0); + + return shutdown_state_is_supported(PART(rep, 0)->fd); +} + /* * sds_check_replica -- (internal) check if replica is healthy */ @@ -89,6 +106,13 @@ sds_check(PMEMpoolcheck *ppc, location *loc) CHECK_INFO(ppc, "%s" SDS_CHECK_STR, loc->prefix); + /* shutdown state is supported */ + if (sds_is_supported(loc)) { + CHECK_INFO(ppc, "%s" SDS_NOT_SUPP, loc->prefix); + loc->step = CHECK_STEP_COMPLETE; + return 0; + } + /* shutdown state is valid */ if (!sds_check_replica(loc)) { CHECK_INFO(ppc, "%s" SDS_OK_STR, loc->prefix); @@ -245,6 +269,20 @@ 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 (!sds_is_supported(loc)) { + CHECK_INFO(ppc, "%s" SDS_CHECK_STR, + loc->prefix); + CHECK_INFO(ppc, "%s" SDS_NOT_SUPP, loc->prefix); + return; + } + 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 d2561a339ab64f136d7a9f9676b8954b34460d93..c8deb190987cf91c0cb8f48c97e24fa37b443dbd 100644 --- a/src/test/libpmempool_api/out0.log.match +++ b/src/test/libpmempool_api/out0.log.match @@ -1,7 +1,8 @@ libpmempool_api$(nW)TEST0: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -d 1 -a 0 -r 1 $(nW) checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 100b0c9d8f95b8c6e48e9c58476b1d4fff6e2890..2a70b5a036337272a00d94949bcbea14f160a5db 100644 --- a/src/test/libpmempool_api/out1.log.match +++ b/src/test/libpmempool_api/out1.log.match @@ -1,7 +1,8 @@ libpmempool_api$(nW)TEST1: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -d 0 -a 1 -r 1 $(*) checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 7fdeff216deb75fb55674bb1b652d24a4f7d0fda..6e76c1ce2fd6d5025cdfd09183e75845ff1d3c12 100644 --- a/src/test/libpmempool_api/out10.log.match +++ b/src/test/libpmempool_api/out10.log.match @@ -1,7 +1,8 @@ libpmempool_api$(nW)TEST10: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -d 0 -r 0 -y 0 $(nW) checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header incorrect pool header status = not consistent @@ -9,7 +10,8 @@ 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 cc449af264abb460d55cd5557a3704613bfd7ccd..5829456fdfa2dac5e1d09ab1df300d07a6c9ed21 100644 --- a/src/test/libpmempool_api/out13.log.match +++ b/src/test/libpmempool_api/out13.log.match @@ -5,7 +5,8 @@ libpmempool_api$(nW)TEST13: DONE libpmempool_api$(nW)TEST13: START: libpmempool_test$(nW) $(nW)libpmempool_test$(nW) -s 999999 $(nW) checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 e5824c1470534bf1ed498cd832e77875728e7950..3590d89b826493b7fb9a258f41487f2b2b0101e8 100644 --- a/src/test/libpmempool_api/out9.log.match +++ b/src/test/libpmempool_api/out9.log.match @@ -2,7 +2,8 @@ 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header incorrect pool header pool_hdr.major is not valid @@ -15,7 +16,8 @@ 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 d918f4b77832a3fa4c1b7b4082b116e5dbbf56e6..8b7304afaf7881b301f77e3762d3a352166d2614 100644 --- a/src/test/libpmempool_backup/out0.log.match +++ b/src/test/libpmempool_backup/out0.log.match @@ -5,7 +5,8 @@ creating backup file: $(nW)pool.part2_backup creating backup file: $(nW)pool.part3_backup creating backup file: $(nW)pool.part4_backup checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -29,7 +30,8 @@ creating backup file: $(nW)pool.part2_backup creating backup file: $(nW)pool.part3_backup creating backup file: $(nW)pool.part4_backup checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -49,7 +51,8 @@ creating backup file: $(nW)pool.part2_backup creating backup file: $(nW)pool.part3_backup creating backup file: $(nW)pool.part4_backup checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 05610fa1b6b58de0019b08ad854ebdc8545bc767..34102e991d3101fa2aff3cadf2ab0e94b49ba512 100644 --- a/src/test/libpmempool_backup/out6.log.match +++ b/src/test/libpmempool_backup/out6.log.match @@ -2,7 +2,8 @@ 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -29,7 +30,8 @@ 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -50,7 +52,8 @@ 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -73,7 +76,8 @@ 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -90,7 +94,8 @@ 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -111,7 +116,8 @@ 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 51f16ea87ca03b62a91e6d0147e8096423dc383d..d59d40b997caa6f71f11089857b78dcb65398d19 100644 --- a/src/test/libpmempool_backup/out7.log.match +++ b/src/test/libpmempool_backup/out7.log.match @@ -2,7 +2,8 @@ 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header pool header correct checking pmemblk header @@ -22,7 +23,8 @@ 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header pool header correct checking pmemlog header @@ -38,7 +40,8 @@ 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 4aef39bfe9a5fd9132c71d403837882cd6fae9ba..41accdf32f9dcc46cc3274f846041ce700759732 100644 --- a/src/test/libpmempool_feature/TEST1.PS1 +++ b/src/test/libpmempool_feature/TEST1.PS1 @@ -22,6 +22,14 @@ 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 247a64db83805ae57d40ca068019c916e96db4de..fc66cd36db113411f0bba9866b204d866e98a705 100644 --- a/src/test/libpmempool_feature/TEST2w.PS1 +++ b/src/test/libpmempool_feature/TEST2w.PS1 @@ -19,6 +19,14 @@ 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 917f4397128dc76ba22a754e24c0a5f81662c11e..7c22e0e1c8133a2ad51259b292fb2d00ed1b64dd 100644 --- a/src/test/libpmempool_feature/common.PS1 +++ b/src/test/libpmempool_feature/common.PS1 @@ -16,6 +16,16 @@ $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_persist_count/out1.log.match b/src/test/obj_persist_count/out1.log.match index f21a163d2aa1a37b7879f49868ce844df4f1e505..05e34801246bc7c2968c40edb889018619776703 100644 --- a/src/test/obj_persist_count/out1.log.match +++ b/src/test/obj_persist_count/out1.log.match @@ -3,7 +3,7 @@ obj_persist_count$(nW)TEST1: START: obj_persist_count task cl(all) drain(all) pmem_persist pmem_msync pmem_flush pmem_drain pmem_memcpy_cls pmem_memcpy_drain pmem_memset_cls pmem_memset_drain potential_cache_misses $(OPT)pool_create 49282 14 11 0 0 0 0 0 11 3 49275 $(OPX)pool_create 49602 24 11 5 0 5 0 0 11 3 49595 -root_alloc 9 4 0 0 3 1 4 2 2 1 5 +root_alloc 9 5 0 0 3 2 4 2 2 1 5 atomic_alloc 2 2 1 0 0 1 1 0 0 0 1 atomic_free 1 2 1 0 0 1 0 0 0 0 1 tx_begin_end 0 2 0 0 0 2 0 0 0 0 0 @@ -13,10 +13,10 @@ tx_free 1 1 1 0 0 0 tx_free_next 1 1 1 0 0 0 0 0 0 0 1 tx_add 3 3 1 0 0 1 1 0 1 1 1 tx_add_next 3 3 1 0 0 1 1 0 1 1 1 -tx_add_large 178 13 6 0 4 3 165 2 3 2 10 +tx_add_large 178 14 6 0 4 4 165 2 3 2 10 tx_add_lnext 164 5 1 0 0 2 161 0 2 2 1 -pmalloc 6 3 0 0 2 1 4 2 0 0 2 -pfree 5 3 0 0 2 1 3 2 0 0 2 +pmalloc 6 4 0 0 2 2 4 2 0 0 2 +pfree 5 4 0 0 2 2 3 2 0 0 2 pmalloc_stack 2 2 1 0 0 1 1 0 0 0 1 pfree_stack 1 2 1 0 0 1 0 0 0 0 1 obj_persist_count$(nW)TEST1: DONE diff --git a/src/test/obj_reorder_basic/obj_reorder_basic.c b/src/test/obj_reorder_basic/obj_reorder_basic.c index ad22157bbbeb4e8c5526717919d153616abfafd8..9cafd1fff5a70876fdf3a31b348b837e297300a6 100644 --- a/src/test/obj_reorder_basic/obj_reorder_basic.c +++ b/src/test/obj_reorder_basic/obj_reorder_basic.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BSD-3-Clause -/* Copyright 2018, Intel Corporation */ +/* Copyright 2018-2020, Intel Corporation */ /* * obj_reorder_basic.c -- a simple unit test for store reordering @@ -70,10 +70,15 @@ main(int argc, char *argv[]) if (argc != 3 || strchr("wc", argv[1][0]) == 0 || argv[1][1] != '\0') UT_FATAL("usage: %s w|c file", argv[0]); + char opt = argv[1][0]; + if (opt == 'c') { + int y = 1; + pmemobj_ctl_set(NULL, "copy_on_write.at_open", &y); + } + PMEMobjpool *pop = pmemobj_open(argv[2], LAYOUT_NAME); UT_ASSERT(pop != NULL); - char opt = argv[1][0]; VALGRIND_EMIT_LOG("PMREORDER_MARKER_WRITE.BEGIN"); switch (opt) { case 'w': diff --git a/src/test/obj_sds/mocks_windows_sds.h b/src/test/obj_sds/mocks_windows_sds.h new file mode 100644 index 0000000000000000000000000000000000000000..eec729d1655e216fe8d6e22b38787498cabe6149 --- /dev/null +++ b/src/test/obj_sds/mocks_windows_sds.h @@ -0,0 +1,10 @@ +/* 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 7d3a8a179626e0e62249ff2209b51b5ba597d95e..acd09eb05cfc7eb3ab52ab94330952c7662beba9 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 */ /* - * util_sds.c -- unit test for shutdown status functions + * obj_sds.c -- unit test for shutdown status functions */ #include "unittest.h" @@ -102,6 +102,11 @@ 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 c3da8b6ec4cc8c4cfa405e1b4d523c00d9572ad4..985eede724c4f160743cdbadaebdca241e0bcbed 100644 --- a/src/test/obj_sds/obj_sds.vcxproj +++ b/src/test/obj_sds/obj_sds.vcxproj @@ -79,7 +79,9 @@ <ClCompile Include="..\..\core\os_windows.c" /> <ClCompile Include="..\..\core\out.c" /> <ClCompile Include="..\..\common\pool_hdr.c" /> - <ClCompile Include="..\..\common\set.c" /> + <ClCompile Include="..\..\common\set.c" > + <ForcedIncludeFiles>mocks_windows_sds.h;%(ForcedIncludeFiles)</ForcedIncludeFiles> + </ClCompile> <ClCompile Include="..\..\common\shutdown_state.c" /> <ClCompile Include="..\..\core\util.c" /> <ClCompile Include="..\..\core\util_windows.c" /> diff --git a/src/test/pmempool_check/common.sh b/src/test/pmempool_check/common.sh index eaabac83973177128545116b6fec55caac703215..720b7814beae62de3ad219d9b01b550484a56522 100644 --- a/src/test/pmempool_check/common.sh +++ b/src/test/pmempool_check/common.sh @@ -12,6 +12,16 @@ 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> @@ -39,6 +49,15 @@ 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 70a8708f78d5eadfc2feb1b65e58c9740f24cb12..154046c35161f0cbb47ce2f14825a0736eb932bb 100644 --- a/src/test/pmempool_check/out1.log.match +++ b/src/test/pmempool_check/out1.log.match @@ -8,7 +8,8 @@ $(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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header incorrect pool header pool_hdr.major is not valid @@ -28,7 +29,8 @@ PMEMLOG: pmemlog $(nW): spoil: pmemlog.start_offset=$(*) $(nW): spoil: pmemlog.end_offset=$(*) checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 82019390ed912fa94e7cc35a43984450e2ee03a5..299c687e420ce26f2c949e0f7e50409bc951c1ed 100644 --- a/src/test/pmempool_check/out10.log.match +++ b/src/test/pmempool_check/out10.log.match @@ -1,8 +1,9 @@ $(nW)pool.replica2.part1: spoil: pool_hdr.uuid=ERROR replica 0: checking shutdown state -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 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 d451d3ed685e70ee7c2a3c92fb7141c76b5c7140..d06f451f194441adf96baf582be6ba17641fd037 100644 --- a/src/test/pmempool_check/out13.log.match +++ b/src/test/pmempool_check/out13.log.match @@ -1,5 +1,6 @@ checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 7d7153455821fa9831b91720faa525bf6c5dea3c..3171e918105186fde83432b5f39b428c92823942 100644 --- a/src/test/pmempool_check/out14.log.match +++ b/src/test/pmempool_check/out14.log.match @@ -1,17 +1,20 @@ checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header pool header correct $(nW) consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header pool header correct checking pmemlog header pmemlog header correct $(nW) consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 0dbfd0aacb30ba5739601b15b7cc7551385d00bd..62ab867b72678bcff548077aa4f7d7a7e62a1f23 100644 --- a/src/test/pmempool_check/out15.log.match +++ b/src/test/pmempool_check/out15.log.match @@ -2,7 +2,8 @@ Arguments: create log Input: two parts per poolset Output: four parts in poolset checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -14,7 +15,8 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -26,7 +28,8 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -41,7 +44,8 @@ Arguments: create blk 512 Input: two parts per poolset Output: four parts in poolset checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -53,7 +57,8 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -65,7 +70,8 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -80,7 +86,8 @@ Arguments: create obj Input: two parts per poolset Output: four parts in poolset checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -92,7 +99,8 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -104,7 +112,8 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -117,9 +126,10 @@ 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 -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -131,9 +141,10 @@ 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 -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -145,9 +156,10 @@ 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 -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -160,13 +172,14 @@ the poolset contains part files from various poolsets $(nW)pool.set: not consistent Output: four replicas in poolset replica 0: checking shutdown state -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 +$(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 part 0: checking pool header replica 0 part 0: pool header correct replica 1 part 0: checking pool header @@ -178,13 +191,14 @@ 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 -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 +$(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 part 0: checking pool header replica 0 part 0: pool header correct replica 1 part 0: checking pool header @@ -196,13 +210,14 @@ 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 -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 +$(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 part 0: checking pool header replica 0 part 0: pool header correct replica 1 part 0: checking pool header @@ -216,7 +231,8 @@ $(nW)pool.set: not consistent Input: two replicas per poolset Output: four parts in poolset checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -228,7 +244,8 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -240,7 +257,8 @@ replica 0 part 3: pool header correct the poolset contains part files from various poolsets $(nW)pool.set: not consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -253,9 +271,10 @@ 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 -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -267,9 +286,10 @@ 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 -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -281,9 +301,10 @@ 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 -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -296,13 +317,14 @@ the poolset contains part files from various poolsets $(nW)pool.set: not consistent Output: four replicas in poolset replica 0: checking shutdown state -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 +$(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 part 0: checking pool header replica 0 part 0: pool header correct replica 1 part 0: checking pool header @@ -314,13 +336,14 @@ 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 -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 +$(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 part 0: checking pool header replica 0 part 0: pool header correct replica 1 part 0: checking pool header @@ -332,13 +355,14 @@ 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 -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 +$(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 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 69ad39713c68ff380f24199f2171c014c8705e33..9ae7ea815b5d898ffd84a4e176aac65727d45e40 100644 --- a/src/test/pmempool_check/out16.log.match +++ b/src/test/pmempool_check/out16.log.match @@ -1,18 +1,21 @@ $(nW)pool.p1: spoil: pool_hdr.crtime=$(nW) checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header $(nW)pool.set: not consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 aec35d6c45d7c1b8e9445ad8270d318a6b51db74..5103f3ba66326dfb72de6d6a22a3678cd472746f 100644 --- a/src/test/pmempool_check/out17.log.match +++ b/src/test/pmempool_check/out17.log.match @@ -1,6 +1,7 @@ $(nW)pool.p1: spoil: pool_hdr.checksum=$(nW) checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header replica 0 part 1: checking pool header @@ -10,7 +11,8 @@ replica 0 part 0: invalid pool_hdr.checksum $(nW)pool.set: cannot repair $(nW)pool.p1: spoil: pool_hdr.uuid=$(nW) checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header replica 0 part 1: checking pool header @@ -21,7 +23,8 @@ 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 1cfa675e1290b3710060f12853006790462c4d11..0ac6f31875e305919f40bfc791298cbcfc8b7796 100644 --- a/src/test/pmempool_check/out18.log.match +++ b/src/test/pmempool_check/out18.log.match @@ -2,7 +2,8 @@ $(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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 fbd8e914c65e9107e4e445a05de6d896e718b836..43c7ca68e6274c3114ce5f9cff135a235a3bf558 100644 --- a/src/test/pmempool_check/out19.log.match +++ b/src/test/pmempool_check/out19.log.match @@ -1,11 +1,13 @@ $(nW)pool.p1: spoil: pool_hdr.arch_flags=$(nW) checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header $(nW)pool.set: not consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 @@ -18,12 +20,14 @@ $(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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header $(nW)pool.set: not consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: incorrect pool header replica 0 part 1: checking pool header @@ -32,7 +36,8 @@ 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 f8fd6192a14aead06b362bd0fe18f9b21bb5459c..6adb515d9220b89942a578cae69376e32088dc61 100644 --- a/src/test/pmempool_check/out20.log.match +++ b/src/test/pmempool_check/out20.log.match @@ -6,7 +6,8 @@ $(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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header pool header correct checking pmemlog header @@ -20,7 +21,8 @@ $(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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header pool header correct checking pmemblk header @@ -38,7 +40,8 @@ $(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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 d451d3ed685e70ee7c2a3c92fb7141c76b5c7140..d06f451f194441adf96baf582be6ba17641fd037 100644 --- a/src/test/pmempool_check/out22.log.match +++ b/src/test/pmempool_check/out22.log.match @@ -1,5 +1,6 @@ checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 7d7153455821fa9831b91720faa525bf6c5dea3c..3171e918105186fde83432b5f39b428c92823942 100644 --- a/src/test/pmempool_check/out23.log.match +++ b/src/test/pmempool_check/out23.log.match @@ -1,17 +1,20 @@ checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header pool header correct $(nW) consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header pool header correct checking pmemlog header pmemlog header correct $(nW) consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 90e9d57ca67d7dedbdaacd8449a147485bf4c27a..66fcfceb0639d24a4a030ade21ad07ffb6dfade4 100644 --- a/src/test/pmempool_check/out25.log.match +++ b/src/test/pmempool_check/out25.log.match @@ -1,12 +1,14 @@ checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -15,7 +17,8 @@ checking pmemlog header pmemlog header correct $(nW) consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 9fe38c512eda97fece21a1f217db812039f39081..2ccbb2239041a4faefd385ef8680a4e7fe9aa749 100644 --- a/src/test/pmempool_check/out27.log.match +++ b/src/test/pmempool_check/out27.log.match @@ -1,17 +1,20 @@ checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported replica 0 part 0: checking pool header replica 0 part 0: pool header correct $(nW) consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 841153b7750f067360886002918d70f92ffa8397..03a317dc801c479a65f86b6066b2fc272f5802d8 100644 --- a/src/test/pmempool_check/out4.log.match +++ b/src/test/pmempool_check/out4.log.match @@ -1,13 +1,15 @@ $(nW): spoil: pool_hdr.checksum=$(nW) checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 53848539c53bc9874825ad066a57bbe3213571c5..98a94eaf4a52935a7d2b773a4da247b3f3bb8d76 100644 --- a/src/test/pmempool_check/out5.log.match +++ b/src/test/pmempool_check/out5.log.match @@ -1,12 +1,14 @@ checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 ff51dde780070f5e9f1a4ebb2d5c466cb83059ba..673f17ca8db79a5d3a4eda312f9a86aee033a17c 100644 --- a/src/test/pmempool_check/out7.log.match +++ b/src/test/pmempool_check/out7.log.match @@ -2,7 +2,8 @@ $(nW)file.pool: spoil: pool_hdr.uuid=ERROR incorrect pool header $(nW)file.pool: not consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header incorrect pool header invalid pool_hdr.uuid @@ -13,7 +14,8 @@ checking BTT Info headers BTT Layout not written $(nW)file.pool: repaired checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header pool header correct checking pmemblk header @@ -26,14 +28,16 @@ $(nW)file.pool: spoil: pool_hdr.next_part_uuid=ERROR_NEXT incorrect pool header $(nW)file.pool: not consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header incorrect pool header invalid pool_hdr.uuid @@ -54,7 +58,8 @@ checking BTT Info headers BTT Layout not written $(nW)file.pool: repaired checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header pool header correct checking pmemblk header @@ -69,14 +74,16 @@ $(nW)file.pool: spoil: pool_hdr.next_repl_uuid=ERROR_RNEXT incorrect pool header $(nW)file.pool: not consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header incorrect pool header invalid pool_hdr.uuid @@ -97,7 +104,8 @@ checking BTT Info headers BTT Layout not written $(nW)file.pool: repaired checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 3184d01d28e6ae5107b5bd614e8ed9e8614da02c..3ee0d73140089bc12b9195691dc9d9d85198e879 100644 --- a/src/test/pmempool_check/out8.log.match +++ b/src/test/pmempool_check/out8.log.match @@ -6,7 +6,8 @@ $(nW)pool.p1: spoil: pool_hdr.poolset_uuid=ERROR replica 0 part 0: incorrect pool header $(nW)pool.set: not consistent checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 d180c92cf5aacd296c8c7e814f357d9ed4f744b6..be170dbb52520ab159811c156b61afee20f830c5 100644 --- a/src/test/pmempool_check/out9.log.match +++ b/src/test/pmempool_check/out9.log.match @@ -1,5 +1,6 @@ checking shutdown state -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported checking pool header pool header correct $(nW)file.pool: consistent @@ -13,7 +14,8 @@ $(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 -shutdown state correct +$(OPT)shutdown state correct +$(OPX)shutdown state not supported 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 33973d443923094b9b46e658b01a4b77459786c9..5bf1a9acac718f32e4b1fdee7e641e3e6a1d8195 100755 --- a/src/test/pmempool_feature/TEST1.PS1 +++ b/src/test/pmempool_feature/TEST1.PS1 @@ -19,6 +19,14 @@ 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 e601cb155760f06473561d8f53d065b93afa158e..2d520a4d8681725b11a2c1282cee362bb170267b 100755 --- a/src/test/pmempool_feature/TEST15.PS1 +++ b/src/test/pmempool_feature/TEST15.PS1 @@ -17,6 +17,14 @@ 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 78acdd6e27ced2c00a354b2d34f21526dab018c1..019fcc61437d77dd273c75826b778790aa44762b 100755 --- a/src/test/pmempool_feature/TEST2.PS1 +++ b/src/test/pmempool_feature/TEST2.PS1 @@ -19,6 +19,14 @@ 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 7c64fb25543e150c4ba20f261f5613c253bd3a21..77ac52639f40c582184eea8f7f0f25893947159b 100644 --- a/src/test/pmempool_feature/common.PS1 +++ b/src/test/pmempool_feature/common.PS1 @@ -20,6 +20,15 @@ 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 6ad2045f8ed10bf2d9618dec91c23c2463cd4893..a7a2a651eb1d3c5d99bbc6bf8e211e8307af752e 100644 --- a/src/test/pmempool_feature/common.sh +++ b/src/test/pmempool_feature/common.sh @@ -21,6 +21,14 @@ 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() { + return $($pmempool_exe feature -q $1 $POOLSET 2>> $LOG) +} + # pmempool_feature_query -- query feature # # usage: pmempool_feature_query <feature> [<query-exit-type>] @@ -122,6 +130,14 @@ 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 + pmempool_feature_query_return "SHUTDOWN_STATE" + if [[ $? -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 @@ -136,6 +152,13 @@ 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 + pmempool_feature_query_return "SHUTDOWN_STATE" + if [[ $? -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 fa9ba097d3bccf61a629852eb31ed18ff2966343..e376da792457b56e9f9dda3b4dd584a2fca3eef7 100644 --- a/src/test/pmempool_info/out14.log.match +++ b/src/test/pmempool_info/out14.log.match @@ -20,7 +20,8 @@ Alignment Descriptor : $(*) Class : $(*) Data : $(*) Machine : $(*) -Last shutdown : dirty +$(OPT)Last shutdown : dirty +$(OPX)Last shutdown : clean Checksum : $(*) [OK] PMEM OBJ Header: @@ -54,7 +55,8 @@ Alignment Descriptor : $(*) Class : $(*) Data : $(*) Machine : $(*) -Last shutdown : dirty +$(OPT)Last shutdown : dirty +$(OPX)Last shutdown : clean Checksum : $(*) [OK] PMEM OBJ Header: @@ -103,7 +105,8 @@ Alignment Descriptor : $(*) Class : $(*) Data : $(*) Machine : $(*) -Last shutdown : dirty +$(OPT)Last shutdown : dirty +$(OPX)Last shutdown : clean Checksum : $(*) [OK] PMEM OBJ Header: @@ -152,7 +155,8 @@ Alignment Descriptor : $(*) Class : $(*) Data : $(*) Machine : $(*) -Last shutdown : dirty +$(OPT)Last shutdown : dirty +$(OPX)Last shutdown : clean Checksum : $(*) [OK] PMEM OBJ Header: diff --git a/src/test/pmempool_sync/out27.log.match b/src/test/pmempool_sync/out27.log.match index fcf7fa64af1cc2cd851bd38500a66ccf80d761b2..92889289b3f28e7576572966e4720e403cc2f3fc 100644 --- a/src/test/pmempool_sync/out27.log.match +++ b/src/test/pmempool_sync/out27.log.match @@ -9,9 +9,10 @@ verify($(nW)/testset1): pool file successfully verified ($(N) records of size $( "length":16, $(nW)/testset1: synchronized replica 0: checking shutdown state -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 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 40196c45415e710a69750b74c1b6ab1290838a15..d169a0c8907b62ba07aee07b5041a64f87ff1285 100644 --- a/src/test/pmempool_sync/out28.log.match +++ b/src/test/pmempool_sync/out28.log.match @@ -10,9 +10,10 @@ verify($(nW)/testset1): pool file successfully verified ($(N) records of size $( $(nW)/testset1: synchronized No bad blocks found replica 0: checking shutdown state -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 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 beaeacfe48a189c242e3fdc20d10c37abea2fc2f..77f0c1420aa8d4c2b671acd4a9ef0902d2645048 100644 --- a/src/test/pmempool_sync/out29.log.match +++ b/src/test/pmempool_sync/out29.log.match @@ -2,9 +2,10 @@ 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 -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 part 0: checking pool header replica 0 part 0: pool header correct replica 0 part 1: checking pool header @@ -12,9 +13,10 @@ replica 0 part 1: empty pool hdr $(nW)/testset1: not consistent $(nW)/testset1: synchronized replica 0: checking shutdown state -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 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 cf8e313bf8ae8d759993236140b69140248474a8..a795dd78cd63f1402377b9f768f2016bb88f8d2b 100644 --- a/src/test/pmempool_sync/out30.log.match +++ b/src/test/pmempool_sync/out30.log.match @@ -64,9 +64,10 @@ Root offset : $(nW) "length":8, $(nW)/testset1: synchronized replica 0: checking shutdown state -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 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 a930f6272e73de6fa3b446d9b066b6a9e0a5de88..dbe3e2839f199a31288187e615404663e421f258 100644 --- a/src/test/pmempool_sync/out31.log.match +++ b/src/test/pmempool_sync/out31.log.match @@ -58,9 +58,10 @@ Root offset : $(nW) $(nW)/testset1: synchronized No bad blocks found replica 0: checking shutdown state -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 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 f0ed872d3aab66266ca35885230d66ea64a68c54..1ec8253b9ea7a558448736b447c0321a44430978 100644 --- a/src/test/pmempool_sync/out38.log.match +++ b/src/test/pmempool_sync/out38.log.match @@ -65,9 +65,10 @@ 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 -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 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 7438695b928f353015ba1d8fb522e3e951fb0e13..a2152758f351cbd058036ef171833bbc28d265ae 100644 --- a/src/test/pmempool_sync/out39.log.match +++ b/src/test/pmempool_sync/out39.log.match @@ -65,9 +65,10 @@ 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 -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 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 da9b663d0e7cb638584f18728bf4ada5f2aa7bd4..11a231ae248e10d352c6f94f27c5cbfc6419e4ea 100644 --- a/src/test/pmempool_sync/out40.log.match +++ b/src/test/pmempool_sync/out40.log.match @@ -65,9 +65,10 @@ 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 -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 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 7438695b928f353015ba1d8fb522e3e951fb0e13..a2152758f351cbd058036ef171833bbc28d265ae 100644 --- a/src/test/pmempool_sync/out41.log.match +++ b/src/test/pmempool_sync/out41.log.match @@ -65,9 +65,10 @@ 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 -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 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 6887b88d6e79399bc13d2dc264a23f01f1ad20e4..3acf449bda5737bf0eb8fdcb42e99af56bc3ce32 100644 --- a/src/test/pmempool_sync/out42.log.match +++ b/src/test/pmempool_sync/out42.log.match @@ -6,9 +6,10 @@ 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 -replica 0: shutdown state correct -replica 1: checking shutdown state -replica 1: shutdown state correct +$(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 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 48d3b9a1c2925c22b2276ec7067dfafde37ee827..e0266c7162e47d0a634eddfbd63e6f4bdbc65f11 100644 --- a/src/test/pmempool_sync/out44.log.match +++ b/src/test/pmempool_sync/out44.log.match @@ -4,11 +4,12 @@ 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 -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 +$(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 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 48d3b9a1c2925c22b2276ec7067dfafde37ee827..e0266c7162e47d0a634eddfbd63e6f4bdbc65f11 100644 --- a/src/test/pmempool_sync/out45.log.match +++ b/src/test/pmempool_sync/out45.log.match @@ -4,11 +4,12 @@ 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 -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 +$(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 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 48d3b9a1c2925c22b2276ec7067dfafde37ee827..e0266c7162e47d0a634eddfbd63e6f4bdbc65f11 100644 --- a/src/test/pmempool_sync/out46.log.match +++ b/src/test/pmempool_sync/out46.log.match @@ -4,11 +4,12 @@ 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 -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 +$(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 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 d74b615aa96f4a70cfa5fe030d0a8e4ad06a68cc..a3feea8552d99ace67fc183512e1cef2c1d70608 100644 --- a/src/test/pmempool_sync/out47.log.match +++ b/src/test/pmempool_sync/out47.log.match @@ -4,11 +4,12 @@ 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 -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 +$(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 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 d74b615aa96f4a70cfa5fe030d0a8e4ad06a68cc..a3feea8552d99ace67fc183512e1cef2c1d70608 100644 --- a/src/test/pmempool_sync/out48.log.match +++ b/src/test/pmempool_sync/out48.log.match @@ -4,11 +4,12 @@ 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 -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 +$(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 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 d74b615aa96f4a70cfa5fe030d0a8e4ad06a68cc..a3feea8552d99ace67fc183512e1cef2c1d70608 100644 --- a/src/test/pmempool_sync/out49.log.match +++ b/src/test/pmempool_sync/out49.log.match @@ -4,11 +4,12 @@ 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 -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 +$(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 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 d74b615aa96f4a70cfa5fe030d0a8e4ad06a68cc..a3feea8552d99ace67fc183512e1cef2c1d70608 100644 --- a/src/test/pmempool_sync/out50.log.match +++ b/src/test/pmempool_sync/out50.log.match @@ -4,11 +4,12 @@ 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 -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 +$(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 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 d74b615aa96f4a70cfa5fe030d0a8e4ad06a68cc..a3feea8552d99ace67fc183512e1cef2c1d70608 100644 --- a/src/test/pmempool_sync/out51.log.match +++ b/src/test/pmempool_sync/out51.log.match @@ -4,11 +4,12 @@ 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 -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 +$(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 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 d74b615aa96f4a70cfa5fe030d0a8e4ad06a68cc..a3feea8552d99ace67fc183512e1cef2c1d70608 100644 --- a/src/test/pmempool_sync/out52.log.match +++ b/src/test/pmempool_sync/out52.log.match @@ -4,11 +4,12 @@ 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 -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 +$(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 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 d74b615aa96f4a70cfa5fe030d0a8e4ad06a68cc..a3feea8552d99ace67fc183512e1cef2c1d70608 100644 --- a/src/test/pmempool_sync/out53.log.match +++ b/src/test/pmempool_sync/out53.log.match @@ -4,11 +4,12 @@ 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 -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 +$(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 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 4eba6ddcc9551ef8f9b33b65225a24ec82598924..16a3fdc55dd7e789aeab4f5a81b6a5f716c71301 100755 --- a/src/test/pmempool_sync_remote/TEST21 +++ b/src/test/pmempool_sync_remote/TEST21 @@ -17,6 +17,8 @@ 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 3a0f6a774536a2a4fdcbb65c454c28d9be2e3fe5..df4faef961eaf748404372ddf6739bca12321a4b 100644 --- a/src/test/pmempool_sync_remote/common.sh +++ b/src/test/pmempool_sync_remote/common.sh @@ -24,6 +24,16 @@ 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/unittest/unittest.sh b/src/test/unittest/unittest.sh index bf1fc796df64d654e45bacedd310921cb11caf08..5c39a5d0bf1d90991e1dcfb6fe93fdaf4044d709 100644 --- a/src/test/unittest/unittest.sh +++ b/src/test/unittest/unittest.sh @@ -3539,7 +3539,7 @@ function pmreorder_run_tool() # function pmreorder_expect_success() { - ret=$(pmreorder_run_tool "$@") + ret=$(pmreorder_run_tool "$@" | tail -n1) if [ "$ret" -ne "0" ]; then msg=$(interactive_red STDERR "failed with exit code $ret") @@ -3561,7 +3561,7 @@ function pmreorder_expect_success() # function pmreorder_expect_failure() { - ret=$(pmreorder_run_tool "$@") + ret=$(pmreorder_run_tool "$@" | tail -n1) if [ "$ret" -eq "0" ]; then msg=$(interactive_red STDERR "succeeded") diff --git a/src/test/util_poolset/grep0.log.match b/src/test/util_poolset/grep0.log.match index 7b434ff162387bb234ded105708d50f85cbb4fff..ca3550eae220a818d9cd56e676263a0e98b5dfde 100644 --- a/src/test/util_poolset/grep0.log.match +++ b/src/test/util_poolset/grep0.log.match @@ -8,6 +8,16 @@ $(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)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(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 @@ -19,7 +29,35 @@ 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)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source Non-empty file detected Non-empty file detected +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source open "$(nW)/testset23": Permission denied +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source reservation pool size 1048576 smaller than 4194304 +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(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 c1756cd8bdf5202b35d175312c51a6b9c9f0edb7..d86cfec9c7b6d394d45c17d67252383eb5ef97f1 100644 --- a/src/test/util_poolset/grep0w.log.match +++ b/src/test/util_poolset/grep0w.log.match @@ -3,6 +3,11 @@ 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 @@ -14,7 +19,21 @@ 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 01ff834b305c70a9219c79c27ef15c0fe8cd6eea..a3bc413778f69df6c36faafcacf2b5b23d229973 100644 --- a/src/test/util_poolset/grep9.log.match +++ b/src/test/util_poolset/grep9.log.match @@ -8,6 +8,16 @@ $(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)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(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 @@ -19,7 +29,35 @@ 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)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source Non-empty file detected Non-empty file detected +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source open "$(nW)/testset23": Permission denied +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source reservation pool size 1048576 smaller than 4194304 +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source +$(OPT)Cannot read device usc - ndctl is not available +$(OPT)Unsafe shutdown count is not supported for this source