Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/test/obj_ndctl_bb/TEST1
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@

. ../unittest/unittest.sh

require_real_pmem
require_ndctl_enable
require_test_type short

setup

require_sds ./obj_ndctl_bb

TMP=tmp${UNITTEST_NUM}.log
rm -f $TMP

Expand Down
3 changes: 2 additions & 1 deletion src/test/obj_ndctl_sds/TEST1
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@

. ../unittest/unittest.sh

require_real_pmem
require_ndctl_enable
require_test_type short

setup

require_sds ./obj_ndctl_sds

TMP=tmp${UNITTEST_NUM}.log
rm -f $TMP

Expand Down
7 changes: 2 additions & 5 deletions src/test/obj_pool/TEST32
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
. ../unittest/unittest.sh

require_test_type medium
# For non-pmem POOL_FEAT_CHECK_BAD_BLOCKS is turned off via PMEMOBJ_CONF="sds.at_create=0"
require_real_pmem
require_sds ./obj_pool

setup

require_sds ./obj_pool

#
# TEST32 existing file, file size >= min required size,
# layout matches the value from pool header
Expand All @@ -26,8 +25,6 @@ expect_normal_exit ./obj_pool$EXESUFFIX c $DIR/testfile "test" 20 0640
# create a bad block recovery file
create_recovery_file $DIR/testfile_r0_p0_badblocks.txt

turn_on_checking_bad_blocks $DIR/testfile

# pmemobj_open() should fail, because the bad block recovery file exists
expect_normal_exit ./obj_pool$EXESUFFIX o $DIR/testfile "test"

Expand Down
7 changes: 2 additions & 5 deletions src/test/obj_pool/TEST33
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
. ../unittest/unittest.sh

require_test_type medium
# For non-pmem POOL_FEAT_CHECK_BAD_BLOCKS is turned off via PMEMOBJ_CONF="sds.at_create=0"
require_real_pmem
require_sds ./obj_pool

setup

require_sds ./obj_pool

POOLSET=$DIR/testset1
create_poolset $POOLSET 10M:$DIR/testfile0:z 10M:$DIR/testfile1:z 10M:$DIR/testfile2:z \
R 30M:$DIR/testfile3:z
Expand All @@ -33,8 +32,6 @@ create_recovery_file $DIR/testset1_r0_p1_badblocks.txt
create_recovery_file $DIR/testset1_r0_p2_badblocks.txt
create_recovery_file $DIR/testset1_r1_p0_badblocks.txt

turn_on_checking_bad_blocks $DIR/testset1

# pmemobj_open() should fail, because the bad block recovery files exist
expect_normal_exit ./obj_pool$EXESUFFIX o $DIR/testset1 "test"

Expand Down
3 changes: 2 additions & 1 deletion src/test/pmempool_sync/TEST32
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@

. ../unittest/unittest.sh

require_real_pmem
require_test_type medium
require_build_type debug nondebug
require_linked_with_ndctl $PMEMPOOL$EXESUFFIX

setup

require_sds $PMEMPOOL$EXESUFFIX

LOG=out${UNITTEST_NUM}.log
rm -f $LOG && touch $LOG

Expand Down
5 changes: 2 additions & 3 deletions src/test/pmempool_sync/TEST33
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@

. ../unittest/unittest.sh

require_real_pmem
require_test_type medium
require_build_type debug nondebug
require_linked_with_ndctl $PMEMPOOL$EXESUFFIX

setup

require_sds $PMEMPOOL$EXESUFFIX

LOG=out${UNITTEST_NUM}.log
rm -f $LOG && touch $LOG

Expand All @@ -36,8 +37,6 @@ expect_normal_exit $PMEMPOOL$EXESUFFIX create obj --layout pmempool$SUFFIX $POOL

expect_normal_exit "$OBJ_VERIFY$EXESUFFIX $POOLSET pmempool$SUFFIX c v &>> $LOG"

turn_on_checking_bad_blocks $POOLSET

# zero blocks: offset: 0 length: 250
zero_blocks $DIR/testfile1 0 250

Expand Down
5 changes: 2 additions & 3 deletions src/test/pmempool_sync/TEST34
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@

. setup.sh

require_real_pmem
require_test_type medium
require_build_type debug nondebug
require_linked_with_ndctl $PMEMPOOL$EXESUFFIX

setup

require_sds $PMEMPOOL$EXESUFFIX

LOG=out${UNITTEST_NUM}.log
rm -f $LOG && touch $LOG

Expand Down Expand Up @@ -50,8 +51,6 @@ create_recovery_file $DIR/testset1_r0_p1_badblocks.txt
create_recovery_file $DIR/testset1_r0_p2_badblocks.txt
create_recovery_file $DIR/testset1_r1_p0_badblocks.txt

