From 514c7d844898c24beef5c072b7747850fed87e7d Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Tue, 25 Jul 2023 12:04:33 -0400 Subject: [PATCH] common: rationalize fault injection testing Signed-off-by: Jan Michalski --- .github/workflows/nightly.yml | 4 ++-- .github/workflows/pmem_check.yml | 41 ++++++++++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 4cce0355128..b2cebff16c0 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -30,8 +30,8 @@ jobs: CONFIG: [ "OS=ubuntu OS_VER=22.04 MAKE_PKG=1 EXPERIMENTAL=y VALGRIND=0 NDCTL_ENABLE=n", "OS=ubuntu OS_VER=22.04 MAKE_PKG=1 EXPERIMENTAL=y VALGRIND=0 NDCTL_ENABLE=n PMDK_CC=clang PMDK_CXX=clang++", - "OS=opensuse-leap OS_VER=15 FAULT_INJECTION=1 TEST_BUILD=debug", - "OS=opensuse-leap OS_VER=15 FAULT_INJECTION=1 TEST_BUILD=nondebug", + "OS=opensuse-leap OS_VER=15 TEST_BUILD=debug", + "OS=opensuse-leap OS_VER=15 TEST_BUILD=nondebug", "OS=opensuse-leap OS_VER=15 MAKE_PKG=1 EXPERIMENTAL=y VALGRIND=0", "OS=rockylinux OS_VER=8 TEST_BUILD=debug", "OS=rockylinux OS_VER=8 TEST_BUILD=nondebug", diff --git a/.github/workflows/pmem_check.yml b/.github/workflows/pmem_check.yml index dd32096f171..28fb136813f 100644 --- a/.github/workflows/pmem_check.yml +++ b/.github/workflows/pmem_check.yml @@ -7,6 +7,9 @@ on: workflow_dispatch: workflow_call: +env: + WORKDIR: utils/gha-runners + jobs: linux: name: PMEM_check @@ -16,8 +19,6 @@ jobs: matrix: os: [[self-hosted, rhel],[self-hosted, opensuse]] build: ['debug', 'nondebug', 'static_debug', 'static_nondebug'] - env: - WORKDIR: utils/gha-runners steps: - name: Clone the git repo @@ -39,3 +40,39 @@ jobs: - name: Run tests (Python) run: cd src/test/ && ./RUNTESTS.py -b ${{ matrix.build }} + + + fault_injection: + name: PMEM fault injection + runs-on: [self-hosted, rhel] + strategy: + fail-fast: false + matrix: + build: ['debug', 'nondebug'] + env: + TEST_LABEL: fault_injection + TEST_BUILD: ${{ matrix.build }} + + steps: + - name: Clone the git repo + uses: actions/checkout@v3 + with: + repository: pmem/pmdk + + - name: Get system information + run: ./$WORKDIR/get-system-info.sh + + - name: Build + env: + FAULT_INJECTION: 1 + run: ./$WORKDIR/build-pmdk.sh + + - name: Create testconfig files + run: ./$WORKDIR/../create-testconfig.sh + + - name: Run tests (Bash) + # TEST_BUILD and TEST_LABEL are taken directly from the environment + run: cd src/test/ && ./RUNTESTS.sh + + - name: Run tests (Python) + run: cd src/test/ && ./RUNTESTS.py -b $TEST_BUILD --test-label $TEST_LABEL