Compare commits

...

10 Commits

Author SHA1 Message Date
Christine Caulfield eea61f64b2 Fix dependancies for kronosnet-tests
Resolves: rhbz#2161168
2023-01-30 15:50:05 +00:00
Christine Caulfield 518c93450a Mon Jan 16 2023 Christine Caulfield <ccaulfie@redhat.com> - 1.25-1
Rebase to 1.25 for PMTUd fixes
Resolves: rhbz#2161168
2023-01-18 07:54:28 +00:00
Christine Caulfield 67bb6c62c6 Fix minor covscan in knet_hand_new test
Don't run api_nozzle_run_updown_test test
2022-07-15 15:08:11 +01:00
Christine Caulfield e05cb2720b Fri Jul 15 2022 Christine Caulfield <ccaulfie@redhat.com> - 1.24-1
Rebase to 1.24
Resolves: rhbz#2024090
2022-07-15 10:32:18 +01:00
Christine Caulfield 3e03939db1 Build the tests RPM
(sorry, all this got lost in the Fedora rebase)
Resolves: rhbz#1999980
2021-10-11 10:54:03 +01:00
Christine Caulfield 7536b229af Bump version
Resolves: rhbz#1999980
2021-10-11 09:00:54 +01:00
Christine Caulfield 088bed91e6 Add gating tests that got lost in the grab from Fedora
Resolves: rhbz#1999980
2021-10-11 08:35:47 +01:00
Christine Caulfield 7f4f1a2bd1 +* Wed Oct 06 2021 Christine Caulfield <ccaulfie@redhat.com> - 1.22-1
+- Rebase to v1.22
+  Resolves: rhbz#1999980
2021-10-06 13:07:56 +01:00
Mohan Boddu 5ba6ffd4c2 Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
Signed-off-by: Mohan Boddu <mboddu@redhat.com>
2021-08-09 21:12:53 +00:00
Aleksandra Fedorova 513055ef72 Add RHEL gating configuration 2021-07-15 03:12:26 +02:00
7 changed files with 99 additions and 65 deletions

4
.gitignore vendored
View File

@ -1 +1,5 @@
/kronosnet-1.21.tar.xz
/kronosnet-1.22.tar.gz
/kronosnet-1.22.tar.xz
/kronosnet-1.24.tar.xz
/kronosnet-1.25.tar.xz

View File

