diff --git a/ChangeLog b/ChangeLog index 9d02f0c32b7..27fbd0c7fed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ - removes btt specific test and related btt tests tools - removes btt support from pmemspoil - removes libpmemlog tests and examples + - removes libpmemblk tests (partially) - ... Wed May 31 2023 Oksana Sałyk diff --git a/src/test/compat_incompat_features/Makefile b/src/test/compat_incompat_features/Makefile index 8a452f9f585..2dc0bafa71e 100644 --- a/src/test/compat_incompat_features/Makefile +++ b/src/test/compat_incompat_features/Makefile @@ -9,7 +9,6 @@ TARGET = pool_open OBJS = pool_open.o LIBPMEMOBJ=y -LIBPMEMBLK=y USE_PMEMSPOIL=y include ../Makefile.inc diff --git a/src/test/compat_incompat_features/TEST0 b/src/test/compat_incompat_features/TEST0 index 0c4e3228e38..24b69e6d5f6 100755 --- a/src/test/compat_incompat_features/TEST0 +++ b/src/test/compat_incompat_features/TEST0 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2017-2019, Intel Corporation +# Copyright 2017-2023, Intel Corporation # # # compat_incompat_features/TEST0 -- test for compat/incompat feature flags @@ -22,21 +22,19 @@ create_poolset $POOLSET \ 20M:$DIR/part0:x \ 20M:$DIR/part1:x -for type in ${POOL_TYPES[@]}; do - expect_normal_exit $PMEMPOOL$EXESUFFIX rm -f $POOLSET >> $LOG_TEMP - expect_normal_exit $PMEMPOOL$EXESUFFIX create ${create_args[$type]} \ - >> $LOG_TEMP - - for flag in ${UNKNOWN_COMPAT[@]}; do - # Set compat/incompat flags in headers - set_compat $DIR/part0 $flag >> $LOG_TEMP - set_compat $DIR/part1 $flag >> $LOG_TEMP - - # Check if pool opens - expect_normal_exit ./pool_open$EXESUFFIX $type $POOLSET 2>&1 - cat $LOG >> $LOG_TEMP - cat $ERR >> $ERR_TEMP - done +expect_normal_exit $PMEMPOOL$EXESUFFIX rm -f $POOLSET >> $LOG_TEMP +expect_normal_exit $PMEMPOOL$EXESUFFIX create ${create_args[obj]} \ + >> $LOG_TEMP + +for flag in ${UNKNOWN_COMPAT[@]}; do + # Set compat/incompat flags in headers + set_compat $DIR/part0 $flag >> $LOG_TEMP + set_compat $DIR/part1 $flag >> $LOG_TEMP + + # Check if pool opens + expect_normal_exit ./pool_open$EXESUFFIX $POOLSET 2>&1 + cat $LOG >> $LOG_TEMP + cat $ERR >> $ERR_TEMP done mv $LOG_TEMP $LOG diff --git a/src/test/compat_incompat_features/TEST1 b/src/test/compat_incompat_features/TEST1 index 0d25f2079d8..d55cd5cb38f 100755 --- a/src/test/compat_incompat_features/TEST1 +++ b/src/test/compat_incompat_features/TEST1 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2017-2018, Intel Corporation +# Copyright 2017-2023, Intel Corporation # # # compat_incompat_features/TEST1 -- test for compat/incompat feature flags @@ -22,28 +22,26 @@ create_poolset $POOLSET \ 20M:$DIR/part0:x \ 20M:$DIR/part1:x -for type in ${POOL_TYPES[@]}; do - # Create poolset - expect_normal_exit $PMEMPOOL$EXESUFFIX rm -f $POOLSET >> $LOG_TEMP - expect_normal_exit $PMEMPOOL$EXESUFFIX create ${create_args[$type]} \ - >> $LOG_TEMP +# Create poolset +expect_normal_exit $PMEMPOOL$EXESUFFIX rm -f $POOLSET >> $LOG_TEMP +expect_normal_exit $PMEMPOOL$EXESUFFIX create ${create_args[obj]} \ + >> $LOG_TEMP - # Set compat flag in part 0 header - set_compat $DIR/part0 ${UNKNOWN_COMPAT[0]} >> $LOG_TEMP +# Set compat flag in part 0 header +set_compat $DIR/part0 ${UNKNOWN_COMPAT[0]} >> $LOG_TEMP - # Check if pool opens - expect_abnormal_exit ./pool_open$EXESUFFIX $type $POOLSET 2>&1 - cat $LOG >> $LOG_TEMP - cat $ERR >> $ERR_TEMP +# Check if pool opens +expect_abnormal_exit ./pool_open$EXESUFFIX $POOLSET 2>&1 +cat $LOG >> $LOG_TEMP +cat $ERR >> $ERR_TEMP - # Set compat flag in part 1 headers - set_compat $DIR/part1 ${UNKNOWN_COMPAT[1]} >> $LOG_TEMP +# Set compat flag in part 1 headers +set_compat $DIR/part1 ${UNKNOWN_COMPAT[1]} >> $LOG_TEMP - # Check if pool opens - expect_abnormal_exit ./pool_open$EXESUFFIX $type $POOLSET 2>&1 - cat $LOG >> $LOG_TEMP - cat $ERR >> $ERR_TEMP -done +# Check if pool opens +expect_abnormal_exit ./pool_open$EXESUFFIX $POOLSET 2>&1 +cat $LOG >> $LOG_TEMP +cat $ERR >> $ERR_TEMP mv $LOG_TEMP $LOG mv $ERR_TEMP $ERR diff --git a/src/test/compat_incompat_features/TEST2 b/src/test/compat_incompat_features/TEST2 index 6877d453321..08c106826ea 100755 --- a/src/test/compat_incompat_features/TEST2 +++ b/src/test/compat_incompat_features/TEST2 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2017-2018, Intel Corporation +# Copyright 2017-2023, Intel Corporation # # # compat_incompat_features/TEST2 -- test for compat/incompat feature flags @@ -23,31 +23,29 @@ create_poolset $POOLSET \ 20M:$DIR/part0:x \ 20M:$DIR/part1:x -for type in ${POOL_TYPES[@]}; do - # Create poolset - expect_normal_exit $PMEMPOOL$EXESUFFIX rm -f $POOLSET >> $LOG_TEMP - expect_normal_exit $PMEMPOOL$EXESUFFIX create ${create_args[$type]} \ - >> $LOG_TEMP +# Create poolset +expect_normal_exit $PMEMPOOL$EXESUFFIX rm -f $POOLSET >> $LOG_TEMP +expect_normal_exit $PMEMPOOL$EXESUFFIX create ${create_args[obj]} \ + >> $LOG_TEMP - # Set POOL_FEAT_SINGLEHDR incompat flag in headers - set_incompat $DIR/part0 $POOL_FEAT_SINGLEHDR >> $LOG_TEMP - set_incompat $DIR/part1 $POOL_FEAT_SINGLEHDR >> $LOG_TEMP +# Set POOL_FEAT_SINGLEHDR incompat flag in headers +set_incompat $DIR/part0 $POOL_FEAT_SINGLEHDR >> $LOG_TEMP +set_incompat $DIR/part1 $POOL_FEAT_SINGLEHDR >> $LOG_TEMP + +# Check if pool fails to open +expect_abnormal_exit ./pool_open$EXESUFFIX $POOLSET 2>&1 +cat $LOG >> $LOG_TEMP +cat $ERR >> $ERR_TEMP + +for flag in ${UNKNOWN_INCOMPAT[@]}; do + # Set compat/incompat flags in headers + set_incompat $DIR/part0 $flag >> $LOG_TEMP + set_incompat $DIR/part1 $flag >> $LOG_TEMP # Check if pool fails to open - expect_abnormal_exit ./pool_open$EXESUFFIX $type $POOLSET 2>&1 + expect_abnormal_exit ./pool_open$EXESUFFIX $POOLSET 2>&1 cat $LOG >> $LOG_TEMP cat $ERR >> $ERR_TEMP - - for flag in ${UNKNOWN_INCOMPAT[@]}; do - # Set compat/incompat flags in headers - set_incompat $DIR/part0 $flag >> $LOG_TEMP - set_incompat $DIR/part1 $flag >> $LOG_TEMP - - # Check if pool fails to open - expect_abnormal_exit ./pool_open$EXESUFFIX $type $POOLSET 2>&1 - cat $LOG >> $LOG_TEMP - cat $ERR >> $ERR_TEMP - done done mv $LOG_TEMP $LOG diff --git a/src/test/compat_incompat_features/TEST3 b/src/test/compat_incompat_features/TEST3 index c3572d40fc5..09d4f67b058 100755 --- a/src/test/compat_incompat_features/TEST3 +++ b/src/test/compat_incompat_features/TEST3 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2017-2018, Intel Corporation +# Copyright 2017-2023, Intel Corporation # # # compat_incompat_features/TEST3 -- test for compat/incompat feature flags @@ -22,45 +22,43 @@ create_poolset $POOLSET \ 20M:$DIR/part0:x \ 20M:$DIR/part1:x -for type in ${POOL_TYPES[@]}; do - # Create poolset - expect_normal_exit $PMEMPOOL$EXESUFFIX rm -f $POOLSET >> $LOG_TEMP - expect_normal_exit $PMEMPOOL$EXESUFFIX create ${create_args[$type]} \ - >> $LOG_TEMP - - # Set compat/incompat flags in headers - set_incompat $DIR/part0 $POOL_FEAT_SINGLEHDR >> $LOG_TEMP - - # Check if pool fails to open - expect_abnormal_exit ./pool_open$EXESUFFIX $type $POOLSET 2>&1 - cat $LOG >> $LOG_TEMP - cat $ERR >> $ERR_TEMP - - # Set compat/incompat flags in headers - set_incompat $DIR/part0 0 >> $LOG_TEMP - set_incompat $DIR/part1 $POOL_FEAT_SINGLEHDR >> $LOG_TEMP - - # Check if pool fails to open - expect_abnormal_exit ./pool_open$EXESUFFIX $type $POOLSET 2>&1 - cat $LOG >> $LOG_TEMP - cat $ERR >> $ERR_TEMP - - # Set compat/incompat flags in headers - set_incompat $DIR/part0 ${UNKNOWN_INCOMPAT[0]} >> $LOG_TEMP - - # Check if pool fails to open - expect_abnormal_exit ./pool_open$EXESUFFIX $type $POOLSET 2>&1 - cat $LOG >> $LOG_TEMP - cat $ERR >> $ERR_TEMP - - # Set compat/incompat flags in headers - set_incompat $DIR/part1 ${UNKNOWN_INCOMPAT[1]} >> $LOG_TEMP - - # Check if pool fails to open - expect_abnormal_exit ./pool_open$EXESUFFIX $type $POOLSET 2>&1 - cat $LOG >> $LOG_TEMP - cat $ERR >> $ERR_TEMP -done +# Create poolset +expect_normal_exit $PMEMPOOL$EXESUFFIX rm -f $POOLSET >> $LOG_TEMP +expect_normal_exit $PMEMPOOL$EXESUFFIX create ${create_args[obj]} \ + >> $LOG_TEMP + +# Set compat/incompat flags in headers +set_incompat $DIR/part0 $POOL_FEAT_SINGLEHDR >> $LOG_TEMP + +# Check if pool fails to open +expect_abnormal_exit ./pool_open$EXESUFFIX $POOLSET 2>&1 +cat $LOG >> $LOG_TEMP +cat $ERR >> $ERR_TEMP + +# Set compat/incompat flags in headers +set_incompat $DIR/part0 0 >> $LOG_TEMP +set_incompat $DIR/part1 $POOL_FEAT_SINGLEHDR >> $LOG_TEMP + +# Check if pool fails to open +expect_abnormal_exit ./pool_open$EXESUFFIX $POOLSET 2>&1 +cat $LOG >> $LOG_TEMP +cat $ERR >> $ERR_TEMP + +# Set compat/incompat flags in headers +set_incompat $DIR/part0 ${UNKNOWN_INCOMPAT[0]} >> $LOG_TEMP + +# Check if pool fails to open +expect_abnormal_exit ./pool_open$EXESUFFIX $POOLSET 2>&1 +cat $LOG >> $LOG_TEMP +cat $ERR >> $ERR_TEMP + +# Set compat/incompat flags in headers +set_incompat $DIR/part1 ${UNKNOWN_INCOMPAT[1]} >> $LOG_TEMP + +# Check if pool fails to open +expect_abnormal_exit ./pool_open$EXESUFFIX $POOLSET 2>&1 +cat $LOG >> $LOG_TEMP +cat $ERR >> $ERR_TEMP mv $LOG_TEMP $LOG mv $ERR_TEMP $ERR diff --git a/src/test/compat_incompat_features/TEST4 b/src/test/compat_incompat_features/TEST4 index 86b854895ef..9b35827be99 100755 --- a/src/test/compat_incompat_features/TEST4 +++ b/src/test/compat_incompat_features/TEST4 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2017-2018, Intel Corporation +# Copyright 2017-2023, Intel Corporation # # # compat_incompat_features/TEST4 -- test for compat/incompat feature flags @@ -23,29 +23,27 @@ create_poolset $POOLSET \ 20M:$DIR/part0:x \ 20M:$DIR/part1:x -for type in ${POOL_TYPES[@]}; do - # Create poolset - expect_normal_exit $PMEMPOOL$EXESUFFIX rm -f $POOLSET >> $LOG_TEMP - expect_normal_exit $PMEMPOOL$EXESUFFIX create ${create_args[$type]} \ - >> $LOG_TEMP +# Create poolset +expect_normal_exit $PMEMPOOL$EXESUFFIX rm -f $POOLSET >> $LOG_TEMP +expect_normal_exit $PMEMPOOL$EXESUFFIX create ${create_args[obj]} \ + >> $LOG_TEMP - # Clear POOL_FEAT_SINGLEHDR incompat flag in header - set_incompat $DIR/part0 0 >> $LOG_TEMP +# Clear POOL_FEAT_SINGLEHDR incompat flag in header +set_incompat $DIR/part0 0 >> $LOG_TEMP + +# Check if pool fails to open +expect_abnormal_exit ./pool_open$EXESUFFIX $POOLSET 2>&1 +cat $LOG >> $LOG_TEMP +cat $ERR >> $ERR_TEMP + +for flag in ${UNKNOWN_INCOMPAT[@]}; do + # Set compat/incompat flags in headers + set_incompat $DIR/part0 $flag >> $LOG_TEMP # Check if pool fails to open - expect_abnormal_exit ./pool_open$EXESUFFIX $type $POOLSET 2>&1 + expect_abnormal_exit ./pool_open$EXESUFFIX $POOLSET 2>&1 cat $LOG >> $LOG_TEMP cat $ERR >> $ERR_TEMP - - for flag in ${UNKNOWN_INCOMPAT[@]}; do - # Set compat/incompat flags in headers - set_incompat $DIR/part0 $flag >> $LOG_TEMP - - # Check if pool fails to open - expect_abnormal_exit ./pool_open$EXESUFFIX $type $POOLSET 2>&1 - cat $LOG >> $LOG_TEMP - cat $ERR >> $ERR_TEMP - done done mv $LOG_TEMP $LOG diff --git a/src/test/compat_incompat_features/common.sh b/src/test/compat_incompat_features/common.sh index 5bd35db2bce..11baff11f6e 100644 --- a/src/test/compat_incompat_features/common.sh +++ b/src/test/compat_incompat_features/common.sh @@ -18,12 +18,11 @@ rm -f $ERR_TEMP && touch $ERR_TEMP LAYOUT=OBJ_LAYOUT$SUFFIX POOLSET=$DIR/pool.set -POOL_TYPES=(obj blk) +POOL_TYPES=(obj) # pmempool create arguments: declare -A create_args create_args[obj]="obj $POOLSET" -create_args[blk]="blk 512 $POOLSET" # Known compat flags: diff --git a/src/test/compat_incompat_features/err1.log.match b/src/test/compat_incompat_features/err1.log.match index 4565bdc6688..5be4d66ef71 100644 --- a/src/test/compat_incompat_features/err1.log.match +++ b/src/test/compat_incompat_features/err1.log.match @@ -1,4 +1,2 @@ {$(nW) main} compat_incompat_features/TEST1: Error: $(nW)pool.set: pmemobj_open failed: Invalid argument {$(nW) main} compat_incompat_features/TEST1: Error: $(nW)pool.set: pmemobj_open failed: Invalid argument -{$(nW) main} compat_incompat_features/TEST1: Error: $(nW)pool.set: pmemblk_open failed: Invalid argument -{$(nW) main} compat_incompat_features/TEST1: Error: $(nW)pool.set: pmemblk_open failed: Invalid argument diff --git a/src/test/compat_incompat_features/err2.log.match b/src/test/compat_incompat_features/err2.log.match index 80921e6f033..025380d71f6 100644 --- a/src/test/compat_incompat_features/err2.log.match +++ b/src/test/compat_incompat_features/err2.log.match @@ -2,7 +2,3 @@ {$(nW) main} compat_incompat_features/TEST2: Error: $(nW)pool.set: pmemobj_open failed: Invalid argument {$(nW) main} compat_incompat_features/TEST2: Error: $(nW)pool.set: pmemobj_open failed: Invalid argument {$(nW) main} compat_incompat_features/TEST2: Error: $(nW)pool.set: pmemobj_open failed: Invalid argument -{$(nW) main} compat_incompat_features/TEST2: Error: $(nW)pool.set: pmemblk_open failed: Invalid argument -{$(nW) main} compat_incompat_features/TEST2: Error: $(nW)pool.set: pmemblk_open failed: Invalid argument -{$(nW) main} compat_incompat_features/TEST2: Error: $(nW)pool.set: pmemblk_open failed: Invalid argument -{$(nW) main} compat_incompat_features/TEST2: Error: $(nW)pool.set: pmemblk_open failed: Invalid argument diff --git a/src/test/compat_incompat_features/err3.log.match b/src/test/compat_incompat_features/err3.log.match index 1249e833962..1440f3e3f93 100644 --- a/src/test/compat_incompat_features/err3.log.match +++ b/src/test/compat_incompat_features/err3.log.match @@ -2,7 +2,3 @@ {$(nW) main} compat_incompat_features/TEST3: Error: $(nW)pool.set: pmemobj_open failed: Invalid argument {$(nW) main} compat_incompat_features/TEST3: Error: $(nW)pool.set: pmemobj_open failed: Invalid argument {$(nW) main} compat_incompat_features/TEST3: Error: $(nW)pool.set: pmemobj_open failed: Invalid argument -{$(nW) main} compat_incompat_features/TEST3: Error: $(nW)pool.set: pmemblk_open failed: Invalid argument -{$(nW) main} compat_incompat_features/TEST3: Error: $(nW)pool.set: pmemblk_open failed: Invalid argument -{$(nW) main} compat_incompat_features/TEST3: Error: $(nW)pool.set: pmemblk_open failed: Invalid argument -{$(nW) main} compat_incompat_features/TEST3: Error: $(nW)pool.set: pmemblk_open failed: Invalid argument diff --git a/src/test/compat_incompat_features/err4.log.match b/src/test/compat_incompat_features/err4.log.match index 2f81a8c1f06..bebb3b9148c 100644 --- a/src/test/compat_incompat_features/err4.log.match +++ b/src/test/compat_incompat_features/err4.log.match @@ -2,7 +2,3 @@ {$(nW) main} compat_incompat_features/TEST4: Error: $(nW)pool.set: pmemobj_open failed: Invalid argument {$(nW) main} compat_incompat_features/TEST4: Error: $(nW)pool.set: pmemobj_open failed: Invalid argument {$(nW) main} compat_incompat_features/TEST4: Error: $(nW)pool.set: pmemobj_open failed: Invalid argument -{$(nW) main} compat_incompat_features/TEST4: Error: $(nW)pool.set: pmemblk_open failed: Invalid argument -{$(nW) main} compat_incompat_features/TEST4: Error: $(nW)pool.set: pmemblk_open failed: Invalid argument -{$(nW) main} compat_incompat_features/TEST4: Error: $(nW)pool.set: pmemblk_open failed: Invalid argument -{$(nW) main} compat_incompat_features/TEST4: Error: $(nW)pool.set: pmemblk_open failed: Invalid argument diff --git a/src/test/compat_incompat_features/out0.log.match b/src/test/compat_incompat_features/out0.log.match index bc94207fda2..8c6c23418c0 100644 --- a/src/test/compat_incompat_features/out0.log.match +++ b/src/test/compat_incompat_features/out0.log.match @@ -1,32 +1,16 @@ compat_incompat_features/TEST0: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW) + $(nW)pool_open$(nW) $(nW) $(nW)pool.set: pmemobj_open succeeded compat_incompat_features/TEST0: DONE compat_incompat_features/TEST0: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW) + $(nW)pool_open$(nW) $(nW) $(nW)pool.set: pmemobj_open succeeded compat_incompat_features/TEST0: DONE compat_incompat_features/TEST0: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW) + $(nW)pool_open$(nW) $(nW) $(nW)pool.set: pmemobj_open succeeded compat_incompat_features/TEST0: DONE compat_incompat_features/TEST0: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW) + $(nW)pool_open$(nW) $(nW) $(nW)pool.set: pmemobj_open succeeded compat_incompat_features/TEST0: DONE -compat_incompat_features/TEST0: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW) -$(nW)pool.set: pmemblk_open succeeded -compat_incompat_features/TEST0: DONE -compat_incompat_features/TEST0: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW) -$(nW)pool.set: pmemblk_open succeeded -compat_incompat_features/TEST0: DONE -compat_incompat_features/TEST0: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW) -$(nW)pool.set: pmemblk_open succeeded -compat_incompat_features/TEST0: DONE -compat_incompat_features/TEST0: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW) -$(nW)pool.set: pmemblk_open succeeded -compat_incompat_features/TEST0: DONE diff --git a/src/test/compat_incompat_features/out1.log.match b/src/test/compat_incompat_features/out1.log.match index 79784b58e29..a87b0d08dce 100644 --- a/src/test/compat_incompat_features/out1.log.match +++ b/src/test/compat_incompat_features/out1.log.match @@ -1,8 +1,4 @@ compat_incompat_features/TEST1: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW)pool.set + $(nW)pool_open$(nW) $(nW)pool.set compat_incompat_features/TEST1: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW)pool.set -compat_incompat_features/TEST1: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW)pool.set -compat_incompat_features/TEST1: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW)pool.set + $(nW)pool_open$(nW) $(nW)pool.set diff --git a/src/test/compat_incompat_features/out2.log.match b/src/test/compat_incompat_features/out2.log.match index e7877a67db2..29b5e909bfc 100644 --- a/src/test/compat_incompat_features/out2.log.match +++ b/src/test/compat_incompat_features/out2.log.match @@ -1,16 +1,8 @@ compat_incompat_features/TEST2: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW)pool.set + $(nW)pool_open$(nW) $(nW)pool.set compat_incompat_features/TEST2: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW)pool.set + $(nW)pool_open$(nW) $(nW)pool.set compat_incompat_features/TEST2: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW)pool.set + $(nW)pool_open$(nW) $(nW)pool.set compat_incompat_features/TEST2: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW)pool.set -compat_incompat_features/TEST2: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW)pool.set -compat_incompat_features/TEST2: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW)pool.set -compat_incompat_features/TEST2: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW)pool.set -compat_incompat_features/TEST2: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW)pool.set + $(nW)pool_open$(nW) $(nW)pool.set diff --git a/src/test/compat_incompat_features/out3.log.match b/src/test/compat_incompat_features/out3.log.match index 24b15301b14..6d6bd6b5f71 100644 --- a/src/test/compat_incompat_features/out3.log.match +++ b/src/test/compat_incompat_features/out3.log.match @@ -1,16 +1,8 @@ compat_incompat_features/TEST3: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW)pool.set + $(nW)pool_open$(nW) $(nW)pool.set compat_incompat_features/TEST3: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW)pool.set + $(nW)pool_open$(nW) $(nW)pool.set compat_incompat_features/TEST3: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW)pool.set + $(nW)pool_open$(nW) $(nW)pool.set compat_incompat_features/TEST3: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW)pool.set -compat_incompat_features/TEST3: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW)pool.set -compat_incompat_features/TEST3: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW)pool.set -compat_incompat_features/TEST3: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW)pool.set -compat_incompat_features/TEST3: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW)pool.set + $(nW)pool_open$(nW) $(nW)pool.set diff --git a/src/test/compat_incompat_features/out4.log.match b/src/test/compat_incompat_features/out4.log.match index 7e43d4905fb..83e26c69281 100644 --- a/src/test/compat_incompat_features/out4.log.match +++ b/src/test/compat_incompat_features/out4.log.match @@ -1,16 +1,8 @@ compat_incompat_features/TEST4: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW)pool.set + $(nW)pool_open$(nW) $(nW)pool.set compat_incompat_features/TEST4: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW)pool.set + $(nW)pool_open$(nW) $(nW)pool.set compat_incompat_features/TEST4: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW)pool.set + $(nW)pool_open$(nW) $(nW)pool.set compat_incompat_features/TEST4: START: compat_incompat_features - $(nW)pool_open$(nW) obj $(nW)pool.set -compat_incompat_features/TEST4: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW)pool.set -compat_incompat_features/TEST4: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW)pool.set -compat_incompat_features/TEST4: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW)pool.set -compat_incompat_features/TEST4: START: compat_incompat_features - $(nW)pool_open$(nW) blk $(nW)pool.set + $(nW)pool_open$(nW) $(nW)pool.set diff --git a/src/test/compat_incompat_features/pool_open.c b/src/test/compat_incompat_features/pool_open.c index 41d80fb7e59..70ed9a3e967 100644 --- a/src/test/compat_incompat_features/pool_open.c +++ b/src/test/compat_incompat_features/pool_open.c @@ -12,30 +12,17 @@ int main(int argc, char *argv[]) { START(argc, argv, "compat_incompat_features"); - if (argc < 3) - UT_FATAL("usage: %s ", argv[0]); + if (argc < 2) + UT_FATAL("usage: %s ", argv[0]); - char *type = argv[1]; - char *path = argv[2]; + char *path = argv[1]; - if (strcmp(type, "obj") == 0) { - PMEMobjpool *pop = pmemobj_open(path, ""); - if (pop == NULL) { - UT_FATAL("!%s: pmemobj_open failed", path); - } else { - UT_OUT("%s: pmemobj_open succeeded", path); - pmemobj_close(pop); - } - } else if (strcmp(type, "blk") == 0) { - PMEMblkpool *pop = pmemblk_open(path, 0); - if (pop == NULL) { - UT_FATAL("!%s: pmemblk_open failed", path); - } else { - UT_OUT("%s: pmemblk_open succeeded", path); - pmemblk_close(pop); - } + PMEMobjpool *pop = pmemobj_open(path, ""); + if (pop == NULL) { + UT_FATAL("!%s: pmemobj_open failed", path); } else { - UT_FATAL("usage: %s ", argv[0]); + UT_OUT("%s: pmemobj_open succeeded", path); + pmemobj_close(pop); } DONE(NULL); diff --git a/src/test/ctl_cow/Makefile b/src/test/ctl_cow/Makefile index 11c63aa1397..becf3089181 100644 --- a/src/test/ctl_cow/Makefile +++ b/src/test/ctl_cow/Makefile @@ -7,7 +7,6 @@ TARGET = ctl_cow OBJS = ctl_cow.o -LIBPMEMBLK=y LIBPMEMOBJ=y include ../Makefile.inc diff --git a/src/test/ctl_cow/ctl_cow.c b/src/test/ctl_cow/ctl_cow.c index c335e8f44a5..412d8f5ea52 100644 --- a/src/test/ctl_cow/ctl_cow.c +++ b/src/test/ctl_cow/ctl_cow.c @@ -64,29 +64,6 @@ test_obj(const char *path) pmemobj_close(pop); } -static void -test_blk(const char *path) -{ - PMEMblkpool *pbp = pmemblk_open(path, 512); - - if (pbp == NULL) - UT_FATAL("!cannot open %s", path); - - char x[512] = "Test blk x"; - char y[512] = "Test blk y"; - - if (pmemblk_write(pbp, &x, 1) < 0) - UT_FATAL("cannot write to %s", path); - - if (pmemblk_write(pbp, &y, 2) < 0) - UT_FATAL("cannot write to %s", path); - - if (pmemblk_set_zero(pbp, 2) < 0) - UT_FATAL("cannot write to %s", path); - - pmemblk_close(pbp); -} - static void test_dax(const char *path) { @@ -104,7 +81,7 @@ main(int argc, char *argv[]) START(argc, argv, "ctl_cow"); if (argc < 3) - UT_FATAL("usage: %s filename obj|blk|dax", argv[0]); + UT_FATAL("usage: %s filename obj|dax", argv[0]); const char *path = argv[1]; const char *action = argv[2]; @@ -112,9 +89,6 @@ main(int argc, char *argv[]) if (strcmp(action, "obj") == 0) { test_obj(path); - } else if (strcmp(action, "blk") == 0) { - test_blk(path); - } else if (strcmp(action, "dax") == 0) { test_dax(path); diff --git a/src/test/ctl_prefault/Makefile b/src/test/ctl_prefault/Makefile index 600ca1aff2d..17fadc2ff64 100644 --- a/src/test/ctl_prefault/Makefile +++ b/src/test/ctl_prefault/Makefile @@ -7,7 +7,6 @@ TARGET = ctl_prefault OBJS = ctl_prefault.o -LIBPMEMBLK=y LIBPMEMOBJ=y include ../Makefile.inc diff --git a/src/test/ctl_prefault/TEST0 b/src/test/ctl_prefault/TEST0 index b57e3e2f880..2c3828c251e 100755 --- a/src/test/ctl_prefault/TEST0 +++ b/src/test/ctl_prefault/TEST0 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2018-2019, Intel Corporation +# Copyright 2018-2023, Intel Corporation . ../unittest/unittest.sh @@ -13,21 +13,21 @@ setup require_native_fallocate $DIR/testfile1 # create, don't prefault -expect_normal_exit ./ctl_prefault$EXESUFFIX obj $DIR/testfile1 0 0 +expect_normal_exit ./ctl_prefault$EXESUFFIX $DIR/testfile1 0 0 pagefault_create_baseline=`cat out$UNITTEST_NUM.log | sed -n '3p'` # open, don't prefault -expect_normal_exit ./ctl_prefault$EXESUFFIX obj $DIR/testfile1 0 1 +expect_normal_exit ./ctl_prefault$EXESUFFIX $DIR/testfile1 0 1 pagefault_open_baseline=`cat out$UNITTEST_NUM.log | sed -n '3p'` rm -f $DIR/testfile1 # create, prefault -expect_normal_exit ./ctl_prefault$EXESUFFIX obj $DIR/testfile1 2 0 +expect_normal_exit ./ctl_prefault$EXESUFFIX $DIR/testfile1 2 0 pagefault_create_prefault=`cat out$UNITTEST_NUM.log | sed -n '3p'` # open, prefault -expect_normal_exit ./ctl_prefault$EXESUFFIX obj $DIR/testfile1 1 1 +expect_normal_exit ./ctl_prefault$EXESUFFIX $DIR/testfile1 1 1 pagefault_open_prefault=`cat out$UNITTEST_NUM.log | sed -n '3p'` rm -f $DIR/testfile1 diff --git a/src/test/ctl_prefault/ctl_prefault.c b/src/test/ctl_prefault/ctl_prefault.c index 5116cd58af1..28705a68576 100644 --- a/src/test/ctl_prefault/ctl_prefault.c +++ b/src/test/ctl_prefault/ctl_prefault.c @@ -10,10 +10,6 @@ #include #include "unittest.h" -#define OBJ_STR "obj" -#define BLK_STR "blk" - -#define BSIZE 20 #define LAYOUT "obj_ctl_prefault" typedef unsigned char vec_t; @@ -106,28 +102,6 @@ test_obj(const char *path, int open) UT_OUT("%ld", resident_pages); } -/* - * test_blk -- open/create PMEMblkpool - */ -static void -test_blk(const char *path, int open) -{ - PMEMblkpool *pbp; - if (open) { - if ((pbp = pmemblk_open(path, BSIZE)) == NULL) - UT_FATAL("!pmemblk_open: %s", path); - } else { - if ((pbp = pmemblk_create(path, BSIZE, PMEMBLK_MIN_POOL, - S_IWUSR | S_IRUSR)) == NULL) - UT_FATAL("!pmemblk_create: %s", path); - } - - size_t resident_pages = count_resident_pages(pbp, PMEMBLK_MIN_POOL); - - pmemblk_close(pbp); - - UT_OUT("%ld", resident_pages); -} #define USAGE() do {\ UT_FATAL("usage: %s file-name type(obj/blk) prefault(0/1/2) "\ @@ -139,24 +113,15 @@ main(int argc, char *argv[]) { START(argc, argv, "ctl_prefault"); - if (argc != 5) + if (argc != 4) USAGE(); - char *type = argv[1]; - const char *path = argv[2]; - int prefault = atoi(argv[3]); - int open = atoi(argv[4]); - - if (strcmp(type, OBJ_STR) == 0) { - prefault_fun(prefault, (fun)pmemobj_ctl_get, - (fun)pmemobj_ctl_set); - test_obj(path, open); - } else if (strcmp(type, BLK_STR) == 0) { - prefault_fun(prefault, (fun)pmemblk_ctl_get, - (fun)pmemblk_ctl_set); - test_blk(path, open); - } else - USAGE(); + const char *path = argv[1]; + int prefault = atoi(argv[2]); + int open = atoi(argv[3]); + + prefault_fun(prefault, (fun)pmemobj_ctl_get, (fun)pmemobj_ctl_set); + test_obj(path, open); DONE(NULL); } diff --git a/src/test/out_err_mt/Makefile b/src/test/out_err_mt/Makefile index 516da77e873..389a487af7b 100644 --- a/src/test/out_err_mt/Makefile +++ b/src/test/out_err_mt/Makefile @@ -9,7 +9,6 @@ OBJS = out_err_mt.o LIBPMEMCOMMON=y LIBPMEM=y -LIBPMEMBLK=y LIBPMEMOBJ=y LIBPMEMPOOL=y diff --git a/src/test/out_err_mt/TEST0 b/src/test/out_err_mt/TEST0 index 0cb7a7b437f..a4f3e680e94 100755 --- a/src/test/out_err_mt/TEST0 +++ b/src/test/out_err_mt/TEST0 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2015-2020, Intel Corporation +# Copyright 2015-2023, Intel Corporation # # @@ -15,8 +15,7 @@ disable_eatmydata setup -expect_normal_exit ./out_err_mt$EXESUFFIX \ - $DIR/testfile1 $DIR/testfile2 $DIR/testfile3 $DIR/testfile4 $DIR +expect_normal_exit ./out_err_mt$EXESUFFIX $DIR/testfile1 check diff --git a/src/test/out_err_mt/TEST1 b/src/test/out_err_mt/TEST1 index 589971766b7..f1f557f211b 100755 --- a/src/test/out_err_mt/TEST1 +++ b/src/test/out_err_mt/TEST1 @@ -19,17 +19,14 @@ configure_valgrind drd force-enable setup unset PMEM_LOG_LEVEL -unset PMEMBLK_LOG_LEVEL unset PMEMOBJ_LOG_LEVEL unset PMEMPOOL_LOG_LEVEL unset PMEM_LOG_FILE -unset PMEMBLK_LOG_FILE unset PMEMOBJ_LOG_FILE unset PMEMPOOL_LOG_FILE -expect_normal_exit ./out_err_mt$EXESUFFIX $DIR/testfile1\ - $DIR/testfile2 $DIR/testfile3 $DIR/testfile4 $DIR +expect_normal_exit ./out_err_mt$EXESUFFIX $DIR/testfile1 check diff --git a/src/test/out_err_mt/TEST2 b/src/test/out_err_mt/TEST2 index edd1c5bf8fe..83bac1d3e38 100755 --- a/src/test/out_err_mt/TEST2 +++ b/src/test/out_err_mt/TEST2 @@ -19,15 +19,12 @@ configure_valgrind helgrind force-enable setup unset PMEM_LOG_LEVEL -unset PMEMBLK_LOG_LEVEL unset PMEMOBJ_LOG_LEVEL unset PMEM_LOG_FILE -unset PMEMBLK_LOG_FILE unset PMEMOBJ_LOG_FILE -expect_normal_exit ./out_err_mt$EXESUFFIX $DIR/testfile1 $DIR/testfile2\ - $DIR/testfile3 $DIR/testfile4 $DIR +expect_normal_exit ./out_err_mt$EXESUFFIX $DIR/testfile1 check diff --git a/src/test/out_err_mt/out0.log.match b/src/test/out_err_mt/out0.log.match index e883c4ecc87..48a982f8dc5 100644 --- a/src/test/out_err_mt/out0.log.match +++ b/src/test/out_err_mt/out0.log.match @@ -1,33 +1,23 @@ out_err_mt$(nW)TEST0: START: out_err_mt$(nW) - $(nW)out_err_mt$(nW) $(nW)testfile1 $(nW)testfile2 $(nW)testfile3 $(nW)testfile4 $(nW) + $(nW)out_err_mt$(nW) $(nW)testfile1 start PMEM: PMEMOBJ: -PMEMBLK: PMEMPOOL: version check PMEM: libpmem major version mismatch (need 10000, found $(N)) PMEMOBJ: libpmemobj major version mismatch (need 10001, found $(N)) -PMEMBLK: libpmemblk major version mismatch (need 10003, found $(N)) PMEMPOOL: libpmempool major version mismatch (need 10006, found $(N)) pmem_msync PMEM: msync: $(S) PMEMOBJ: libpmemobj major version mismatch (need 10001, found $(N)) -PMEMBLK: libpmemblk major version mismatch (need 10003, found $(N)) PMEMPOOL: libpmempool major version mismatch (need 10006, found $(N)) pmemobj_alloc PMEM: msync: $(S) PMEMOBJ: allocation with size 0 -PMEMBLK: libpmemblk major version mismatch (need 10003, found $(N)) -PMEMPOOL: libpmempool major version mismatch (need 10006, found $(N)) -pmemblk_set_error -PMEM: msync: $(S) -PMEMOBJ: allocation with size 0 -PMEMBLK: lba out of range (nlba $(N)) PMEMPOOL: libpmempool major version mismatch (need 10006, found $(N)) pmempool_check_init PMEM: msync: $(S) PMEMOBJ: allocation with size 0 -PMEMBLK: lba out of range (nlba $(N)) PMEMPOOL: provided args_size is not supported out_err_mt$(nW)TEST0: DONE diff --git a/src/test/out_err_mt/out1.log.match b/src/test/out_err_mt/out1.log.match index cef9ba31f6d..3c4276c93c3 100644 --- a/src/test/out_err_mt/out1.log.match +++ b/src/test/out_err_mt/out1.log.match @@ -1,33 +1,23 @@ out_err_mt$(nW)TEST1: START: out_err_mt$(nW) - $(nW)out_err_mt$(nW) $(nW)testfile1 $(nW)testfile2 $(nW)testfile3 $(nW)testfile4 $(nW) + $(nW)out_err_mt$(nW) $(nW)testfile1 start PMEM: PMEMOBJ: -PMEMBLK: PMEMPOOL: version check PMEM: libpmem major version mismatch (need 10000, found $(N)) PMEMOBJ: libpmemobj major version mismatch (need 10001, found $(N)) -PMEMBLK: libpmemblk major version mismatch (need 10003, found $(N)) PMEMPOOL: libpmempool major version mismatch (need 10006, found $(N)) pmem_msync PMEM: msync: $(S) PMEMOBJ: libpmemobj major version mismatch (need 10001, found $(N)) -PMEMBLK: libpmemblk major version mismatch (need 10003, found $(N)) PMEMPOOL: libpmempool major version mismatch (need 10006, found $(N)) pmemobj_alloc PMEM: msync: $(S) PMEMOBJ: allocation with size 0 -PMEMBLK: libpmemblk major version mismatch (need 10003, found $(N)) -PMEMPOOL: libpmempool major version mismatch (need 10006, found $(N)) -pmemblk_set_error -PMEM: msync: $(S) -PMEMOBJ: allocation with size 0 -PMEMBLK: lba out of range (nlba $(N)) PMEMPOOL: libpmempool major version mismatch (need 10006, found $(N)) pmempool_check_init PMEM: msync: $(S) PMEMOBJ: allocation with size 0 -PMEMBLK: lba out of range (nlba $(N)) PMEMPOOL: provided args_size is not supported out_err_mt$(nW)TEST1: DONE diff --git a/src/test/out_err_mt/out2.log.match b/src/test/out_err_mt/out2.log.match index a271565b06c..eeadb0149bd 100644 --- a/src/test/out_err_mt/out2.log.match +++ b/src/test/out_err_mt/out2.log.match @@ -1,33 +1,23 @@ out_err_mt$(nW)TEST2: START: out_err_mt$(nW) - $(nW)out_err_mt$(nW) $(nW)testfile1 $(nW)testfile2 $(nW)testfile3 $(nW)testfile4 $(nW) + $(nW)out_err_mt$(nW) $(nW)testfile1 start PMEM: PMEMOBJ: -PMEMBLK: PMEMPOOL: version check PMEM: libpmem major version mismatch (need 10000, found $(N)) PMEMOBJ: libpmemobj major version mismatch (need 10001, found $(N)) -PMEMBLK: libpmemblk major version mismatch (need 10003, found $(N)) PMEMPOOL: libpmempool major version mismatch (need 10006, found $(N)) pmem_msync PMEM: msync: $(S) PMEMOBJ: libpmemobj major version mismatch (need 10001, found $(N)) -PMEMBLK: libpmemblk major version mismatch (need 10003, found $(N)) PMEMPOOL: libpmempool major version mismatch (need 10006, found $(N)) pmemobj_alloc PMEM: msync: $(S) PMEMOBJ: allocation with size 0 -PMEMBLK: libpmemblk major version mismatch (need 10003, found $(N)) -PMEMPOOL: libpmempool major version mismatch (need 10006, found $(N)) -pmemblk_set_error -PMEM: msync: $(S) -PMEMOBJ: allocation with size 0 -PMEMBLK: lba out of range (nlba $(N)) PMEMPOOL: libpmempool major version mismatch (need 10006, found $(N)) pmempool_check_init PMEM: msync: $(S) PMEMOBJ: allocation with size 0 -PMEMBLK: lba out of range (nlba $(N)) PMEMPOOL: provided args_size is not supported out_err_mt$(nW)TEST2: DONE diff --git a/src/test/out_err_mt/out_err_mt.c b/src/test/out_err_mt/out_err_mt.c index c917270eea7..254a77bb560 100644 --- a/src/test/out_err_mt/out_err_mt.c +++ b/src/test/out_err_mt/out_err_mt.c @@ -20,7 +20,6 @@ print_errors(const char *msg) UT_OUT("%s", msg); UT_OUT("PMEM: %s", pmem_errormsg()); UT_OUT("PMEMOBJ: %s", pmemobj_errormsg()); - UT_OUT("PMEMBLK: %s", pmemblk_errormsg()); UT_OUT("PMEMPOOL: %s", pmempool_errormsg()); } @@ -45,13 +44,6 @@ check_errors(unsigned ver) UT_ASSERTeq(err_need, ver); UT_ASSERTeq(err_found, PMEMOBJ_MAJOR_VERSION); - ret = sscanf(pmemblk_errormsg(), - "libpmemblk major version mismatch (need %d, found %d)", - &err_need, &err_found); - UT_ASSERTeq(ret, 2); - UT_ASSERTeq(err_need, ver); - UT_ASSERTeq(err_found, PMEMBLK_MAJOR_VERSION); - ret = sscanf(pmempool_errormsg(), "libpmempool major version mismatch (need %d, found %d)", &err_need, &err_found); @@ -67,7 +59,6 @@ do_test(void *arg) pmem_check_version(ver, 0); pmemobj_check_version(ver, 0); - pmemblk_check_version(ver, 0); pmempool_check_version(ver, 0); check_errors(ver); @@ -94,7 +85,7 @@ main(int argc, char *argv[]) { START(argc, argv, "out_err_mt"); - if (argc != 6) + if (argc != 2) UT_FATAL("usage: %s file1 file2 file3 file4 dir", argv[0]); @@ -102,14 +93,11 @@ main(int argc, char *argv[]) PMEMobjpool *pop = pmemobj_create(argv[1], "test", PMEMOBJ_MIN_POOL, 0666); - PMEMblkpool *pbp = pmemblk_create(argv[3], - 128, PMEMBLK_MIN_POOL, 0666); util_init(); pmem_check_version(10000, 0); pmemobj_check_version(10001, 0); - pmemblk_check_version(10003, 0); pmempool_check_version(10006, 0); print_errors("version check"); @@ -129,14 +117,9 @@ main(int argc, char *argv[]) UT_ASSERTeq(ret, -1); print_errors("pmemobj_alloc"); - size_t nblock = pmemblk_nblock(pbp); - pmemblk_set_error(pbp, (long long)nblock + 1); - print_errors("pmemblk_set_error"); - run_mt_test(do_test); pmemobj_close(pop); - pmemblk_close(pbp); PMEMpoolcheck *ppc; struct pmempool_check_args args = {NULL, }; diff --git a/src/test/pmempool_check/TEST20 b/src/test/pmempool_check/TEST20 index 7e3a0aafacd..70d8d5ff18a 100755 --- a/src/test/pmempool_check/TEST20 +++ b/src/test/pmempool_check/TEST20 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2017-2018, Intel Corporation +# Copyright 2017-2023, Intel Corporation # # # pmempool_check/TEST20 -- test for checking pools with device dax under @@ -31,3 +31,5 @@ expect_normal_exit $PMEMPOOL$EXESUFFIX check -vry $POOLSET >> $LOG expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOLSET &> /dev/null pass + +check diff --git a/src/test/pmempool_check/out20.log.match b/src/test/pmempool_check/out20.log.match index f8fd6192a14..792a834a742 100644 --- a/src/test/pmempool_check/out20.log.match +++ b/src/test/pmempool_check/out20.log.match @@ -1,44 +1,5 @@ -PMEMLOG: pmemlog -$(nW)file.pool: spoil: pool_hdr.features.compat=0x01 -$(nW)file.pool: spoil: pool_hdr.f:checksum_gen -checking bad blocks is not supported on this OS, please switch off the CHECK_BAD_BLOCKS compat feature using 'pmempool-feature' -$(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 checking pool header pool header correct -checking pmemlog header -pmemlog header correct -$(nW)file.pool: consistent -PMEMBLK: pmemblk -$(nW)file.pool: spoil: pool_hdr.features.compat=0x01 -$(nW)file.pool: spoil: pool_hdr.f:checksum_gen -checking bad blocks is not supported on this OS, please switch off the CHECK_BAD_BLOCKS compat feature using 'pmempool-feature' -$(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 -checking pool header -pool header correct -checking pmemblk header -pmemblk header correct -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -$(nW)file.pool: consistent -PMEMLOG: pmemobj -$(nW)file.pool: spoil: pool_hdr.features.compat=0x01 -$(nW)file.pool: spoil: pool_hdr.f:checksum_gen -checking bad blocks is not supported on this OS, please switch off the CHECK_BAD_BLOCKS compat feature using 'pmempool-feature' -$(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 -checking pool header -pool header correct -$(nW)file.pool: consistent +$(nW): consistent diff --git a/src/test/pmempool_create/TEST0 b/src/test/pmempool_create/TEST0 index 0b0fa6b85a2..0f589e9e0f2 100755 --- a/src/test/pmempool_create/TEST0 +++ b/src/test/pmempool_create/TEST0 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation +# Copyright 2014-2023, Intel Corporation # # # pmempool_create/TEST0 -- test for pmempool create command with default pool size @@ -16,11 +16,6 @@ setup POOL=$DIR/file.pool -# PMEMBLK -expect_normal_exit $PMEMPOOL$EXESUFFIX create blk 512 $POOL -check_file $POOL -check_signature PMEMBLK $POOL - # PMEMLOG rm -f $POOL expect_normal_exit $PMEMPOOL$EXESUFFIX create log $POOL diff --git a/src/test/pmempool_create/TEST2 b/src/test/pmempool_create/TEST2 index 54a3e8afb26..237825525b0 100755 --- a/src/test/pmempool_create/TEST2 +++ b/src/test/pmempool_create/TEST2 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation +# Copyright 2014-2023, Intel Corporation # # # pmempool_create/TEST2 -- test for creating pools of specified size @@ -19,12 +19,6 @@ SIZE=$(((1024 + 512) * 1024 * 1024)) require_free_space $SIZE -# PMEMBLK -expect_normal_exit $PMEMPOOL$EXESUFFIX create -s $SIZE blk 512 $POOL -check_file $POOL -check_signature PMEMBLK $POOL -check_size $SIZE $POOL - # PMEMLOG rm -f $POOL expect_normal_exit $PMEMPOOL$EXESUFFIX create -s $SIZE log $POOL diff --git a/src/test/pmempool_create/TEST3 b/src/test/pmempool_create/TEST3 index d1d7e50b5d4..e9df171551b 100755 --- a/src/test/pmempool_create/TEST3 +++ b/src/test/pmempool_create/TEST3 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation +# Copyright 2014-2023, Intel Corporation # # # pmempool_create/TEST3 -- test for inheriting pools @@ -17,16 +17,6 @@ setup POOL=$DIR/file.pool INHERIT=$DIR/inherit.pool -# PMEMBLK -expect_normal_exit $PMEMPOOL$EXESUFFIX create blk 512 $POOL -check_file $POOL -check_signature PMEMBLK $POOL -SIZE=$(get_size $POOL) -expect_normal_exit $PMEMPOOL$EXESUFFIX create --inherit $POOL $INHERIT -check_file $INHERIT -check_signature PMEMBLK $INHERIT -check_size $SIZE $INHERIT - # PMEMLOG rm -f $POOL rm -f $INHERIT diff --git a/src/test/pmempool_create/TEST4 b/src/test/pmempool_create/TEST4 index b5f94dd8a47..781ef4f9e5f 100755 --- a/src/test/pmempool_create/TEST4 +++ b/src/test/pmempool_create/TEST4 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation +# Copyright 2014-2023, Intel Corporation # # # pmempool_create/TEST0 -- test for creating pool with specified permissions @@ -16,12 +16,6 @@ setup POOL=$DIR/file.pool -# PMEMBLK -expect_normal_exit $PMEMPOOL$EXESUFFIX create -m 0666 blk 512 $POOL -check_file $POOL -check_signature PMEMBLK $POOL -check_mode 666 $POOL - # PMEMLOG rm -f $POOL expect_normal_exit $PMEMPOOL$EXESUFFIX create -m 0555 log $POOL diff --git a/src/test/pmempool_create/TEST5 b/src/test/pmempool_create/TEST5 deleted file mode 100755 index 3d23c6193c1..00000000000 --- a/src/test/pmempool_create/TEST5 +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation -# -# -# pmempool_create/TEST5 -- test for pmempool create for checking bsize argument -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type pmem non-pmem - -setup - -POOL=$DIR/file.pool -POOL2=$DIR/file.pool2 - -# PMEMBLK -expect_abnormal_exit $PMEMPOOL$EXESUFFIX create blk $POOL 2> err5.log - -expect_abnormal_exit $PMEMPOOL$EXESUFFIX create blk 4294967296 $POOL2 2>> err5.log - -check - -pass diff --git a/src/test/pmempool_create/TEST6 b/src/test/pmempool_create/TEST6 index 51741c0dc4e..dcd08578ac4 100755 --- a/src/test/pmempool_create/TEST6 +++ b/src/test/pmempool_create/TEST6 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation +# Copyright 2014-2023, Intel Corporation # # # pmempool_create/TEST6 -- test for pmempool create command with poolset @@ -33,12 +33,6 @@ create_poolset $POOLREP 32M:$POOL1:z 32M:$POOL2:z 32M:$POOL3:z\ R 32M:$REPL1:z 32M:$REPL2:z 32M:$REPL3:z check_file $POOLREP -# PMEMBLK -rm -f $POOLS -expect_normal_exit $PMEMPOOL$EXESUFFIX create blk 512 $POOLSET -check_files $POOLS -check_signatures PMEMBLK $POOLS - # PMEMLOG rm -f $POOLS expect_normal_exit $PMEMPOOL$EXESUFFIX create log $POOLSET diff --git a/src/test/pmempool_create/TEST8 b/src/test/pmempool_create/TEST8 index 54e75192679..0cd481de44f 100755 --- a/src/test/pmempool_create/TEST8 +++ b/src/test/pmempool_create/TEST8 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2017-2018, Intel Corporation +# Copyright 2017-2023, Intel Corporation # # # pmempool_create/TEST8 -- test for pmempool create command with poolset @@ -36,12 +36,6 @@ create_poolset $POOLREP 32M:$POOL1:z 32M:$POOL2:z 32M:$POOL3:z\ check_file $POOLREP -# PMEMBLK -rm -f $POOLS -expect_normal_exit $PMEMPOOL$EXESUFFIX create blk 512 $POOLSET -check_files $POOLS -check_signatures PMEMBLK $POOL1 - # PMEMLOG rm -f $POOLS expect_normal_exit $PMEMPOOL$EXESUFFIX create log $POOLSET diff --git a/src/test/pmempool_create/err5.log.match b/src/test/pmempool_create/err5.log.match deleted file mode 100644 index abee3fb18c5..00000000000 --- a/src/test/pmempool_create/err5.log.match +++ /dev/null @@ -1,3 +0,0 @@ -error: blk pool requires argument -error: $(*) -- Invalid block size 4294967296 -error: creating pool file failed diff --git a/src/test/set_funcs/Makefile b/src/test/set_funcs/Makefile index cec3f161d4a..34eb2570ad9 100644 --- a/src/test/set_funcs/Makefile +++ b/src/test/set_funcs/Makefile @@ -9,7 +9,6 @@ OBJS = set_funcs.o LIBPMEM=y LIBPMEMOBJ=y -LIBPMEMBLK=y include ../Makefile.inc diff --git a/src/test/set_funcs/set_funcs.c b/src/test/set_funcs/set_funcs.c index 32d8037b954..86c36380a79 100644 --- a/src/test/set_funcs/set_funcs.c +++ b/src/test/set_funcs/set_funcs.c @@ -13,7 +13,6 @@ #define EXTRA sizeof(GUARD) #define OBJ 0 -#define BLK 1 static struct counters { int mallocs; @@ -107,38 +106,6 @@ obj_strdup(const char *s) return test_strdup(s); } -static void * -blk_malloc(size_t size) -{ - cnt[BLK].mallocs++; - return test_malloc(size); -} - -static void -blk_free(void *ptr) -{ - if (ptr) - cnt[BLK].frees++; - test_free(ptr); -} - -static void * -blk_realloc(void *ptr, size_t size) -{ - if (ptr == NULL) - cnt[BLK].reallocs_null++; - else - cnt[BLK].reallocs++; - return test_realloc(ptr, size); -} - -static char * -blk_strdup(const char *s) -{ - cnt[BLK].strdups++; - return test_strdup(s); -} - /* * There are a few allocations made at first call to pmemobj_open() or * pmemobj_create(). They are related to some global structures @@ -207,48 +174,6 @@ test_obj(const char *path) UNLINK(path); } -static void -test_blk(const char *path) -{ - pmemblk_set_funcs(blk_malloc, blk_free, blk_realloc, blk_strdup); - - /* - * Generate ERR() call, that calls malloc() once, - * but only when it is called for the first time - * (free() is called in the destructor of the library). - */ - pmemblk_create(EXISTING_FILE, 0, NON_ZERO_POOL_SIZE, 0); - - memset(cnt, 0, sizeof(cnt)); - - PMEMblkpool *blk = pmemblk_create(path, 512, PMEMBLK_MIN_POOL, 0600); - - pmemblk_close(blk); - - UT_OUT("blk_mallocs: %d", cnt[BLK].mallocs); - UT_OUT("blk_frees: %d", cnt[BLK].frees); - UT_OUT("blk_reallocs: %d", cnt[BLK].reallocs); - UT_OUT("blk_reallocs_null: %d", cnt[BLK].reallocs_null); - UT_OUT("blk_strdups: %d", cnt[BLK].strdups); - - if (cnt[BLK].mallocs == 0 || cnt[BLK].frees == 0) - UT_FATAL("BLK mallocs: %d, frees: %d", cnt[BLK].mallocs, - cnt[BLK].frees); - - for (int i = 0; i < 5; ++i) { - if (i == BLK) - continue; - if (cnt[i].mallocs || cnt[i].frees) - UT_FATAL("BLK allocation used %d functions", i); - } - - if (cnt[BLK].mallocs + cnt[BLK].strdups + cnt[BLK].reallocs_null - != cnt[BLK].frees) - UT_FATAL("BLK memory leak"); - - UNLINK(path); -} - int main(int argc, char *argv[]) { @@ -258,7 +183,6 @@ main(int argc, char *argv[]) UT_FATAL("usage: %s file dir", argv[0]); test_obj(argv[1]); - test_blk(argv[1]); DONE(NULL); } diff --git a/src/test/traces_pmem/Makefile b/src/test/traces_pmem/Makefile index dc21f7e94fc..c96953bc6e4 100644 --- a/src/test/traces_pmem/Makefile +++ b/src/test/traces_pmem/Makefile @@ -8,7 +8,6 @@ TARGET = traces_pmem OBJS = traces_pmem.o LIBPMEM=y -LIBPMEMBLK=y LIBPMEMOBJ=y include ../Makefile.inc diff --git a/src/test/traces_pmem/TEST0 b/src/test/traces_pmem/TEST0 index 51e80ec73a0..37bc38c3df4 100755 --- a/src/test/traces_pmem/TEST0 +++ b/src/test/traces_pmem/TEST0 @@ -17,8 +17,6 @@ setup export PMEM_LOG_LEVEL=4 export PMEM_LOG_FILE=./trace_pmem$UNITTEST_NUM.log -export PMEMBLK_LOG_LEVEL=4 -export PMEMBLK_LOG_FILE=./trace_pmemblk$UNITTEST_NUM.log export PMEMOBJ_LOG_LEVEL=4 export PMEMOBJ_LOG_FILE=./trace_pmemobj$UNITTEST_NUM.log @@ -28,7 +26,6 @@ expect_normal_exit ./traces_pmem$EXESUFFIX # string format. We can't rely on full output (because of different # machines configurations), hence comparison of only first 3 lines. head -n 3 $PMEM_LOG_FILE > ./trace_pmem_head$UNITTEST_NUM.log -head -n 3 $PMEMBLK_LOG_FILE > ./trace_pmemblk_head$UNITTEST_NUM.log head -n 3 $PMEMOBJ_LOG_FILE > ./trace_pmemobj_head$UNITTEST_NUM.log check diff --git a/src/test/traces_pmem/trace_pmemblk_head0.log.match b/src/test/traces_pmem/trace_pmemblk_head0.log.match deleted file mode 100644 index b9825be4f32..00000000000 --- a/src/test/traces_pmem/trace_pmemblk_head0.log.match +++ /dev/null @@ -1,3 +0,0 @@ -: <$(N)> [out.c:$(N) $(*)] pid $(N): program: $(*) -: <$(N)> [out.c:$(N) $(*)] libpmemblk version $(N).$(N) -: <$(N)> [out.c:$(N) $(*)] src version: $(*) diff --git a/src/test/traces_pmem/traces_pmem.c b/src/test/traces_pmem/traces_pmem.c index b4393d1a4ce..d88fd047913 100644 --- a/src/test/traces_pmem/traces_pmem.c +++ b/src/test/traces_pmem/traces_pmem.c @@ -14,8 +14,6 @@ main(int argc, char *argv[]) UT_ASSERT(!pmem_check_version(PMEM_MAJOR_VERSION, PMEM_MINOR_VERSION)); - UT_ASSERT(!pmemblk_check_version(PMEMBLK_MAJOR_VERSION, - PMEMBLK_MINOR_VERSION)); UT_ASSERT(!pmemobj_check_version(PMEMOBJ_MAJOR_VERSION, PMEMOBJ_MINOR_VERSION));