#!/bin/sh # dlog is a very low-level system piece so it makes sense that a test # would involve touching the system. We've got a fairly comprehensive # integration test (see `dlog_test.in`) which does that. However, the # process of gathering test coverage really wants us to run something # isolated and we don't have the mana to deal with that properly. So, # here I am going to run a bunch of useless commands in hopes that it # hits as many lines as possible. @bindir@/tizen-unittests/dlog/test_capi_coverage for MODE in monitor priority_exact pid_wrong tid_wrong tag_wrong prefix_wrong sorting clear alias negative misc; do @bindir@/tizen-unittests/dlog/test_libdlogutil_cov $MODE 0 pipe done dlogsend -b main -b radio -b apps -b dotnet -b dotnet_api -b native -b native_api bla dlogsend -h dlogsend -kszc 1 -d 1 -f 1 -x dlogsend -k kritzkrieg echo "bla" | dlogsend dlogsend -b main "🚽🥌⚱️🚱" dlogutil --help dlogutil --chlep dlogutil -b rutal dlogutil -de 2 -n 2 -r 2 -f '/tmp/dlogutil-testing-chaff' dlogutil -db main --color never --pid 42 --tid 1337 dlogutil -b main -c dlogutil -b main -g dlogutil -dv threadtime --color always dlogutil -dv json dlogutil --sort-by height dlogutil --color octarine dlogutil -v hammertime dlogutil -g -b apps dlogutil -g -b main dlogutil -g -b main -b apps dlogutil -m bla -g dlogutil -m bla -c dlogutil --version dlogutil --low-mem-resize low dlogutil -e 3 -e 3 dlogutil :D dlogutil -d --pid 123 dlogutil -d --tid 123 dlogutil -d -m bla dlogutil --monitor & UTIL=$! sleep 2 kill $UTIL dlogutil & UTIL=$! sleep 2 kill $UTIL dlogutil NONEXISTENT:F & UTIL=$! sleep 3 kill $UTIL ORIGINAL_CONFIG_PATH="$DLOG_CONFIG_PATH" export DLOG_CONFIG_PATH="@datadir@/dlog-coverage.conf" PATH=$PATH:@libexecdir@/libdlog/ dlog_logger -t 0 & LOGGER=$! sleep 5 echo "blabla" > /dev/kmsg # run dlogsend/dlogutil again because this counts for a different backend. dlogsend -b main "blablabla" dlogsend -c 999 -b main "blablabla999" dlogsend -t FLOOD -b main "blablabla" dlog_redirect_stdout --outtag FOO -- /usr/bin/echo Hi dlog_redirect_stdout --errtag BAR -- /usr/bin/sh -c "echo Hi >&2" dlog_redirect_stdout --outbuffer radio --outtag MONTAG --outprio W -- /usr/bin/echo Hi dlog_redirect_stdout --errbuffer radio --errtag DIENSTAG --errprio I -- /usr/bin/sh -c "echo Hi >&2" sleep 0.3233 dlogutil -db main dlogutil -db main TEST:* dlogutil -db main TEST:=E dlogutil -db main TEST:E dlogutil -db main *:E dlogutil -db main --pid 123 dlogutil -db main --tid 123 dlogutil -b main -c dlogutil -b main -g dlogutil -u 10 -db main dlogutil -u 1 -db main dlogutil --sort-by recv_real -db main dlogutil --sort-by recv_mono -db main dlogutil --sort-by sent_real -db main dlogutil --sort-by sent_mono -db main sleep 0.42 kill $LOGGER DLOG_CONFIG_PATH="$ORIGINAL_CONFIG_PATH"