From f106e806c8671ed0703669532ff62c507177663e Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Fri, 14 Jul 2023 09:22:18 +0200 Subject: [PATCH] test: avoid unnecessary skip in case of different expected test type configure_valgrind and require_valgrind shall be used after require_test_type and require_fs_type to avoid SKIPs with message due to unsupported/unselected Valgrind configuration. In case of require_test_type and require_fs_type the SKIP is executed but without message added to a test log. Signed-off-by: Tomasz Gromadzki --- src/test/libpmempool_backup/TEST6 | 5 ++--- src/test/obj_many_size_allocs/TEST0 | 6 +++--- src/test/obj_pmalloc_mt/TEST0 | 2 +- src/test/obj_pmalloc_mt/TEST2 | 2 +- src/test/obj_pmalloc_mt/TEST3 | 2 +- src/test/obj_pmalloc_rand_mt/TEST0 | 4 ++-- src/test/obj_reserve_mt/TEST0 | 2 +- src/test/obj_reserve_mt/TEST2 | 2 +- src/test/obj_reserve_mt/TEST3 | 2 +- src/test/obj_tx_alloc_mt/TEST0 | 2 +- src/test/obj_tx_alloc_mt/TEST2 | 2 +- src/test/obj_tx_flow/TEST0 | 6 +++--- src/test/obj_tx_locks/TEST0 | 6 +++--- src/test/obj_zones/TEST0 | 6 +++--- src/test/obj_zones/TEST1 | 6 +++--- 15 files changed, 27 insertions(+), 28 deletions(-) diff --git a/src/test/libpmempool_backup/TEST6 b/src/test/libpmempool_backup/TEST6 index b16d4ae04cf..d547b43e053 100755 --- a/src/test/libpmempool_backup/TEST6 +++ b/src/test/libpmempool_backup/TEST6 @@ -9,14 +9,13 @@ . ../unittest/unittest.sh -EXE=../libpmempool_api/libpmempool_test$EXESUFFIX +require_test_type medium # This test memcpy + persist entire pool, and it runs # forever under pmemcheck. +EXE=../libpmempool_api/libpmempool_test$EXESUFFIX configure_valgrind pmemcheck force-disable $EXE -require_test_type medium - require_fs_type pmem non-pmem setup diff --git a/src/test/obj_many_size_allocs/TEST0 b/src/test/obj_many_size_allocs/TEST0 index b8fd679176d..4ba25b76cfa 100755 --- a/src/test/obj_many_size_allocs/TEST0 +++ b/src/test/obj_many_size_allocs/TEST0 @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2015-2019, Intel Corporation +# Copyright 2015-2023, Intel Corporation # # Copyright (c) 2016, Microsoft Corporation. All rights reserved. # @@ -36,11 +36,11 @@ . ../unittest/unittest.sh +require_test_type long + # covered by TEST3 configure_valgrind memcheck force-disable -require_test_type long - setup # limit number of emitted logs due to excessive log size diff --git a/src/test/obj_pmalloc_mt/TEST0 b/src/test/obj_pmalloc_mt/TEST0 index a6d53d0e6e9..5893b66ffad 100755 --- a/src/test/obj_pmalloc_mt/TEST0 +++ b/src/test/obj_pmalloc_mt/TEST0 @@ -9,9 +9,9 @@ . ../unittest/unittest.sh -require_valgrind 3.10 require_fs_type pmem non-pmem require_test_type long +require_valgrind 3.10 configure_valgrind helgrind force-enable setup diff --git a/src/test/obj_pmalloc_mt/TEST2 b/src/test/obj_pmalloc_mt/TEST2 index 0774c09e070..3c815db4bcd 100755 --- a/src/test/obj_pmalloc_mt/TEST2 +++ b/src/test/obj_pmalloc_mt/TEST2 @@ -9,9 +9,9 @@ . ../unittest/unittest.sh -require_valgrind 3.10 require_fs_type pmem non-pmem require_test_type medium +require_valgrind 3.10 configure_valgrind helgrind force-enable setup diff --git a/src/test/obj_pmalloc_mt/TEST3 b/src/test/obj_pmalloc_mt/TEST3 index 1d0d6e53abb..764fe4c1c87 100755 --- a/src/test/obj_pmalloc_mt/TEST3 +++ b/src/test/obj_pmalloc_mt/TEST3 @@ -9,9 +9,9 @@ . ../unittest/unittest.sh -require_valgrind 3.10 require_fs_type pmem non-pmem require_test_type long +require_valgrind 3.10 configure_valgrind drd force-enable setup diff --git a/src/test/obj_pmalloc_rand_mt/TEST0 b/src/test/obj_pmalloc_rand_mt/TEST0 index 468aa347e36..a7b5aaeef1e 100755 --- a/src/test/obj_pmalloc_rand_mt/TEST0 +++ b/src/test/obj_pmalloc_rand_mt/TEST0 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2017-2019, Intel Corporation +# Copyright 2017-2023, Intel Corporation # # src/test/obj_pmalloc_rand_mt/TEST0 -- multithreaded allocator test @@ -8,9 +8,9 @@ . ../unittest/unittest.sh -require_valgrind 3.10 require_fs_type pmem require_test_type long +require_valgrind 3.10 configure_valgrind helgrind force-enable setup diff --git a/src/test/obj_reserve_mt/TEST0 b/src/test/obj_reserve_mt/TEST0 index bfbb0cb3eea..065efc84e98 100755 --- a/src/test/obj_reserve_mt/TEST0 +++ b/src/test/obj_reserve_mt/TEST0 @@ -9,9 +9,9 @@ . ../unittest/unittest.sh -require_valgrind 3.10 require_fs_type pmem non-pmem require_test_type long +require_valgrind 3.10 configure_valgrind helgrind force-enable setup diff --git a/src/test/obj_reserve_mt/TEST2 b/src/test/obj_reserve_mt/TEST2 index da2e6319a78..f674d81e672 100755 --- a/src/test/obj_reserve_mt/TEST2 +++ b/src/test/obj_reserve_mt/TEST2 @@ -9,9 +9,9 @@ . ../unittest/unittest.sh -require_valgrind 3.10 require_fs_type pmem non-pmem require_test_type medium +require_valgrind 3.10 configure_valgrind helgrind force-enable setup diff --git a/src/test/obj_reserve_mt/TEST3 b/src/test/obj_reserve_mt/TEST3 index 00579fd27c8..debe6587644 100755 --- a/src/test/obj_reserve_mt/TEST3 +++ b/src/test/obj_reserve_mt/TEST3 @@ -9,9 +9,9 @@ . ../unittest/unittest.sh -require_valgrind 3.10 require_fs_type pmem non-pmem require_test_type long +require_valgrind 3.10 configure_valgrind drd force-enable setup diff --git a/src/test/obj_tx_alloc_mt/TEST0 b/src/test/obj_tx_alloc_mt/TEST0 index 17167709252..c427cd8806b 100755 --- a/src/test/obj_tx_alloc_mt/TEST0 +++ b/src/test/obj_tx_alloc_mt/TEST0 @@ -9,9 +9,9 @@ . ../unittest/unittest.sh -require_valgrind 3.10 require_fs_type pmem non-pmem require_test_type long +require_valgrind 3.10 configure_valgrind helgrind force-enable setup diff --git a/src/test/obj_tx_alloc_mt/TEST2 b/src/test/obj_tx_alloc_mt/TEST2 index b2710818040..df3ae52ca45 100755 --- a/src/test/obj_tx_alloc_mt/TEST2 +++ b/src/test/obj_tx_alloc_mt/TEST2 @@ -9,9 +9,9 @@ . ../unittest/unittest.sh -require_valgrind 3.10 require_fs_type pmem non-pmem require_test_type medium +require_valgrind 3.10 configure_valgrind helgrind force-enable setup diff --git a/src/test/obj_tx_flow/TEST0 b/src/test/obj_tx_flow/TEST0 index 86d3108240d..0e3606d4d16 100755 --- a/src/test/obj_tx_flow/TEST0 +++ b/src/test/obj_tx_flow/TEST0 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2015-2019, Intel Corporation +# Copyright 2015-2023, Intel Corporation # # src/test/obj_tx_flow/TEST0 -- unit test for transaction flow @@ -9,10 +9,10 @@ . ../unittest/unittest.sh # this test verifies the correctness of the tx management functions only -configure_valgrind pmemcheck force-disable - require_test_type medium +configure_valgrind pmemcheck force-disable + setup expect_normal_exit ./obj_tx_flow$EXESUFFIX f $DIR/testfile1 diff --git a/src/test/obj_tx_locks/TEST0 b/src/test/obj_tx_locks/TEST0 index edd3baaeb4f..39f2759b076 100755 --- a/src/test/obj_tx_locks/TEST0 +++ b/src/test/obj_tx_locks/TEST0 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2015-2019, Intel Corporation +# Copyright 2015-2023, Intel Corporation # # src/test/obj_tx_locks/TEST0 -- unit test for transaction locks @@ -9,10 +9,10 @@ . ../unittest/unittest.sh # this test verifies the correctness of the tx management functions only -configure_valgrind pmemcheck force-disable - require_test_type medium +configure_valgrind pmemcheck force-disable + setup expect_normal_exit ./obj_tx_locks$EXESUFFIX $DIR/testfile1 diff --git a/src/test/obj_zones/TEST0 b/src/test/obj_zones/TEST0 index 446ca428774..4dc87c3a280 100755 --- a/src/test/obj_zones/TEST0 +++ b/src/test/obj_zones/TEST0 @@ -1,14 +1,14 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2017-2019, Intel Corporation +# Copyright 2017-2023, Intel Corporation . ../unittest/unittest.sh +require_test_type medium + # too large configure_valgrind force-disable -require_test_type medium - setup create_holey_file 64G $DIR/testfile1 diff --git a/src/test/obj_zones/TEST1 b/src/test/obj_zones/TEST1 index b7a161fb55c..b78f4fe5291 100755 --- a/src/test/obj_zones/TEST1 +++ b/src/test/obj_zones/TEST1 @@ -1,14 +1,14 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2019, Intel Corporation +# Copyright 2023, Intel Corporation . ../unittest/unittest.sh +require_test_type medium + # too large configure_valgrind force-disable -require_test_type medium - # runs too long on debug builds require_build_type nondebug