diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-03-16 18:54:42 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-03-16 18:54:42 +0100 |
commit | 51e690f720b4a53a431e7a536b2fe8c25e866f7d (patch) | |
tree | 6722e6b94d03063db7e0705538976c266c7c934b /tests | |
parent | 8f8e2cd66bd7f1e35f7bf0678e25bbdb99d67093 (diff) | |
download | rsyslog-51e690f720b4a53a431e7a536b2fe8c25e866f7d.tar.gz rsyslog-51e690f720b4a53a431e7a536b2fe8c25e866f7d.tar.bz2 rsyslog-51e690f720b4a53a431e7a536b2fe8c25e866f7d.zip |
fixed some portability issues
first noticed on FreeBSD
Also, some cosmetic improvements.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/getline.c | 3 | ||||
-rw-r--r-- | tests/nettester.c | 4 | ||||
-rwxr-xr-x | tests/omod-if-array.sh | 9 | ||||
-rwxr-xr-x | tests/parsertest.sh | 8 |
4 files changed, 20 insertions, 4 deletions
diff --git a/tests/getline.c b/tests/getline.c index 10de2ffe..617d1b0e 100644 --- a/tests/getline.c +++ b/tests/getline.c @@ -23,7 +23,8 @@ */ #include "config.h" #include <stdio.h> -#include <malloc.h> +#include <sys/types.h> +#include <stdlib.h> /* we emulate getline (the dirty way) if we do not have it * We do not try very hard, as this is just a test driver. diff --git a/tests/nettester.c b/tests/nettester.c index 89a784f3..37183ac9 100644 --- a/tests/nettester.c +++ b/tests/nettester.c @@ -43,6 +43,7 @@ #include <unistd.h> #include <string.h> #include <glob.h> +#include <signal.h> #include <netinet/in.h> #define EXIT_FAILURE 1 @@ -361,7 +362,8 @@ int main(int argc, char *argv[]) if((srcdir = getenv("srcdir")) == NULL) srcdir = "."; - printf("Start of nettester run ($srcdir=%s, testsuite=%s)\n", srcdir, testSuite); + printf("Start of nettester run ($srcdir=%s, testsuite=%s, input=%s)\n", + srcdir, testSuite, argv[2]); /* create input config file */ if((fp = fopen(NETTEST_INPUT_CONF_FILE, "w")) == NULL) { diff --git a/tests/omod-if-array.sh b/tests/omod-if-array.sh index 8a8d67f3..fd845b4d 100755 --- a/tests/omod-if-array.sh +++ b/tests/omod-if-array.sh @@ -1,5 +1,12 @@ -#!/bin/bash -e echo test omod-if-array via udp ./nettester omod-if-array udp +if [ "$?" -ne "0" ]; then + exit 1 +fi + echo test omod-if-array via tcp ./nettester omod-if-array tcp +if [ "$?" -ne "0" ]; then + exit 1 +fi + diff --git a/tests/parsertest.sh b/tests/parsertest.sh index fabe7e8d..a6b7d45c 100755 --- a/tests/parsertest.sh +++ b/tests/parsertest.sh @@ -1,5 +1,11 @@ -#!/bin/bash -e echo test parsertest via udp ./nettester parse1 udp +if [ "$?" -ne "0" ]; then + exit 1 +fi + echo test parsertest via tcp ./nettester parse1 tcp +if [ "$?" -ne "0" ]; then + exit 1 +fi |