test: refactor and generalize setup(), adding a setup2()
This patch refactors the way the primary and secondary syslogd is started by the test framework. The generalizations not only make the code more readable, it hopefully also makes it easier to add new tests in the future. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@ -15,8 +15,7 @@ echo "= Phase 2 - syslog() with openlog() & custom facility ==="
|
||||
cat <<EOF >${CONFD}/console.conf
|
||||
console.* -${LOGCONS}
|
||||
EOF
|
||||
kill -HUP `cat ${PID}`
|
||||
sleep 2
|
||||
reload
|
||||
|
||||
./api -i foo
|
||||
grep "foo: ${MSG}" ${LOGCONS}
|
||||
@ -29,8 +28,7 @@ echo "= Phase 4 - Verify RFC5424 API with syslogp() ==========="
|
||||
cat <<EOF >${CONFD}/v1.conf
|
||||
ftp.* -${LOGV1} ;RFC5424
|
||||
EOF
|
||||
kill -HUP `cat ${PID}`
|
||||
sleep 2
|
||||
reload
|
||||
|
||||
./api -i troglobit -p
|
||||
sleep 2
|
||||
|
Reference in New Issue
Block a user