app-admin/rsyslog: fix tests
authorThomas Deutschmann <whissi@gentoo.org>
Wed, 29 Apr 2020 12:25:31 +0000 (14:25 +0200)
committerThomas Deutschmann <whissi@gentoo.org>
Wed, 29 Apr 2020 15:21:14 +0000 (17:21 +0200)
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
app-admin/rsyslog/files/rsyslog-8.2004.0-skip-librelp-openssl-specific-tests.patch [new file with mode: 0644]
app-admin/rsyslog/rsyslog-8.2004.0.ebuild

diff --git a/app-admin/rsyslog/files/rsyslog-8.2004.0-skip-librelp-openssl-specific-tests.patch b/app-admin/rsyslog/files/rsyslog-8.2004.0-skip-librelp-openssl-specific-tests.patch
new file mode 100644 (file)
index 0000000..bc047a4
--- /dev/null
@@ -0,0 +1,106 @@
+From 15f5a1bda22bc4586e7ad8d24222befd1933a822 Mon Sep 17 00:00:00 2001
+From: Andre lorbach <alorbach@adiscon.com>
+Date: Wed, 29 Apr 2020 09:24:10 +0200
+Subject: [PATCH] SKIP librelp tlscmd tests if librelp was build without
+ openssl support
+
+closes https://github.com/rsyslog/rsyslog/issues/4131
+---
+ tests/imrelp-tls-cfgcmd.sh      | 23 ++++++++++++-----------
+ tests/sndrcv_relp_tls-cfgcmd.sh | 25 +++++++++++++------------
+ 2 files changed, 25 insertions(+), 23 deletions(-)
+
+diff --git a/tests/imrelp-tls-cfgcmd.sh b/tests/imrelp-tls-cfgcmd.sh
+index bbd63c9cd3..bb1af4ec91 100755
+--- a/tests/imrelp-tls-cfgcmd.sh
++++ b/tests/imrelp-tls-cfgcmd.sh
+@@ -1,6 +1,7 @@
+ #!/bin/bash
+ # addd 2019-11-14 by alorbach, released under ASL 2.0
+ . ${srcdir:=.}/diag.sh init
++require_relpEngineSetTLSLibByName
+ export NUMMESSAGES=1000
+ export RSYSLOG_DEBUG="debug nologfuncflow noprintmutexaction nostdout"
+ export RSYSLOG_DEBUGLOG="$RSYSLOG_DYNNAME.receiver.debuglog"
+@@ -27,21 +28,21 @@ tcpflood --check-only -k "Protocol=-ALL,TLSv1.2" -u "openssl" -Trelp-tls -acertv
+ shutdown_when_empty
+ wait_shutdown
+-content_check --check-only "parameter tls.tlslib ignored" ${RSYSLOG_DEBUGLOG}
++content_check --check-only "relpTcpTLSSetPrio_gtls" ${RSYSLOG_DEBUGLOG}
+ ret=$?
+ if [ $ret == 0 ]; then
+-      echo "SKIP: Parameter tls.tlslib not supported"
++      echo "SKIP: LIBRELP was build without OPENSSL Support"
++      skip_test
++fi 
++
++content_check --check-only "OpenSSL Version too old" ${RSYSLOG_DEBUGLOG}
++ret=$?
++if [ $ret == 0 ]; then
++      echo "SKIP: OpenSSL Version too old"
+       skip_test
+ else
+-      content_check --check-only "OpenSSL Version too old" ${RSYSLOG_DEBUGLOG}
+-      ret=$?
+-      if [ $ret == 0 ]; then
+-              echo "SKIP: OpenSSL Version too old"
+-              skip_test
+-      else
+-              # Kindly check for a failed session
+-              content_check "relp connect failed with return 10031" ${RSYSLOG_DYNNAME}.tcpflood
+-      fi
++      # Kindly check for a failed session
++      content_check "relp connect failed with return 10031" ${RSYSLOG_DYNNAME}.tcpflood
+ fi
+ exit_test
+\ No newline at end of file
+diff --git a/tests/sndrcv_relp_tls-cfgcmd.sh b/tests/sndrcv_relp_tls-cfgcmd.sh
+index ff7b3bb75c..57e0f720f0 100755
+--- a/tests/sndrcv_relp_tls-cfgcmd.sh
++++ b/tests/sndrcv_relp_tls-cfgcmd.sh
+@@ -1,6 +1,7 @@
+ #!/bin/bash
+ # added 2019-11-13 by alorbach
+ . ${srcdir:=.}/diag.sh init
++require_relpEngineSetTLSLibByName
+ export PORT_RCVR="$(get_free_port)"
+ export RSYSLOG_DEBUG="debug nologfuncflow noprintmutexaction nostdout"
+ export RSYSLOG_DEBUGLOG="$RSYSLOG_DYNNAME.receiver.debuglog"
+@@ -40,22 +41,22 @@ wait_shutdown 2
+ shutdown_when_empty
+ wait_shutdown
+-content_check --check-only "parameter tls.tlslib ignored" ${RSYSLOG_DEBUGLOG}
++content_check --check-only "relpTcpConnectTLSInit_gnutls" ${RSYSLOG_DEBUGLOG}
+ ret=$?
+ if [ $ret == 0 ]; then
+-      echo "SKIP: Parameter tls.tlslib not supported"
++      echo "SKIP: LIBRELP was build without OPENSSL Support"
++      skip_test
++fi 
++
++content_check --check-only "OpenSSL Version too old" $RSYSLOG_DEBUGLOG
++ret=$?
++if [ $ret == 0 ]; then
++      echo "SKIP: OpenSSL Version too old"
+       skip_test
+ else
+-      content_check --check-only "OpenSSL Version too old" $RSYSLOG_DEBUGLOG
+-      ret=$?
+-      if [ $ret == 0 ]; then
+-              echo "SKIP: OpenSSL Version too old"
+-              skip_test
+-      else
+-              # Kindly check for a failed session
+-              content_check "librelp error 10031" $RSYSLOG_DEBUGLOG
+-      #       content_check "OpenSSL Error Stack:"
+-      fi
++      # Kindly check for a failed session
++      content_check "librelp error 10031" $RSYSLOG_DEBUGLOG
++#     content_check "OpenSSL Error Stack:"
+ fi
+ exit_test
+\ No newline at end of file
index e3157ed0808d661da39ee2d602e8a4eb48475a85..8f08c7337b5aede42bfcd9a72bc4d998bf1d61d1 100644 (file)
@@ -98,6 +98,8 @@ if [[ ${PV} == "9999" ]]; then
        DEPEND+=" >=dev-python/docutils-0.12"
 fi
 
+PATCHES=( "${FILESDIR}"/${P}-skip-librelp-openssl-specific-tests.patch )
+
 CONFIG_CHECK="~INOTIFY_USER"
 WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"