diff options
| author | Kazuki Yamaguchi <k@rhe.jp> | 2025-07-10 21:46:36 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-07-21 14:31:24 +0000 |
| commit | 090825f5fc9fb40cc7d27c72ec8343ddcea51cda (patch) | |
| tree | 6094853b3f559911145b88b70a3c14215690b752 | |
| parent | be58cd4d7d8ec57f0a45ceb01dceded287237e08 (diff) | |
[ruby/openssl] Move slow tests to OSSL_TEST_ALL=1 only
Update GitHub Actions workflows to set OSSL_TEST_ALL=1.
Exclude a few slow tests that are not critical for local development,
unless OSSL_TEST_ALL=1 is set. The bindings code paths are still reached
by other tests with smaller inputs, and failures in those would likely
indicate an issue in OpenSSL rather than in the bindings.
Newly excluded tests include generating large DSA keys and measuring
CRYPTO_memcmp() timing. These tests currently take nearly half of the
total runtime.
https://github.com/ruby/openssl/commit/382eca2aec
| -rw-r--r-- | test/openssl/test_ossl.rb | 2 | ||||
| -rw-r--r-- | test/openssl/test_pkey_dh.rb | 2 | ||||
| -rw-r--r-- | test/openssl/test_pkey_dsa.rb | 8 | ||||
| -rw-r--r-- | test/openssl/test_ssl_session.rb | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/test/openssl/test_ossl.rb b/test/openssl/test_ossl.rb index 9f4b39d4f5..2e06203ece 100644 --- a/test/openssl/test_ossl.rb +++ b/test/openssl/test_ossl.rb @@ -63,7 +63,7 @@ class OpenSSL::OSSL < OpenSSL::SSLTestCase end assert_operator(a_b_time, :<, a_c_time * 10, "fixed_length_secure_compare timing test failed") assert_operator(a_c_time, :<, a_b_time * 10, "fixed_length_secure_compare timing test failed") - end + end if ENV["OSSL_TEST_ALL"] == "1" def test_error_data # X509V3_EXT_nconf_nid() called from OpenSSL::X509::ExtensionFactory#create_ext is a function diff --git a/test/openssl/test_pkey_dh.rb b/test/openssl/test_pkey_dh.rb index cf56032cb3..c82f642c01 100644 --- a/test/openssl/test_pkey_dh.rb +++ b/test/openssl/test_pkey_dh.rb @@ -16,7 +16,7 @@ class OpenSSL::TestPKeyDH < OpenSSL::PKeyTestCase # This test is slow dh = OpenSSL::PKey::DH.new(NEW_KEYLEN) assert_key(dh) - end if ENV["OSSL_TEST_ALL"] + end if ENV["OSSL_TEST_ALL"] == "1" def test_new_break unless openssl? && OpenSSL.fips_mode diff --git a/test/openssl/test_pkey_dsa.rb b/test/openssl/test_pkey_dsa.rb index b882476346..f3324b04af 100644 --- a/test/openssl/test_pkey_dsa.rb +++ b/test/openssl/test_pkey_dsa.rb @@ -47,11 +47,11 @@ class OpenSSL::TestPKeyDSA < OpenSSL::PKeyTestCase assert_equal 1024, key1024.p.num_bits assert_equal 160, key1024.q.num_bits - key2048 = OpenSSL::PKey::DSA.generate(2048) - assert_equal 2048, key2048.p.num_bits - assert_equal 256, key2048.q.num_bits - if ENV["OSSL_TEST_ALL"] == "1" # slow + key2048 = OpenSSL::PKey::DSA.generate(2048) + assert_equal 2048, key2048.p.num_bits + assert_equal 256, key2048.q.num_bits + key3072 = OpenSSL::PKey::DSA.generate(3072) assert_equal 3072, key3072.p.num_bits assert_equal 256, key3072.q.num_bits diff --git a/test/openssl/test_ssl_session.rb b/test/openssl/test_ssl_session.rb index f453f58657..37874ca273 100644 --- a/test/openssl/test_ssl_session.rb +++ b/test/openssl/test_ssl_session.rb @@ -222,7 +222,7 @@ __EOS__ # Skipping tests that use session_remove_cb by default because it may cause # deadlock. - TEST_SESSION_REMOVE_CB = ENV["OSSL_TEST_ALL"] == "1" + TEST_SESSION_REMOVE_CB = ENV["OSSL_TEST_UNSAFE"] == "1" def test_ctx_client_session_cb_tls12 start_server do |port| |
