diff options
author | Karel Zak | 2015-10-06 10:17:11 +0200 |
---|---|---|
committer | Karel Zak | 2015-10-06 10:17:11 +0200 |
commit | 5b90a8f38fda1426ad02f31b6391c7495cd18bf9 (patch) | |
tree | 53e77829b30f7812cb48d0051ea7c455d251befd /tests/ts/logger | |
parent | logger: fix messages separation on UNIX socket (diff) | |
download | kernel-qcow2-util-linux-5b90a8f38fda1426ad02f31b6391c7495cd18bf9.tar.gz kernel-qcow2-util-linux-5b90a8f38fda1426ad02f31b6391c7495cd18bf9.tar.xz kernel-qcow2-util-linux-5b90a8f38fda1426ad02f31b6391c7495cd18bf9.zip |
tests: update and extend logger tests
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/ts/logger')
-rwxr-xr-x | tests/ts/logger/errors | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ts/logger/errors b/tests/ts/logger/errors index d47c7bc1e..71b34c8e9 100755 --- a/tests/ts/logger/errors +++ b/tests/ts/logger/errors @@ -44,6 +44,14 @@ function logger_fun { echo |socat -u - UNIX-CONNECT:$DEVLOG } +function logger_printf { + # logger without --no-act to write all data to the socket + echo "socket data, ${TS_SUBNAME}:" |socat -u - UNIX-CONNECT:$DEVLOG + printf "$1" | $TS_HELPER_LOGGER -u $DEVLOG --stderr >> "$TS_OUTPUT" 2>&1 + echo "ret: $?" >> "$TS_OUTPUT" + echo |socat -u - UNIX-CONNECT:$DEVLOG +} + ts_init_subtest "kern_priority" logger_fun -t "prio" -p kern.emerg "message" ts_finalize_subtest @@ -72,6 +80,14 @@ logger_fun -t "A B" "tag_with_space" logger_fun -t "A B" --rfc5424 "tag_with_space_rfc5424" ts_finalize_subtest +ts_init_subtest "tcp" +logger_fun --tcp -t "tcp" "message" +ts_finalize_subtest + +ts_init_subtest "multi-line" +logger_printf "AAA\nBBB\nCCC\n" +ts_finalize_subtest + ts_init_subtest "rfc5424_msgid_with_space" logger_fun -t "rfc5424_msgid_with_space" --rfc5424 --msgid="A B" "message" ts_finalize_subtest |