mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
[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
This commit is contained in:
parent
be58cd4d7d
commit
090825f5fc
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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|
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user