@ -1,58 +0,0 @@
commit e13b7c74634c511d44603a203a328f4d67920321
Author: Christine Caulfield <ccaulfie@redhat.com>
Date: Mon May 10 13:00:58 2021 +0100
[build] Add -fstack-clash-protection to release builds
CentOS Stream CI insists on this but it's generally a 'good thing'
diff --git a/configure.ac b/configure.ac
index e429dcc..020cbe1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,6 +173,23 @@ AC_ARG_ENABLE([libnozzle],
AM_CONDITIONAL([BUILD_LIBNOZZLE], [test x$enable_libnozzle = xyes])
+## local helper functions
+# this function checks if CC support options passed as
+# args. Global CPPFLAGS are ignored during this test.
+cc_supports_flag() {
+ saveCPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$@"
+ if echo $CC | grep -q clang; then
+ CPPFLAGS="-Werror $CPPFLAGS"
+ fi
+ AC_MSG_CHECKING([whether $CC supports "$@"])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+ [RC=0; AC_MSG_RESULT([yes])],
+ [RC=1; AC_MSG_RESULT([no])])
+ CPPFLAGS="$saveCPPFLAGS"
+ return $RC
+}
+
# Checks for libraries.
AX_PTHREAD(,[AC_MSG_ERROR([POSIX threads support is required])])
saved_LIBS="$LIBS"
@@ -297,12 +314,20 @@ AC_ARG_WITH([testdir],
AC_SUBST([TESTDIR])
+# Check for availablility of hardening options
+HARDENING_FLAGS="-fstack-clash-protection"
+for j in $HARDENING_FLAGS; do
+ if cc_supports_flag $j; then
+ EXTRA_HARDENING_FLAGS="$EXTRA_HARDENING_FLAGS $j";
+ fi
+done
+
# debug build stuff
if test "x${enable_debug}" = xyes; then
AC_DEFINE_UNQUOTED([DEBUG], [1], [Compiling Debugging code])
OPT_CFLAGS="-O0"
else
- OPT_CFLAGS="-O3"
+ OPT_CFLAGS="-O3 $EXTRA_HARDENING_FLAGS"
fi
# gdb flags

7
gating.yaml Normal file
View File

@ -0,0 +1,7 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1,7 +1,7 @@
###############################################################################
###############################################################################
##
## Copyright (C) 2012-2019 Red Hat, Inc. All rights reserved.
## Copyright (C) 2012-2023 Red Hat, Inc. All rights reserved.
##
## This copyrighted material is made available to anyone wishing to use,
## modify, copy, or redistribute it subject to the terms and conditions
@ -25,7 +25,7 @@
%bcond_with rpmdebuginfo
%bcond_with overriderpmdebuginfo
%bcond_without buildman
%bcond_with installtests
%bcond_without installtests
%if %{with overriderpmdebuginfo}
%undefine _enable_debug_packages
@ -36,13 +36,13 @@
Name: kronosnet
Summary: Multipoint-to-Multipoint VPN daemon
Version: 1.21
Release: 3%{?dist}
Version: 1.25
Release: 2%{?dist}
License: GPLv2+ and LGPLv2+
URL: https://kronosnet.org
Source0: https://kronosnet.org/releases/%{name}-%{version}.tar.xz
Patch0: bz1954551-enable-stack-clash-protection.patch
#Patch0: 1_24.testfix.patch
# Build dependencies
BuildRequires: make
@ -87,7 +87,7 @@ BuildRequires: autoconf automake libtool
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .bz1954551-enable-stack-clash-protection
#%patch0 -p1 -b .1_24.testfix
%build
%if %{with runautogen}
@ -426,6 +426,9 @@ Requires: libknet1-crypto-plugins-all%{_isa} = %{version}-%{release}
Summary: Provides kronosnet test suite
License: GPLv2+
Requires: libknet1%{_isa} = %{version}-%{release}
%if %{with libnozzle}
Requires: libnozzle1%{_isa} = %{version}-%{release}
%endif
%description -n kronosnet-tests
This package contains all the libknet and libnozzle test suite.
@ -439,6 +442,30 @@ Requires: libknet1%{_isa} = %{version}-%{release}
%endif
%changelog
* Wed Jan 18 2023 Christine Caulfield <ccaulfie@redhat.com> - 1.25-1
Rebase to 1.25 for PMTUd fixes
Resolves: rhbz#2161168
* Fri Jul 15 2022 Christine Caulfield <ccaulfie@redhat.com> - 1.24-2
- Fix libnozzle tests failing & covscan warning on api_knet_handle_new test
Resolves: rhbz#2024090
* Fri Jul 15 2022 Christine Caulfield <ccaulfie@redhat.com> - 1.24-1
- Rebase to 1.24
Resolves: rhbz#2024090
* Wed Oct 06 2021 Christine Caulfield <ccaulfie@redhat.com> - 1.22-3
- Add back the test suite that got lost in the pull from Fedora
Resolves: rhbz#1999980
* Wed Oct 06 2021 Christine Caulfield <ccaulfie@redhat.com> - 1.22-1
- Rebase to v1.22
Resolves: rhbz#1999980
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.21-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Wed Jun 16 2021 Florian Weimer <fweimer@redhat.com> - 1.21-3
- Rebuilt for RHEL 9 BETA for openssl 3.0
Related: rhbz#1971065

View File

@ -1 +1 @@
SHA512 (kronosnet-1.21.tar.xz) = c265f3e31bace0f60e04a5a6b062c2a4be4db61450c1c5de3ccb48fbf879e3bbe89aca9b87e4ae757ba9f7e430406da5fdadf314b3cdf9d838b517031b90d5cc
SHA512 (kronosnet-1.25.tar.xz) = 9d9816cd9e441904b3b9b1e8bc72e8f19f1010af87afb99b8ed70224121b16bce10f3df564f69fe16d4a5106a3dcffd03777ccfc7f550a8b090e9fb7c43d28a2

35
tests/run-tests.sh Executable file
View File

@ -0,0 +1,35 @@
#!/bin/sh
EXCLUDES="knet_bench_test api_knet_handle_new_limit_test fun_pmtud_crypto_test api_nozzle_run_updown_test run-tests.sh"
TESTS_RUN=0
TESTS_FAILED=0
modprobe sctp
cd /usr/lib64/kronosnet/tests
for i in *
do
echo $EXCLUDES|grep $i >/dev/null 2>/dev/null
if [ $? = 1 ]
then
echo
echo "---- running $i"
./$i
if [ $? != 0 ]
then
TESTS_FAILED=$((TESTS_FAILED + 1))
echo "FAILED: $i"
fi
TESTS_RUN=$((TESTS_RUN + 1))
fi
done
echo
echo "Tests run: $TESTS_RUN"
echo "Tests failed: $TESTS_FAILED"
if [ $TESTS_FAILED -gt 0 ]
then
exit 1
else
exit 0
fi

19
tests/tests.yml Normal file
View File

@ -0,0 +1,19 @@
- hosts: localhost
roles:
- role: standard-test-source # Fetch source tarball and unpack it into the test environment
tags:
- always
- role: standard-test-basic
tags:
- atomic
- classic
required_packages:
- bash
- kronosnet-tests
- kernel-modules-extra
tests:
- check: # Run tests
dir: .
run: ./run-tests.sh