Repository: randombit/botan
Pull request #2507 (2020-11-22 14:05:18)

Try running all tests in CI even under qemu/valgrind
As GH actions CPUs seem to be faster


Patch:
diff --git a/doc/deprecated.rst b/doc/deprecated.rst
index 0d16e5f9a..b651e1afd 100644
--- a/doc/deprecated.rst
+++ b/doc/deprecated.rst
@@ -34,7 +34,7 @@ in a future major release:
 - All CBC mode ciphersuites. This includes all available 3DES and SEED
   ciphersuites. This implies also removing Encrypt-then-MAC extension.
 
-- All ciphersuites using DH key exchange (DHE-DSS, DHE-RSA, DHE-PSK, anon DH)
+- All ciphersuites using DH key exchange (DHE-RSA, DHE-PSK)
 
 - Support for renegotiation in TLS v1.2
 
diff --git a/src/scripts/ci/travis.yml b/src/scripts/ci/travis.yml
index 46736d0ff..1337cc95c 100644
--- a/src/scripts/ci/travis.yml
+++ b/src/scripts/ci/travis.yml
@@ -10,6 +10,11 @@ jobs:
       env:
        - TARGET="shared"
 
+    - name: Linux arm64 (GCC)
+      arch: arm64
+      env:
+       - TARGET="shared"
+
 install:
   - ./src/scripts/ci/setup_travis.sh
 
diff --git a/src/scripts/ci_build.py b/src/scripts/ci_build.py
index 03ef0f97c..f6010c389 100755
--- a/src/scripts/ci_build.py
+++ b/src/scripts/ci_build.py
@@ -74,12 +74,6 @@ def determine_flags(target, target_os, target_cpu, target_cc, cc_bin,
     test_prefix = []
     test_cmd = [os.path.join(root_dir, 'botan-test')]
 
-    essential_tests = ['block', 'aead', 'hash', 'stream', 'mac', 'modes', 'kdf',
-                       'hmac_drbg', 'hmac_drbg_unit', 'tls',
-                       'rsa_sign', 'rsa_verify', 'dh_kat',
-                       'ecc_randomized', 'ecdh_kat', 'ecdsa_sign', 'curve25519_scalar',
-                       'cpuid', 'simd_32', 'os_utils', 'util', 'util_dates']
-
     install_prefix = os.path.join(tempfile.gettempdir(), 'botan-install')
 
     flags = ['--prefix=%s' % (install_prefix),
@@ -118,13 +112,21 @@ def determine_flags(target, target_os, target_cpu, target_cc, cc_bin,
         flags += ['--with-coverage-info', '--with-debug-info', '--test-mode']
 
     if target == 'valgrind':
-        # valgrind in 16.04 has a bug with rdrand handling
-        flags += ['--with-valgrind', '--disable-rdrand']
+        flags += ['--with-valgrind']
         test_prefix = ['valgrind', '--error-exitcode=9', '-v', '--leak-check=full', '--show-reachable=yes']
         # valgrind is single threaded anyway
         test_cmd += ['--test-threads=1']
         # valgrind is slow
-        test_cmd += essential_tests
+        slow_tests = [
+            'cryptobox', 'dh_invalid', 'dh_kat', 'dh_keygen',
+            'dl_group_gen', 'dlies', 'dsa_param', 'ecc_basemul',
+            'ecdsa_verify_wycheproof', 'mce_keygen', 'passhash9',
+            'rsa_encrypt', 'rsa_pss', 'rsa_pss_raw', 'scrypt',
+            'srp6_kat', 'x509_path_bsi', 'xmss_keygen', 'xmss_sign',
+            'pbkdf', 'argon2', 'bcrypt', 'bcrypt_pbkdf', 'compression',
+            'ed25519_sign', 'elgamal_keygen', 'x509_path_rsa_pss']
+
+        test_cmd += ['--skip-tests=%s' % (','.join(slow_tests))]
 
     if target == 'fuzzers':
         flags += ['--unsafe-fuzzer-mode']
@@ -195,9 +197,6 @@ def determine_flags(target, target_os, target_cpu, target_cc, cc_bin,
             test_cmd = [os.path.join(root_dir, 'botan-test.exe')] + test_cmd[1:]
             test_prefix = ['wine']
         else:
-            # Build everything but restrict what is run
-            test_cmd += essential_tests
-
             if target == 'cross-arm32':
                 flags += ['--cpu=armv7']
                 cc_bin = 'arm-linux-gnueabihf-g++'


Test patch:
diff --git a/src/tests/test_compression.cpp b/src/tests/test_compression.cpp
index fdc2ddd35..7f503d538 100644
--- a/src/tests/test_compression.cpp
+++ b/src/tests/test_compression.cpp
@@ -66,6 +66,8 @@ class Compression_Tests final : public Test
                {
                Test::Result result(algo + " compression");
 
+               result.start_timer();
+
                std::unique_ptr<Botan::Compression_Algorithm> c(Botan::make_compressor(algo));
                std::unique_ptr<Botan::Decompression_Algorithm> d(Botan::make_decompressor(algo));
 
@@ -108,6 +110,8 @@ class Compression_Tests final : public Test
                result.test_lt("Zeros compresses much better than text", c1_z / 8, c1_t);
                result.test_lt("Text compresses much better than random", c1_t / 2, c1_r);
 
+               result.end_timer();
+
                results.emplace_back(result);
                }
             catch(std::exception& e)