From f22f83f1fa830e5b9e2773431f410ed1466279a6 Mon Sep 17 00:00:00 2001 From: Maciej Slodczyk Date: Mon, 4 Jun 2018 15:29:26 +0200 Subject: [PATCH] testsuite: add pid/tid filter tests Change-Id: I0e92b5c9b52e059cc4ebfa68986d1aa1bc16d8ac Signed-off-by: Maciej Slodczyk --- tests/dlog_test.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/dlog_test.in b/tests/dlog_test.in index 8368d20..079bf5f 100644 --- a/tests/dlog_test.in +++ b/tests/dlog_test.in @@ -206,6 +206,18 @@ dlogsend -b main -t DLOG_TESTSUITE rawformatTEST line=`$cmd $format` if [[ "$line" == "rawformatTEST" ]]; then ok; else fail; fi +LOG_DETAILS="testing if pid filtering works" +dlogsend -b main -t DLOG_TESTSUITE pidTEST & +sleep 1 +line=`dlogutil -v raw -d --pid $!` +[[ "$line" == "pidTEST" ]] && ok || fail + +LOG_DETAILS="testing if tid filtering works" +dlogsend -b main -t DLOG_TESTSUITE tidTEST & +sleep 1 +line=`dlogutil -v raw -d --tid $!` #dlogsend is a single threaded app so tid is the same as pid +[[ "$line" == "tidTEST" ]] && ok || fail + LOG_DETAILS="testing if the library works with multithreaded app" dlogutil -f $TESTDIR/dlog_mt_test & MT_TEST=$! -- 2.7.4