line=`$cmd_prefix $format | $cmd_postfix`
[[ "$line" == "rawformatTEST" ]] && ok || fail
+LOG_DETAILS="testing if KMSG works in the default format"
+# We check if the command returns at least 1000 logs. This seems to be a safe value. In my test,
+# my target reaches it in about 2 seconds after the boot. Feel free to change it to a reasonable
+# yet lower value if the test happens to fail otherwise, but it would be extremely surprising.
+[[ "$(dlogutil -db kmsg | wc -l)" -gt 1000 ]] && ok || fail
+
+LOG_DETAILS="testing if KMSG works in the raw format"
+last_dmesg=`dmesg | tail -n1 | sed -re "s/^\[[ 0-9]{5,}\.[0-9]{6}\] (.*)$/\1/g"`
+sleep 1 # To make sure dlog has already parsed the log
+dlogutil -db kmsg -v raw | grep -Fm1 "$last_dmesg" >/dev/null && ok || fail
+
LOG_DETAILS="testing if pid filtering works"
dlogsend -b main -t DLOG_TESTSUITE pidTEST &
sleep 1