From 3d925e79dd8284962f0b1eb39fe1aed23d64e844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Thu, 11 Nov 2021 05:27:33 +0100 Subject: [PATCH] Add optional support for tests running Now my tests did not finish successfully even on local build. Not enabling them by default. --- strongswan-5.9.4-test-socket.patch | 31 ++++++++++++++++++++++++++++++ strongswan.spec | 7 +++++++ 2 files changed, 38 insertions(+) create mode 100644 strongswan-5.9.4-test-socket.patch diff --git a/strongswan-5.9.4-test-socket.patch b/strongswan-5.9.4-test-socket.patch new file mode 100644 index 0000000..48e72b5 --- /dev/null +++ b/strongswan-5.9.4-test-socket.patch @@ -0,0 +1,31 @@ +From 377039d24648f82dac35dcf22a2b43de81f2fb96 Mon Sep 17 00:00:00 2001 +From: Petr Mensik +Date: Thu, 11 Nov 2021 05:48:38 +0100 +Subject: [PATCH] Skip test case, which always hangs + +It just stops and does not continue. Avoid that test. +--- + src/libtls/tests/suites/test_socket.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/libtls/tests/suites/test_socket.c b/src/libtls/tests/suites/test_socket.c +index 9e26e91..5296680 100644 +--- a/src/libtls/tests/suites/test_socket.c ++++ b/src/libtls/tests/suites/test_socket.c +@@ -804,11 +804,13 @@ Suite *socket_suite_create() + add_tls_versions_test(test_tls_12_server, TLS_1_0, TLS_1_3); + suite_add_tcase(s, tc); + ++#if 0 + tc = tcase_create("TLS 1.3/key exchange groups"); + tcase_add_checked_fixture(tc, setup_creds, teardown_creds); + tcase_add_loop_test(tc, test_tls13_ke_groups, 0, + tls_crypto_get_supported_groups(NULL)); + suite_add_tcase(s, tc); ++#endif + + tc = tcase_create("TLS 1.3/signature schemes"); + tcase_add_checked_fixture(tc, setup_all_creds, teardown_creds); +-- +2.31.1 + diff --git a/strongswan.spec b/strongswan.spec index 5c89f1a..5eda071 100644 --- a/strongswan.spec +++ b/strongswan.spec @@ -3,6 +3,7 @@ %bcond_without python3 %bcond_without perl +%bcond_with check Name: strongswan Version: 5.9.4 @@ -13,6 +14,8 @@ URL: http://www.strongswan.org/ Source0: http://download.strongswan.org/strongswan-%{version}%{?prerelease}.tar.bz2 Source1: tmpfiles-strongswan.conf Patch0: strongswan-5.6.0-uintptr_t.patch +# https://github.com/strongswan/strongswan/issues/752 +Patch1: strongswan-5.9.4-test-socket.patch # only needed for pre-release versions #BuildRequires: autoconf automake @@ -289,6 +292,9 @@ install -D -m 0644 %{SOURCE1} %{buildroot}/%{_tmpfilesdir}/strongswan-starter.co %check +%if %{with check} + %make_build -j1 check +%endif %if %{with python} pushd src/libcharon/plugins/vici %pytest @@ -382,6 +388,7 @@ install -D -m 0644 %{SOURCE1} %{buildroot}/%{_tmpfilesdir}/strongswan-starter.co %changelog * Thu Nov 11 2021 Petr Menšík - 5.9.4-3 - Resolves rhbz#1419441 Add python and perl vici bindings +- Adds optional tests run * Tue Nov 09 2021 Paul Wouters - 5.9.4-2 - Resolves rhbz#2018547 'strongswan restart' breaks ipsec started with strongswan-starter