From 5d193e41b24578f61a193243c4aa2fe0c34b5aee Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Sat, 17 Jun 2023 19:16:38 +0200 Subject: [PATCH 1/4] common: unify builds names - `nondebug` instead of `release` Signed-off-by: Tomasz Gromadzki --- .github/workflows/pmem_check.yml | 4 ++-- .github/workflows/pmem_long.yml | 4 ++-- .github/workflows/pmem_valgrind_py.yml | 2 +- src/test/Makefile.inc | 2 +- src/test/ex_libpmem2/TESTS.py | 2 +- src/test/obj_fragmentation2/TESTS.py | 4 ++-- src/test/obj_ulog_size/TESTS.py | 4 ++-- src/test/scope/TESTS.py | 2 +- src/test/unittest/builds.py | 12 ++++++------ src/test/unittest/consts.py | 2 +- src/test/unittest/futils.py | 2 +- utils/docker/configure-tests.sh | 2 +- 12 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/pmem_check.yml b/.github/workflows/pmem_check.yml index 5c151ec0e34..4e7f4581fb2 100644 --- a/.github/workflows/pmem_check.yml +++ b/.github/workflows/pmem_check.yml @@ -23,9 +23,9 @@ jobs: 'check TEST_BUILD=static-debug', 'check TEST_BUILD=static-nondebug', 'pycheck TEST_BUILD=debug', - 'pycheck TEST_BUILD=release', + 'pycheck TEST_BUILD=nondebug', 'pycheck TEST_BUILD=static_debug', - 'pycheck TEST_BUILD=static_release'] + 'pycheck TEST_BUILD=static_nondebug'] env: WORKDIR: utils/gha-runners diff --git a/.github/workflows/pmem_long.yml b/.github/workflows/pmem_long.yml index 1235022defd..b2d52ca635a 100644 --- a/.github/workflows/pmem_long.yml +++ b/.github/workflows/pmem_long.yml @@ -23,9 +23,9 @@ jobs: 'RUNTESTS.sh -t long -b static-debug', 'RUNTESTS.sh -t long -b static-nondebug', 'RUNTESTS.py -t long -b debug', - 'RUNTESTS.py -t long -b release', + 'RUNTESTS.py -t long -b nondebug', 'RUNTESTS.py -t long -b static_debug', - 'RUNTESTS.py -t long -b static_release'] + 'RUNTESTS.py -t long -b static_nondebug'] env: WORKDIR: utils/gha-runners diff --git a/.github/workflows/pmem_valgrind_py.yml b/.github/workflows/pmem_valgrind_py.yml index aaab4357c71..b11211b9c77 100644 --- a/.github/workflows/pmem_valgrind_py.yml +++ b/.github/workflows/pmem_valgrind_py.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: config: ['drd', 'pmemcheck', 'memcheck', 'helgrind'] - build: ['debug', 'release', 'static_debug', 'static_release'] + build: ['debug', 'nondebug', 'static_debug', 'static_nondebug'] os: [[self-hosted, rhel],[self-hosted, opensuse]] env: diff --git a/src/test/Makefile.inc b/src/test/Makefile.inc index 803bcfbcd2a..cc9e1e05665 100644 --- a/src/test/Makefile.inc +++ b/src/test/Makefile.inc @@ -610,7 +610,7 @@ TSTCHECKS=$(shell ls -1 TEST* 2> /dev/null | grep '^TEST[0-9]\+$$' | sort -V) TSTCHECKSPY=$(shell test -f TESTS.py && cd .. && ./RUNTESTS.py --list-testcases $(TST) | while read name; do echo py/$$name; done) $(TSTCHECKSPY): - @cd .. && ./RUNTESTS.py $(subst nondebug,release,$(RUNTEST_OPTIONS)) -u $(shell echo $@ | sed 's/^py\/[^0-9]*\([0-9]*\)$$/\1/') -- ${TST} + @cd .. && ./RUNTESTS.py $(RUNTEST_OPTIONS) -u $(shell echo $@ | sed 's/^py\/[^0-9]*\([0-9]*\)$$/\1/') -- ${TST} $(TSTCHECKS): sync-test @cd .. && ./RUNTESTS.sh ${TST} $(RUNTEST_OPTIONS) -s $@ diff --git a/src/test/ex_libpmem2/TESTS.py b/src/test/ex_libpmem2/TESTS.py index e1d0f02c589..7b4bbd50baa 100755 --- a/src/test/ex_libpmem2/TESTS.py +++ b/src/test/ex_libpmem2/TESTS.py @@ -7,7 +7,7 @@ from testframework import granularity as g -@t.require_build(['debug', 'release']) +@t.require_build(['debug', 'nondebug']) class EX_LIBPMEM2(t.Test): test_type = t.Medium file_size = 1 * t.MiB diff --git a/src/test/obj_fragmentation2/TESTS.py b/src/test/obj_fragmentation2/TESTS.py index 1808f4cfc0b..303e224bafb 100755 --- a/src/test/obj_fragmentation2/TESTS.py +++ b/src/test/obj_fragmentation2/TESTS.py @@ -1,6 +1,6 @@ #!../env.py # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2019-2020, Intel Corporation +# Copyright 2019-2023, Intel Corporation # from os import path @@ -10,7 +10,7 @@ @g.require_granularity(g.CACHELINE) -@t.require_build('release') +@t.require_build('nondebug') class Base(t.Test): test_type = t.Long seed = '12345' diff --git a/src/test/obj_ulog_size/TESTS.py b/src/test/obj_ulog_size/TESTS.py index 580c308575d..3b9d10d4566 100755 --- a/src/test/obj_ulog_size/TESTS.py +++ b/src/test/obj_ulog_size/TESTS.py @@ -1,12 +1,12 @@ #!../env.py # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2019-2020, Intel Corporation +# Copyright 2019-2023, Intel Corporation import testframework as t -@t.require_build(['debug', 'release']) +@t.require_build(['debug', 'nondebug']) class BASE(t.Test): test_type = t.Medium diff --git a/src/test/scope/TESTS.py b/src/test/scope/TESTS.py index 8d352a43b0a..42974f0e49c 100755 --- a/src/test/scope/TESTS.py +++ b/src/test/scope/TESTS.py @@ -60,7 +60,7 @@ class Common(t.Test): def run(self, ctx): static = False - if str(self.ctx.build) in ['debug', 'release']: + if str(self.ctx.build) in ['debug', 'nondebug']: lib = '{}.so.1'.format(self.checked_lib) else: static = True diff --git a/src/test/unittest/builds.py b/src/test/unittest/builds.py index 17b682d77ca..d4aff17b8c8 100644 --- a/src/test/unittest/builds.py +++ b/src/test/unittest/builds.py @@ -35,12 +35,12 @@ def __init__(self): self.env = {'LD_LIBRARY_PATH': self.libdir} -class Release(Build): - """Set this context for a release build""" +class NonDebug(Build): + """Set this context for a nondebug build""" is_preferred = True def __init__(self): - self.libdir = c.RELEASE_LIBDIR + self.libdir = c.NONDEBUG_LIBDIR self.env = {'LD_LIBRARY_PATH': self.libdir} @@ -52,12 +52,12 @@ def __init__(self): self.libdir = c.DEBUG_LIBDIR -class Static_Release(Build): - """Set this context for a static_release build""" +class Static_Nondebug(Build): + """Set this context for a static_nondebug build""" def __init__(self): self.exesuffix = '.static-nondebug' - self.libdir = c.RELEASE_LIBDIR + self.libdir = c.NONDEBUG_LIBDIR def require_build(build, **kwargs): diff --git a/src/test/unittest/consts.py b/src/test/unittest/consts.py index 80ace3f5043..8e9b3c44036 100644 --- a/src/test/unittest/consts.py +++ b/src/test/unittest/consts.py @@ -12,7 +12,7 @@ ROOTDIR = abspath(join(dirname(__file__), '..')) DEBUG_LIBDIR = abspath(join(ROOTDIR, '..', 'debug')) -RELEASE_LIBDIR = abspath(join(ROOTDIR, '..', 'nondebug')) +NONDEBUG_LIBDIR = abspath(join(ROOTDIR, '..', 'nondebug')) HEADER_SIZE = 4096 diff --git a/src/test/unittest/futils.py b/src/test/unittest/futils.py index 657002f7c48..d79f9e6c95a 100644 --- a/src/test/unittest/futils.py +++ b/src/test/unittest/futils.py @@ -23,7 +23,7 @@ def get_lib_dir(ctx): if str(ctx.build) == 'debug': return c.DEBUG_LIBDIR else: - return c.RELEASE_LIBDIR + return c.NONDEBUG_LIBDIR def get_example_path(ctx, libname, name, dirname=None): diff --git a/utils/docker/configure-tests.sh b/utils/docker/configure-tests.sh index dd0876a1279..abe2a1f74bc 100755 --- a/utils/docker/configure-tests.sh +++ b/utils/docker/configure-tests.sh @@ -49,7 +49,7 @@ config = { 'fs_dir_force_pmem': 0, 'keep_going': False, 'timeout': '3m', - 'build': ['debug', 'release'], + 'build': ['debug', 'nondebug'], 'force_enable': None, 'device_dax_path': [], 'fail_on_skip': False, From f5bbf87016bec403f4b7901d4764b487012257f6 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Sat, 17 Jun 2023 20:40:41 +0200 Subject: [PATCH 2/4] common: unify builds names - _debug instead of -debug unify builds names - _debug instead of -debug _nondebug instead of -nondebug Signed-off-by: Tomasz Gromadzki --- .github/workflows/pmem_check.yml | 4 ++-- .github/workflows/pmem_long.yml | 4 ++-- .github/workflows/pmem_valgrind_sh.yml | 2 +- doc/pmempool/pmempool.1.md | 2 +- src/test/.gitignore | 4 ++-- src/test/Makefile.inc | 4 ++-- src/test/README | 18 +++++++------- src/test/RUNTESTS.sh | 8 +++---- src/test/obj_debug/TEST0 | 4 ++-- src/test/obj_debug/TEST1 | 4 ++-- src/test/obj_debug/TEST2 | 4 ++-- src/test/obj_debug/TEST3 | 4 ++-- src/test/obj_debug/TEST4 | 4 ++-- src/test/obj_debug/TEST5 | 4 ++-- src/test/pmem_movnt_align/TEST0 | 4 ++-- src/test/pmem_movnt_align/TEST2 | 4 ++-- src/test/testconfig.py.example | 2 +- src/test/testconfig.sh.example | 2 +- src/test/tools/anonymous_mmap/Makefile | 4 ++-- .../tools/anonymous_mmap/check_max_mmap.sh | 4 ++-- src/test/traces_pmem/TEST0 | 2 +- src/test/unittest/builds.py | 4 ++-- src/test/unittest/unittest.sh | 24 +++++++++---------- src/tools/.gitignore | 4 ++-- src/tools/Makefile.inc | 4 ++-- 25 files changed, 64 insertions(+), 64 deletions(-) diff --git a/.github/workflows/pmem_check.yml b/.github/workflows/pmem_check.yml index 4e7f4581fb2..6b09c91fa3e 100644 --- a/.github/workflows/pmem_check.yml +++ b/.github/workflows/pmem_check.yml @@ -20,8 +20,8 @@ jobs: os: [[self-hosted, rhel],[self-hosted, opensuse]] config: ['check TEST_BUILD=debug', 'check TEST_BUILD=nondebug', - 'check TEST_BUILD=static-debug', - 'check TEST_BUILD=static-nondebug', + 'check TEST_BUILD=static_debug', + 'check TEST_BUILD=static_nondebug', 'pycheck TEST_BUILD=debug', 'pycheck TEST_BUILD=nondebug', 'pycheck TEST_BUILD=static_debug', diff --git a/.github/workflows/pmem_long.yml b/.github/workflows/pmem_long.yml index b2d52ca635a..38d471c8db4 100644 --- a/.github/workflows/pmem_long.yml +++ b/.github/workflows/pmem_long.yml @@ -20,8 +20,8 @@ jobs: os: [[self-hosted, rhel],[self-hosted, opensuse]] config: ['RUNTESTS.sh -t long -b debug', 'RUNTESTS.sh -t long -b nondebug', - 'RUNTESTS.sh -t long -b static-debug', - 'RUNTESTS.sh -t long -b static-nondebug', + 'RUNTESTS.sh -t long -b static_debug', + 'RUNTESTS.sh -t long -b static_nondebug', 'RUNTESTS.py -t long -b debug', 'RUNTESTS.py -t long -b nondebug', 'RUNTESTS.py -t long -b static_debug', diff --git a/.github/workflows/pmem_valgrind_sh.yml b/.github/workflows/pmem_valgrind_sh.yml index 2b1be3d923f..dee1f824752 100644 --- a/.github/workflows/pmem_valgrind_sh.yml +++ b/.github/workflows/pmem_valgrind_sh.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: config: ['drd', 'pmemcheck', 'memcheck', 'helgrind'] - build: ['debug', 'nondebug', 'static-debug', 'static-nondebug'] + build: ['debug', 'nondebug', 'static_debug', 'static_nondebug'] os: [[self-hosted, rhel],[self-hosted, opensuse]] env: diff --git a/doc/pmempool/pmempool.1.md b/doc/pmempool/pmempool.1.md index a9f9fc843ea..90b5a6cfba9 100644 --- a/doc/pmempool/pmempool.1.md +++ b/doc/pmempool/pmempool.1.md @@ -98,7 +98,7 @@ In order to get more information about specific *command* you can use **pmempool The debug logs are available only in the debug version of the tool, which is not provided by binary packages, but can be built from sources. -The **pmempool.static-debug** binary blob can be found +The **pmempool.static_debug** binary blob can be found in the 'src/tools/pmempool/' subdirectory. + **PMEMPOOL_TOOL_LOG_LEVEL** diff --git a/src/test/.gitignore b/src/test/.gitignore index b69ceaa895b..373f9574991 100644 --- a/src/test/.gitignore +++ b/src/test/.gitignore @@ -7,8 +7,8 @@ testconfig.py *.log testfile* # ignore static binaries generated for testing -*.static-debug -*.static-nondebug +*.static_debug +*.static_nondebug libs.tar *.synced .sync-dir diff --git a/src/test/Makefile.inc b/src/test/Makefile.inc index cc9e1e05665..213e38c4fbb 100644 --- a/src/test/Makefile.inc +++ b/src/test/Makefile.inc @@ -530,8 +530,8 @@ ifeq ($(COMPILE_LANG), cpp) LINKER=$(CXX) endif -SUFFIX_STATIC_DEBUG=static-debug -SUFFIX_STATIC_NONDEBUG=static-nondebug +SUFFIX_STATIC_DEBUG=static_debug +SUFFIX_STATIC_NONDEBUG=static_nondebug ifneq ($(TARGET),) # diff --git a/src/test/README b/src/test/README index e53f2f5403e..9041f2bf81a 100644 --- a/src/test/README +++ b/src/test/README @@ -41,20 +41,20 @@ how RUNTESTS.sh will run a test, use the -n option. For example: $ RUNTESTS.sh -n blk_nblock -s TEST0 (in ./blk_nblock) TEST=check FS=none BUILD=debug ./TEST0 (in ./blk_nblock) TEST=check FS=none BUILD=nondebug ./TEST0 - (in ./blk_nblock) TEST=check FS=none BUILD=static-debug ./TEST0 - (in ./blk_nblock) TEST=check FS=none BUILD=static-nondebug ./TEST0 + (in ./blk_nblock) TEST=check FS=none BUILD=static_debug ./TEST0 + (in ./blk_nblock) TEST=check FS=none BUILD=static_nondebug ./TEST0 (in ./blk_nblock) TEST=check FS=pmem BUILD=debug ./TEST0 (in ./blk_nblock) TEST=check FS=pmem BUILD=nondebug ./TEST0 - (in ./blk_nblock) TEST=check FS=pmem BUILD=static-debug ./TEST0 - (in ./blk_nblock) TEST=check FS=pmem BUILD=static-nondebug ./TEST0 + (in ./blk_nblock) TEST=check FS=pmem BUILD=static_debug ./TEST0 + (in ./blk_nblock) TEST=check FS=pmem BUILD=static_nondebug ./TEST0 (in ./blk_nblock) TEST=check FS=non-pmem BUILD=debug ./TEST0 (in ./blk_nblock) TEST=check FS=non-pmem BUILD=nondebug ./TEST0 - (in ./blk_nblock) TEST=check FS=non-pmem BUILD=static-debug ./TEST0 - (in ./blk_nblock) TEST=check FS=non-pmem BUILD=static-nondebug ./TEST0 + (in ./blk_nblock) TEST=check FS=non-pmem BUILD=static_debug ./TEST0 + (in ./blk_nblock) TEST=check FS=non-pmem BUILD=static_nondebug ./TEST0 (in ./blk_nblock) TEST=check FS=any BUILD=debug ./TEST0 (in ./blk_nblock) TEST=check FS=any BUILD=nondebug ./TEST0 - (in ./blk_nblock) TEST=check FS=any BUILD=static-debug ./TEST0 - (in ./blk_nblock) TEST=check FS=any BUILD=static-nondebug ./TEST0 + (in ./blk_nblock) TEST=check FS=any BUILD=static_debug ./TEST0 + (in ./blk_nblock) TEST=check FS=any BUILD=static_nondebug ./TEST0 Notice how the TEST0 script is run repeatedly with different settings for the three environment variables TEST, FS, and BUILD, providing the test type, @@ -68,7 +68,7 @@ RUNTESTS.sh takes options to limit what it runs. The usage is: [ --force-enable memcheck|pmemcheck|helgrind|drd ]] [ -c ] [tests...] - Build types are: debug, nondebug, static-debug, static-nondebug, all (default) + Build types are: debug, nondebug, static_debug, static_nondebug, all (default) Test types are: check (default), short, medium, long, all where: check = short + medium; all = short + medium + long File system types are: none, pmem, non-pmem, any, all (default) diff --git a/src/test/RUNTESTS.sh b/src/test/RUNTESTS.sh index 31e21f42096..7789ae7af77 100755 --- a/src/test/RUNTESTS.sh +++ b/src/test/RUNTESTS.sh @@ -22,7 +22,7 @@ Usage: $0 [ -hnv ] [ -b build-type ] [ -t test-type ] [ -f fs-type ] -n dry run -v be verbose -b build-type run only specified build type - build-type: debug, nondebug, static-debug, static-nondebug, all (default) + build-type: debug, nondebug, static_debug, static_nondebug, all (default) -t test-type run only specified test type test-type: check (default), short, medium, long, all where: check = short + medium; all = short + medium + long @@ -291,7 +291,7 @@ runtest() { } fss=$(intersection "$fstype" "$req_fstype" "none pmem non-pmem any") - builds=$(intersection "$buildtype" "$req_buildtype" "debug nondebug static-debug static-nondebug") + builds=$(intersection "$buildtype" "$req_buildtype" "debug nondebug static_debug static_nondebug") # for each fs-type being tested... for fs in $fss @@ -384,7 +384,7 @@ verbose_tests= [ -n "$KEEP_GOING" ] && keep_going=$KEEP_GOING [ -n "$VERBOSE_TESTS" ] && verbose_tests="$VERBOSE_TESTS" -PMEMDETECT="tools/pmemdetect/pmemdetect.static-nondebug" +PMEMDETECT="tools/pmemdetect/pmemdetect.static_nondebug" pmemdetect() { LD_LIBRARY_PATH=$LIBNDCTL_LD_LIBRARY_PATHS:$LD_LIBRARY_PATH $PMEMDETECT "$@" } @@ -475,7 +475,7 @@ do buildtype="$buildtype $2" case "$2" in - debug|nondebug|static-debug|static-nondebug|all) + debug|nondebug|static_debug|static_nondebug|all) ;; *) usage "bad build-type: $buildtype" diff --git a/src/test/obj_debug/TEST0 b/src/test/obj_debug/TEST0 index 92564c3b9f1..fc90c745eb1 100755 --- a/src/test/obj_debug/TEST0 +++ b/src/test/obj_debug/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_debug/TEST0 -- unit test for debug features @@ -9,7 +9,7 @@ . ../unittest/unittest.sh require_test_type medium -require_build_type debug static-debug +require_build_type debug static_debug require_fs_type any setup diff --git a/src/test/obj_debug/TEST1 b/src/test/obj_debug/TEST1 index d0d9c5533d5..ab510258a16 100755 --- a/src/test/obj_debug/TEST1 +++ b/src/test/obj_debug/TEST1 @@ -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_debug/TEST1 -- unit test for debug features @@ -9,7 +9,7 @@ . ../unittest/unittest.sh require_test_type medium -require_build_type debug static-debug +require_build_type debug static_debug require_fs_type any setup diff --git a/src/test/obj_debug/TEST2 b/src/test/obj_debug/TEST2 index b5bfa716816..2da4ae945f3 100755 --- a/src/test/obj_debug/TEST2 +++ b/src/test/obj_debug/TEST2 @@ -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_debug/TEST2 -- unit test for debug features @@ -9,7 +9,7 @@ . ../unittest/unittest.sh require_test_type medium -require_build_type debug static-debug +require_build_type debug static_debug require_fs_type any # test causes 5 pmemcheck errors by design diff --git a/src/test/obj_debug/TEST3 b/src/test/obj_debug/TEST3 index 85130d27f97..87903894e43 100755 --- a/src/test/obj_debug/TEST3 +++ b/src/test/obj_debug/TEST3 @@ -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_debug/TEST3 -- unit test for debug features @@ -9,7 +9,7 @@ . ../unittest/unittest.sh require_test_type medium -require_build_type debug static-debug +require_build_type debug static_debug require_fs_type any setup diff --git a/src/test/obj_debug/TEST4 b/src/test/obj_debug/TEST4 index d4b24c0e911..49cc61aa3ae 100755 --- a/src/test/obj_debug/TEST4 +++ b/src/test/obj_debug/TEST4 @@ -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_debug/TEST4 -- unit test for debug features @@ -9,7 +9,7 @@ . ../unittest/unittest.sh require_test_type medium -require_build_type debug static-debug +require_build_type debug static_debug require_fs_type any setup diff --git a/src/test/obj_debug/TEST5 b/src/test/obj_debug/TEST5 index 36e1ef045cd..aed770b5042 100755 --- a/src/test/obj_debug/TEST5 +++ b/src/test/obj_debug/TEST5 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2019, Intel Corporation +# Copyright 2016-2023, Intel Corporation # # src/test/obj_debug/TEST5 -- unit test for debug features @@ -9,7 +9,7 @@ . ../unittest/unittest.sh require_test_type medium -require_build_type debug static-debug +require_build_type debug static_debug require_fs_type any FUNCS=17 diff --git a/src/test/pmem_movnt_align/TEST0 b/src/test/pmem_movnt_align/TEST0 index c7bc60d52ed..937915800d2 100755 --- a/src/test/pmem_movnt_align/TEST0 +++ b/src/test/pmem_movnt_align/TEST0 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2015-2022, Intel Corporation +# Copyright 2015-2023, Intel Corporation # # src/test/pmem_movnt_align/TEST0 -- unit test for pmem_memcpy_persist @@ -12,7 +12,7 @@ require_test_type medium require_x86_64 require_fs_type pmem non-pmem -require_build_type debug static-debug +require_build_type debug static_debug setup diff --git a/src/test/pmem_movnt_align/TEST2 b/src/test/pmem_movnt_align/TEST2 index 78cab06cf5a..7ef22107edb 100755 --- a/src/test/pmem_movnt_align/TEST2 +++ b/src/test/pmem_movnt_align/TEST2 @@ -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/pmem_movnt_align/TEST0 -- unit test for pmem_memcpy_persist @@ -11,7 +11,7 @@ require_test_type medium require_fs_type pmem non-pmem -require_build_type debug static-debug +require_build_type debug static_debug setup diff --git a/src/test/testconfig.py.example b/src/test/testconfig.py.example index 60570e5387f..5434ddbdbc8 100644 --- a/src/test/testconfig.py.example +++ b/src/test/testconfig.py.example @@ -85,7 +85,7 @@ config = { # # Set build type to be run: - # debug, release, static-debug, static-release, all + # debug, release, static_debug, static_nondebug, all # Can be a string or a list: ['debug', 'release'] # diff --git a/src/test/testconfig.sh.example b/src/test/testconfig.sh.example index 313b5a6fbbb..00c6da99edc 100644 --- a/src/test/testconfig.sh.example +++ b/src/test/testconfig.sh.example @@ -77,7 +77,7 @@ # # Overwrite available build types: -# debug, nondebug, static-debug, static-nondebug, all (default) +# debug, nondebug, static_debug, static_nondebug, all (default) # #TEST_BUILD=all diff --git a/src/test/tools/anonymous_mmap/Makefile b/src/test/tools/anonymous_mmap/Makefile index 762eca0d9ea..020f0add6fe 100644 --- a/src/test/tools/anonymous_mmap/Makefile +++ b/src/test/tools/anonymous_mmap/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2018, Intel Corporation +# Copyright 2018-2023, Intel Corporation # # src/test/tools/anonymous_mmap/Makefile -- Makefile for anonymous_mmap @@ -19,5 +19,5 @@ TESTCONFIG=$(TOP)/src/test/testconfig.sh all: max_dax_devices -max_dax_devices: $(TESTCONFIG) check_max_mmap.sh anonymous_mmap.static-nondebug +max_dax_devices: $(TESTCONFIG) check_max_mmap.sh anonymous_mmap.static_nondebug @./check_max_mmap.sh diff --git a/src/test/tools/anonymous_mmap/check_max_mmap.sh b/src/test/tools/anonymous_mmap/check_max_mmap.sh index c5edc5e1ebc..6e6f9af47c0 100755 --- a/src/test/tools/anonymous_mmap/check_max_mmap.sh +++ b/src/test/tools/anonymous_mmap/check_max_mmap.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2018, Intel Corporation +# Copyright 2018-2023, Intel Corporation # # src/test/tools/anonymous_mmap/check_max_mmap.sh -- checks how many DAX @@ -10,7 +10,7 @@ DIR_CHECK_MAX_MMAP="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" FILE_MAX_DAX_DEVICES="$DIR_CHECK_MAX_MMAP/max_dax_devices" -ANONYMOUS_MMAP="$DIR_CHECK_MAX_MMAP/anonymous_mmap.static-nondebug" +ANONYMOUS_MMAP="$DIR_CHECK_MAX_MMAP/anonymous_mmap.static_nondebug" source "$DIR_CHECK_MAX_MMAP/../../testconfig.sh" diff --git a/src/test/traces_pmem/TEST0 b/src/test/traces_pmem/TEST0 index 37bc38c3df4..4b299d1d54e 100755 --- a/src/test/traces_pmem/TEST0 +++ b/src/test/traces_pmem/TEST0 @@ -11,7 +11,7 @@ require_test_type medium require_fs_type none -require_build_type debug static-debug +require_build_type debug static_debug setup diff --git a/src/test/unittest/builds.py b/src/test/unittest/builds.py index d4aff17b8c8..c933761d506 100644 --- a/src/test/unittest/builds.py +++ b/src/test/unittest/builds.py @@ -48,7 +48,7 @@ class Static_Debug(Build): """Set this context for a static_debug build""" def __init__(self): - self.exesuffix = '.static-debug' + self.exesuffix = '.static_debug' self.libdir = c.DEBUG_LIBDIR @@ -56,7 +56,7 @@ class Static_Nondebug(Build): """Set this context for a static_nondebug build""" def __init__(self): - self.exesuffix = '.static-nondebug' + self.exesuffix = '.static_nondebug' self.libdir = c.NONDEBUG_LIBDIR diff --git a/src/test/unittest/unittest.sh b/src/test/unittest/unittest.sh index 23b65a7b125..5ca9faa93be 100644 --- a/src/test/unittest/unittest.sh +++ b/src/test/unittest/unittest.sh @@ -126,20 +126,20 @@ LIB_TOOLS="../../tools" # Paths to some useful tools [ "$PMEMPOOL" ] || PMEMPOOL=$LIB_TOOLS/pmempool/pmempool [ "$DAXIO" ] || DAXIO=$LIB_TOOLS/daxio/daxio -[ "$PMEMSPOIL" ] || PMEMSPOIL=$TOOLS/pmemspoil/pmemspoil.static-nondebug +[ "$PMEMSPOIL" ] || PMEMSPOIL=$TOOLS/pmemspoil/pmemspoil.static_nondebug [ "$PMEMWRITE" ] || PMEMWRITE=$TOOLS/pmemwrite/pmemwrite [ "$PMEMALLOC" ] || PMEMALLOC=$TOOLS/pmemalloc/pmemalloc [ "$PMEMOBJCLI" ] || PMEMOBJCLI=$TOOLS/pmemobjcli/pmemobjcli -[ "$PMEMDETECT" ] || PMEMDETECT=$TOOLS/pmemdetect/pmemdetect.static-nondebug +[ "$PMEMDETECT" ] || PMEMDETECT=$TOOLS/pmemdetect/pmemdetect.static_nondebug [ "$PMREORDER" ] || PMREORDER=$LIB_TOOLS/pmreorder/pmreorder.py [ "$FIP" ] || FIP=$TOOLS/fip/fip [ "$DDMAP" ] || DDMAP=$TOOLS/ddmap/ddmap [ "$CMPMAP" ] || CMPMAP=$TOOLS/cmpmap/cmpmap [ "$EXTENTS" ] || EXTENTS=$TOOLS/extents/extents -[ "$FALLOCATE_DETECT" ] || FALLOCATE_DETECT=$TOOLS/fallocate_detect/fallocate_detect.static-nondebug +[ "$FALLOCATE_DETECT" ] || FALLOCATE_DETECT=$TOOLS/fallocate_detect/fallocate_detect.static_nondebug [ "$OBJ_VERIFY" ] || OBJ_VERIFY=$TOOLS/obj_verify/obj_verify -[ "$USC_PERMISSION" ] || USC_PERMISSION=$TOOLS/usc_permission_check/usc_permission_check.static-nondebug -[ "$ANONYMOUS_MMAP" ] || ANONYMOUS_MMAP=$TOOLS/anonymous_mmap/anonymous_mmap.static-nondebug +[ "$USC_PERMISSION" ] || USC_PERMISSION=$TOOLS/usc_permission_check/usc_permission_check.static_nondebug +[ "$ANONYMOUS_MMAP" ] || ANONYMOUS_MMAP=$TOOLS/anonymous_mmap/anonymous_mmap.static_nondebug # force globs to fail if they don't match shopt -s failglob @@ -176,14 +176,14 @@ STRACE="strace" case "$BUILD" in -debug|static-debug) +debug|static_debug) if [ -z "$PMDK_LIB_PATH_DEBUG" ]; then PMDK_LIB_PATH=../../debug else PMDK_LIB_PATH=$PMDK_LIB_PATH_DEBUG fi ;; -nondebug|static-nondebug) +nondebug|static_nondebug) if [ -z "$PMDK_LIB_PATH_NONDEBUG" ]; then PMDK_LIB_PATH=../../nondebug else @@ -806,7 +806,7 @@ function check_pool() { then echo "$UNITTEST_NAME: checking consistency of pool ${1}" fi - ${PMEMPOOL}.static-nondebug check $1 2>&1 1>>$CHECK_POOL_LOG_FILE + ${PMEMPOOL}.static_nondebug check $1 2>&1 1>>$CHECK_POOL_LOG_FILE fi } @@ -1095,7 +1095,7 @@ get_node_devdax_path() { dax_device_zero() { for path in ${DEVICE_DAX_PATH[@]} do - ${PMEMPOOL}.static-debug rm -f $path + ${PMEMPOOL}.static_debug rm -f $path done } @@ -1570,10 +1570,10 @@ function require_no_asan() { nondebug) require_no_asan_for ../../nondebug/libpmem.so ;; - static-debug) + static_debug) require_no_asan_for ../../debug/libpmem.a ;; - static-nondebug) + static_nondebug) require_no_asan_for ../../nondebug/libpmem.a ;; esac @@ -2077,7 +2077,7 @@ check_layout() # function dump_pool_info() { # ignore selected header fields that differ by definition - ${PMEMPOOL}.static-nondebug info $* | sed -e "/^UUID/,/^Checksum/d" + ${PMEMPOOL}.static_nondebug info $* | sed -e "/^UUID/,/^Checksum/d" } # diff --git a/src/tools/.gitignore b/src/tools/.gitignore index 11dc3fb7618..9d8f914eded 100644 --- a/src/tools/.gitignore +++ b/src/tools/.gitignore @@ -2,6 +2,6 @@ TAGS cscope.in.out cscope.po.out cscope.out -*.static-debug -*.static-nondebug +*.static_debug +*.static_nondebug .synced diff --git a/src/tools/Makefile.inc b/src/tools/Makefile.inc index 9ac1374d9f2..6b3901ae95d 100644 --- a/src/tools/Makefile.inc +++ b/src/tools/Makefile.inc @@ -93,9 +93,9 @@ BASH_COMP_FILES ?= BASH_COMP_DESTDIR = $(DESTDIR)$(bashcompdir) ifneq ($(DEBUG),1) -TARGET_STATIC_NONDEBUG=$(TARGET).static-nondebug +TARGET_STATIC_NONDEBUG=$(TARGET).static_nondebug endif -TARGET_STATIC_DEBUG=$(TARGET).static-debug +TARGET_STATIC_DEBUG=$(TARGET).static_debug LIBSDIR=$(TOP)/src LIBSDIR_DEBUG=$(LIBSDIR)/debug From faaf1ea5c03e35004d856e300978cac62ef899a0 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Sat, 17 Jun 2023 20:54:50 +0200 Subject: [PATCH 3/4] common: create common test matric for bash and python tests Signed-off-by: Tomasz Gromadzki --- .github/workflows/pmem_check.yml | 16 +++----- ...pmem_valgrind_py.yml => pmem_valgrind.yml} | 9 ++-- .github/workflows/pmem_valgrind_sh.yml | 41 ------------------- 3 files changed, 11 insertions(+), 55 deletions(-) rename .github/workflows/{pmem_valgrind_py.yml => pmem_valgrind.yml} (78%) delete mode 100644 .github/workflows/pmem_valgrind_sh.yml diff --git a/.github/workflows/pmem_check.yml b/.github/workflows/pmem_check.yml index 6b09c91fa3e..b5836f11115 100644 --- a/.github/workflows/pmem_check.yml +++ b/.github/workflows/pmem_check.yml @@ -18,14 +18,7 @@ jobs: fail-fast: false matrix: os: [[self-hosted, rhel],[self-hosted, opensuse]] - config: ['check TEST_BUILD=debug', - 'check TEST_BUILD=nondebug', - 'check TEST_BUILD=static_debug', - 'check TEST_BUILD=static_nondebug', - 'pycheck TEST_BUILD=debug', - 'pycheck TEST_BUILD=nondebug', - 'pycheck TEST_BUILD=static_debug', - 'pycheck TEST_BUILD=static_nondebug'] + config: ['debug', 'nondebug', 'static_debug', 'static_nondebug'] env: WORKDIR: utils/gha-runners @@ -42,5 +35,8 @@ jobs: - name: Create testconfig files run: ./$WORKDIR/create-testconfig.sh - - name: Run tests - run: make ${{ matrix.config }} + - name: Run tests check + run: make check TEST_BUILD=${{ matrix.config }} + + - name: Run tests pycheck + run: make pycheck TEST_BUILD=${{ matrix.config }} diff --git a/.github/workflows/pmem_valgrind_py.yml b/.github/workflows/pmem_valgrind.yml similarity index 78% rename from .github/workflows/pmem_valgrind_py.yml rename to .github/workflows/pmem_valgrind.yml index b11211b9c77..87ddb6d6183 100644 --- a/.github/workflows/pmem_valgrind_py.yml +++ b/.github/workflows/pmem_valgrind.yml @@ -1,7 +1,7 @@ -# Run all tests (in python test framework) with 'force-enabled' valgrind. +# Run all tests with 'force-enabled' valgrind. # # This workflow is run on 'self-hosted' runners. -name: PMEM Valgrind python +name: PMEM Valgrind on: workflow_dispatch: @@ -10,13 +10,14 @@ on: jobs: linux: - name: PMEM_valgrind_py + name: PMEM_valgrind if: github.repository == 'pmem/pmdk' runs-on: ${{ matrix.os }} timeout-minutes: 4320 # wait max 3 days strategy: fail-fast: false matrix: + script: ['sh', 'py'] config: ['drd', 'pmemcheck', 'memcheck', 'helgrind'] build: ['debug', 'nondebug', 'static_debug', 'static_nondebug'] os: [[self-hosted, rhel],[self-hosted, opensuse]] @@ -38,4 +39,4 @@ jobs: run: ./$WORKDIR/create-testconfig.sh - name: Run tests - run: cd src/test/ && ./RUNTESTS.py --force-enable ${{ matrix.config }} -b ${{ matrix.build }} + run: cd src/test/ && ./RUNTESTS.${{ matrix.script }} --force-enable ${{ matrix.config }} -b ${{ matrix.build }} diff --git a/.github/workflows/pmem_valgrind_sh.yml b/.github/workflows/pmem_valgrind_sh.yml deleted file mode 100644 index dee1f824752..00000000000 --- a/.github/workflows/pmem_valgrind_sh.yml +++ /dev/null @@ -1,41 +0,0 @@ -# Run all tests (in bash test framework) with 'force-enabled' valgrind. -# -# This workflow is run on 'self-hosted' runners. -name: PMEM Valgrind bash - -on: - workflow_dispatch: - schedule: - - cron: '0 18 * * 5' # At 18:00 on Friday. - -jobs: - linux: - name: PMEM_valgrind_sh - if: github.repository == 'pmem/pmdk' - runs-on: ${{ matrix.os }} - timeout-minutes: 4320 # wait max 3 days - strategy: - fail-fast: false - matrix: - config: ['drd', 'pmemcheck', 'memcheck', 'helgrind'] - build: ['debug', 'nondebug', 'static_debug', 'static_nondebug'] - os: [[self-hosted, rhel],[self-hosted, opensuse]] - - env: - WORKDIR: utils/gha-runners - - steps: - - name: Clone the git repo - uses: actions/checkout@v3 - - - name: Get system information - run: ./$WORKDIR/get-system-info.sh - - - name: Build - run: ./$WORKDIR/build-pmdk.sh - - - name: Create testconfig file - run: ./$WORKDIR/create-testconfig.sh - - - name: Run tests - run: cd src/test/ && ./RUNTESTS.sh --force-enable ${{ matrix.config }} -b ${{ matrix.build }} From 47ee59647074cd1a419d02b672aa4da3f9873e83 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Sat, 17 Jun 2023 12:07:10 +0200 Subject: [PATCH 4/4] common: simplify long tests description Signed-off-by: Tomasz Gromadzki --- .github/workflows/pmem_long.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pmem_long.yml b/.github/workflows/pmem_long.yml index 38d471c8db4..6324501d182 100644 --- a/.github/workflows/pmem_long.yml +++ b/.github/workflows/pmem_long.yml @@ -18,14 +18,8 @@ jobs: fail-fast: false matrix: os: [[self-hosted, rhel],[self-hosted, opensuse]] - config: ['RUNTESTS.sh -t long -b debug', - 'RUNTESTS.sh -t long -b nondebug', - 'RUNTESTS.sh -t long -b static_debug', - 'RUNTESTS.sh -t long -b static_nondebug', - 'RUNTESTS.py -t long -b debug', - 'RUNTESTS.py -t long -b nondebug', - 'RUNTESTS.py -t long -b static_debug', - 'RUNTESTS.py -t long -b static_nondebug'] + script: ['sh', 'py'] + build: [ 'debug', 'nondebug', 'static_debug', 'static_nondebug'] env: WORKDIR: utils/gha-runners @@ -44,4 +38,4 @@ jobs: run: ./$WORKDIR/create-testconfig.sh - name: Run tests - run: cd src/test/ && ./${{ matrix.config }} + run: cd src/test/ && ./RUNTESTS.${{ matrix.script }} -t long -b ${{ matrix.build }}