]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: logger, validate written socket data
authorRuediger Meier <ruediger.meier@ga-group.nl>
Thu, 9 Apr 2015 18:14:50 +0000 (20:14 +0200)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Mon, 13 Apr 2015 11:24:50 +0000 (13:24 +0200)
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>
tests/expected/logger/errors-check_socket [new file with mode: 0644]
tests/expected/logger/formats-check_socket [new file with mode: 0644]
tests/expected/logger/options-check_socket [new file with mode: 0644]
tests/ts/logger/errors
tests/ts/logger/formats
tests/ts/logger/options

diff --git a/tests/expected/logger/errors-check_socket b/tests/expected/logger/errors-check_socket
new file mode 100644 (file)
index 0000000..fa36c4e
--- /dev/null
@@ -0,0 +1 @@
+Check written socket data of all subtests.
diff --git a/tests/expected/logger/formats-check_socket b/tests/expected/logger/formats-check_socket
new file mode 100644 (file)
index 0000000..fa36c4e
--- /dev/null
@@ -0,0 +1 @@
+Check written socket data of all subtests.
diff --git a/tests/expected/logger/options-check_socket b/tests/expected/logger/options-check_socket
new file mode 100644 (file)
index 0000000..fa36c4e
--- /dev/null
@@ -0,0 +1 @@
+Check written socket data of all subtests.
index 2dfb4109c2c4c98b506e5df5ccca0784d0753a12..8df97c83412fc9c4cd49f6583f85890a30d3ba8a 100755 (executable)
@@ -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
index 203c4d6f67c3b2cb3998bba97689ad5c0c7d9cb0..5957feae249bc9d2256919ba2a0adaab14399e68 100755 (executable)
@@ -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
index c77c65565667ee725497b3aca154dd2017e68c8d..afcf5f859f94aad2dba46abb1cb2901eafb7df79 100755 (executable)
@@ -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