From 934f9855da1720c1f020389b577ad10d07599ffa Mon Sep 17 00:00:00 2001 From: Marek Szulc Date: Wed, 30 Nov 2022 16:15:55 +0100 Subject: [PATCH] Add integration test for log limiter Change-Id: I951ececa259bed4a7aa5b2806dcdcc5e3aa40e89 --- tests/dlog_test.in | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/dlog_test.in b/tests/dlog_test.in index 10e4f00..a022670 100644 --- a/tests/dlog_test.in +++ b/tests/dlog_test.in @@ -955,6 +955,24 @@ if [ "$TEST_DYNAMIC_FILTERS" = "true" ] && [ "$type" != "zero-copy" ]; then # No dlog_logger -t 0 & LOGGER=$! sleep 1 + + # limiter test (the feature allows to enable/disable particular log type) + dlogsend -c 11 -d 1 -t QWE blabla & + + sleep 0.5 + dlogctl -t QWE -s deny + LOG_DETAILS="testing if log limiter works (deny) (1/3)" + [ "$(dlogutil -d QWE | wc -l)" -eq 1 ] && ok || fail + sleep 6 + LOG_DETAILS="testing if log limiter works (deny) (2/3)" + [ "$(dlogutil -d QWE | wc -l)" -eq 1 ] && ok || fail + + dlogctl -t QWE -s allow + sleep 4 + LOG_DETAILS="testing if log limiter works (allow) (3/3)" + [ "$(dlogutil -d QWE | wc -l)" -eq 5 ] && ok || fail + + dlogutil -c fi fi -- 2.7.4