summaryrefslogtreecommitdiffstats
path: root/tests/ts/logger
diff options
context:
space:
mode:
authorRuediger Meier2015-04-09 20:14:50 +0200
committerRuediger Meier2015-04-13 13:24:50 +0200
commiteffd66e38e845414afbed19793189672f783c4b1 (patch)
tree6adda19258aa9294120013716813d120266ec39b /tests/ts/logger
parenttests: logger with socat device (diff)
downloadkernel-qcow2-util-linux-effd66e38e845414afbed19793189672f783c4b1.tar.gz
kernel-qcow2-util-linux-effd66e38e845414afbed19793189672f783c4b1.tar.xz
kernel-qcow2-util-linux-effd66e38e845414afbed19793189672f783c4b1.zip
tests: logger, validate written socket data
Actually there should be no data written to the socket because we are always using --no-act. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts/logger')
-rwxr-xr-xtests/ts/logger/errors5
-rwxr-xr-xtests/ts/logger/formats5
-rwxr-xr-xtests/ts/logger/options5
3 files changed, 15 insertions, 0 deletions
diff --git a/tests/ts/logger/errors b/tests/ts/logger/errors
index 2dfb4109c..8df97c834 100755
--- a/tests/ts/logger/errors
+++ b/tests/ts/logger/errors
@@ -72,7 +72,12 @@ ts_init_subtest "rfc5424_msgid_with_space"
logger_fun -t "rfc5424_msgid_with_space" --rfc5424 --msgid="A B" "message"
ts_finalize_subtest
+ts_init_subtest "check_socket"
+ts_log "Check written socket data of all subtests."
sleep 1
kill $SOCAT_PID
+wait $SOCAT_PID &>/dev/null
+cat "$SOCKIN" >> "$TS_OUTPUT" 2>&1
+ts_finalize_subtest
ts_finalize
diff --git a/tests/ts/logger/formats b/tests/ts/logger/formats
index 203c4d6f6..5957feae2 100755
--- a/tests/ts/logger/formats
+++ b/tests/ts/logger/formats
@@ -68,7 +68,12 @@ for facility in auth authpriv cron daemon ftp lpr mail news syslog user uucp loc
done
ts_finalize_subtest
+ts_init_subtest "check_socket"
+ts_log "Check written socket data of all subtests."
sleep 1
kill $SOCAT_PID
+wait $SOCAT_PID &>/dev/null
+cat "$SOCKIN" >> "$TS_OUTPUT" 2>&1
+ts_finalize_subtest
ts_finalize
diff --git a/tests/ts/logger/options b/tests/ts/logger/options
index c77c65565..afcf5f859 100755
--- a/tests/ts/logger/options
+++ b/tests/ts/logger/options
@@ -69,7 +69,12 @@ for i in "${tests_array[@]}"; do
ts_finalize_subtest
done
+ts_init_subtest "check_socket"
+ts_log "Check written socket data of all subtests."
sleep 1
kill $SOCAT_PID
+wait $SOCAT_PID &>/dev/null
+cat "$SOCKIN" >> "$TS_OUTPUT" 2>&1
+ts_finalize_subtest
ts_finalize