turn_on_checking_bad_blocks $POOLSET

# fail because of recovery files
expect_abnormal_exit "$OBJ_VERIFY$EXESUFFIX $POOLSET pmempool$SUFFIX v &>> $LOG"

Expand Down
5 changes: 2 additions & 3 deletions src/test/pmempool_sync/TEST35
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@

. setup.sh

require_real_pmem
require_test_type medium
require_build_type debug nondebug
require_linked_with_ndctl $PMEMPOOL$EXESUFFIX

setup

require_sds $PMEMPOOL$EXESUFFIX

LOG=out${UNITTEST_NUM}.log
rm -f $LOG && touch $LOG

Expand Down Expand Up @@ -50,8 +51,6 @@ create_recovery_file $DIR/testset1_r0_p1_badblocks.txt 1000 250
create_recovery_file $DIR/testset1_r0_p2_badblocks.txt
create_recovery_file $DIR/testset1_r1_p0_badblocks.txt

turn_on_checking_bad_blocks $POOLSET

# fail because of recovery files
expect_abnormal_exit "$OBJ_VERIFY$EXESUFFIX $POOLSET pmempool$SUFFIX v &>> $LOG"

Expand Down
5 changes: 2 additions & 3 deletions src/test/pmempool_sync/TEST36
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@

. setup.sh

require_real_pmem
require_test_type medium
require_build_type debug nondebug
require_linked_with_ndctl $PMEMPOOL$EXESUFFIX

setup

require_sds $PMEMPOOL$EXESUFFIX

LOG=out${UNITTEST_NUM}.log
rm -f $LOG && touch $LOG

Expand All @@ -39,8 +40,6 @@ expect_normal_exit $PMEMPOOL$EXESUFFIX create obj --layout pmempool$SUFFIX $POOL

expect_normal_exit "$OBJ_VERIFY$EXESUFFIX $POOLSET pmempool$SUFFIX c v &>> $LOG"

turn_on_checking_bad_blocks $POOLSET

# zero blocks: offset: 1000 length: 250
zero_blocks $DIR/testfile0 1000 250

Expand Down
5 changes: 2 additions & 3 deletions src/test/pmempool_sync/TEST37
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@

. setup.sh

require_real_pmem
require_test_type medium
require_build_type debug nondebug
require_linked_with_ndctl $PMEMPOOL$EXESUFFIX

setup

require_sds $PMEMPOOL$EXESUFFIX

LOG=out${UNITTEST_NUM}.log
rm -f $LOG && touch $LOG

Expand All @@ -39,8 +40,6 @@ expect_normal_exit $PMEMPOOL$EXESUFFIX create obj --layout pmempool$SUFFIX $POOL

expect_normal_exit "$OBJ_VERIFY$EXESUFFIX $POOLSET pmempool$SUFFIX c v &>> $LOG"

turn_on_checking_bad_blocks $POOLSET

# zero blocks: offset: 125 length: 125
zero_blocks $DIR/testfile1 125 125

Expand Down
8 changes: 3 additions & 5 deletions src/test/pmempool_sync/TEST43
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018-2024, Intel Corporation
# Copyright 2025, Hewlett Packard Enterprise Development LP
# Copyright 2025-2026, Hewlett Packard Enterprise Development LP
#
#
# pmempool_sync/TEST43 -- test for sync command with badblocks
Expand All @@ -12,14 +12,14 @@

. ../unittest/unittest.sh

require_real_pmem
require_test_type medium
require_fs_type non-pmem
require_build_type debug nondebug
require_linked_with_ndctl $PMEMPOOL$EXESUFFIX

setup

require_sds $PMEMPOOL$EXESUFFIX

export PMEMPOOL_LOG_LEVEL=10

LOG=out${UNITTEST_NUM}.log
Expand Down Expand Up @@ -57,8 +57,6 @@ create_recovery_file $DIR/testset1_r1_p0_badblocks.txt
create_recovery_file $DIR/testset1_r1_p1_badblocks.txt 126 2
create_recovery_file $DIR/testset1_r1_p2_badblocks.txt

turn_on_checking_bad_blocks $POOLSET

# fixing bad blocks should fail
expect_abnormal_exit "$PMEMPOOL$EXESUFFIX sync -v -b $POOLSET &>> $LOG"

Expand Down
8 changes: 3 additions & 5 deletions src/test/pmempool_sync/TEST44
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018-2024, Intel Corporation
# Copyright 2025, Hewlett Packard Enterprise Development LP
# Copyright 2025-2026, Hewlett Packard Enterprise Development LP
#
#
# pmempool_sync/TEST44 -- test for sync command with badblocks
Expand All @@ -17,14 +17,14 @@

. setup.sh

require_real_pmem
require_test_type medium
require_fs_type non-pmem
require_build_type debug nondebug
require_linked_with_ndctl $PMEMPOOL$EXESUFFIX

