mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-15 08:56:38 -05:00
test: don't try to log for LOG_LEVEL_NONE
We can only log for a level below our current one if we are two above NONE. And by the same instance, we don't expect NONE messages to show up.
This commit is contained in:
parent
b00bc81929
commit
48cff597a6
1 changed files with 5 additions and 2 deletions
|
|
@ -156,10 +156,10 @@ test_log_levels(enum spa_log_level level)
|
||||||
* with our level, one with a level above (should never show up)
|
* with our level, one with a level above (should never show up)
|
||||||
* and one with a level below (should show up).
|
* and one with a level below (should show up).
|
||||||
*/
|
*/
|
||||||
if (level > SPA_LOG_LEVEL_NONE) {
|
if (level > SPA_LOG_LEVEL_NONE)
|
||||||
pw_log(level, "CURRENT");
|
pw_log(level, "CURRENT");
|
||||||
|
if (level > SPA_LOG_LEVEL_ERROR)
|
||||||
pw_log(level - 1, "BELOW");
|
pw_log(level - 1, "BELOW");
|
||||||
}
|
|
||||||
if (level < SPA_LOG_LEVEL_TRACE)
|
if (level < SPA_LOG_LEVEL_TRACE)
|
||||||
pw_log(level + 1, "ABOVE");
|
pw_log(level + 1, "ABOVE");
|
||||||
|
|
||||||
|
|
@ -180,6 +180,9 @@ test_log_levels(enum spa_log_level level)
|
||||||
if (level == SPA_LOG_LEVEL_NONE) {
|
if (level == SPA_LOG_LEVEL_NONE) {
|
||||||
pwtest_bool_false(current_level_found);
|
pwtest_bool_false(current_level_found);
|
||||||
pwtest_bool_false(below_level_found);
|
pwtest_bool_false(below_level_found);
|
||||||
|
} else if (level == SPA_LOG_LEVEL_ERROR) {
|
||||||
|
pwtest_bool_true(current_level_found);
|
||||||
|
pwtest_bool_false(below_level_found);
|
||||||
} else {
|
} else {
|
||||||
pwtest_bool_true(current_level_found);
|
pwtest_bool_true(current_level_found);
|
||||||
pwtest_bool_true(below_level_found);
|
pwtest_bool_true(below_level_found);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue