From 5e1e29163abcda901c9ec997c6a81025b7bbdd27 Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Mon, 26 Jun 2023 14:06:26 -0400 Subject: [PATCH 1/2] test: cleanup pmempool_[!check] from depracated tests Signed-off-by: Jan Michalski --- ChangeLog | 1 + src/test/pmempool_dump/TEST0 | 13 ++- src/test/pmempool_dump/out0.log.match | 6 +- src/test/pmempool_info/TEST0 | 26 ------ src/test/pmempool_info/TEST1 | 26 ------ src/test/pmempool_info/TEST16 | 10 +- src/test/pmempool_info/TEST2 | 26 ------ src/test/pmempool_info/TEST27 | 4 +- src/test/pmempool_info/TEST3 | 26 ------ src/test/pmempool_info/TEST4 | 32 ------- src/test/pmempool_info/TEST5 | 32 ------- src/test/pmempool_info/TEST6 | 27 ------ src/test/pmempool_info/TEST7 | 27 ------ src/test/pmempool_info/TEST8 | 44 --------- src/test/pmempool_info/TEST9 | 29 ------ src/test/pmempool_info/out0.log.match | 30 ------ src/test/pmempool_info/out1.log.match | 31 ------- src/test/pmempool_info/out16.log.match | 81 ---------------- src/test/pmempool_info/out2.log.match | 48 ---------- src/test/pmempool_info/out27.log.match | 17 ++-- src/test/pmempool_info/out3.log.match | 67 -------------- src/test/pmempool_info/out4.log.match | 89 ------------------ src/test/pmempool_info/out5.log.match | 122 ------------------------- src/test/pmempool_info/out6.log.match | 34 ------- src/test/pmempool_info/out7.log.match | 34 ------- src/test/pmempool_info/out8.log.match | 93 ------------------- src/test/pmempool_info/out9.log.match | 0 src/test/pmempool_inval/TEST0 | 19 +--- src/test/pmempool_inval/out0.log.match | 18 ---- src/test/pmempool_rm/TEST0 | 22 ++--- src/test/pmempool_rm/TEST1 | 20 +--- src/test/pmempool_rm/TEST10 | 14 +-- src/test/pmempool_rm/TEST11 | 21 +---- src/test/pmempool_rm/out0.log.match | 2 - src/test/pmempool_rm/out1.log.match | 4 - src/test/pmempool_sync/TEST26 | 16 +--- src/test/pmempool_sync/out26.log.match | 4 - 37 files changed, 42 insertions(+), 1073 deletions(-) delete mode 100755 src/test/pmempool_info/TEST0 delete mode 100755 src/test/pmempool_info/TEST1 delete mode 100755 src/test/pmempool_info/TEST2 delete mode 100755 src/test/pmempool_info/TEST3 delete mode 100755 src/test/pmempool_info/TEST4 delete mode 100755 src/test/pmempool_info/TEST5 delete mode 100755 src/test/pmempool_info/TEST6 delete mode 100755 src/test/pmempool_info/TEST7 delete mode 100755 src/test/pmempool_info/TEST8 delete mode 100755 src/test/pmempool_info/TEST9 delete mode 100644 src/test/pmempool_info/out0.log.match delete mode 100644 src/test/pmempool_info/out1.log.match delete mode 100644 src/test/pmempool_info/out2.log.match delete mode 100644 src/test/pmempool_info/out3.log.match delete mode 100644 src/test/pmempool_info/out4.log.match delete mode 100644 src/test/pmempool_info/out5.log.match delete mode 100644 src/test/pmempool_info/out6.log.match delete mode 100644 src/test/pmempool_info/out7.log.match delete mode 100644 src/test/pmempool_info/out8.log.match delete mode 100644 src/test/pmempool_info/out9.log.match diff --git a/ChangeLog b/ChangeLog index f22193e424e..d90ecad4ff5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ This release: - removes libpmempool tests that use log/blk/btt pool types + - removes pmempool tests that use log/blk/btt pool types - removes other misc tests using pmempool with log/blk/btt pool types - ... diff --git a/src/test/pmempool_dump/TEST0 b/src/test/pmempool_dump/TEST0 index 63fc53545fe..6f7724e1cdd 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 @@ -16,13 +16,18 @@ setup POOL=$DIR/file.pool LOG=out${UNITTEST_NUM}.log +ERR=err${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 2> $ERR +cat $ERR >> $LOG +rm $ERR echo >> $LOG -expect_normal_exit $PMEMPOOL$EXESUFFIX dump -b $POOL >> $LOG +expect_abnormal_exit $PMEMPOOL$EXESUFFIX dump -b $POOL >> $LOG 2> $ERR +cat $ERR >> $LOG +rm $ERR echo >> $LOG check diff --git a/src/test/pmempool_dump/out0.log.match b/src/test/pmempool_dump/out0.log.match index ac7d3b8af36..fe9b20a2944 100644 --- a/src/test/pmempool_dump/out0.log.match +++ b/src/test/pmempool_dump/out0.log.match @@ -1,2 +1,4 @@ -TEST -TEST +error: $(nW)/file.pool: PMEMOBJ pool not supported + +error: $(nW)/file.pool: PMEMOBJ pool not supported + 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..5029eeed9b3 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 : $(*) 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..58c08a1c7e9 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,22 +15,18 @@ 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 a pmemobj pool expect_normal_exit $PMEMPOOL$EXESUFFIX create obj $DIR/pool.obj -# Create poolset with replica +# Create a poolset with replica create_poolset $DIR/pool.set 32M:$DIR/pool.part1:z 32M:$DIR/pool.part2:z\ R 32M:$DIR/rep.part1 32M:$DIR/rep.part2 # Create pmemobj pools from the poolset expect_normal_exit $PMEMPOOL$EXESUFFIX create obj $DIR/pool.set -# Check if all pools and poolset exist +# Check if all pools and the poolset exist check_files\ - $DIR/pool.log\ - $DIR/pool.blk\ $DIR/pool.obj\ $DIR/pool.set\ $DIR/pool.part1\ @@ -40,28 +36,24 @@ 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\ $DIR/rep.part1\ $DIR/rep.part2 -# Pool set file must exist +# The pool set file must exist check_file $DIR/pool.set # Create pmemobj pools from the poolset expect_normal_exit $PMEMPOOL$EXESUFFIX create obj $DIR/pool.set -# Remove all pool files and poolset +# Remove all the pool files and the poolset expect_normal_exit $PMEMPOOL$EXESUFFIX rm -v $DIR/pool.set >> $LOG # Check if all pool files don't exist @@ -71,7 +63,7 @@ check_no_files\ $DIR/rep.part1\ $DIR/rep.part2 -# Check if poolset file exists +# Check if the poolset file exists check_file $DIR/pool.set check 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 From 840c2c276945b65c67fe09d10d66d5df536c7866 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Tue, 27 Jun 2023 06:50:55 +0200 Subject: [PATCH 2/2] test: remove btt tests Remove btt specyfic tests and related tools. libpmemblk test that uses btt are not included in this PR Signed-off-by: Tomasz Gromadzki --- ChangeLog | 2 + src/test/Makefile | 3 - src/test/Makefile.inc | 7 - src/test/bttdevice/Makefile | 11 - src/test/bttdevice/README | 9 - src/test/bttdevice/TEST0 | 37 -- src/test/bttdevice/TEST1 | 32 -- src/test/bttdevice/out0.log.match | 67 ---- src/test/bttdevice/out1.log.match | 35 -- src/test/libpmempool_api/Makefile | 3 +- src/test/libpmempool_api/Makefile.inc | 3 +- src/test/libpmempool_api/libpmempool_test.c | 2 - src/test/libpmempool_bttdev/Makefile | 8 - src/test/libpmempool_bttdev/README | 5 - src/test/libpmempool_bttdev/TEST0 | 30 -- src/test/libpmempool_bttdev/TEST1 | 33 -- src/test/libpmempool_bttdev/TEST10 | 34 -- src/test/libpmempool_bttdev/TEST11 | 38 -- src/test/libpmempool_bttdev/TEST2 | 40 -- src/test/libpmempool_bttdev/TEST3 | 38 -- src/test/libpmempool_bttdev/TEST4 | 38 -- src/test/libpmempool_bttdev/TEST5 | 39 -- src/test/libpmempool_bttdev/TEST6 | 42 --- src/test/libpmempool_bttdev/TEST7 | 34 -- src/test/libpmempool_bttdev/TEST8 | 51 --- src/test/libpmempool_bttdev/TEST9 | 50 --- src/test/libpmempool_bttdev/out0.log.match | 8 - src/test/libpmempool_bttdev/out1.log.match | 6 - src/test/libpmempool_bttdev/out10.log.match | 6 - src/test/libpmempool_bttdev/out11.log.match | 10 - src/test/libpmempool_bttdev/out2.log.match | 19 - src/test/libpmempool_bttdev/out3.log.match | 16 - src/test/libpmempool_bttdev/out4.log.match | 15 - src/test/libpmempool_bttdev/out5.log.match | 6 - src/test/libpmempool_bttdev/out6.log.match | 27 -- src/test/libpmempool_bttdev/out7.log.match | 9 - src/test/libpmempool_bttdev/out8.log.match | 140 ------- src/test/libpmempool_bttdev/out9.log.match | 165 --------- src/test/libpmempool_map_flog/Makefile | 8 - src/test/libpmempool_map_flog/README | 6 - src/test/libpmempool_map_flog/TEST0 | 48 --- src/test/libpmempool_map_flog/TEST1 | 58 --- src/test/libpmempool_map_flog/TEST2 | 72 ---- src/test/libpmempool_map_flog/TEST3 | 69 ---- src/test/libpmempool_map_flog/out0.log.match | 93 ----- src/test/libpmempool_map_flog/out1.log.match | 94 ----- src/test/libpmempool_map_flog/out2.log.match | 164 --------- src/test/libpmempool_map_flog/out3.log.match | 55 --- src/test/pmempool_create/TEST1 | 25 -- src/test/tools/Makefile | 3 +- src/test/tools/bttcreate/.gitignore | 1 - src/test/tools/bttcreate/Makefile | 17 - src/test/tools/bttcreate/README | 22 -- src/test/tools/bttcreate/bttcreate.c | 363 ------------------- src/test/tools/pmemspoil/README | 17 - src/test/tools/pmemspoil/spoil.c | 18 - src/test/unittest/unittest.sh | 24 -- 57 files changed, 5 insertions(+), 2270 deletions(-) delete mode 100644 src/test/bttdevice/Makefile delete mode 100644 src/test/bttdevice/README delete mode 100755 src/test/bttdevice/TEST0 delete mode 100755 src/test/bttdevice/TEST1 delete mode 100644 src/test/bttdevice/out0.log.match delete mode 100644 src/test/bttdevice/out1.log.match delete mode 100644 src/test/libpmempool_bttdev/Makefile delete mode 100644 src/test/libpmempool_bttdev/README delete mode 100755 src/test/libpmempool_bttdev/TEST0 delete mode 100755 src/test/libpmempool_bttdev/TEST1 delete mode 100755 src/test/libpmempool_bttdev/TEST10 delete mode 100755 src/test/libpmempool_bttdev/TEST11 delete mode 100755 src/test/libpmempool_bttdev/TEST2 delete mode 100755 src/test/libpmempool_bttdev/TEST3 delete mode 100755 src/test/libpmempool_bttdev/TEST4 delete mode 100755 src/test/libpmempool_bttdev/TEST5 delete mode 100755 src/test/libpmempool_bttdev/TEST6 delete mode 100755 src/test/libpmempool_bttdev/TEST7 delete mode 100755 src/test/libpmempool_bttdev/TEST8 delete mode 100755 src/test/libpmempool_bttdev/TEST9 delete mode 100644 src/test/libpmempool_bttdev/out0.log.match delete mode 100644 src/test/libpmempool_bttdev/out1.log.match delete mode 100644 src/test/libpmempool_bttdev/out10.log.match delete mode 100644 src/test/libpmempool_bttdev/out11.log.match delete mode 100644 src/test/libpmempool_bttdev/out2.log.match delete mode 100644 src/test/libpmempool_bttdev/out3.log.match delete mode 100644 src/test/libpmempool_bttdev/out4.log.match delete mode 100644 src/test/libpmempool_bttdev/out5.log.match delete mode 100644 src/test/libpmempool_bttdev/out6.log.match delete mode 100644 src/test/libpmempool_bttdev/out7.log.match delete mode 100644 src/test/libpmempool_bttdev/out8.log.match delete mode 100644 src/test/libpmempool_bttdev/out9.log.match delete mode 100644 src/test/libpmempool_map_flog/Makefile delete mode 100644 src/test/libpmempool_map_flog/README delete mode 100755 src/test/libpmempool_map_flog/TEST0 delete mode 100755 src/test/libpmempool_map_flog/TEST1 delete mode 100755 src/test/libpmempool_map_flog/TEST2 delete mode 100755 src/test/libpmempool_map_flog/TEST3 delete mode 100644 src/test/libpmempool_map_flog/out0.log.match delete mode 100644 src/test/libpmempool_map_flog/out1.log.match delete mode 100644 src/test/libpmempool_map_flog/out2.log.match delete mode 100644 src/test/libpmempool_map_flog/out3.log.match delete mode 100755 src/test/pmempool_create/TEST1 delete mode 100644 src/test/tools/bttcreate/.gitignore delete mode 100644 src/test/tools/bttcreate/Makefile delete mode 100644 src/test/tools/bttcreate/README delete mode 100644 src/test/tools/bttcreate/bttcreate.c diff --git a/ChangeLog b/ChangeLog index d90ecad4ff5..cfbc5ac5eaa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ - removes libpmempool tests that use log/blk/btt pool types - removes pmempool tests that use log/blk/btt pool types - removes other misc tests using pmempool with log/blk/btt pool types + - removes btt specific test and related btt tests tools + - removes btt support from pmemspoil - ... Wed May 31 2023 Oksana Sałyk diff --git a/src/test/Makefile b/src/test/Makefile index 6ceb5f2a783..8b85b3d581d 100644 --- a/src/test/Makefile +++ b/src/test/Makefile @@ -126,7 +126,6 @@ OBJ_TESTS = \ OTHER_TESTS = \ arch_flags\ - bttdevice\ checksum\ compat_incompat_features\ ctl_prefault\ @@ -248,10 +247,8 @@ LIBPMEMPOOL_DEPS = \ LIBPMEMPOOL_TESTS = \ libpmempool_include\ libpmempool_backup\ - libpmempool_bttdev\ libpmempool_check_version\ libpmempool_feature\ - libpmempool_map_flog\ libpmempool_rm LIBPMEMPOOL_MOD_DEPS = \ diff --git a/src/test/Makefile.inc b/src/test/Makefile.inc index e38f5d0bb6b..057a3bd07d3 100644 --- a/src/test/Makefile.inc +++ b/src/test/Makefile.inc @@ -658,13 +658,6 @@ ifeq ($(USE_PMEMSPOIL), y) all: $(TOOLS)/pmemspoil/pmemspoil endif -$(TOOLS)/bttcreate/bttcreate: - $(MAKE) -C $(TOOLS)/bttcreate all - -ifeq ($(USE_BTTCREATE), y) -all: $(TOOLS)/bttcreate/bttcreate -endif - $(TOOLS)/pmemwrite/pmemwrite: $(MAKE) -C $(TOOLS)/pmemwrite all diff --git a/src/test/bttdevice/Makefile b/src/test/bttdevice/Makefile deleted file mode 100644 index 2a7832cc0a3..00000000000 --- a/src/test/bttdevice/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016, Intel Corporation - -# -# src/test/bttdevice/Makefile -- build unittest for testing tools operating -# on btt device -# -USE_PMEMSPOIL=y -USE_BTTCREATE=y - -include ../Makefile.inc diff --git a/src/test/bttdevice/README b/src/test/bttdevice/README deleted file mode 100644 index fa28ea2397e..00000000000 --- a/src/test/bttdevice/README +++ /dev/null @@ -1,9 +0,0 @@ -Persistent Memory Development Kit - -This is src/test/bttdevice/README. - -This directory contains a unit test for tools that use btt device. - -The tests in this directory verify the creation of btt pool, -support for corrupting the pool in pmemspoil tool and analyzing -the pool by pmempool info. diff --git a/src/test/bttdevice/TEST0 b/src/test/bttdevice/TEST0 deleted file mode 100755 index 96b0092419e..00000000000 --- a/src/test/bttdevice/TEST0 +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2018, Intel Corporation -# -# -# bttdevice/TEST0 -- test for checking bttcreate tool -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type any - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG - -echo "Create btt device - uuid defined by the user" >> $LOG -expect_normal_exit $BTTCREATE -s 20M -b 1K -l 256 \ - -u "9047cad6-53e1-4ba8-bcdd-a9fb411f7392" -v $POOL >> $LOG - -expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOL >> $LOG -check_file $POOL -rm -f $POOL - -echo -e "\nCreate btt device - automatic uuid generation" >> $LOG -expect_normal_exit $BTTCREATE -s 40M -b 2K -l 256 -v $POOL >> $LOG - -expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOL >> $LOG -check_file $POOL - -check - -pass diff --git a/src/test/bttdevice/TEST1 b/src/test/bttdevice/TEST1 deleted file mode 100755 index 025832fa6c5..00000000000 --- a/src/test/bttdevice/TEST1 +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2018, Intel Corporation -# -# -# bttdevice/TEST1 -- test for checking pmempool info for spoiled btt device -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type any - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG - -expect_normal_exit $BTTCREATE -v $POOL >> $LOG - -$PMEMSPOIL -v $POOL "bttdevice.arena(0).btt_info.sig=BADSIGNATURE"\ - "bttdevice.arena(0).btt_info.external_lbasize=10"\ - "bttdevice.arena(0).btt_info.major=0x0" >> $LOG - -expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOL -f btt >> $LOG -check_file $POOL - -check - -pass diff --git a/src/test/bttdevice/out0.log.match b/src/test/bttdevice/out0.log.match deleted file mode 100644 index db9890213f8..00000000000 --- a/src/test/bttdevice/out0.log.match +++ /dev/null @@ -1,67 +0,0 @@ -Create btt device - uuid defined by the user -BTT successfully created: $(nW) -poolsize 20971520B -blocksize 1024B -maxlanes 256 -uuid 9047cad6-53e1-4ba8-bcdd-a9fb411f7392 - - -BTT Device -[ARENA 0] -PMEM BLK BTT Info Header: -Signature : BTT_ARENA_INFO -UUID of container : 9047cad6-53e1-4ba8-bcdd-a9fb411f7392 -Flags : 0x0 -Major : 1 -Minor : 1 -External LBA size : 1024 -$(OPT)External LBA count : 20112 -$(OPX)External LBA count : 20052 -Internal LBA size : 1024 -$(OPT)Internal LBA count : 20368 -$(OPX)Internal LBA count : 20308 -Free blocks : 256 -Info block size : 4096 -Next arena offset : 0x0 -Arena data offset : 0x1000 -$(OPT)Area map offset : 0x13e6000 -$(OPX)Area map offset : 0x13d7000 -$(OPT)Area flog offset : 0x13fa000 -$(OPX)Area flog offset : 0x13eb000 -$(OPT)Info block backup offset : 0x13fe000 -$(OPX)Info block backup offset : 0x13ef000 -Checksum : $(XX) [OK] - -Create btt device - automatic uuid generation -BTT successfully created: $(nW) -poolsize 41943040B -blocksize 2048B -maxlanes 256 -uuid $(nW) - - -BTT Device -[ARENA 0] -PMEM BLK BTT Info Header: -Signature : BTT_ARENA_INFO -UUID of container : $(nW) -Flags : 0x0 -Major : 1 -Minor : 1 -External LBA size : 2048 -$(OPT)External LBA count : 20168 -$(OPX)External LBA count : 20138 -Internal LBA size : 2048 -$(OPT)Internal LBA count : 20424 -$(OPX)Internal LBA count : 20394 -Free blocks : 256 -Info block size : 4096 -Next arena offset : 0x0 -Arena data offset : 0x1000 -$(OPT)Area map offset : 0x27e6000 -$(OPX)Area map offset : 0x27d7000 -$(OPT)Area flog offset : 0x27fa000 -$(OPX)Area flog offset : 0x27eb000 -$(OPT)Info block backup offset : 0x27fe000 -$(OPX)Info block backup offset : 0x27ef000 -Checksum : $(XX) [OK] diff --git a/src/test/bttdevice/out1.log.match b/src/test/bttdevice/out1.log.match deleted file mode 100644 index db930a8f1ea..00000000000 --- a/src/test/bttdevice/out1.log.match +++ /dev/null @@ -1,35 +0,0 @@ -BTT successfully created: $(nW) -poolsize 20971520B -blocksize 512B -maxlanes 256 -uuid $(nW) - -$(nW): spoil: bttdevice.arena(0).btt_info.sig=BADSIGNATURE -$(nW): spoil: bttdevice.arena(0).btt_info.external_lbasize=10 -$(nW): spoil: bttdevice.arena(0).btt_info.major=0x0 - -BTT Device -[ARENA 0] -PMEM BLK BTT Info Header: -Signature : BADSIGNATUREFO -UUID of container : $(nW) -Flags : 0x0 -Major : 0 -Minor : 1 -External LBA size : 10 -$(OPT)External LBA count : 40322 -$(OPX)External LBA count : 40203 -Internal LBA size : 512 -$(OPT)Internal LBA count : 40578 -$(OPX)Internal LBA count : 40459 -Free blocks : 256 -Info block size : 4096 -Next arena offset : 0x0 -Arena data offset : 0x1000 -$(OPT)Area map offset : 0x13d2000 -$(OPX)Area map offset : 0x13c3000 -$(OPT)Area flog offset : 0x13fa000 -$(OPX)Area flog offset : 0x13eb000 -$(OPT)Info block backup offset : 0x13fe000 -$(OPX)Info block backup offset : 0x13ef000 -Checksum : $(XX) [wrong! should be: $(XX)] diff --git a/src/test/libpmempool_api/Makefile b/src/test/libpmempool_api/Makefile index 817f8b99499..a594fc22477 100644 --- a/src/test/libpmempool_api/Makefile +++ b/src/test/libpmempool_api/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2019, Intel Corporation +# Copyright 2016-2023, Intel Corporation # # src/test/libpmempool_api/Makefile -- build libpmempool_api unittest @@ -11,6 +11,5 @@ OBJS = libpmempool_test.o LIBPMEMPOOL=y USE_PMEMSPOIL=y USE_PMEMWRITE=y -USE_BTTCREATE=y include ../Makefile.inc diff --git a/src/test/libpmempool_api/Makefile.inc b/src/test/libpmempool_api/Makefile.inc index f8e320c6f0b..96cb5dbf0a6 100644 --- a/src/test/libpmempool_api/Makefile.inc +++ b/src/test/libpmempool_api/Makefile.inc @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2018, Intel Corporation +# Copyright 2016-2023, Intel Corporation # # src/test/libpmempool_api/Makefile.inc -- build libpmempool_* unittest @@ -11,6 +11,5 @@ all: ../libpmempool_api/libpmempool_test USE_PMEMSPOIL=y -USE_BTTCREATE=y include ../Makefile.inc diff --git a/src/test/libpmempool_api/libpmempool_test.c b/src/test/libpmempool_api/libpmempool_test.c index 59d49694710..f2f0f0e6e75 100644 --- a/src/test/libpmempool_api/libpmempool_test.c +++ b/src/test/libpmempool_api/libpmempool_test.c @@ -118,8 +118,6 @@ main(int argc, char *argv[]) args.pool_type = PMEMPOOL_POOL_TYPE_LOG; } else if (strcmp(optarg, "obj") == 0) { args.pool_type = PMEMPOOL_POOL_TYPE_OBJ; - } else if (strcmp(optarg, "btt") == 0) { - args.pool_type = PMEMPOOL_POOL_TYPE_BTT; } else { args.pool_type = (uint32_t)strtoul(optarg, NULL, 0); diff --git a/src/test/libpmempool_bttdev/Makefile b/src/test/libpmempool_bttdev/Makefile deleted file mode 100644 index 8ca9ae97273..00000000000 --- a/src/test/libpmempool_bttdev/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016, Intel Corporation - -# -# src/test/libpmempool_bttdev/Makefile -- build libpmempool_bttdev unittest -# - -include ../libpmempool_api/Makefile.inc diff --git a/src/test/libpmempool_bttdev/README b/src/test/libpmempool_bttdev/README deleted file mode 100644 index 1bdf8d7f8d4..00000000000 --- a/src/test/libpmempool_bttdev/README +++ /dev/null @@ -1,5 +0,0 @@ -Persistent Memory Development Kit - -This is src/test/pmempool_bttdev/README. - -This directory contains a unit test for btt device. diff --git a/src/test/libpmempool_bttdev/TEST0 b/src/test/libpmempool_bttdev/TEST0 deleted file mode 100755 index 70d3eddc572..00000000000 --- a/src/test/libpmempool_bttdev/TEST0 +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2018, Intel Corporation -# -# -# libpmempool_bttdev/TEST0 -- test for checking API -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type any - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG -EXE=../libpmempool_api/libpmempool_test - -expect_normal_exit $BTTCREATE $POOL >> $LOG - -expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt $POOL >> $LOG - -check_file $POOL - -check - -pass diff --git a/src/test/libpmempool_bttdev/TEST1 b/src/test/libpmempool_bttdev/TEST1 deleted file mode 100755 index 41e2bf3f350..00000000000 --- a/src/test/libpmempool_bttdev/TEST1 +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2018, Intel Corporation -# -# -# libpmempool_bttdev/TEST1 -- test for checking btt -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type any - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG -EXE=../libpmempool_api/libpmempool_test - -expect_normal_exit $BTTCREATE $POOL >> $LOG - -$PMEMSPOIL $POOL "bttdevice.arena(0).btt_info.sig=ERROR"\ - "bttdevice.arena(0).btt_info_backup.sig=ERROR" - -expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt $POOL >> $LOG - -check_file $POOL - -check - -pass diff --git a/src/test/libpmempool_bttdev/TEST10 b/src/test/libpmempool_bttdev/TEST10 deleted file mode 100755 index eb91be0052d..00000000000 --- a/src/test/libpmempool_bttdev/TEST10 +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2018, Intel Corporation -# -# -# libpmempool_bttdev/TEST10 -- test for checking btt -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type any - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG -EXE=../libpmempool_api/libpmempool_test - -expect_normal_exit $BTTCREATE $POOL >> $LOG - -$PMEMSPOIL $POOL "bttdevice.arena(0).btt_info.checksum=777"\ - "bttdevice.arena(0).btt_info.sig=ERROR"\ - "bttdevice.arena(0).btt_info_backup.checksum=777" - -expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt $POOL >> $LOG - -check_file $POOL - -check - -pass diff --git a/src/test/libpmempool_bttdev/TEST11 b/src/test/libpmempool_bttdev/TEST11 deleted file mode 100755 index 55d2083db3a..00000000000 --- a/src/test/libpmempool_bttdev/TEST11 +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2021, Intel Corporation -# -# -# libpmempool_bttdev/TEST11 -- test for checking btt -# - -. ../unittest/unittest.sh - -require_test_type medium -require_fs_type any -require_unlimited_vm - -# Valgrind cannot trace more than 32G which is required for this test -configure_valgrind memcheck force-disable - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG -EXE=../libpmempool_api/libpmempool_test - -truncate -s1T $POOL -expect_normal_exit $BTTCREATE -s 1T -b 512M -t $POOL >> $LOG - -$PMEMSPOIL $POOL "bttdevice.arena(1).btt_info.checksum=777"\ - "bttdevice.arena(1).btt_info.sig=ERROR"\ - "bttdevice.arena(1).btt_info_backup.checksum=777" - -expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt $POOL >> $LOG - -check_file $POOL - -check - -pass diff --git a/src/test/libpmempool_bttdev/TEST2 b/src/test/libpmempool_bttdev/TEST2 deleted file mode 100755 index f5c5e49edce..00000000000 --- a/src/test/libpmempool_bttdev/TEST2 +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2018, Intel Corporation -# -# -# libpmempool_bttdev/TEST2 -- test for checking btt -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type any - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -LOG_TEMP=out${UNITTEST_NUM}_part.log -rm -f $LOG && touch $LOG -rm -f $LOG_TEMP && touch $LOG_TEMP -EXE=../libpmempool_api/libpmempool_test - -expect_normal_exit $BTTCREATE $POOL >> $LOG - -$PMEMSPOIL $POOL "bttdevice.arena(0).btt_info_backup.sig=ERROR" -expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt $POOL >> $LOG -cat $LOG >> $LOG_TEMP - -$PMEMSPOIL $POOL "bttdevice.arena(0).btt_info.sig=ERROR" -expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt $POOL >> $LOG -cat $LOG >> $LOG_TEMP - -mv $LOG_TEMP $LOG - -check_file $POOL - -check - -pass diff --git a/src/test/libpmempool_bttdev/TEST3 b/src/test/libpmempool_bttdev/TEST3 deleted file mode 100755 index 45c0d528dc9..00000000000 --- a/src/test/libpmempool_bttdev/TEST3 +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2021, Intel Corporation -# -# -# libpmempool_bttdev/TEST3 -- test for checking btt -# - -. ../unittest/unittest.sh - -require_test_type medium -require_fs_type any -require_unlimited_vm - -# Valgrind cannot trace more than 32G which is required for this test -configure_valgrind memcheck force-disable - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG -EXE=../libpmempool_api/libpmempool_test - -truncate -s1T $POOL -expect_normal_exit $BTTCREATE -s 1T -b 512M -t $POOL >> $LOG - -$PMEMSPOIL $POOL "bttdevice.arena(0).btt_info.sig=ERROR"\ - "bttdevice.arena(0).btt_info_backup.sig=ERROR"\ - "bttdevice.arena(1).btt_info_backup.sig=ERROR" - -expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt $POOL >> $LOG - -check_file $POOL - -check - -pass diff --git a/src/test/libpmempool_bttdev/TEST4 b/src/test/libpmempool_bttdev/TEST4 deleted file mode 100755 index 4190eef9ce2..00000000000 --- a/src/test/libpmempool_bttdev/TEST4 +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2021, Intel Corporation -# -# -# libpmempool_bttdev/TEST4 -- test for checking btt -# - -. ../unittest/unittest.sh - -require_test_type medium -require_fs_type any -require_unlimited_vm - -# Valgrind cannot trace more than 32G which is required for this test -configure_valgrind memcheck force-disable - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG -EXE=../libpmempool_api/libpmempool_test - -truncate -s1T $POOL -expect_normal_exit $BTTCREATE -s 1T -b 512M -t $POOL >> $LOG - -$PMEMSPOIL $POOL "bttdevice.arena(0).btt_info.sig=ERROR"\ - "bttdevice.arena(0).btt_info_backup.sig=ERROR"\ - "bttdevice.arena(1).btt_info.sig=ERROR" - -expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt $POOL >> $LOG - -check_file $POOL - -check - -pass diff --git a/src/test/libpmempool_bttdev/TEST5 b/src/test/libpmempool_bttdev/TEST5 deleted file mode 100755 index c3ef2f17b4f..00000000000 --- a/src/test/libpmempool_bttdev/TEST5 +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2021, Intel Corporation -# -# -# libpmempool_bttdev/TEST5 -- test for checking btt -# - -. ../unittest/unittest.sh - -require_test_type medium -require_fs_type any -require_unlimited_vm - -# Valgrind cannot trace more than 32G which is required for this test -configure_valgrind memcheck force-disable - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG -EXE=../libpmempool_api/libpmempool_test - -truncate -s1T $POOL -expect_normal_exit $BTTCREATE -s 1T -b 512M -t $POOL >> $LOG - -$PMEMSPOIL $POOL "bttdevice.arena(0).btt_info.sig=ERROR"\ - "bttdevice.arena(0).btt_info_backup.sig=ERROR"\ - "bttdevice.arena(1).btt_info.sig=ERROR"\ - "bttdevice.arena(1).btt_info_backup.sig=ERROR" - -expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt $POOL >> $LOG - -check_file $POOL - -check - -pass diff --git a/src/test/libpmempool_bttdev/TEST6 b/src/test/libpmempool_bttdev/TEST6 deleted file mode 100755 index 1a05e08397a..00000000000 --- a/src/test/libpmempool_bttdev/TEST6 +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2021, Intel Corporation -# -# -# libpmempool_bttdev/TEST6 -- test for checking btt -# - -. ../unittest/unittest.sh - -require_test_type medium -require_fs_type any -require_unlimited_vm - -# Valgrind cannot trace more than 32G which is required for this test -configure_valgrind memcheck force-disable - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG -EXE=../libpmempool_api/libpmempool_test - -truncate -s2T $POOL -expect_normal_exit $BTTCREATE -s 2T -b 512M -t $POOL >> $LOG - -$PMEMSPOIL $POOL "bttdevice.arena(0).btt_info.sig=ERROR"\ - "bttdevice.arena(0).btt_info_backup.sig=ERROR"\ - "bttdevice.arena(1).btt_info.sig=ERROR"\ - "bttdevice.arena(1).btt_info_backup.sig=ERROR"\ - "bttdevice.arena(2).btt_info.sig=ERROR"\ - "bttdevice.arena(2).btt_info_backup.sig=ERROR"\ - "bttdevice.arena(3).btt_info.checksum=13" - -expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt $POOL >> $LOG - -check_file $POOL - -check - -pass diff --git a/src/test/libpmempool_bttdev/TEST7 b/src/test/libpmempool_bttdev/TEST7 deleted file mode 100755 index f1475bc1b17..00000000000 --- a/src/test/libpmempool_bttdev/TEST7 +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2018, Intel Corporation -# -# -# libpmempool_bttdev/TEST7 -- test for checking btt -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type any - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -rm -f $LOG && touch $LOG -EXE=../libpmempool_api/libpmempool_test - -expect_normal_exit $BTTCREATE $POOL >> $LOG - -$PMEMSPOIL -v $POOL "bttdevice.arena(0).btt_info.sig=BADSIGNATURE"\ - "bttdevice.arena(0).btt_info.external_lbasize=10"\ - "bttdevice.arena(0).btt_info.major=0x0" >> $LOG - -expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt $POOL >> $LOG - -check_file $POOL - -check - -pass diff --git a/src/test/libpmempool_bttdev/TEST8 b/src/test/libpmempool_bttdev/TEST8 deleted file mode 100755 index 889ef33845b..00000000000 --- a/src/test/libpmempool_bttdev/TEST8 +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2018, Intel Corporation -# -# -# libpmempool_bttdev/TEST8 -- test for checking btt -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type any - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -LOG_TEMP=out${UNITTEST_NUM}_part.log -rm -f $LOG && touch $LOG -rm -f $LOG_TEMP && touch $LOG_TEMP -EXE=../libpmempool_api/libpmempool_test - -expect_normal_exit $BTTCREATE $POOL >> $LOG - -declare -A btt_info_dic_err=(["sig"]="ERROR" ["uuid"]="01-02" - ["flags"]="7" ["major"]="7" ["minor"]="7" - ["nfree"]="7" ["infosize"]="7" ["nextoff"]="7" - ["dataoff"]="7" ["infooff"]="7" ["unused"]="7" - ["parent_uuid"]="03-04" ["mapoff"]="7" ["flogoff"]="7") - -for field in flags unused major sig nextoff infosize infooff dataoff nfree mapoff uuid parent_uuid flogoff minor -do - spcmd="bttdevice.arena(0).btt_info.$field=${btt_info_dic_err["$field"]}" - - rm -f $POOL - - expect_normal_exit $BTTCREATE $POOL - $PMEMSPOIL -v $POOL $spcmd >> $LOG_TEMP - - expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt $POOL - cat $LOG >> $LOG_TEMP - - check_file $POOL -done - -mv $LOG_TEMP $LOG - -check - -pass diff --git a/src/test/libpmempool_bttdev/TEST9 b/src/test/libpmempool_bttdev/TEST9 deleted file mode 100755 index d1f87abb307..00000000000 --- a/src/test/libpmempool_bttdev/TEST9 +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2018, Intel Corporation -# -# -# libpmempool_bttdev/TEST9 -- test for checking btt -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type any - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -LOG_TEMP=out${UNITTEST_NUM}_part.log -rm -f $LOG && touch $LOG -rm -f $LOG_TEMP && touch $LOG_TEMP -EXE=../libpmempool_api/libpmempool_test - -expect_normal_exit $BTTCREATE $POOL >> $LOG - -declare -A btt_info_dic_err=(["sig"]="ERROR" ["uuid"]="01-02" - ["flags"]="7" ["major"]="7" ["minor"]="7" - ["nfree"]="7" ["infosize"]="7" ["nextoff"]="7" - ["dataoff"]="7" ["infooff"]="7" ["unused"]="7") - -for field in flags unused major sig nextoff infosize infooff dataoff nfree uuid minor -do - spcmd=$spcmd"bttdevice.arena(0).btt_info.$field=${btt_info_dic_err["$field"]} " - - rm -f $POOL - - expect_normal_exit $BTTCREATE $POOL - $PMEMSPOIL -v $POOL $spcmd >> $LOG_TEMP - - expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt $POOL - cat $LOG >> $LOG_TEMP - - check_file $POOL -done - -mv $LOG_TEMP $LOG - -check - -pass diff --git a/src/test/libpmempool_bttdev/out0.log.match b/src/test/libpmempool_bttdev/out0.log.match deleted file mode 100644 index 551f5da973c..00000000000 --- a/src/test/libpmempool_bttdev/out0.log.match +++ /dev/null @@ -1,8 +0,0 @@ -libpmempool_bttdev/TEST0: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = consistent -libpmempool_bttdev/TEST0: DONE diff --git a/src/test/libpmempool_bttdev/out1.log.match b/src/test/libpmempool_bttdev/out1.log.match deleted file mode 100644 index 9389f346f74..00000000000 --- a/src/test/libpmempool_bttdev/out1.log.match +++ /dev/null @@ -1,6 +0,0 @@ -libpmempool_bttdev/TEST1: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -can not find any valid BTT Info -status = not consistent -libpmempool_bttdev/TEST1: DONE diff --git a/src/test/libpmempool_bttdev/out10.log.match b/src/test/libpmempool_bttdev/out10.log.match deleted file mode 100644 index 35a6d9f9988..00000000000 --- a/src/test/libpmempool_bttdev/out10.log.match +++ /dev/null @@ -1,6 +0,0 @@ -libpmempool_bttdev/TEST10: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -can not find any valid BTT Info -status = not consistent -libpmempool_bttdev/TEST10: DONE diff --git a/src/test/libpmempool_bttdev/out11.log.match b/src/test/libpmempool_bttdev/out11.log.match deleted file mode 100644 index 759d24ecdc2..00000000000 --- a/src/test/libpmempool_bttdev/out11.log.match +++ /dev/null @@ -1,10 +0,0 @@ -libpmempool_bttdev/TEST11: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -arena 1: BTT Info header checksum incorrect. Do you want to regenerate BTT Info? -arena 1: regenerating BTT Info header -the following error can be fixed using PMEMPOOL_CHECK_ADVANCED flag -arena 1: BTT Info header checksum incorrect -status = cannot repair -libpmempool_bttdev/TEST11: DONE diff --git a/src/test/libpmempool_bttdev/out2.log.match b/src/test/libpmempool_bttdev/out2.log.match deleted file mode 100644 index c07df5c153c..00000000000 --- a/src/test/libpmempool_bttdev/out2.log.match +++ /dev/null @@ -1,19 +0,0 @@ -libpmempool_bttdev/TEST2: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -arena 0: BTT Info backup checksum incorrect. Do you want to restore it from BTT Info header? -arena 0: restoring BTT Info backup from header -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST2: DONE -libpmempool_bttdev/TEST2: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST2: DONE diff --git a/src/test/libpmempool_bttdev/out3.log.match b/src/test/libpmempool_bttdev/out3.log.match deleted file mode 100644 index 984262f52a2..00000000000 --- a/src/test/libpmempool_bttdev/out3.log.match +++ /dev/null @@ -1,16 +0,0 @@ -libpmempool_bttdev/TEST3: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Do you want to regenerate BTT Info? -arena 0: regenerating BTT Info header -arena 0: BTT Info header checksum correct -arena 0: BTT Info backup checksum incorrect. Do you want to restore it from BTT Info header? -arena 0: restoring BTT Info backup from header -arena 1: BTT Info header checksum correct -arena 1: BTT Info backup checksum incorrect. Do you want to restore it from BTT Info header? -arena 1: restoring BTT Info backup from header -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -arena 1: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST3: DONE diff --git a/src/test/libpmempool_bttdev/out4.log.match b/src/test/libpmempool_bttdev/out4.log.match deleted file mode 100644 index 9a352ee192c..00000000000 --- a/src/test/libpmempool_bttdev/out4.log.match +++ /dev/null @@ -1,15 +0,0 @@ -libpmempool_bttdev/TEST4: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Do you want to regenerate BTT Info? -arena 0: regenerating BTT Info header -arena 0: BTT Info header checksum correct -arena 0: BTT Info backup checksum incorrect. Do you want to restore it from BTT Info header? -arena 0: restoring BTT Info backup from header -arena 1: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 1: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -arena 1: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST4: DONE diff --git a/src/test/libpmempool_bttdev/out5.log.match b/src/test/libpmempool_bttdev/out5.log.match deleted file mode 100644 index e28feb59ac3..00000000000 --- a/src/test/libpmempool_bttdev/out5.log.match +++ /dev/null @@ -1,6 +0,0 @@ -libpmempool_bttdev/TEST5: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -can not find any valid BTT Info -status = not consistent -libpmempool_bttdev/TEST5: DONE diff --git a/src/test/libpmempool_bttdev/out6.log.match b/src/test/libpmempool_bttdev/out6.log.match deleted file mode 100644 index abd4a71c973..00000000000 --- a/src/test/libpmempool_bttdev/out6.log.match +++ /dev/null @@ -1,27 +0,0 @@ -libpmempool_bttdev/TEST6: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Do you want to regenerate BTT Info? -arena 0: regenerating BTT Info header -arena 0: BTT Info header checksum correct -arena 0: BTT Info backup checksum incorrect. Do you want to restore it from BTT Info header? -arena 0: restoring BTT Info backup from header -arena 1: BTT Info header checksum incorrect. Do you want to regenerate BTT Info? -arena 1: regenerating BTT Info header -arena 1: BTT Info header checksum correct -arena 1: BTT Info backup checksum incorrect. Do you want to restore it from BTT Info header? -arena 1: restoring BTT Info backup from header -arena 2: BTT Info header checksum incorrect. Do you want to regenerate BTT Info? -arena 2: regenerating BTT Info header -arena 2: BTT Info header checksum correct -arena 2: BTT Info backup checksum incorrect. Do you want to restore it from BTT Info header? -arena 2: restoring BTT Info backup from header -arena 3: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 3: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -arena 1: checking BTT Map and Flog -arena 2: checking BTT Map and Flog -arena 3: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST6: DONE diff --git a/src/test/libpmempool_bttdev/out7.log.match b/src/test/libpmempool_bttdev/out7.log.match deleted file mode 100644 index 4a7e2f61931..00000000000 --- a/src/test/libpmempool_bttdev/out7.log.match +++ /dev/null @@ -1,9 +0,0 @@ -libpmempool_bttdev/TEST7: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST7: DONE diff --git a/src/test/libpmempool_bttdev/out8.log.match b/src/test/libpmempool_bttdev/out8.log.match deleted file mode 100644 index 2558f7fa625..00000000000 --- a/src/test/libpmempool_bttdev/out8.log.match +++ /dev/null @@ -1,140 +0,0 @@ -$(nW)test_libpmempool_bttdev8$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.flags=7 -libpmempool_bttdev/TEST8: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST8: DONE -$(nW)test_libpmempool_bttdev8$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.unused=7 -libpmempool_bttdev/TEST8: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST8: DONE -$(nW)test_libpmempool_bttdev8$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.major=7 -libpmempool_bttdev/TEST8: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST8: DONE -$(nW)test_libpmempool_bttdev8$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.sig=ERROR -libpmempool_bttdev/TEST8: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST8: DONE -$(nW)test_libpmempool_bttdev8$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.nextoff=7 -libpmempool_bttdev/TEST8: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST8: DONE -$(nW)test_libpmempool_bttdev8$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.infosize=7 -libpmempool_bttdev/TEST8: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST8: DONE -$(nW)test_libpmempool_bttdev8$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.infooff=7 -libpmempool_bttdev/TEST8: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST8: DONE -$(nW)test_libpmempool_bttdev8$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.dataoff=7 -libpmempool_bttdev/TEST8: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST8: DONE -$(nW)test_libpmempool_bttdev8$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.nfree=7 -libpmempool_bttdev/TEST8: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST8: DONE -$(nW)test_libpmempool_bttdev8$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.mapoff=7 -libpmempool_bttdev/TEST8: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST8: DONE -$(nW)test_libpmempool_bttdev8$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.uuid=01-02 -libpmempool_bttdev/TEST8: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST8: DONE -$(nW)test_libpmempool_bttdev8$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.parent_uuid=03-04 -libpmempool_bttdev/TEST8: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST8: DONE -$(nW)test_libpmempool_bttdev8$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.flogoff=7 -libpmempool_bttdev/TEST8: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST8: DONE -$(nW)test_libpmempool_bttdev8$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.minor=7 -libpmempool_bttdev/TEST8: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST8: DONE diff --git a/src/test/libpmempool_bttdev/out9.log.match b/src/test/libpmempool_bttdev/out9.log.match deleted file mode 100644 index a0d44ac118d..00000000000 --- a/src/test/libpmempool_bttdev/out9.log.match +++ /dev/null @@ -1,165 +0,0 @@ -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.flags=7 -libpmempool_bttdev/TEST9: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST9: DONE -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.flags=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.unused=7 -libpmempool_bttdev/TEST9: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST9: DONE -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.flags=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.unused=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.major=7 -libpmempool_bttdev/TEST9: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST9: DONE -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.flags=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.unused=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.major=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.sig=ERROR -libpmempool_bttdev/TEST9: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST9: DONE -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.flags=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.unused=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.major=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.sig=ERROR -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.nextoff=7 -libpmempool_bttdev/TEST9: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST9: DONE -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.flags=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.unused=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.major=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.sig=ERROR -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.nextoff=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.infosize=7 -libpmempool_bttdev/TEST9: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST9: DONE -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.flags=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.unused=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.major=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.sig=ERROR -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.nextoff=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.infosize=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.infooff=7 -libpmempool_bttdev/TEST9: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST9: DONE -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.flags=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.unused=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.major=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.sig=ERROR -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.nextoff=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.infosize=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.infooff=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.dataoff=7 -libpmempool_bttdev/TEST9: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST9: DONE -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.flags=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.unused=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.major=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.sig=ERROR -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.nextoff=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.infosize=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.infooff=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.dataoff=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.nfree=7 -libpmempool_bttdev/TEST9: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST9: DONE -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.flags=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.unused=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.major=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.sig=ERROR -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.nextoff=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.infosize=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.infooff=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.dataoff=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.nfree=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.uuid=01-02 -libpmempool_bttdev/TEST9: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST9: DONE -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.flags=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.unused=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.major=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.sig=ERROR -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.nextoff=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.infosize=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.infooff=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.dataoff=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.nfree=7 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.uuid=01-02 -$(nW)test_libpmempool_bttdev9$(nW)file.pool: spoil: bttdevice.arena(0).btt_info.minor=7 -libpmempool_bttdev/TEST9: START: libpmempool_test - $(nW)libpmempool_test$(nW) -r 1 -t btt $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum incorrect. Restore BTT Info from backup? -arena 0: restoring BTT Info header from backup -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = repaired -libpmempool_bttdev/TEST9: DONE diff --git a/src/test/libpmempool_map_flog/Makefile b/src/test/libpmempool_map_flog/Makefile deleted file mode 100644 index a335d2e041a..00000000000 --- a/src/test/libpmempool_map_flog/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016, Intel Corporation - -# -# src/test/libpmempool_map_flog/Makefile -- build libpmempool_map_flog unittest -# - -include ../libpmempool_api/Makefile.inc diff --git a/src/test/libpmempool_map_flog/README b/src/test/libpmempool_map_flog/README deleted file mode 100644 index 531489af868..00000000000 --- a/src/test/libpmempool_map_flog/README +++ /dev/null @@ -1,6 +0,0 @@ -Persistent Memory Development Kit - -This is src/test/libpmempool_map_flog/README. - -This directory contains a unit test for libpmempool check in context of -map and flog defects. diff --git a/src/test/libpmempool_map_flog/TEST0 b/src/test/libpmempool_map_flog/TEST0 deleted file mode 100755 index 8be64ea8506..00000000000 --- a/src/test/libpmempool_map_flog/TEST0 +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2018, Intel Corporation -# -# -# libpmempool_map_flog/TEST0 -- test for checking map and flog -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type any - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -LOG_TEMP=out${UNITTEST_NUM}_part.log -rm -f $LOG && touch $LOG -rm -f $LOG_TEMP && touch $LOG_TEMP -EXE=../libpmempool_api/libpmempool_test - -declare -A map_err=(["Initial"]="0" ["Error"]="4" - ["Zeroed"]="8" ["Normal"]="C") - -ent_val=2 - -for field in Zeroed Error Initial Normal; -do - for((i=0;i> $LOG_TEMP - $PMEMSPOIL $POOL $spcmd - - expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt -a 1 $POOL - cat $LOG >> $LOG_TEMP - done -done - -mv $LOG_TEMP $LOG -check_file $POOL - -check -pass diff --git a/src/test/libpmempool_map_flog/TEST1 b/src/test/libpmempool_map_flog/TEST1 deleted file mode 100755 index f7ee3afb7b3..00000000000 --- a/src/test/libpmempool_map_flog/TEST1 +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2018, Intel Corporation -# -# -# libpmempool_map_flog/TEST1 -- test for checking map and flog -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type any - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -LOG_TEMP=out${UNITTEST_NUM}_part.log -rm -f $LOG && touch $LOG -rm -f $LOG_TEMP && touch $LOG_TEMP -EXE=../libpmempool_api/libpmempool_test - -declare -A map_err=(["Initial"]="0" ["Error"]="4" - ["Zeroed"]="8" ["Normal"]="C") - -ent_val=6 - -for field in Zeroed Error Initial Normal; -do - expect_normal_exit $BTTCREATE $POOL - - for((i=0;i> $LOG_TEMP - $PMEMSPOIL $POOL $spcmd - done - - # duplicated entry - spcmd="bttdevice.arena.btt_map(6)=0x${map_err["$field"]}0000003" - echo ${field}: $spcmd >> $LOG_TEMP - $PMEMSPOIL $POOL $spcmd - - # lba number is higher then internal nlba - spcmd="bttdevice.arena.btt_map(2)=0x${map_err["$field"]}000FFFF" - echo ${field}: $spcmd >> $LOG_TEMP - $PMEMSPOIL $POOL $spcmd - - expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt -a 1 $POOL - cat $LOG >> $LOG_TEMP -done - -mv $LOG_TEMP $LOG -check_file $POOL - -check -pass diff --git a/src/test/libpmempool_map_flog/TEST2 b/src/test/libpmempool_map_flog/TEST2 deleted file mode 100755 index 1766f68e8ba..00000000000 --- a/src/test/libpmempool_map_flog/TEST2 +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2018, Intel Corporation -# -# -# libpmempool_map_flog/TEST2 -- test for checking map and flog -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type any - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -LOG_TEMP=out${UNITTEST_NUM}_part.log -rm -f $LOG && touch $LOG -rm -f $LOG_TEMP && touch $LOG_TEMP -EXE=../libpmempool_api/libpmempool_test - -declare -A map_err=(["Initial"]="0" ["Error"]="4" - ["Zeroed"]="8" ["Normal"]="C") - -ent_val=9 - -for field in Zeroed Error Initial Normal; -do - expect_normal_exit $BTTCREATE $POOL - - for((i=0;i> $LOG_TEMP - $PMEMSPOIL $POOL $spcmd - done - - spcmd="bttdevice.arena.btt_flog(3).seq=4" - echo ${field}: $spcmd >> $LOG_TEMP - $PMEMSPOIL $POOL $spcmd - - spcmd="bttdevice.arena.btt_flog(4).old_map=0x${map_err["$field"]}000FFFF" - echo ${field}: $spcmd >> $LOG_TEMP - $PMEMSPOIL $POOL $spcmd - - spcmd="bttdevice.arena.btt_flog(5).new_map=0x${map_err["$field"]}000FFFF" - echo ${field}: $spcmd >> $LOG_TEMP - $PMEMSPOIL $POOL $spcmd - - spcmd="bttdevice.arena.btt_flog(6).old_map=0x${map_err["$field"]}0000001" - echo ${field}: $spcmd >> $LOG_TEMP - $PMEMSPOIL $POOL $spcmd - - spcmd="bttdevice.arena.btt_flog(7).new_map=0x${map_err["$field"]}0000002" - echo ${field}: $spcmd >> $LOG_TEMP - $PMEMSPOIL $POOL $spcmd - - spcmd="bttdevice.arena.btt_flog(8).new_map=0x${map_err["$field"]}0000069" - echo ${field}: $spcmd >> $LOG_TEMP - $PMEMSPOIL $POOL $spcmd - - expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt -a 1 $POOL - cat $LOG >> $LOG_TEMP -done - -mv $LOG_TEMP $LOG -check_file $POOL - -check -pass diff --git a/src/test/libpmempool_map_flog/TEST3 b/src/test/libpmempool_map_flog/TEST3 deleted file mode 100755 index 6f258db2711..00000000000 --- a/src/test/libpmempool_map_flog/TEST3 +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2018, Intel Corporation -# -# -# libpmempool_map_flog/TEST3 -- test for checking map and flog -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type any - -setup - -POOL=$DIR/file.pool -LOG=out${UNITTEST_NUM}.log -LOG_TEMP=out${UNITTEST_NUM}_part.log -rm -f $LOG && touch $LOG -rm -f $LOG_TEMP && touch $LOG_TEMP -EXE=../libpmempool_api/libpmempool_test - -ent_val=10 - -expect_normal_exit $BTTCREATE $POOL - -for((i=0;i> $LOG_TEMP - $PMEMSPOIL $POOL $spcmd -done - -spcmd="bttdevice.arena.btt_map(5)=0xC0000002" -echo $spcmd >> $LOG_TEMP -$PMEMSPOIL $POOL $spcmd - -spcmd="bttdevice.arena.btt_map(6)=0xC0000002" -echo $spcmd >> $LOG_TEMP -$PMEMSPOIL $POOL $spcmd - -spcmd="bttdevice.arena.btt_map(7)=0xC0000002" -echo $spcmd >> $LOG_TEMP -$PMEMSPOIL $POOL $spcmd - -spcmd="bttdevice.arena.btt_map(10)=0xC0000002" -echo $spcmd >> $LOG_TEMP -$PMEMSPOIL $POOL $spcmd - -spcmd="bttdevice.arena.btt_map(11)=0xC0000002" -echo $spcmd >> $LOG_TEMP -$PMEMSPOIL $POOL $spcmd - -spcmd="bttdevice.arena.btt_map(12)=0xC0000003" -echo $spcmd >> $LOG_TEMP -$PMEMSPOIL $POOL $spcmd - -expect_normal_exit $EXE$EXESUFFIX -r 1 -t btt -a 1 $POOL -cat $LOG >> $LOG_TEMP - -expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOL -f btt -m\ - | $GREP "error" >> $LOG_TEMP - -mv $LOG_TEMP $LOG -check_file $POOL - -check -pass diff --git a/src/test/libpmempool_map_flog/out0.log.match b/src/test/libpmempool_map_flog/out0.log.match deleted file mode 100644 index d9843dbc05e..00000000000 --- a/src/test/libpmempool_map_flog/out0.log.match +++ /dev/null @@ -1,93 +0,0 @@ -Zeroed: bttdevice.arena.btt_map(0)=0x80000000 -libpmempool_map_flog$(nW)TEST0: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = consistent -libpmempool_map_flog$(nW)TEST0: DONE -Zeroed: bttdevice.arena.btt_map(0)=0x80000001 -libpmempool_map_flog$(nW)TEST0: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -arena 0: BTT Map entry 1 duplicated at 1 -arena 0: unmapped block 0 -arena 0: number of unmapped blocks: 1 -arena 0: number of invalid BTT Map entries: 1 -Do you want to repair invalid BTT Map entries? -arena 0: storing 0x40000001 at 0 BTT Map entry -arena 0: storing 0x40000000 at 1 BTT Map entry -status = repaired -libpmempool_map_flog$(nW)TEST0: DONE -Error: bttdevice.arena.btt_map(0)=0x40000000 -libpmempool_map_flog$(nW)TEST0: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = consistent -libpmempool_map_flog$(nW)TEST0: DONE -Error: bttdevice.arena.btt_map(0)=0x40000001 -libpmempool_map_flog$(nW)TEST0: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -arena 0: BTT Map entry 1 duplicated at 1 -arena 0: unmapped block 0 -arena 0: number of unmapped blocks: 1 -arena 0: number of invalid BTT Map entries: 1 -Do you want to repair invalid BTT Map entries? -arena 0: storing 0x40000001 at 0 BTT Map entry -arena 0: storing 0x40000000 at 1 BTT Map entry -status = repaired -libpmempool_map_flog$(nW)TEST0: DONE -Initial: bttdevice.arena.btt_map(0)=0x00000000 -libpmempool_map_flog$(nW)TEST0: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = consistent -libpmempool_map_flog$(nW)TEST0: DONE -Initial: bttdevice.arena.btt_map(0)=0x00000001 -libpmempool_map_flog$(nW)TEST0: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = consistent -libpmempool_map_flog$(nW)TEST0: DONE -Normal: bttdevice.arena.btt_map(0)=0xC0000000 -libpmempool_map_flog$(nW)TEST0: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = consistent -libpmempool_map_flog$(nW)TEST0: DONE -Normal: bttdevice.arena.btt_map(0)=0xC0000001 -libpmempool_map_flog$(nW)TEST0: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -arena 0: BTT Map entry 1 duplicated at 1 -arena 0: unmapped block 0 -arena 0: number of unmapped blocks: 1 -arena 0: number of invalid BTT Map entries: 1 -Do you want to repair invalid BTT Map entries? -arena 0: storing 0x40000001 at 0 BTT Map entry -arena 0: storing 0x40000000 at 1 BTT Map entry -status = repaired -libpmempool_map_flog$(nW)TEST0: DONE diff --git a/src/test/libpmempool_map_flog/out1.log.match b/src/test/libpmempool_map_flog/out1.log.match deleted file mode 100644 index c42f39bf907..00000000000 --- a/src/test/libpmempool_map_flog/out1.log.match +++ /dev/null @@ -1,94 +0,0 @@ -Zeroed: bttdevice.arena.btt_map(0)=0x80000000 -Zeroed: bttdevice.arena.btt_map(1)=0x80000001 -Zeroed: bttdevice.arena.btt_map(2)=0x80000002 -Zeroed: bttdevice.arena.btt_map(3)=0x80000003 -Zeroed: bttdevice.arena.btt_map(4)=0x80000004 -Zeroed: bttdevice.arena.btt_map(5)=0x80000005 -Zeroed: bttdevice.arena.btt_map(6)=0x80000003 -Zeroed: bttdevice.arena.btt_map(2)=0x8000FFFF -libpmempool_map_flog$(nW)TEST1: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -arena 0: invalid BTT Map entry at 2 -arena 0: BTT Map entry 3 duplicated at 6 -arena 0: unmapped block 2 -arena 0: unmapped block 6 -arena 0: number of unmapped blocks: 2 -arena 0: number of invalid BTT Map entries: 2 -Do you want to repair invalid BTT Map entries? -arena 0: storing 0x40000003 at 3 BTT Map entry -arena 0: storing 0x40000006 at 6 BTT Map entry -arena 0: storing 0x40000002 at 2 BTT Map entry -status = repaired -libpmempool_map_flog$(nW)TEST1: DONE -Error: bttdevice.arena.btt_map(0)=0x40000000 -Error: bttdevice.arena.btt_map(1)=0x40000001 -Error: bttdevice.arena.btt_map(2)=0x40000002 -Error: bttdevice.arena.btt_map(3)=0x40000003 -Error: bttdevice.arena.btt_map(4)=0x40000004 -Error: bttdevice.arena.btt_map(5)=0x40000005 -Error: bttdevice.arena.btt_map(6)=0x40000003 -Error: bttdevice.arena.btt_map(2)=0x4000FFFF -libpmempool_map_flog$(nW)TEST1: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -arena 0: invalid BTT Map entry at 2 -arena 0: BTT Map entry 3 duplicated at 6 -arena 0: unmapped block 2 -arena 0: unmapped block 6 -arena 0: number of unmapped blocks: 2 -arena 0: number of invalid BTT Map entries: 2 -Do you want to repair invalid BTT Map entries? -arena 0: storing 0x40000003 at 3 BTT Map entry -arena 0: storing 0x40000006 at 6 BTT Map entry -arena 0: storing 0x40000002 at 2 BTT Map entry -status = repaired -libpmempool_map_flog$(nW)TEST1: DONE -Initial: bttdevice.arena.btt_map(0)=0x00000000 -Initial: bttdevice.arena.btt_map(1)=0x00000001 -Initial: bttdevice.arena.btt_map(2)=0x00000002 -Initial: bttdevice.arena.btt_map(3)=0x00000003 -Initial: bttdevice.arena.btt_map(4)=0x00000004 -Initial: bttdevice.arena.btt_map(5)=0x00000005 -Initial: bttdevice.arena.btt_map(6)=0x00000003 -Initial: bttdevice.arena.btt_map(2)=0x0000FFFF -libpmempool_map_flog$(nW)TEST1: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -status = consistent -libpmempool_map_flog$(nW)TEST1: DONE -Normal: bttdevice.arena.btt_map(0)=0xC0000000 -Normal: bttdevice.arena.btt_map(1)=0xC0000001 -Normal: bttdevice.arena.btt_map(2)=0xC0000002 -Normal: bttdevice.arena.btt_map(3)=0xC0000003 -Normal: bttdevice.arena.btt_map(4)=0xC0000004 -Normal: bttdevice.arena.btt_map(5)=0xC0000005 -Normal: bttdevice.arena.btt_map(6)=0xC0000003 -Normal: bttdevice.arena.btt_map(2)=0xC000FFFF -libpmempool_map_flog$(nW)TEST1: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -arena 0: invalid BTT Map entry at 2 -arena 0: BTT Map entry 3 duplicated at 6 -arena 0: unmapped block 2 -arena 0: unmapped block 6 -arena 0: number of unmapped blocks: 2 -arena 0: number of invalid BTT Map entries: 2 -Do you want to repair invalid BTT Map entries? -arena 0: storing 0x40000003 at 3 BTT Map entry -arena 0: storing 0x40000006 at 6 BTT Map entry -arena 0: storing 0x40000002 at 2 BTT Map entry -status = repaired -libpmempool_map_flog$(nW)TEST1: DONE diff --git a/src/test/libpmempool_map_flog/out2.log.match b/src/test/libpmempool_map_flog/out2.log.match deleted file mode 100644 index 7a530951abe..00000000000 --- a/src/test/libpmempool_map_flog/out2.log.match +++ /dev/null @@ -1,164 +0,0 @@ -Zeroed: bttdevice.arena.btt_map(0)=0x80000000 -Zeroed: bttdevice.arena.btt_map(1)=0x80000001 -Zeroed: bttdevice.arena.btt_map(2)=0x80000002 -Zeroed: bttdevice.arena.btt_map(3)=0x80000003 -Zeroed: bttdevice.arena.btt_map(4)=0x80000004 -Zeroed: bttdevice.arena.btt_map(5)=0x80000005 -Zeroed: bttdevice.arena.btt_map(6)=0x80000006 -Zeroed: bttdevice.arena.btt_map(7)=0x80000007 -Zeroed: bttdevice.arena.btt_map(8)=0x80000008 -Zeroed: bttdevice.arena.btt_flog(3).seq=4 -Zeroed: bttdevice.arena.btt_flog(4).old_map=0x8000FFFF -Zeroed: bttdevice.arena.btt_flog(5).new_map=0x8000FFFF -Zeroed: bttdevice.arena.btt_flog(6).old_map=0x80000001 -Zeroed: bttdevice.arena.btt_flog(7).new_map=0x80000002 -Zeroed: bttdevice.arena.btt_flog(8).new_map=0x80000069 -libpmempool_map_flog$(nW)TEST2: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -arena 0: invalid BTT Flog entry at 3 -arena 0: invalid BTT Flog entry at 4 -arena 0: invalid BTT Flog entry at 5 -$(OPT)arena 0: unmapped block 40325 -$(OPX)arena 0: unmapped block 40206 -$(OPT)arena 0: unmapped block 40326 -$(OPX)arena 0: unmapped block 40207 -$(OPT)arena 0: unmapped block 40327 -$(OPX)arena 0: unmapped block 40208 -arena 0: number of unmapped blocks: 3 -arena 0: number of invalid BTT Flog entries: 3 -Do you want to repair invalid BTT Flog entries? -$(OPT)arena 0: repairing BTT Flog at 5 with free block entry 0x40009d87 -$(OPX)arena 0: repairing BTT Flog at 5 with free block entry 0x40009d10 -$(OPT)arena 0: repairing BTT Flog at 4 with free block entry 0x40009d86 -$(OPX)arena 0: repairing BTT Flog at 4 with free block entry 0x40009d0f -$(OPT)arena 0: repairing BTT Flog at 3 with free block entry 0x40009d85 -$(OPX)arena 0: repairing BTT Flog at 3 with free block entry 0x40009d0e -status = repaired -libpmempool_map_flog$(nW)TEST2: DONE -Error: bttdevice.arena.btt_map(0)=0x40000000 -Error: bttdevice.arena.btt_map(1)=0x40000001 -Error: bttdevice.arena.btt_map(2)=0x40000002 -Error: bttdevice.arena.btt_map(3)=0x40000003 -Error: bttdevice.arena.btt_map(4)=0x40000004 -Error: bttdevice.arena.btt_map(5)=0x40000005 -Error: bttdevice.arena.btt_map(6)=0x40000006 -Error: bttdevice.arena.btt_map(7)=0x40000007 -Error: bttdevice.arena.btt_map(8)=0x40000008 -Error: bttdevice.arena.btt_flog(3).seq=4 -Error: bttdevice.arena.btt_flog(4).old_map=0x4000FFFF -Error: bttdevice.arena.btt_flog(5).new_map=0x4000FFFF -Error: bttdevice.arena.btt_flog(6).old_map=0x40000001 -Error: bttdevice.arena.btt_flog(7).new_map=0x40000002 -Error: bttdevice.arena.btt_flog(8).new_map=0x40000069 -libpmempool_map_flog$(nW)TEST2: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -arena 0: invalid BTT Flog entry at 3 -arena 0: invalid BTT Flog entry at 4 -arena 0: invalid BTT Flog entry at 5 -$(OPT)arena 0: unmapped block 40325 -$(OPX)arena 0: unmapped block 40206 -$(OPT)arena 0: unmapped block 40326 -$(OPX)arena 0: unmapped block 40207 -$(OPT)arena 0: unmapped block 40327 -$(OPX)arena 0: unmapped block 40208 -arena 0: number of unmapped blocks: 3 -arena 0: number of invalid BTT Flog entries: 3 -Do you want to repair invalid BTT Flog entries? -$(OPT)arena 0: repairing BTT Flog at 5 with free block entry 0x40009d87 -$(OPX)arena 0: repairing BTT Flog at 5 with free block entry 0x40009d10 -$(OPT)arena 0: repairing BTT Flog at 4 with free block entry 0x40009d86 -$(OPX)arena 0: repairing BTT Flog at 4 with free block entry 0x40009d0f -$(OPT)arena 0: repairing BTT Flog at 3 with free block entry 0x40009d85 -$(OPX)arena 0: repairing BTT Flog at 3 with free block entry 0x40009d0e -status = repaired -libpmempool_map_flog$(nW)TEST2: DONE -Initial: bttdevice.arena.btt_map(0)=0x00000000 -Initial: bttdevice.arena.btt_map(1)=0x00000001 -Initial: bttdevice.arena.btt_map(2)=0x00000002 -Initial: bttdevice.arena.btt_map(3)=0x00000003 -Initial: bttdevice.arena.btt_map(4)=0x00000004 -Initial: bttdevice.arena.btt_map(5)=0x00000005 -Initial: bttdevice.arena.btt_map(6)=0x00000006 -Initial: bttdevice.arena.btt_map(7)=0x00000007 -Initial: bttdevice.arena.btt_map(8)=0x00000008 -Initial: bttdevice.arena.btt_flog(3).seq=4 -Initial: bttdevice.arena.btt_flog(4).old_map=0x0000FFFF -Initial: bttdevice.arena.btt_flog(5).new_map=0x0000FFFF -Initial: bttdevice.arena.btt_flog(6).old_map=0x00000001 -Initial: bttdevice.arena.btt_flog(7).new_map=0x00000002 -Initial: bttdevice.arena.btt_flog(8).new_map=0x00000069 -libpmempool_map_flog$(nW)TEST2: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -arena 0: invalid BTT Flog entry at 3 -arena 0: invalid BTT Flog entry at 4 -arena 0: invalid BTT Flog entry at 5 -$(OPT)arena 0: unmapped block 40325 -$(OPX)arena 0: unmapped block 40206 -$(OPT)arena 0: unmapped block 40326 -$(OPX)arena 0: unmapped block 40207 -$(OPT)arena 0: unmapped block 40327 -$(OPX)arena 0: unmapped block 40208 -arena 0: number of unmapped blocks: 3 -arena 0: number of invalid BTT Flog entries: 3 -Do you want to repair invalid BTT Flog entries? -$(OPT)arena 0: repairing BTT Flog at 5 with free block entry 0x40009d87 -$(OPX)arena 0: repairing BTT Flog at 5 with free block entry 0x40009d10 -$(OPT)arena 0: repairing BTT Flog at 4 with free block entry 0x40009d86 -$(OPX)arena 0: repairing BTT Flog at 4 with free block entry 0x40009d0f -$(OPT)arena 0: repairing BTT Flog at 3 with free block entry 0x40009d85 -$(OPX)arena 0: repairing BTT Flog at 3 with free block entry 0x40009d0e -status = repaired -libpmempool_map_flog$(nW)TEST2: DONE -Normal: bttdevice.arena.btt_map(0)=0xC0000000 -Normal: bttdevice.arena.btt_map(1)=0xC0000001 -Normal: bttdevice.arena.btt_map(2)=0xC0000002 -Normal: bttdevice.arena.btt_map(3)=0xC0000003 -Normal: bttdevice.arena.btt_map(4)=0xC0000004 -Normal: bttdevice.arena.btt_map(5)=0xC0000005 -Normal: bttdevice.arena.btt_map(6)=0xC0000006 -Normal: bttdevice.arena.btt_map(7)=0xC0000007 -Normal: bttdevice.arena.btt_map(8)=0xC0000008 -Normal: bttdevice.arena.btt_flog(3).seq=4 -Normal: bttdevice.arena.btt_flog(4).old_map=0xC000FFFF -Normal: bttdevice.arena.btt_flog(5).new_map=0xC000FFFF -Normal: bttdevice.arena.btt_flog(6).old_map=0xC0000001 -Normal: bttdevice.arena.btt_flog(7).new_map=0xC0000002 -Normal: bttdevice.arena.btt_flog(8).new_map=0xC0000069 -libpmempool_map_flog$(nW)TEST2: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -arena 0: invalid BTT Flog entry at 3 -arena 0: invalid BTT Flog entry at 4 -arena 0: invalid BTT Flog entry at 5 -$(OPT)arena 0: unmapped block 40325 -$(OPX)arena 0: unmapped block 40206 -$(OPT)arena 0: unmapped block 40326 -$(OPX)arena 0: unmapped block 40207 -$(OPT)arena 0: unmapped block 40327 -$(OPX)arena 0: unmapped block 40208 -arena 0: number of unmapped blocks: 3 -arena 0: number of invalid BTT Flog entries: 3 -Do you want to repair invalid BTT Flog entries? -$(OPT)arena 0: repairing BTT Flog at 5 with free block entry 0x40009d87 -$(OPX)arena 0: repairing BTT Flog at 5 with free block entry 0x40009d10 -$(OPT)arena 0: repairing BTT Flog at 4 with free block entry 0x40009d86 -$(OPX)arena 0: repairing BTT Flog at 4 with free block entry 0x40009d0f -$(OPT)arena 0: repairing BTT Flog at 3 with free block entry 0x40009d85 -$(OPX)arena 0: repairing BTT Flog at 3 with free block entry 0x40009d0e -status = repaired -libpmempool_map_flog$(nW)TEST2: DONE diff --git a/src/test/libpmempool_map_flog/out3.log.match b/src/test/libpmempool_map_flog/out3.log.match deleted file mode 100644 index e1bc49ee759..00000000000 --- a/src/test/libpmempool_map_flog/out3.log.match +++ /dev/null @@ -1,55 +0,0 @@ -bttdevice.arena.btt_map(0)=0xC0000000 -bttdevice.arena.btt_map(1)=0xC0000001 -bttdevice.arena.btt_map(2)=0xC0000002 -bttdevice.arena.btt_map(3)=0xC0000003 -bttdevice.arena.btt_map(4)=0xC0000004 -bttdevice.arena.btt_map(5)=0xC0000005 -bttdevice.arena.btt_map(6)=0xC0000006 -bttdevice.arena.btt_map(7)=0xC0000007 -bttdevice.arena.btt_map(8)=0xC0000008 -bttdevice.arena.btt_map(9)=0xC0000009 -bttdevice.arena.btt_map(5)=0xC0000002 -bttdevice.arena.btt_map(6)=0xC0000002 -bttdevice.arena.btt_map(7)=0xC0000002 -bttdevice.arena.btt_map(10)=0xC0000002 -bttdevice.arena.btt_map(11)=0xC0000002 -bttdevice.arena.btt_map(12)=0xC0000003 -libpmempool_map_flog$(nW)TEST3: START: libpmempool_test$(nW) - $(nW)libpmempool_test$(nW) -r 1 -t btt -a 1 $(nW) -checking BTT Info headers -arena 0: BTT Info header checksum correct -checking BTT Map and Flog -arena 0: checking BTT Map and Flog -arena 0: BTT Map entry 2 duplicated at 5 -arena 0: BTT Map entry 2 duplicated at 6 -arena 0: BTT Map entry 2 duplicated at 7 -arena 0: BTT Map entry 2 duplicated at 10 -arena 0: BTT Map entry 2 duplicated at 11 -arena 0: BTT Map entry 3 duplicated at 12 -arena 0: unmapped block 5 -arena 0: unmapped block 6 -arena 0: unmapped block 7 -arena 0: unmapped block 10 -arena 0: unmapped block 11 -arena 0: unmapped block 12 -arena 0: number of unmapped blocks: 6 -arena 0: number of invalid BTT Map entries: 6 -Do you want to repair invalid BTT Map entries? -arena 0: storing 0x40000002 at 2 BTT Map entry -arena 0: storing 0x40000003 at 3 BTT Map entry -arena 0: storing 0x4000000c at 12 BTT Map entry -arena 0: storing 0x4000000b at 11 BTT Map entry -arena 0: storing 0x4000000a at 10 BTT Map entry -arena 0: storing 0x40000007 at 7 BTT Map entry -arena 0: storing 0x40000006 at 6 BTT Map entry -arena 0: storing 0x40000005 at 5 BTT Map entry -status = repaired -libpmempool_map_flog$(nW)TEST3: DONE -0000000002: 0x00000002 state: error -0000000003: 0x00000003 state: error -0000000005: 0x00000005 state: error -0000000006: 0x00000006 state: error -0000000007: 0x00000007 state: error -0000000010: 0x0000000a state: error -0000000011: 0x0000000b state: error -0000000012: 0x0000000c state: error diff --git a/src/test/pmempool_create/TEST1 b/src/test/pmempool_create/TEST1 deleted file mode 100755 index f8f901b3ce4..00000000000 --- a/src/test/pmempool_create/TEST1 +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2018, Intel Corporation -# -# -# pmempool_create/TEST1 -- test for creating pmemblk pool with btt layout -# - -. ../unittest/unittest.sh - -require_test_type medium - -require_fs_type pmem non-pmem - -setup - -POOL=$DIR/file.pool - -# PMEMBLK with layout -expect_normal_exit $PMEMPOOL$EXESUFFIX create -w blk 512 $POOL -check_file $POOL -check_signature PMEMBLK $POOL -check_arena $POOL - -pass diff --git a/src/test/tools/Makefile b/src/test/tools/Makefile index 0f21e3f7de0..8d677bf1979 100644 --- a/src/test/tools/Makefile +++ b/src/test/tools/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2015-2022, Intel Corporation +# Copyright 2015-2023, Intel Corporation # # src/test/tools/Makefile -- build unit test helpers @@ -15,7 +15,6 @@ DIRS = \ pmemalloc\ pmemobjcli\ pmemdetect\ - bttcreate\ gran_detecto\ ddmap\ cmpmap\ diff --git a/src/test/tools/bttcreate/.gitignore b/src/test/tools/bttcreate/.gitignore deleted file mode 100644 index 08e50c3e754..00000000000 --- a/src/test/tools/bttcreate/.gitignore +++ /dev/null @@ -1 +0,0 @@ -bttcreate diff --git a/src/test/tools/bttcreate/Makefile b/src/test/tools/bttcreate/Makefile deleted file mode 100644 index ce78bb4935c..00000000000 --- a/src/test/tools/bttcreate/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016, Intel Corporation -# -# Makefile -- Makefile for bttcreate tool -# -TOP = ../../../.. - -vpath %.c $(TOP)/src/libpmemblk/ - -TARGET = bttcreate -OBJS = bttcreate.o btt.o - -LIBPMEMCOMMON=y -LIBPMEM=y - -include $(TOP)/src/tools/Makefile.inc -INCS += -I$(TOP)/src/libpmemblk diff --git a/src/test/tools/bttcreate/README b/src/test/tools/bttcreate/README deleted file mode 100644 index 45f8718b1e5..00000000000 --- a/src/test/tools/bttcreate/README +++ /dev/null @@ -1,22 +0,0 @@ -Persistent Memory Development Kit - -This is src/test/tools/bttcreate/README. - -This directory contains a tool for creating BTT pool in given file. -It's used as a helper program by some unit tests. - -Usage: - $ bttcreate [-s ] [-b ] - [-l ] [-u ] [-t] [-v] - - Valid arguments: - -s - size of the pool file (i.e. size of the pool + 4KB) - -b - block size - -l - maximum number of lanes - -u - parent uuid (generated by default) - -t - do not allocate blocks - -v - verbose - -Example: - ./bttcreate file_name -s 20M -b 1K -l 256 - -u "9047cad6-53e1-4ba8-bcdd-a9fb411f7392" -v diff --git a/src/test/tools/bttcreate/bttcreate.c b/src/test/tools/bttcreate/bttcreate.c deleted file mode 100644 index 688689c31a9..00000000000 --- a/src/test/tools/bttcreate/bttcreate.c +++ /dev/null @@ -1,363 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -/* Copyright 2016-2023, Intel Corporation */ -/* - * bttcreate.c -- tool for generating BTT layout - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "set.h" -#include "pool_hdr.h" -#include "btt.h" -#include "btt_layout.h" -#include "pmemcommon.h" -#include "os.h" -#include "util.h" -#include "page_size.h" - -#define BTT_CREATE_DEF_SIZE (20 * (1UL << 20)) /* 20 MB */ -#define BTT_CREATE_DEF_BLK_SIZE 512UL -#define BTT_CREATE_DEF_OFFSET_SIZE PMEM_PAGESIZE - -struct btt_context { - void *addr; - uint64_t len; -}; - -struct bbtcreate_options { - const char *fpath; - size_t poolsize; - uint32_t blocksize; - unsigned maxlanes; - uuid_t uuid; - bool trunc; - bool verbose; - bool user_uuid; -}; - -/* - * nsread -- btt callback for reading - */ -static int -nsread(void *ns, unsigned lane, void *buf, size_t count, - uint64_t off) -{ - struct btt_context *nsc = (struct btt_context *)ns; - - if (off + count > nsc->len) { - errno = EINVAL; - return -1; - } - memcpy(buf, (char *)nsc->addr + off, count); - return 0; -} - -/* - * nswrite -- btt callback for writing - */ -static int -nswrite(void *ns, unsigned lane, const void *buf, - size_t count, uint64_t off) -{ - struct btt_context *nsc = (struct btt_context *)ns; - - if (off + count > nsc->len) { - errno = EINVAL; - return -1; - } - - memcpy((char *)nsc->addr + off, buf, count); - - return 0; -} - -/* - * nsmap -- btt callback for memory mapping - */ -static ssize_t -nsmap(void *ns, unsigned lane, void **addrp, size_t len, - uint64_t off) -{ - struct btt_context *nsc = (struct btt_context *)ns; - - assert((ssize_t)len >= 0); - if (off + len >= nsc->len) { - errno = EINVAL; - return -1; - } - - /* - * Since the entire file is memory-mapped, this callback - * can always provide the entire length requested. - */ - *addrp = (char *)nsc->addr + off; - return (ssize_t)len; -} - -/* - * nssync -- btt callback for memory synchronization - */ -static void -nssync(void *ns, unsigned lane, void *addr, size_t len) -{ - /* do nothing */ -} - -/* - * nszero -- btt callback for zeroing memory - */ -static int -nszero(void *ns, unsigned lane, size_t len, uint64_t off) -{ - struct btt_context *nsc = (struct btt_context *)ns; - if (off + len >= nsc->len) { - errno = EINVAL; - return -1; - } - memset((char *)nsc->addr + off, 0, len); - return 0; -} - -/* - * print_usage -- print usage of program - */ -static void -print_usage(char *name) -{ - printf("Usage: %s [-s ] [-b ] " - "[-l ] [-u ] [-t] [-v] " - "\n", name); -} - -/* - * file_error -- handle file errors - */ -static int -file_error(const int fd, const char *fpath) -{ - if (fd != -1) - (void) os_close(fd); - os_unlink(fpath); - return -1; -} - -/* - * print_uuid -- print uuid - */ -static void -print_uuid(uuid_t uuid) -{ - char uuidstr[POOL_HDR_UUID_STR_LEN]; - if (util_uuid_to_string(uuid, uuidstr) == 0) { - printf("uuid\t\t%s\n", uuidstr); - } -} - -/* - * print_result -- print result if verbose option is on - */ -static void -print_result(struct bbtcreate_options *opts) -{ - if (opts->verbose) { - printf("BTT successfully created: %s\n", opts->fpath); - printf("poolsize\t%zuB\n", opts->poolsize); - printf("blocksize\t%uB\n", opts->blocksize); - printf("maxlanes\t%u\n", opts->maxlanes); - print_uuid(opts->uuid); - putchar('\n'); - } -} - -int -main(int argc, char *argv[]) -{ - common_init("", "", "", 0, 0); - - int opt; - size_t size; - int fd; - int res = 0; - struct bbtcreate_options opts = { - .poolsize = BTT_CREATE_DEF_SIZE, - .blocksize = BTT_CREATE_DEF_BLK_SIZE, - .maxlanes = BTT_DEFAULT_NFREE, - .trunc = false, - .verbose = false, - .user_uuid = false - }; - - /* parse option */ - while ((opt = getopt(argc, argv, "s:b:l:u:tv")) != -1) { - switch (opt) { - case 's': - if (util_parse_size(optarg, &size) == 0) { - opts.poolsize = size; - } else { - fprintf(stderr, "Wrong size format in pool" - " size option\n"); - res = 1; - goto out; - } - break; - case 'b': - if (util_parse_size(optarg, &size) == 0) { - opts.blocksize = (uint32_t)size; - } else { - fprintf(stderr, "Wrong size format in block" - " size option\n"); - res = 1; - goto out; - } - break; - case 'l': - opts.maxlanes = (unsigned)strtoul(optarg, NULL, 0); - break; - case 'u': - if (util_uuid_from_string(optarg, - (struct uuid *)&opts.uuid) == 0) { - opts.user_uuid = true; - } else { - fprintf(stderr, "Wrong uuid format."); - res = 1; - goto out; - } - break; - case 't': - opts.trunc = true; - break; - case 'v': - opts.verbose = true; - break; - default: - print_usage(argv[0]); - res = 1; - goto out; - } - } - if (optind < argc) { - opts.fpath = argv[optind]; - } else { - print_usage(argv[0]); - res = 1; - goto out; - } - - /* check sizes */ - if (opts.poolsize - BTT_CREATE_DEF_OFFSET_SIZE < BTT_MIN_SIZE) { - fprintf(stderr, "Pool size is less then %d MB\n", - BTT_MIN_SIZE >> 20); - res = 1; - goto out; - } - if (opts.blocksize < BTT_MIN_LBA_SIZE) { - fprintf(stderr, "Block size is less then %zu B\n", - BTT_MIN_LBA_SIZE); - res = 1; - goto out; - } - - /* open file */ - if ((fd = os_open(opts.fpath, O_RDWR|O_CREAT, - S_IRUSR|S_IWUSR)) < 0) { - perror(opts.fpath); - res = 1; - goto out; - } - - /* allocate file */ - if (!opts.trunc) { - if (os_posix_fallocate(fd, 0, - (os_off_t)opts.poolsize) != 0) { - perror("posix_fallocate"); - res = file_error(fd, opts.fpath); - goto error; - } - } else { - if (os_ftruncate(fd, (os_off_t)opts.poolsize) != 0) { - perror("ftruncate"); - res = file_error(fd, opts.fpath); - goto error; - } - } - - /* map created file */ - void *base = util_map(fd, 0, opts.poolsize, MAP_SHARED, 0, 0, NULL); - if (!base) { - perror("util_map"); - res = file_error(fd, opts.fpath); - goto error_map; - } - - /* setup btt context */ - struct btt_context btt_context = { - .addr = (void *)((uint64_t)base + BTT_CREATE_DEF_OFFSET_SIZE), - .len = opts.poolsize - BTT_CREATE_DEF_OFFSET_SIZE - }; - - /* generate uuid */ - if (!opts.user_uuid) { - if (util_uuid_generate(opts.uuid) < 0) { - perror("util_uuid_generate"); - res = -1; - goto error_map; - } - } - - /* init callback structure */ - static struct ns_callback btt_ns_callback = { - .nsread = nsread, - .nswrite = nswrite, - .nsmap = nsmap, - .nssync = nssync, - .nszero = nszero, - }; - - /* init btt in requested area */ - struct btt *bttp = btt_init(opts.poolsize - BTT_CREATE_DEF_OFFSET_SIZE, - opts.blocksize, opts.uuid, opts.maxlanes, - (void *)&btt_context, - &btt_ns_callback); - if (!bttp) { - printf("Error: Cannot initialize BTT layer\n"); - res = -1; - goto error_map; - } - - /* initialize metadata */ - if (btt_set_error(bttp, 0, 0)) { - perror("btt_set_error"); - res = -1; - goto error_btt; - } - if (btt_set_zero(bttp, 0, 0)) { - perror("btt_set_zero"); - res = -1; - goto error_btt; - } - - /* print results */ - print_result(&opts); - -error_btt: - btt_fini(bttp); - if (util_unmap(base, opts.poolsize) < 0) { - perror("!util_unmap"); - res = -1; - } -error_map: - common_fini(); -error: - os_close(fd); -out: - return res; -} diff --git a/src/test/tools/pmemspoil/README b/src/test/tools/pmemspoil/README index e464d4c337e..1ede7b7c5d9 100644 --- a/src/test/tools/pmemspoil/README +++ b/src/test/tools/pmemspoil/README @@ -25,26 +25,9 @@ The pmemspoil supports the following structures: - pmemlog - see log.h for details - pmemblk - see blk.h for details - arena - specify arena index - - btt_info - see btt_layout.h for details - - btt_info_backup - the same as btt_info but refers to BTT Info - backup header - - btt_flog - see btt_layout.h for details - - btt_flog_prime - the same as btt_flog but refers to second - instance of FLOG entry - - btt_map - BTT Map entries, see btt_layout.h for details - - bttdevice - analogical to pmemblk but for BTT device Examples: In order to change pool_hdr's signature and start offset of pmemlog pool: $ pmemspoil /path/to/file pool_hdr.signature=ERROR\ pmemlog.start_offset=0x0 - -For pmemblk pool file you can modify a signature in BTT Info header of second -arena using the following command: - $ pmemspoil /path/to/file "pmemblk.arena(1).btt_info.sig=ERROR" - -In order to change BTT Map entry number 20 and 5th flog sequence number in 3rd -arena: - $ pmemspoil /path/to/file "pmemblk.arena(3).btt_map(20)=0x0"\ - "pmemblk.arena(3).btt_flog(5).seq=0xff" diff --git a/src/test/tools/pmemspoil/spoil.c b/src/test/tools/pmemspoil/spoil.c index d7ea9fda1cb..a51d4eb1ee5 100644 --- a/src/test/tools/pmemspoil/spoil.c +++ b/src/test/tools/pmemspoil/spoil.c @@ -1026,23 +1026,6 @@ pmemspoil_process_pmemblk(struct pmemspoil *psp, return PROCESS_RET; } -/* - * pmemspoil_process_bttdevice -- process btt device fields - */ -static int -pmemspoil_process_bttdevice(struct pmemspoil *psp, - struct pmemspoil_list *pfp, void *arg) -{ - PROCESS_BEGIN(psp, pfp) { - PROCESS(arena, - pmemspoil_get_arena_offset(psp, PROCESS_INDEX, - ALIGN_UP(sizeof(struct pool_hdr), - BTT_ALIGNMENT)), - UINT32_MAX, uint64_t); - } PROCESS_END - return PROCESS_RET; -} - /* * pmemspoil_process_pmemlog -- process pmemlog fields */ @@ -1232,7 +1215,6 @@ pmemspoil_process(struct pmemspoil *psp, PROCESS(pmemlog, NULL, 1, void *); PROCESS(pmemblk, NULL, 1, void *); PROCESS(pmemobj, NULL, 1, void *); - PROCESS(bttdevice, NULL, 1, void *); } PROCESS_END return PROCESS_RET; diff --git a/src/test/unittest/unittest.sh b/src/test/unittest/unittest.sh index 6998f59e3ff..be077a9d1ba 100644 --- a/src/test/unittest/unittest.sh +++ b/src/test/unittest/unittest.sh @@ -127,7 +127,6 @@ LIB_TOOLS="../../tools" [ "$PMEMPOOL" ] || PMEMPOOL=$LIB_TOOLS/pmempool/pmempool [ "$DAXIO" ] || DAXIO=$LIB_TOOLS/daxio/daxio [ "$PMEMSPOIL" ] || PMEMSPOIL=$TOOLS/pmemspoil/pmemspoil.static-nondebug -[ "$BTTCREATE" ] || BTTCREATE=$TOOLS/bttcreate/bttcreate.static-nondebug [ "$PMEMWRITE" ] || PMEMWRITE=$TOOLS/pmemwrite/pmemwrite [ "$PMEMALLOC" ] || PMEMALLOC=$TOOLS/pmemalloc/pmemalloc [ "$PMEMOBJCLI" ] || PMEMOBJCLI=$TOOLS/pmemobjcli/pmemobjcli @@ -1938,15 +1937,6 @@ SIG_LEN=8 LAYOUT_OFFSET=$(getconf PAGE_SIZE) LAYOUT_LEN=1024 -# Length of arena's signature -ARENA_SIG_LEN=16 - -# Signature of BTT Arena -ARENA_SIG="BTT_ARENA_INFO" - -# Offset to first arena -ARENA_OFF=$(($(getconf PAGE_SIZE) * 2)) - # # check_file -- check if file exists and print error message if not # @@ -2085,20 +2075,6 @@ check_layout() fi } -# -# check_arena -- check if file contains specified arena signature -# -check_arena() -{ - local file=$1 - local sig=$($DD if=$file bs=1 skip=$ARENA_OFF count=$ARENA_SIG_LEN 2>/dev/null | tr -d \\0) - - if [[ $sig != $ARENA_SIG ]] - then - fatal "error: can't find arena signature" - fi -} - # # dump_pool_info -- dump selected pool metadata and/or user data #