3 # dlog is a very low-level system piece so it makes sense that a test
4 # would involve touching the system. We've got a fairly comprehensive
5 # integration test (see `dlog_test.in`) which does that. However, the
6 # process of gathering test coverage really wants us to run something
7 # isolated and we don't have the mana to deal with that properly. So,
8 # here I am going to run a bunch of useless commands in hopes that it
9 # hits as many lines as possible.
12 @bindir@/tizen-unittests/dlog/test_capi_coverage
14 for MODE in monitor priority_exact pid_wrong tid_wrong tag_wrong prefix_wrong sorting clear alias negative misc; do
15 @bindir@/tizen-unittests/dlog/test_libdlogutil_cov $MODE 0 pipe
18 dlogsend -b main -b radio -b apps -b dotnet -b dotnet_api -b native -b native_api bla
20 dlogsend -kszc 1 -d 1 -f 1 -x
21 dlogsend -k kritzkrieg
23 dlogsend -b main "🚽🥌⚱️🚱"
28 dlogutil -de 2 -n 2 -r 2 -f '/tmp/dlogutil-testing-chaff'
29 dlogutil -db main --color never --pid 42 --tid 1337
32 dlogutil -dv threadtime --color always
34 dlogutil --sort-by height
35 dlogutil --color octarine
36 dlogutil -v hammertime
39 dlogutil -g -b main -b apps
43 dlogutil --low-mem-resize low
60 dlogutil NONEXISTENT:F &
65 ORIGINAL_CONFIG_PATH="$DLOG_CONFIG_PATH"
66 export DLOG_CONFIG_PATH="@datadir@/dlog-coverage.conf"
67 PATH=$PATH:@libexecdir@/libdlog/
72 echo "blabla" > /dev/kmsg
74 # run dlogsend/dlogutil again because this counts for a different backend.
75 dlogsend -b main "blablabla"
76 dlogsend -c 999 -b main "blablabla999"
77 dlogsend -t FLOOD -b main "blablabla"
78 dlog_redirect_stdout --outtag FOO -- /usr/bin/echo Hi
79 dlog_redirect_stdout --errtag BAR -- /usr/bin/sh -c "echo Hi >&2"
80 dlog_redirect_stdout --outbuffer radio --outtag MONTAG --outprio W -- /usr/bin/echo Hi
81 dlog_redirect_stdout --errbuffer radio --errtag DIENSTAG --errprio I -- /usr/bin/sh -c "echo Hi >&2"
84 dlogutil -db main TEST:*
85 dlogutil -db main TEST:=E
86 dlogutil -db main TEST:E
88 dlogutil -db main --pid 123
89 dlogutil -db main --tid 123
92 dlogutil -u 10 -db main
93 dlogutil -u 1 -db main
94 dlogutil --sort-by recv_real -db main
95 dlogutil --sort-by recv_mono -db main
96 dlogutil --sort-by sent_real -db main
97 dlogutil --sort-by sent_mono -db main
101 DLOG_CONFIG_PATH="$ORIGINAL_CONFIG_PATH"