summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-12-12 13:49:03 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-12-12 16:56:54 +0100
commit886d6fdec605e47ec19a3e37dd9596c525178a54 (patch)
tree8a4d3be8401fa25a31be75f91b6418d7c75b3a90 /tests
parenta4842afc83334f97653e6cca6220b19f53696509 (diff)
fix logging: log_set_category_filter() for internal DL* logging cats
In log_set_category_filter(), passing a negative index lead to memory corruption. Particularly dangerous since the internal logging categories have negative values. Fix: apply map_subsys() to interpret negative values as internal logging categories. As a side effect, out-of-bounds logging categories will be mapped to DLGLOBAL instead of being dropped. Fix the expectations in logging_test to match the fixed bug. While at it also guard against a NULL logging target. Change-Id: Ib0725b22bc39498c6b3970a61eb3339cf56d19f1
Diffstat (limited to 'tests')
-rw-r--r--tests/logging/logging_test.err1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/logging/logging_test.err b/tests/logging/logging_test.err
index 4527d835..17b3cad0 100644
--- a/tests/logging/logging_test.err
+++ b/tests/logging/logging_test.err
@@ -6,3 +6,4 @@ DLGLOBAL You should see this on DLGLOBAL (b)
DLGLOBAL You should see this on DLGLOBAL (c)
DLGLOBAL You should see this on DLGLOBAL (d)
DLGLOBAL You should see this on DLGLOBAL (e)
+DLGLOBAL You should see this (DLGLOBAL on DEBUG)