diff mbox series

[11/14] multipath tests: expect_condlog: skip depending on verbosity

Message ID 20220706143822.30182-12-mwilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series multipath: fixes for sysfs accessors | expand

Commit Message

Martin Wilck July 6, 2022, 2:38 p.m. UTC
From: Martin Wilck <mwilck@suse.com>

otherwise we'll get failures if verbosity level is low.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 tests/test-log.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/tests/test-log.c b/tests/test-log.c
index 14f25b9..0c17cd9 100644
--- a/tests/test-log.c
+++ b/tests/test-log.c
@@ -6,6 +6,8 @@ 
 #include <cmocka.h>
 #include "log.h"
 #include "test-log.h"
+#include "debug.h"
+
 
 __attribute__((format(printf, 2, 0)))
 void __wrap_dlog (int prio, const char * fmt, ...)
@@ -24,6 +26,8 @@  void __wrap_dlog (int prio, const char * fmt, ...)
 
 void expect_condlog(int prio, char *string)
 {
+	if (prio > MAX_VERBOSITY || prio > libmp_verbosity)
+		return;
 	expect_value(__wrap_dlog, prio, prio);
 	will_return(__wrap_dlog, string);
 }