From 29f54ee2f27a7040accd637dd49bcd4f79e398f8 Mon Sep 17 00:00:00 2001 From: gpotter2 Date: Tue, 9 Jan 2018 19:59:29 +0100 Subject: [PATCH] Disable OpenSSL tests in a cleaner way (PY3 only) --- .appveyor.yml | 9 +++++++-- .travis/test.sh | 3 +-- test/tls/tests_tls_netaccess.uts | 14 ++++++++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index af0f96209..5f7f0fc70 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -26,6 +26,11 @@ test_script: # Set environment variables - set PYTHONPATH=%APPVEYOR_BUILD_FOLDER% - set PATH="%APPVEYOR_BUILD_FOLDER%;C:\Program Files\Wireshark\;%PATH%" + + # Disable open_ssl client tests + - set ARGS=-K open_ssl_client + # Disable broken Python 3 tests if Python3 is detected + - if not x%PYTHON:3=%==x%PYTHON% set ARGS=%ARGS% -K FIXME_py3 # Main unit tests - "%PYTHON%\\python -m coverage run --parallel-mode bin\\UTscapy -f text -t test\\regression.uts -F -K mock_read_routes6_bsd -K ipv6 || exit /b 42" @@ -33,12 +38,12 @@ test_script: # Secondary and contrib unit tests - 'del test\bpf.uts test\linux.uts test\sendsniff.uts' # Don't bother with OS dependent regression tests - - "%PYTHON%\\python -m coverage run --parallel-mode bin\\UTscapy -c test\\configs\\windows.utsc || exit /b 42" + - "%PYTHON%\\python -m coverage run --parallel-mode bin\\UTscapy -c test\\configs\\windows.utsc %ARGS% || exit /b 42" # TLS unit tests # Note: due to a multiprocessing bug, we got to be in the UTscapy.py folder and call it directly - 'cd scapy/tools' - - "%PYTHON%\\python -m coverage run --concurrency=multiprocessing UTscapy.py -f text -t ..\\..\\test\\tls\\tests_tls_netaccess.uts -F -P \"sys.path.append(os.path.abspath('../../test/tls'))\" -K open_ssl_client || exit /b 42" + - "%PYTHON%\\python -m coverage run --concurrency=multiprocessing UTscapy.py -f text -t ..\\..\\test\\tls\\tests_tls_netaccess.uts -F -P \"sys.path.append(os.path.abspath('../../test/tls'))\" %ARGS% || exit /b 42" - 'cd ../../' after_test: diff --git a/.travis/test.sh b/.travis/test.sh index bbcc2e651..9e239cf28 100644 --- a/.travis/test.sh +++ b/.travis/test.sh @@ -120,8 +120,7 @@ fi PYTHON="$PYTHON" $SCAPY_SUDO ./run_tests -c ./configs/travis.utsc -T "bpf.uts" -T "mock_windows.uts" $UT_FLAGS || exit $? # Run unit tests with openssl if we have root privileges -if [ "$TRAVIS_OS_NAME" = "linux" ] && [ -n "$SCAPY_SUDO" ] && \ - ! python --version 2>&1 | grep -q '^Python 3\.' +if [ "$TRAVIS_OS_NAME" = "linux" ] && [ -n "$SCAPY_SUDO" ] then echo "Running TLS netaccess tests" PYTHON="$PYTHON" $SCAPY_SUDO ./run_tests -q -F -t tls/tests_tls_netaccess.uts $UT_FLAGS || exit $? diff --git a/test/tls/tests_tls_netaccess.uts b/test/tls/tests_tls_netaccess.uts index 9c54e8ae0..63424ca91 100644 --- a/test/tls/tests_tls_netaccess.uts +++ b/test/tls/tests_tls_netaccess.uts @@ -64,22 +64,22 @@ def test_tls_server(suite="", version=""): = Testing TLS server with TLS 1.0 and TLS_RSA_WITH_RC4_128_SHA -~ open_ssl_client +~ open_ssl_client FIXME_py3 test_tls_server("RC4-SHA", "-tls1") = Testing TLS server with TLS 1.1 and TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA -~ open_ssl_client +~ open_ssl_client FIXME_py3 test_tls_server("EDH-RSA-DES-CBC3-SHA", "-tls1_1") = Testing TLS server with TLS 1.2 and TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 -~ open_ssl_client +~ open_ssl_client FIXME_py3 test_tls_server("DHE-RSA-AES128-SHA256", "-tls1_2") = Testing TLS server with TLS 1.2 and TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 -~ open_ssl_client +~ open_ssl_client FIXME_py3 test_tls_server("ECDHE-RSA-AES256-GCM-SHA384", "-tls1_2") @@ -112,26 +112,32 @@ def perform_tls_client_test(suite, version): assert False = Testing TLS server and client with SSLv2 and SSL_CK_DES_192_EDE3_CBC_WITH_MD5 +~ FIXME_py3 perform_tls_client_test("0700c0", "0002") = Testing TLS client with SSLv3 and TLS_RSA_EXPORT_WITH_RC4_40_MD5 +~ FIXME_py3 perform_tls_client_test("0003", "0300") = Testing TLS client with TLS 1.0 and TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA +~ FIXME_py3 perform_tls_client_test("0088", "0301") = Testing TLS client with TLS 1.1 and TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA +~ FIXME_py3 perform_tls_client_test("c013", "0302") = Testing TLS client with TLS 1.2 and TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 +~ FIXME_py3 perform_tls_client_test("009e", "0303") = Testing TLS client with TLS 1.2 and TLS_ECDH_anon_WITH_RC4_128_SHA +~ FIXME_py3 perform_tls_client_test("c016", "0303")