setup

require_sds $PMEMPOOL$EXESUFFIX

export PMEMPOOL_LOG_LEVEL=10

LOG=out${UNITTEST_NUM}.log
Expand Down Expand Up @@ -72,8 +72,6 @@ create_recovery_file $DIR/testset1_r2_p0_badblocks.txt 1000 1 1002 1
create_recovery_file $DIR/testset1_r2_p1_badblocks.txt
create_recovery_file $DIR/testset1_r2_p2_badblocks.txt

turn_on_checking_bad_blocks $POOLSET

# fail because of bad blocks
expect_abnormal_exit "$OBJ_VERIFY$EXESUFFIX $POOLSET pmempool$SUFFIX v &>> $LOG"

Expand Down
8 changes: 3 additions & 5 deletions src/test/pmempool_sync/TEST45
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018-2024, Intel Corporation
# Copyright 2025, Hewlett Packard Enterprise Development LP
# Copyright 2025-2026, Hewlett Packard Enterprise Development LP
#
#
# pmempool_sync/TEST45 -- test for sync command with badblocks
Expand All @@ -15,14 +15,14 @@

. ../unittest/unittest.sh

require_real_pmem
require_test_type medium
require_fs_type non-pmem
require_build_type debug nondebug
require_linked_with_ndctl $PMEMPOOL$EXESUFFIX

setup

require_sds $PMEMPOOL$EXESUFFIX

export PMEMPOOL_LOG_LEVEL=10

LOG=out${UNITTEST_NUM}.log
Expand Down Expand Up @@ -70,8 +70,6 @@ create_recovery_file $DIR/testset1_r2_p0_badblocks.txt
create_recovery_file $DIR/testset1_r2_p1_badblocks.txt 125 1 127 1
create_recovery_file $DIR/testset1_r2_p2_badblocks.txt

turn_on_checking_bad_blocks $POOLSET

# fail because of bad blocks
expect_abnormal_exit "$OBJ_VERIFY$EXESUFFIX $POOLSET pmempool$SUFFIX v &>> $LOG"

Expand Down
8 changes: 3 additions & 5 deletions src/test/pmempool_sync/TEST46
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018-2024, Intel Corporation
# Copyright 2025, Hewlett Packard Enterprise Development LP
# Copyright 2025-2026, Hewlett Packard Enterprise Development LP
#
#
# pmempool_sync/TEST46 -- test for sync command with badblocks
Expand All @@ -15,14 +15,14 @@

. ../unittest/unittest.sh

require_real_pmem
require_test_type medium
require_fs_type non-pmem
require_build_type debug nondebug
require_linked_with_ndctl $PMEMPOOL$EXESUFFIX

setup

require_sds $PMEMPOOL$EXESUFFIX

export PMEMPOOL_LOG_LEVEL=10

LOG=out${UNITTEST_NUM}.log
Expand Down Expand Up @@ -70,8 +70,6 @@ create_recovery_file $DIR/testset1_r2_p0_badblocks.txt
create_recovery_file $DIR/testset1_r2_p1_badblocks.txt
create_recovery_file $DIR/testset1_r2_p2_badblocks.txt 125 1 127 1

turn_on_checking_bad_blocks $POOLSET

# fail because of bad blocks
expect_abnormal_exit "$OBJ_VERIFY$EXESUFFIX $POOLSET pmempool$SUFFIX v &>> $LOG"

Expand Down
8 changes: 3 additions & 5 deletions src/test/pmempool_sync/TEST47
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018-2024, Intel Corporation
# Copyright 2025, Hewlett Packard Enterprise Development LP
# Copyright 2025-2026, Hewlett Packard Enterprise Development LP
#
#
# pmempool_sync/TEST47 -- test for sync command with badblocks
Expand All @@ -16,14 +16,14 @@

. setup.sh

require_real_pmem
require_test_type medium
require_fs_type non-pmem
require_build_type debug nondebug
require_linked_with_ndctl $PMEMPOOL$EXESUFFIX

setup

require_sds $PMEMPOOL$EXESUFFIX

export PMEMPOOL_LOG_LEVEL=10

LOG=out${UNITTEST_NUM}.log
Expand Down Expand Up @@ -73,8 +73,6 @@ create_recovery_file $DIR/testset1_r2_p0_badblocks.txt 1000 2
create_recovery_file $DIR/testset1_r2_p1_badblocks.txt
create_recovery_file $DIR/testset1_r2_p2_badblocks.txt 1000 2

turn_on_checking_bad_blocks $POOLSET

# fail because of bad blocks
expect_abnormal_exit "$OBJ_VERIFY$EXESUFFIX $POOLSET pmempool$SUFFIX v &>> $LOG"

Expand Down
Loading
Loading