From: Ruediger Meier Date: Thu, 9 Apr 2015 18:14:50 +0000 (+0200) Subject: tests: logger, validate written socket data X-Git-Tag: v2.27-rc1~266^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=effd66e38e845414afbed19793189672f783c4b1;p=thirdparty%2Futil-linux.git 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 --- diff --git a/tests/expected/logger/errors-check_socket b/tests/expected/logger/errors-check_socket new file mode 100644 index 0000000000..fa36c4e5be --- /dev/null +++ b/tests/expected/logger/errors-check_socket @@ -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 index 0000000000..fa36c4e5be --- /dev/null +++ b/tests/expected/logger/formats-check_socket @@ -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 index 0000000000..fa36c4e5be --- /dev/null +++ b/tests/expected/logger/options-check_socket @@ -0,0 +1 @@ +Check written socket data of all subtests. diff --git a/tests/ts/logger/errors b/tests/ts/logger/errors index 2dfb4109c2..8df97c8341 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 203c4d6f67..5957feae24 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 c77c655656..afcf5f859f 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