testbench: Enhanced error detection in imrelp-tls-cfgcmd.sh

This solves test failures on some platforms like solaris.

Also added _attribute__((unused)) into SetTlsVerifyDepth in
nsd_ptcp.c to fix compiler errors with gcc9.

closes: https://github.com/rsyslog/rsyslog/issues/4544
This commit is contained in:
Andre lorbach 2021-03-09 09:15:51 +01:00
parent 003ae3bc2a
commit b0b6320c2a
2 changed files with 3 additions and 4 deletions

View File

@ -188,7 +188,7 @@ finalize_it:
static rsRetVal
SetTlsVerifyDepth(nsd_t __attribute__((unused)) *pNsd, int verifyDepth)
{
nsd_ptcp_t *pThis = (nsd_ptcp_t*) pNsd;
nsd_ptcp_t __attribute__((unused)) *pThis = (nsd_ptcp_t*) pNsd;
DEFiRet;
ISOBJ_TYPE_assert((pThis), nsd_ptcp);
if (verifyDepth == 0) {

View File

@ -50,9 +50,8 @@ if [ $ret == 0 ]; then
echo "SKIP: OpenSSL Version too old"
skip_test
else
# Kindly check for a failed session
content_check "librelp: generic error: ecode 10031" $RSYSLOG_DEBUGLOG
# content_check "librelp: generic error: ecode 10031" ${RSYSLOG_DYNNAME}.tcpflood
# Check for a failed session - possible ecodes are 10031 and 10040
content_check "librelp: generic error: ecode" $RSYSLOG_DEBUGLOG
fi
exit_test