test: verify remote logging in logger tool
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
parent
911e3f05a1
commit
87ff7d6901
@ -1,6 +1,7 @@
|
|||||||
EXTRA_DIST = lib.sh opts.sh
|
EXTRA_DIST = lib.sh opts.sh
|
||||||
EXTRA_DIST += api.sh local.sh unicode.sh remote.sh fwd.sh mark.sh \
|
EXTRA_DIST += api.sh local.sh unicode.sh remote.sh fwd.sh mark.sh \
|
||||||
memleak.sh facility.sh notify.sh rotate_all.sh secure.sh
|
memleak.sh facility.sh notify.sh rotate_all.sh secure.sh \
|
||||||
|
logger.sh
|
||||||
CLEANFILES = *~ *.trs *.log
|
CLEANFILES = *~ *.trs *.log
|
||||||
TEST_EXTENSIONS = .sh
|
TEST_EXTENSIONS = .sh
|
||||||
TESTS_ENVIRONMENT= unshare -mrun
|
TESTS_ENVIRONMENT= unshare -mrun
|
||||||
@ -13,6 +14,7 @@ api_LDADD = ../src/libsyslog.la
|
|||||||
|
|
||||||
TESTS = opts.sh
|
TESTS = opts.sh
|
||||||
TESTS += local.sh
|
TESTS += local.sh
|
||||||
|
TESTS += logger.sh
|
||||||
TESTS += unicode.sh
|
TESTS += unicode.sh
|
||||||
TESTS += remote.sh
|
TESTS += remote.sh
|
||||||
TESTS += api.sh
|
TESTS += api.sh
|
||||||
|
21
test/logger.sh
Executable file
21
test/logger.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Verify logger capabilities, for now just remote logger
|
||||||
|
# shellcheck disable=SC1090
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
if [ x"${srcdir}" = x ]; then
|
||||||
|
srcdir=.
|
||||||
|
fi
|
||||||
|
. ${srcdir}/lib.sh
|
||||||
|
ip link set lo up
|
||||||
|
|
||||||
|
print "Starting stand-alone logger test ..."
|
||||||
|
cap_start
|
||||||
|
logger -b -H "$(basename "$0")" -h 127.0.0.3 -I $$ -t test1 "Kilroy was here"
|
||||||
|
cap_stop
|
||||||
|
|
||||||
|
# Check for the composed BSD procname{PID] syntax
|
||||||
|
STR="test1\[$$\]"
|
||||||
|
cap_find "$STR" || FAIL "Cannot find: $STR"
|
||||||
|
|
||||||
|
OK
|
Loading…
Reference in New Issue
Block a user