diff --git a/src/test/pmempool_dump/TEST0 b/src/test/pmempool_dump/TEST0 index 63fc53545fe..fd791d4a9a7 100755 --- a/src/test/pmempool_dump/TEST0 +++ b/src/test/pmempool_dump/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_dump/TEST0 -- test for dump command @@ -18,11 +18,11 @@ POOL=$DIR/file.pool LOG=out${UNITTEST_NUM}.log rm -f $LOG && touch $LOG -expect_normal_exit $PMEMPOOL$EXESUFFIX create log $POOL +expect_normal_exit $PMEMPOOL$EXESUFFIX create obj $POOL expect_normal_exit $PMEMWRITE$EXESUFFIX $POOL TEST -expect_normal_exit $PMEMPOOL$EXESUFFIX dump -b -o $LOG $POOL +expect_abnormal_exit $PMEMPOOL$EXESUFFIX dump -b -o $LOG $POOL echo >> $LOG -expect_normal_exit $PMEMPOOL$EXESUFFIX dump -b $POOL >> $LOG +expect_abnormal_exit $PMEMPOOL$EXESUFFIX dump -b $POOL >> $LOG echo >> $LOG check diff --git a/src/test/pmempool_dump/out0.log.match b/src/test/pmempool_dump/out0.log.match index ac7d3b8af36..139597f9cb0 100644 --- a/src/test/pmempool_dump/out0.log.match +++ b/src/test/pmempool_dump/out0.log.match @@ -1,2 +1,2 @@ -TEST -TEST + + diff --git a/src/test/pmempool_info/TEST0 b/src/test/pmempool_info/TEST0 deleted file mode 100755 index d0121d73df2..00000000000 --- a/src/test/pmempool_info/TEST0 +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation -# -# -# pmempool_info/TEST0 -- test for info command -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type pmem non-pmem - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG - -expect_normal_exit $PMEMPOOL$EXESUFFIX create blk 512 $POOL -expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOL >> $LOG - -check - -pass diff --git a/src/test/pmempool_info/TEST1 b/src/test/pmempool_info/TEST1 deleted file mode 100755 index 29ec7553b4c..00000000000 --- a/src/test/pmempool_info/TEST1 +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation -# -# -# pmempool_info/TEST1 -- test for info command -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type pmem non-pmem - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG - -expect_normal_exit $PMEMPOOL$EXESUFFIX create log $POOL -expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOL >> $LOG - -check - -pass diff --git a/src/test/pmempool_info/TEST16 b/src/test/pmempool_info/TEST16 index 7f72248fcbf..3549889f534 100755 --- a/src/test/pmempool_info/TEST16 +++ b/src/test/pmempool_info/TEST16 @@ -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_info/TEST16 -- test for info command @@ -40,14 +40,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 -rm -f $POOLS -expect_normal_exit $PMEMPOOL$EXESUFFIX create blk 512 $POOLSET -expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOLSET >> $LOG - -rm -f $POOLS -expect_normal_exit $PMEMPOOL$EXESUFFIX create log $POOLSET -expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOLSET >> $LOG - rm -f $POOLS $REPS expect_normal_exit $PMEMPOOL$EXESUFFIX create obj --layout pmempool$SUFFIX $POOLREP expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOLREP >> $LOG diff --git a/src/test/pmempool_info/TEST2 b/src/test/pmempool_info/TEST2 deleted file mode 100755 index 735b856deac..00000000000 --- a/src/test/pmempool_info/TEST2 +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation -# -# -# pmempool_info/TEST2 -- test for info command with BTT layout -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type pmem non-pmem - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG - -expect_normal_exit $PMEMPOOL$EXESUFFIX create -w blk 512 $POOL -expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOL >> $LOG - -check - -pass diff --git a/src/test/pmempool_info/TEST27 b/src/test/pmempool_info/TEST27 index f817b8a4600..ff40dd2896e 100755 --- a/src/test/pmempool_info/TEST27 +++ b/src/test/pmempool_info/TEST27 @@ -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_info/TEST27 -- test for arch string inside info @@ -18,7 +18,7 @@ POOL=$DIR/file.pool LOG=out${UNITTEST_NUM}.log rm -f $LOG && touch $LOG -expect_normal_exit $PMEMPOOL$EXESUFFIX create blk 512 $POOL +expect_normal_exit $PMEMPOOL$EXESUFFIX create obj $POOL expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOL >> $LOG check diff --git a/src/test/pmempool_info/TEST3 b/src/test/pmempool_info/TEST3 deleted file mode 100755 index 380b02f5084..00000000000 --- a/src/test/pmempool_info/TEST3 +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation -# -# -# pmempool_info/TEST3 -- test for info command with BTT Info backup -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type pmem non-pmem - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG - -expect_normal_exit $PMEMPOOL$EXESUFFIX create -w blk 512 $POOL -expect_normal_exit $PMEMPOOL$EXESUFFIX info -B $POOL >> $LOG - -check - -pass diff --git a/src/test/pmempool_info/TEST4 b/src/test/pmempool_info/TEST4 deleted file mode 100755 index ff7536bcb04..00000000000 --- a/src/test/pmempool_info/TEST4 +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation -# -# -# pmempool_info/TEST4 -- test for info command with statistics -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type pmem non-pmem - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG - -expect_normal_exit $PMEMPOOL$EXESUFFIX create -w blk 512 $POOL -expect_normal_exit $PMEMPOOL$EXESUFFIX info -s $POOL >> $LOG - -echo >> $LOG - -rm -f $POOL -expect_normal_exit $PMEMPOOL$EXESUFFIX create log $POOL -expect_normal_exit $PMEMPOOL$EXESUFFIX info -s $POOL >> $LOG - -check - -pass diff --git a/src/test/pmempool_info/TEST5 b/src/test/pmempool_info/TEST5 deleted file mode 100755 index 23361199fbe..00000000000 --- a/src/test/pmempool_info/TEST5 +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation -# -# -# pmempool_info/TEST5 -- test for info command with hexadecimal dumps of headers -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type pmem non-pmem - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG - -expect_normal_exit $PMEMPOOL$EXESUFFIX create log $POOL -expect_normal_exit $PMEMPOOL$EXESUFFIX info -x $POOL >> $LOG - -echo >> $LOG - -rm -f $POOL -expect_normal_exit $PMEMPOOL$EXESUFFIX create blk 512 $POOL -expect_normal_exit $PMEMPOOL$EXESUFFIX info -x $POOL >> $LOG - -check - -pass diff --git a/src/test/pmempool_info/TEST6 b/src/test/pmempool_info/TEST6 deleted file mode 100755 index 92518946f0e..00000000000 --- a/src/test/pmempool_info/TEST6 +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation -# -# -# pmempool_info/TEST6 -- test for info command -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type pmem non-pmem - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG - -expect_normal_exit $PMEMPOOL$EXESUFFIX create log $POOL -expect_normal_exit $PMEMWRITE$EXESUFFIX $POOL TEST -expect_normal_exit $PMEMPOOL$EXESUFFIX info -d $POOL >> $LOG - -check - -pass diff --git a/src/test/pmempool_info/TEST7 b/src/test/pmempool_info/TEST7 deleted file mode 100755 index 946ab73b162..00000000000 --- a/src/test/pmempool_info/TEST7 +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation -# -# -# pmempool_info/TEST7 -- test for info command -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type pmem non-pmem - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG - -expect_normal_exit $PMEMPOOL$EXESUFFIX create log $POOL -expect_normal_exit $PMEMWRITE$EXESUFFIX $POOL TEST -expect_normal_exit $PMEMPOOL$EXESUFFIX info -d $POOL >> $LOG - -check - -pass diff --git a/src/test/pmempool_info/TEST8 b/src/test/pmempool_info/TEST8 deleted file mode 100755 index 24591a74e90..00000000000 --- a/src/test/pmempool_info/TEST8 +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation -# -# -# pmempool_info/TEST8 -- test for info command -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type pmem non-pmem - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG - -expect_normal_exit $PMEMPOOL$EXESUFFIX create blk 512 $POOL -expect_normal_exit $PMEMWRITE$EXESUFFIX $POOL 1:e 2:w:TEST - -INFO_NLBA=$(expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOL | $GREP 'External LBA count' | grep -o '[0-9]\+') -NLBA=$(expect_normal_exit $PMEMPOOL$EXESUFFIX info -m $POOL | $GREP -c '[0-9]\+: 0x[0-9]\+.*') -NZER=$(expect_normal_exit $PMEMPOOL$EXESUFFIX info -mue $POOL | $GREP -c '[0-9]\+: 0x[0-9]\+.*') -NERR=$(expect_normal_exit $PMEMPOOL$EXESUFFIX info -muz $POOL | $GREP -c '[0-9]\+: 0x[0-9]\+.*') -NNON=$(expect_normal_exit $PMEMPOOL$EXESUFFIX info -mez $POOL | $GREP -c '[0-9]\+: 0x[0-9]\+.*') - -echo "Number of LBAs: $INFO_NLBA" >> $LOG -echo "Number of LBAs in map: $NLBA" >> $LOG -echo "Number of LBAs [zero]: $NZER" >> $LOG -echo "Number of LBAs [error]: $NERR" >> $LOG -echo "Number of LBAs [no flag]: $NNON" >> $LOG - -NSUM=$(($NZER + $NERR + $NNON)) -[[ $NSUM == $NLBA ]] || fatal "$NSUM != $NLBA" -[[ $NSUM == $INFO_NLBA ]] || fatal "$NSUM != $INFO_NLBA" - -expect_normal_exit $PMEMPOOL$EXESUFFIX info -dz $POOL >> $LOG - -check - -pass diff --git a/src/test/pmempool_info/TEST9 b/src/test/pmempool_info/TEST9 deleted file mode 100755 index 5182c725baa..00000000000 --- a/src/test/pmempool_info/TEST9 +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation -# -# -# pmempool_info/TEST9 -- test for info command -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type pmem non-pmem - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG - -expect_normal_exit $PMEMPOOL$EXESUFFIX create -w blk 512 $POOL -INFO_NFLOG=$(expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOL | $GREP 'Free blocks' | $GREP -o '[0-9]\+') -NFLOG=$(expect_normal_exit $PMEMPOOL$EXESUFFIX info -g $POOL | $GREP -co '^[0-9]\+:') - -[[ $INFO_NFLOG == $NFLOG ]] || fatal "$INFO_NFLOG $NFLOG" - -check - -pass diff --git a/src/test/pmempool_info/out0.log.match b/src/test/pmempool_info/out0.log.match deleted file mode 100644 index 9ee175cc193..00000000000 --- a/src/test/pmempool_info/out0.log.match +++ /dev/null @@ -1,30 +0,0 @@ -Part file: -path : $(nW)file.pool -type : regular file -size : $(nW) - -POOL Header: -Signature : PMEMBLK -Major : $(*) -Mandatory features : $(*) -Not mandatory features : $(*) -Forced RO : $(*) -Pool set UUID : $(*) -UUID : $(*) -Previous part UUID : $(*) -Next part UUID : $(*) -Previous replica UUID : $(*) -Next replica UUID : $(*) -Creation Time : $(*) -Alignment Descriptor : $(*) -Class : $(*) -Data : $(*) -Machine : $(*) -Last shutdown : clean -Checksum : $(*) [OK] - -PMEM BLK Header: -Block size : $(*) -Is zeroed : $(*) - - diff --git a/src/test/pmempool_info/out1.log.match b/src/test/pmempool_info/out1.log.match deleted file mode 100644 index be24f80bf20..00000000000 --- a/src/test/pmempool_info/out1.log.match +++ /dev/null @@ -1,31 +0,0 @@ -Part file: -path : $(nW)file.pool -type : regular file -size : $(nW) - -POOL Header: -Signature : PMEMLOG -Major : $(*) -Mandatory features : $(*) -Not mandatory features : $(*) -Forced RO : $(*) -Pool set UUID : $(*) -UUID : $(*) -Previous part UUID : $(*) -Next part UUID : $(*) -Previous replica UUID : $(*) -Next replica UUID : $(*) -Creation Time : $(*) -Alignment Descriptor : $(*) -Class : $(*) -Data : $(*) -Machine : $(*) -Last shutdown : clean -Checksum : $(*) [OK] - -PMEM LOG Header: -$(OPT)Start offset : 0x2000 -$(OPX)Start offset : 0x20000 -$(OPT)Write offset : 0x2000 [OK] -$(OPX)Write offset : 0x20000 [OK] -End offset : $(*) diff --git a/src/test/pmempool_info/out16.log.match b/src/test/pmempool_info/out16.log.match index fbe08808ba4..43c73bbddd8 100644 --- a/src/test/pmempool_info/out16.log.match +++ b/src/test/pmempool_info/out16.log.match @@ -1,85 +1,4 @@ Poolset structure: -Number of replicas : 1 -Replica 0 (master) - local, 3 part(s): -part 0: -path : $(nW)pool.part1 -type : regular file -size : $(nW) -part 1: -path : $(nW)pool.part2 -type : regular file -size : $(nW) -part 2: -path : $(nW)pool.part3 -type : regular file -size : $(nW) - -POOL Header: -Signature : PMEMBLK -Major : $(*) -Mandatory features : $(*) -Not mandatory features : $(*) -Forced RO : $(*) -Pool set UUID : $(*) -UUID : $(*) -Previous part UUID : $(*) -Next part UUID : $(*) -Previous replica UUID : $(*) -Next replica UUID : $(*) -Creation Time : $(*) -Alignment Descriptor : $(*) -Class : $(*) -Data : $(*) -Machine : $(*) -Last shutdown : clean -Checksum : $(*) [OK] - -PMEM BLK Header: -Block size : 512 -Is zeroed : true - - -Poolset structure: -Number of replicas : 1 -Replica 0 (master) - local, 3 part(s): -part 0: -path : $(nW)pool.part1 -type : regular file -size : $(nW) -part 1: -path : $(nW)pool.part2 -type : regular file -size : $(nW) -part 2: -path : $(nW)pool.part3 -type : regular file -size : $(nW) - -POOL Header: -Signature : PMEMLOG -Major : $(*) -Mandatory features : $(*) -Not mandatory features : $(*) -Forced RO : $(*) -Pool set UUID : $(*) -UUID : $(*) -Previous part UUID : $(*) -Next part UUID : $(*) -Previous replica UUID : $(*) -Next replica UUID : $(*) -Creation Time : $(*) -Alignment Descriptor : $(*) -Class : $(*) -Data : $(*) -Machine : $(*) -Last shutdown : clean -Checksum : $(*) [OK] - -PMEM LOG Header: -Start offset : $(*) -Write offset : $(*) [OK] -End offset : $(*) -Poolset structure: Number of replicas : 2 Replica 0 (master) - local, 3 part(s): part 0: diff --git a/src/test/pmempool_info/out2.log.match b/src/test/pmempool_info/out2.log.match deleted file mode 100644 index aef04b6dfab..00000000000 --- a/src/test/pmempool_info/out2.log.match +++ /dev/null @@ -1,48 +0,0 @@ -Part file: -path : $(nW)file.pool -type : regular file -size : $(nW) - -POOL Header: -Signature : PMEMBLK -Major : $(*) -Mandatory features : $(*) -Not mandatory features : $(*) -Forced RO : $(*) -Pool set UUID : $(*) -UUID : $(*) -Previous part UUID : $(*) -Next part UUID : $(*) -Previous replica UUID : $(*) -Next replica UUID : $(*) -Creation Time : $(*) -Alignment Descriptor : $(*) -Class : $(*) -Data : $(*) -Machine : $(*) -Last shutdown : clean -Checksum : $(*) [OK] - -PMEM BLK Header: -Block size : 512 -Is zeroed : $(*) - -[ARENA 0] -PMEM BLK BTT Info Header: -Signature : BTT_ARENA_INFO -UUID of container : $(*) -Flags : $(*) -Major : $(*) -Minor : $(*) -External LBA size : $(*) -External LBA count : $(*) -Internal LBA size : $(*) -Internal LBA count : $(*) -Free blocks : $(*) -Info block size : $(*) -Next arena offset : $(*) -Arena data offset : $(*) -Area map offset : $(*) -Area flog offset : $(*) -Info block backup offset : $(*) -Checksum : $(*) [OK] diff --git a/src/test/pmempool_info/out27.log.match b/src/test/pmempool_info/out27.log.match index 1755633d88e..4d8ca2f1a76 100644 --- a/src/test/pmempool_info/out27.log.match +++ b/src/test/pmempool_info/out27.log.match @@ -4,7 +4,7 @@ type : regular file size : $(nW) POOL Header: -Signature : PMEMBLK +Signature : PMEMOBJ Major : $(*) Mandatory features : $(*) Not mandatory features : $(*) @@ -23,11 +23,14 @@ $(OPT)Machine : AMD X86-64 $(OPT)Machine : Aarch64 $(OPT)Machine : RISCV $(OPX)Machine : PPC64 -Last shutdown : clean +Last shutdown : dirty Checksum : $(*) [OK] -PMEM BLK Header: -Block size : $(*) -Is zeroed : $(*) - - +PMEM OBJ Header: +Layout : pmempool$(*) +Lanes offset : $(*) +Number of lanes : $(*) +Heap offset : $(*) +Heap size : $(*) +Checksum : $(*) [OK] +Root offset : $(*) \ No newline at end of file diff --git a/src/test/pmempool_info/out3.log.match b/src/test/pmempool_info/out3.log.match deleted file mode 100644 index 2ee7ff7f314..00000000000 --- a/src/test/pmempool_info/out3.log.match +++ /dev/null @@ -1,67 +0,0 @@ -Part file: -path : $(nW)file.pool -type : regular file -size : $(nW) - -POOL Header: -Signature : PMEMBLK -Major : $(*) -Mandatory features : $(*) -Not mandatory features : $(*) -Forced RO : $(*) -Pool set UUID : $(*) -UUID : $(*) -Previous part UUID : $(*) -Next part UUID : $(*) -Previous replica UUID : $(*) -Next replica UUID : $(*) -Creation Time : $(*) -Alignment Descriptor : $(*) -Class : $(*) -Data : $(*) -Machine : $(*) -Last shutdown : clean -Checksum : $(*) [OK] - -PMEM BLK Header: -Block size : 512 -Is zeroed : $(*) - -[ARENA 0] -PMEM BLK BTT Info Header: -Signature : BTT_ARENA_INFO -UUID of container : $(*) -Flags : $(*) -Major : $(*) -Minor : $(*) -External LBA size : $(*) -External LBA count : $(*) -Internal LBA size : $(*) -Internal LBA count : $(*) -Free blocks : $(*) -Info block size : $(*) -Next arena offset : $(*) -Arena data offset : $(*) -Area map offset : $(*) -Area flog offset : $(*) -Info block backup offset : $(*) -Checksum : $(*) [OK] - -PMEM BLK BTT Info Header Backup: -Signature : BTT_ARENA_INFO -UUID of container : $(*) -Flags : $(*) -Major : $(*) -Minor : $(*) -External LBA size : $(*) -External LBA count : $(*) -Internal LBA size : $(*) -Internal LBA count : $(*) -Free blocks : $(*) -Info block size : $(*) -Next arena offset : $(*) -Arena data offset : $(*) -Area map offset : $(*) -Area flog offset : $(*) -Info block backup offset : $(*) -Checksum : $(*) [OK] diff --git a/src/test/pmempool_info/out4.log.match b/src/test/pmempool_info/out4.log.match deleted file mode 100644 index 025e39ce99a..00000000000 --- a/src/test/pmempool_info/out4.log.match +++ /dev/null @@ -1,89 +0,0 @@ -Part file: -path : $(nW)file.pool -type : regular file -size : $(nW) - -POOL Header: -Signature : PMEMBLK -Major : $(*) -Mandatory features : $(*) -Not mandatory features : $(*) -Forced RO : $(*) -Pool set UUID : $(*) -UUID : $(*) -Previous part UUID : $(*) -Next part UUID : $(*) -Previous replica UUID : $(*) -Next replica UUID : $(*) -Creation Time : $(*) -Alignment Descriptor : $(*) -Class : $(*) -Data : $(*) -Machine : $(*) -Last shutdown : clean -Checksum : $(*) [OK] - -PMEM BLK Header: -Block size : $(*) -Is zeroed : $(*) - -[ARENA 0] -PMEM BLK BTT Info Header: -Signature : BTT_ARENA_INFO -UUID of container : $(*) -Flags : $(*) -Major : $(*) -Minor : $(*) -External LBA size : $(*) -External LBA count : $(*) -Internal LBA size : $(*) -Internal LBA count : $(*) -Free blocks : $(*) -Info block size : $(*) -Next arena offset : $(*) -Arena data offset : $(*) -Area map offset : $(*) -Area flog offset : $(*) -Info block backup offset : $(*) -Checksum : $(*) [OK] - -PMEM BLK Statistics: -Total blocks : $(*) -Zeroed blocks : $(*) [100 %] -Error blocks : 0 [0 %] -Blocks without flag : 0 [0 %] - -Part file: -path : $(nW)file.pool -type : regular file -size : $(nW) - -POOL Header: -Signature : PMEMLOG -Major : $(*) -Mandatory features : $(*) -Not mandatory features : $(*) -Forced RO : $(*) -Pool set UUID : $(*) -UUID : $(*) -Previous part UUID : $(*) -Next part UUID : $(*) -Previous replica UUID : $(*) -Next replica UUID : $(*) -Creation Time : $(*) -Alignment Descriptor : $(*) -Class : $(*) -Data : $(*) -Machine : $(*) -Last shutdown : clean -Checksum : $(*) [OK] - -PMEM LOG Header: -Start offset : $(*) -Write offset : $(*) [OK] -End offset : $(*) - -PMEM LOG Statistics: -Total : $(*) -Available : $(*) [100 %] -Used : 0 [0 %] diff --git a/src/test/pmempool_info/out5.log.match b/src/test/pmempool_info/out5.log.match deleted file mode 100644 index d82515e16ac..00000000000 --- a/src/test/pmempool_info/out5.log.match +++ /dev/null @@ -1,122 +0,0 @@ -Part file: -path : $(nW)file.pool -type : regular file -size : $(nW) - -POOL Header: -00000000$(*)|PMEMLOG.$(*)| -00000010$(*)|$(*)| -00000020$(*)|$(*)| -00000030$(*)|$(*)| -* -00000070$(*)|$(*)| -00000080$(*)|$(*)| -00000090$(*)|$(*)| -* -$(OPT)00000fb0$(*)|$(*)| -$(OPT)00000fc0$(*)|$(*)| -$(OPT)00000fd0$(*)|$(*)| -$(OPT)* -00000ff0$(*)|$(*)| -$(OPT)00001000$(*)|$(*)| -$(OPT)* -$(OPT)0000fff0$(*)|$(*)| ------------------------------------------------------------------------------- -Signature : PMEMLOG -Major : $(*) -Mandatory features : $(*) -Not mandatory features : $(*) -Forced RO : $(*) -Pool set UUID : $(*) -UUID : $(*) -Previous part UUID : $(*) -Next part UUID : $(*) -Previous replica UUID : $(*) -Next replica UUID : $(*) -Creation Time : $(*) -Alignment Descriptor : $(*) -Class : $(*) -Data : $(*) -Machine : $(*) -Last shutdown : clean -Checksum : $(*) [OK] - -PMEM LOG Header: -$(OPT)00001000$(*)|$(*)| -$(OPX)00010000$(*)|$(*)| -$(OPT)00001010$(*)|$(*)| -$(OPX)00010010$(*)|$(*)| -$(OPT)00001020$(*)|$(*)| -$(OPX)00010020$(*)|$(*)| -$(OPT)00001030$(*)|$(*)| -$(OPX)00010030$(*)|$(*)| -$(OPT)00001040$(*)|$(*)| -$(OPX)00010040$(*)|$(*)| ------------------------------------------------------------------------------- -Start offset : $(*) -Write offset : $(*) [OK] -End offset : $(*) - -Part file: -path : $(nW)file.pool -type : regular file -size : $(nW) - -POOL Header: -00000000$(*)|PMEMBLK.$(*)| -00000010$(*)|$(*)| -00000020$(*)|$(*)| -00000030$(*)|$(*)| -* -00000070$(*)|$(*)| -00000080$(*)|$(*)| -00000090$(*)|$(*)| -* -$(OPT)00000fb0$(*)|$(*)| -$(OPT)00000fc0$(*)|$(*)| -$(OPT)00000fd0$(*)|$(*)| -$(OPT)* -00000ff0$(*)|$(*)| -$(OPT)00001000$(*)|$(*)| -$(OPT)* -$(OPT)0000fff0$(*)|$(*)| ------------------------------------------------------------------------------- -Signature : PMEMBLK -Major : $(*) -Mandatory features : $(*) -Not mandatory features : $(*) -Forced RO : $(*) -Pool set UUID : $(*) -UUID : $(*) -Previous part UUID : $(*) -Next part UUID : $(*) -Previous replica UUID : $(*) -Next replica UUID : $(*) -Creation Time : $(*) -Alignment Descriptor : $(*) -Class : $(*) -Data : $(*) -Machine : $(*) -Last shutdown : clean -Checksum : $(*) [OK] - -PMEM BLK Header: -$(OPT)00001000$(*)|$(*)| -$(OPX)00010000$(*)|$(*)| -$(OPT)00001010$(*)|$(*)| -$(OPX)00010010$(*)|$(*)| -$(OPT)00001020$(*)|$(*)| -$(OPX)00010020$(*)|$(*)| -$(OPT)00001030$(*)|$(*)| -$(OPX)00010030$(*)|$(*)| -$(OPT)00001040$(*)|$(*)| -$(OPX)00010040$(*)|$(*)| -$(OPT)00001050$(*)|$(*)| -$(OPX)00010050$(*)|$(*)| -$(OPT)00001060$(*)|$(*)| -$(OPX)00010060$(*)|$(*)| ------------------------------------------------------------------------------- -Block size : $(*) -Is zeroed : $(*) - - diff --git a/src/test/pmempool_info/out6.log.match b/src/test/pmempool_info/out6.log.match deleted file mode 100644 index e93dfeb512c..00000000000 --- a/src/test/pmempool_info/out6.log.match +++ /dev/null @@ -1,34 +0,0 @@ -Part file: -path : $(nW)file.pool -type : regular file -size : $(nW) - -POOL Header: -Signature : PMEMLOG -Major : $(*) -Mandatory features : $(*) -Not mandatory features : $(*) -Forced RO : $(*) -Pool set UUID : $(*) -UUID : $(*) -Previous part UUID : $(*) -Next part UUID : $(*) -Previous replica UUID : $(*) -Next replica UUID : $(*) -Creation Time : $(*) -Alignment Descriptor : $(*) -Class : $(*) -Data : $(*) -Machine : $(*) -Last shutdown : clean -Checksum : $(*) [OK] - -PMEM LOG Header: -Start offset : $(*) -Write offset : $(*) [OK] -End offset : $(*) - -PMEMLOG data: -$(OPT)00002000 54 45 53 54 |TEST | -$(OPX)00020000 54 45 53 54 |TEST | ------------------------------------------------------------------------------- diff --git a/src/test/pmempool_info/out7.log.match b/src/test/pmempool_info/out7.log.match deleted file mode 100644 index e93dfeb512c..00000000000 --- a/src/test/pmempool_info/out7.log.match +++ /dev/null @@ -1,34 +0,0 @@ -Part file: -path : $(nW)file.pool -type : regular file -size : $(nW) - -POOL Header: -Signature : PMEMLOG -Major : $(*) -Mandatory features : $(*) -Not mandatory features : $(*) -Forced RO : $(*) -Pool set UUID : $(*) -UUID : $(*) -Previous part UUID : $(*) -Next part UUID : $(*) -Previous replica UUID : $(*) -Next replica UUID : $(*) -Creation Time : $(*) -Alignment Descriptor : $(*) -Class : $(*) -Data : $(*) -Machine : $(*) -Last shutdown : clean -Checksum : $(*) [OK] - -PMEM LOG Header: -Start offset : $(*) -Write offset : $(*) [OK] -End offset : $(*) - -PMEMLOG data: -$(OPT)00002000 54 45 53 54 |TEST | -$(OPX)00020000 54 45 53 54 |TEST | ------------------------------------------------------------------------------- diff --git a/src/test/pmempool_info/out8.log.match b/src/test/pmempool_info/out8.log.match deleted file mode 100644 index 77672bdf387..00000000000 --- a/src/test/pmempool_info/out8.log.match +++ /dev/null @@ -1,93 +0,0 @@ -Number of LBAs: $(*) -Number of LBAs in map: $(*) -Number of LBAs [zero]: $(*) -Number of LBAs [error]: 1 -Number of LBAs [no flag]: 1 -Part file: -path : $(nW)file.pool -type : regular file -size : $(nW) - -POOL Header: -Signature : PMEMBLK -Major : $(*) -Mandatory features : $(*) -Not mandatory features : $(*) -Forced RO : $(*) -Pool set UUID : $(*) -UUID : $(*) -Previous part UUID : $(*) -Next part UUID : $(*) -Previous replica UUID : $(*) -Next replica UUID : $(*) -Creation Time : $(*) -Alignment Descriptor : $(*) -Class : $(*) -Data : $(*) -Machine : $(*) -Last shutdown : clean -Checksum : $(*) [OK] - -PMEM BLK Header: -Block size : $(*) -Is zeroed : $(*) - -[ARENA 0] -PMEM BLK BTT Info Header: -Signature : BTT_ARENA_INFO -UUID of container : $(*) -Flags : $(*) -Major : $(*) -Minor : $(*) -External LBA size : $(*) -External LBA count : $(*) -Internal LBA size : $(*) -Internal LBA count : $(*) -Free blocks : $(*) -Info block size : $(*) -Next arena offset : $(*) -Arena data offset : $(*) -Area map offset : $(*) -Area flog offset : $(*) -Info block backup offset : $(*) -Checksum : $(*) [OK] - -PMEM BLK blocks data: -Block 1: offset: $(*) state: error -$(*) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -$(*) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| ------------------------------------------------------------------------------- -Block 2: offset: $(*) -$(*)|TEST$(*)| -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) -$(OPT)$(*) diff --git a/src/test/pmempool_info/out9.log.match b/src/test/pmempool_info/out9.log.match deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/test/pmempool_inval/TEST0 b/src/test/pmempool_inval/TEST0 index 19ab75e0ec7..2602af2d509 100755 --- a/src/test/pmempool_inval/TEST0 +++ b/src/test/pmempool_inval/TEST0 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2022, Intel Corporation +# Copyright 2022-2023, Intel Corporation # # # pmempool_inval/TEST0 -- test for pmempool invalid input commands @@ -27,26 +27,9 @@ expect_abnormal_exit $PMEMPOOL$EXESUFFIX rm "\"-rf\"" &>> $LOG expect_abnormal_exit $PMEMPOOL$EXESUFFIX info rm * &>> $LOG expect_abnormal_exit $PMEMPOOL$EXESUFFIX info . &>> $LOG expect_abnormal_exit $PMEMPOOL$EXESUFFIX info "\"./test.txt;ls\"" &>> $LOG -expect_abnormal_exit $PMEMPOOL$EXESUFFIX create blk "rm *" &>> $LOG expect_abnormal_exit $PMEMPOOL$EXESUFFIX create obj rm * &>> $LOG expect_abnormal_exit $PMEMPOOL$EXESUFFIX create "$$&&%%" &>> $LOG expect_abnormal_exit $PMEMPOOL$EXESUFFIX info 'file && ls' &>> $LOG -expect_abnormal_exit $PMEMPOOL$EXESUFFIX create blk -1 $POOL &>>$LOG -expect_abnormal_exit $PMEMPOOL$EXESUFFIX create blk 0x100 $POOL &>>$LOG -expect_abnormal_exit $PMEMPOOL$EXESUFFIX create blk 0xffffffff $POOL &>>$LOG -expect_abnormal_exit $PMEMPOOL$EXESUFFIX create blk "0xfffffffe" $POOL &>>$LOG -expect_abnormal_exit $PMEMPOOL$EXESUFFIX create blk 0x80000000 $POOL &>>$LOG -expect_abnormal_exit $PMEMPOOL$EXESUFFIX create blk 0x1000000 $POOL &>>$LOG - -echo "Poolset creation" >> $LOG -create_poolset $POOL 32ls:$POOL1 &>>$LOG -expect_abnormal_exit $PMEMPOOL$EXESUFFIX create blk 512 $POOL &>>$LOG -create_poolset $POOL 32M:$POOL2 &>>$LOG -expect_abnormal_exit $PMEMPOOL$EXESUFFIX create blk 512 $POOL &>>$LOG -create_poolset $POOL 0M:$POOL1 &>>$LOG -expect_abnormal_exit $PMEMPOOL$EXESUFFIX create blk 512 $POOL &>>$LOG -create_poolset $POOL 0xffffffff:$POOL1 &>>$LOG -expect_abnormal_exit $PMEMPOOL$EXESUFFIX create blk 512 $POOL &>>$LOG check diff --git a/src/test/pmempool_inval/out0.log.match b/src/test/pmempool_inval/out0.log.match index 36e9aa0c6b1..c3205b985cd 100644 --- a/src/test/pmempool_inval/out0.log.match +++ b/src/test/pmempool_inval/out0.log.match @@ -6,25 +6,7 @@ Usage: pmempool rm [] rm: No such file or directory .: Is a directory ./test.txt;ls: No such file or directory -error: cannot parse 'rm' as block size error: invalid option specified for obj pool type -- block size NOTE: pmem blk and log pools are deprecated Usage: pmempool create [] [] file: No such file or directory -create: invalid option -- '1' -NOTE: pmem blk and log pools are deprecated -Usage: pmempool create [] [] -error: cannot parse '0x100' as block size -error: cannot parse '0xffffffff' as block size -error: cannot parse '0xfffffffe' as block size -error: cannot parse '0x80000000' as block size -error: cannot parse '0x1000000' as block size -Poolset creation -error: $(*) [incorrect format of size:2] -error: creating pool file failed -error: $(*) [invalid token found in the current line:3] -error: creating pool file failed -error: $(*) [incorrect format of size:2] -error: creating pool file failed -error: $(*) [incorrect format of size:2] -error: creating pool file failed diff --git a/src/test/pmempool_rm/TEST0 b/src/test/pmempool_rm/TEST0 index 956dc991dbd..f90f90ef6f2 100755 --- a/src/test/pmempool_rm/TEST0 +++ b/src/test/pmempool_rm/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_rm/TEST0 -- test for pmempool rm @@ -15,9 +15,7 @@ setup LOG=out${UNITTEST_NUM}.log rm -f $LOG && touch $LOG -# Create pmemlog, pmemblk and pmemobj pools -expect_normal_exit $PMEMPOOL$EXESUFFIX create log $DIR/pool.log -expect_normal_exit $PMEMPOOL$EXESUFFIX create blk 512 $DIR/pool.blk +# Create pmemobj expect_normal_exit $PMEMPOOL$EXESUFFIX create obj $DIR/pool.obj # Create poolset with replica @@ -29,8 +27,6 @@ expect_normal_exit $PMEMPOOL$EXESUFFIX create obj $DIR/pool.set # Check if all pools and poolset exist check_files\ - $DIR/pool.log\ - $DIR/pool.blk\ $DIR/pool.obj\ $DIR/pool.set\ $DIR/pool.part1\ @@ -40,15 +36,11 @@ check_files\ # Remove all pool files without the poolset expect_normal_exit $PMEMPOOL$EXESUFFIX rm -sv\ - $DIR/pool.log\ - $DIR/pool.blk\ $DIR/pool.obj\ $DIR/pool.set >> $LOG # Check if all pool files don't exist check_no_files\ - $DIR/pool.log\ - $DIR/pool.blk\ $DIR/pool.obj\ $DIR/pool.part1\ $DIR/pool.part2\ diff --git a/src/test/pmempool_rm/TEST1 b/src/test/pmempool_rm/TEST1 index baaaf942943..c297f635f64 100755 --- a/src/test/pmempool_rm/TEST1 +++ b/src/test/pmempool_rm/TEST1 @@ -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_rm/TEST1 -- test for pmempool rm @@ -17,9 +17,7 @@ setup LOG=out${UNITTEST_NUM}.log rm -f $LOG && touch $LOG -# Create pmemlog, pmemblk and pmemobj pools -expect_normal_exit $PMEMPOOL$EXESUFFIX create -m400 log $DIR/pool.log -expect_normal_exit $PMEMPOOL$EXESUFFIX create -m440 blk 512 $DIR/pool.blk +# Create pmemobj pool expect_normal_exit $PMEMPOOL$EXESUFFIX create -m444 obj $DIR/pool.obj # Create poolset with replica @@ -33,8 +31,6 @@ chmod 444 $DIR/pool.set $DIR/pool.part1 $DIR/pool.part2 $DIR/rep.part1 $DIR/rep. # Check if all pools and poolset exist check_files\ - $DIR/pool.log\ - $DIR/pool.blk\ $DIR/pool.obj\ $DIR/pool.set\ $DIR/pool.part1\ @@ -43,13 +39,9 @@ check_files\ $DIR/rep.part2 expect_normal_exit $PMEMPOOL$EXESUFFIX rm -sv\ - $DIR/pool.log\ - $DIR/pool.blk\ $DIR/pool.obj\ $DIR/pool.set >> $LOG 2>&1 << EOF n -n -n y y y @@ -58,8 +50,6 @@ n EOF check_files\ - $DIR/pool.log\ - $DIR/pool.blk\ $DIR/pool.obj\ $DIR/pool.set\ @@ -72,8 +62,6 @@ check_no_files\ expect_normal_exit $PMEMPOOL$EXESUFFIX create -m444 obj $DIR/pool.set check_files\ - $DIR/pool.log\ - $DIR/pool.blk\ $DIR/pool.obj\ $DIR/pool.set\ $DIR/pool.part1\ @@ -82,14 +70,10 @@ check_files\ $DIR/rep.part2 expect_normal_exit $PMEMPOOL$EXESUFFIX rm -fvl\ - $DIR/pool.log\ - $DIR/pool.blk\ $DIR/pool.obj\ $DIR/pool.set >> $LOG check_no_files\ - $DIR/pool.log\ - $DIR/pool.blk\ $DIR/pool.obj\ $DIR/pool.set\ $DIR/pool.part1\ diff --git a/src/test/pmempool_rm/TEST10 b/src/test/pmempool_rm/TEST10 index 6d68fe75ddc..78efa9643d6 100755 --- a/src/test/pmempool_rm/TEST10 +++ b/src/test/pmempool_rm/TEST10 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2018-2019, Intel Corporation +# Copyright 2018-2023, Intel Corporation # # # pmempool_rm/TEST10 -- test for pmempool rm in interactive mode @@ -15,9 +15,7 @@ require_no_superuser setup LOG=out$UNITTEST_NUM.log -# Create pmemlog, pmemblk and pmemobj pools -expect_normal_exit $PMEMPOOL$EXESUFFIX create log $DIR/pool.log -expect_normal_exit $PMEMPOOL$EXESUFFIX create blk 512 $DIR/pool.blk +# Create pmemobj pool expect_normal_exit $PMEMPOOL$EXESUFFIX create obj $DIR/pool.obj # Create poolset @@ -27,35 +25,27 @@ create_poolset $DIR/pool.set 32M:$DIR/pool.part1:z 32M:$DIR/pool.part2:z expect_normal_exit $PMEMPOOL$EXESUFFIX create obj $DIR/pool.set check_files\ - $DIR/pool.log\ - $DIR/pool.blk\ $DIR/pool.obj\ $DIR/pool.set\ $DIR/pool.part1\ $DIR/pool.part2 chmod 400\ - $DIR/pool.log\ - $DIR/pool.blk\ $DIR/pool.obj\ $DIR/pool.set\ $DIR/pool.part1\ $DIR/pool.part2 -echo Y | expect_normal_exit $PMEMPOOL$EXESUFFIX rm $DIR/pool.log > $LOG -echo n | expect_normal_exit $PMEMPOOL$EXESUFFIX rm $DIR/pool.blk >> $LOG echo y | expect_normal_exit $PMEMPOOL$EXESUFFIX rm $DIR/pool.obj >> $LOG echo N | expect_normal_exit $PMEMPOOL$EXESUFFIX rm $DIR/pool.part1 >> $LOG echo n | expect_normal_exit $PMEMPOOL$EXESUFFIX rm $DIR/pool.part2 >> $LOG check_files\ - $DIR/pool.blk\ $DIR/pool.set\ $DIR/pool.part1\ $DIR/pool.part2 check_no_files\ - $DIR/pool.log\ $DIR/pool.obj expect_normal_exit $PMEMPOOL$EXESUFFIX rm $DIR/pool.set >> $LOG <> $LOG 2>&1 <> $LOG 2>&1 <> $LOG_TEMP 2>&1 # Remove poolset expect_normal_exit $PMEMPOOL$EXESUFFIX rm $POOLSET -# Create pmemlog poolset -expect_normal_exit $PMEMPOOL$EXESUFFIX create log $POOLSET -cat $LOG >> $LOG_TEMP - -# Synchronize healthy pool set - should fail as there are no replicas -expect_abnormal_exit $PMEMPOOL$EXESUFFIX sync $POOLSET >> $LOG_TEMP 2>&1 - -# Corrupt metadata in primary replica, leave incorrect checksum -expect_normal_exit $PMEMSPOIL $DIR/testfile1 pool_hdr.uuid=0000000000000000\ - >> $LOG_TEMP - -# Synchronize broken pool set - should fail as there are no other replicas -expect_abnormal_exit $PMEMPOOL$EXESUFFIX sync $POOLSET >> $LOG_TEMP 2>&1 - mv $LOG_TEMP $LOG check diff --git a/src/test/pmempool_sync/out26.log.match b/src/test/pmempool_sync/out26.log.match index d5405b3908f..2503195de05 100644 --- a/src/test/pmempool_sync/out26.log.match +++ b/src/test/pmempool_sync/out26.log.match @@ -2,7 +2,3 @@ error: failed to synchronize: no replica(s) found in the pool set error: Invalid argument error: failed to synchronize: no replica(s) found in the pool set error: Invalid argument -error: failed to synchronize: no replica(s) found in the pool set -error: Invalid argument -error: failed to synchronize: no replica(s) found in the pool set -error: Invalid argument