From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> logger/errors does not use --no-act now. Signed-off-by: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> --- tests/expected/logger/errors-check_socket | 19 +++++++++++++++++++ tests/expected/logger/formats-check_socket | 1 + tests/expected/logger/options-check_socket | 1 + tests/ts/logger/errors | 10 +++++++++- tests/ts/logger/formats | 5 +++++ tests/ts/logger/options | 5 +++++ 6 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 tests/expected/logger/errors-check_socket create mode 100644 tests/expected/logger/formats-check_socket create mode 100644 tests/expected/logger/options-check_socket diff --git a/tests/expected/logger/errors-check_socket b/tests/expected/logger/errors-check_socket new file mode 100644 index 0000000..76a877f --- /dev/null +++ b/tests/expected/logger/errors-check_socket @@ -0,0 +1,19 @@ +Check written socket data of all subtests. +socket data, kern_priority: +<8>Feb 13 23:31:30 prio: message +socket data, kern_priority_numeric: +<8>Feb 13 23:31:30 prio: message +socket data, invalid_prio: + +socket data, rfc5424_exceed_size: +<13>1 2009-02-13T23:31:30.123456+00:00 test-hostname rfc5424_exceed_size - - [timeQuality tzKnown="1" isSynced="0"] abc +socket data, id_with_space: + +socket data, id_with_space: + +socket data, tag_with_space: +<13>Feb 13 23:31:30 A B: tag_with_space +socket data, tag_with_space: +<13>1 2009-02-13T23:31:30.123456+00:00 test-hostname A B - - [timeQuality tzKnown="1" isSynced="0"] tag_with_space_rfc5424 +socket data, rfc5424_msgid_with_space: + diff --git a/tests/expected/logger/formats-check_socket b/tests/expected/logger/formats-check_socket new file mode 100644 index 0000000..fa36c4e --- /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 0000000..fa36c4e --- /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 b6cf8a3..90961c7 100755 --- a/tests/ts/logger/errors +++ b/tests/ts/logger/errors @@ -39,8 +39,11 @@ SOCAT_PID=$! sleep 1 function logger_fun { - $TS_HELPER_LOGGER -u $DEVLOG -s --no-act "$@" >> "$TS_OUTPUT" 2>&1 + # logger without --no-act to write all data to the socket + echo "socket data, ${TS_SUBNAME}:" |socat -u - UNIX:$DEVLOG + $TS_HELPER_LOGGER -u $DEVLOG --stderr "$@" >> "$TS_OUTPUT" 2>&1 echo "ret: $?" >> "$TS_OUTPUT" + echo |socat -u - UNIX:$DEVLOG } ts_init_subtest "kern_priority" @@ -75,6 +78,11 @@ 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." kill $SOCAT_PID +wait $SOCAT_PID +cat "$SOCKIN" >> "$TS_OUTPUT" 2>&1 +ts_finalize_subtest ts_finalize diff --git a/tests/ts/logger/formats b/tests/ts/logger/formats index 5fc6d0b..e521120 100755 --- a/tests/ts/logger/formats +++ b/tests/ts/logger/formats @@ -71,6 +71,11 @@ 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." kill $SOCAT_PID +wait $SOCAT_PID +cat "$SOCKIN" >> "$TS_OUTPUT" 2>&1 +ts_finalize_subtest ts_finalize diff --git a/tests/ts/logger/options b/tests/ts/logger/options index 4eb2b32..2c80e92 100755 --- a/tests/ts/logger/options +++ b/tests/ts/logger/options @@ -69,6 +69,11 @@ for i in "${tests_array[@]}"; do ts_finalize_subtest done +ts_init_subtest "check_socket" +ts_log "Check written socket data of all subtests." kill $SOCAT_PID +wait $SOCAT_PID +cat "$SOCKIN" >> "$TS_OUTPUT" 2>&1 +ts_finalize_subtest ts_finalize -- 1.8.4.5 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html