]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Valgrind test: split and move up list.
authorDarren Tucker <dtucker@dtucker.net>
Sun, 21 Feb 2021 21:09:27 +0000 (08:09 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Tue, 23 Feb 2021 00:18:49 +0000 (11:18 +1100)
Since the valgrind test takes so long it approaches the limit allowed by
github, move it to the head of the list so it's the first one started and
split the longest tests out into a second instance that runs concurrently
with the first.

.github/configs
.github/run_test.sh
.github/setup_ci.sh
.github/workflows/c-cpp.yml

index 280775e1f2de9febe481cd21b29dcda31214ff4f..1c06e00d110c997a1199157ea27bcf8b89b123fe 100755 (executable)
@@ -12,6 +12,7 @@ config=$1
 
 TEST_TARGET="tests"
 LTESTS=""
+SKIP_LTESTS=""
 SUDO=sudo      # run with sudo by default
 TEST_SSH_UNSAFE_PERMISSIONS=1
 
@@ -55,14 +56,22 @@ case "$config" in
        LIBCRYPTOFLAGS="--without-openssl"
        TEST_TARGET=t-exec
        ;;
-    valgrind)
+    valgrind-1)
        # rlimit sandbox and FORTIFY_SOURCE confuse Valgrind.
        CONFIGFLAGS="--without-sandbox --without-hardening"
        CONFIGFLAGS="$CONFIGFLAGS --with-cppflags=-D_FORTIFY_SOURCE=0"
        # Valgrind slows things down enough that the agent timeout test
        # won't reliably pass, and the unit tests run longer than allowed
        # by github.
-       TEST_TARGET="t-exec USE_VALGRIND=1 SKIP_LTESTS=agent-timeout"
+       TEST_TARGET="t-exec USE_VALGRIND=1"
+       SKIP_LTESTS="agent-timeout rekey try-ciphers cert-userkey integrity"
+       ;;
+    valgrind-2)
+       CONFIGFLAGS="--without-sandbox --without-hardening"
+       CONFIGFLAGS="$CONFIGFLAGS --with-cppflags=-D_FORTIFY_SOURCE=0"
+       # The rekey test takes >30 min so run separately.
+       TEST_TARGET="t-exec USE_VALGRIND=1"
+       LTESTS="rekey try-ciphers cert-userkey integrity"
        ;;
     *)
        echo "Unknown configuration $config"
index f698996d405e00176a8c6fe965fe645b480815ef..66fd5260362fd35a0d85b1f11dba31ec99050d2c 100755 (executable)
@@ -6,11 +6,11 @@
 
 set -ex
 
-if [ -z "$LTESTS" ]; then
-    make $TEST_TARGET
+if [ -z "${LTESTS}" ]; then
+    make ${TEST_TARGET} SKIP_LTESTS="${SKIP_LTESTS}"
     result=$?
 else
-    make $TEST_TARGET LTESTS="$LTESTS"
+    make ${TEST_TARGET} SKIP_LTESTS="${SKIP_LTESTS}" LTESTS="${LTESTS}"
     result=$?
 fi
 
index 831203cfd38cc1a221b9ba8b392974a8a4c2dedd..e53a351c5bdf2ffd71e4084c2d04d9df2909b837 100755 (executable)
@@ -53,7 +53,7 @@ for TARGET in $TARGETS; do
     libressl-head)
         INSTALL_LIBRESSL_HEAD=yes
        ;;
-    valgrind)
+    valgrind*)
        PACKAGES="$PACKAGES valgrind"
        ;;
     *) echo "Invalid option '${TARGET}'"
index 5e79c07397e2e9c5afefe38bce57264333a498bb..2279e109ebbae0e28f96119a37e9fe0318a2350d 100644 (file)
@@ -12,22 +12,30 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, macos-10.15, macos-11.0]
-        configs: [default, pam]
+        # First we test all OSes in the default configuration.
+        os: [ubuntu-20.04, ubuntu-18.04, ubuntu-16.04, macos-10.15, macos-11.0]
+        configs: [default]
         # Then we include any extra configs we want to test for specific VMs.
+        # Valgrind slows things down quite a bit, so start them first.
         include:
+          - { os: ubuntu-20.04, configs: valgrind-1 }
+          - { os: ubuntu-20.04, configs: valgrind-2 }
+          - { os: ubuntu-20.04, configs: pam }
           - { os: ubuntu-20.04, configs: kitchensink }
           - { os: ubuntu-20.04, configs: hardenedmalloc }
           - { os: ubuntu-20.04, configs: libressl-head }
           - { os: ubuntu-20.04, configs: openssl-head }
-          - { os: ubuntu-20.04, configs: valgrind }
+          - { os: ubuntu-18.04, configs: pam }
           - { os: ubuntu-18.04, configs: kerberos5 }
           - { os: ubuntu-18.04, configs: libedit }
           - { os: ubuntu-18.04, configs: sk }
           - { os: ubuntu-18.04, configs: selinux }
           - { os: ubuntu-18.04, configs: kitchensink }
           - { os: ubuntu-18.04, configs: without-openssl }
+          - { os: ubuntu-16.04, configs: pam }
           - { os: ubuntu-16.04, configs: kitchensink }
+          - { os: macos-10.15,  configs: pam }
+          - { os: macos-11.0,   configs: pam }
     runs-on: ${{ matrix.os }}
     steps:
     - uses: actions/checkout@v2