Version: 1.12.2-2

On Wed, 22 Aug 2018 at 21:28:16 +0200, Michael Biebl wrote:
> On 8/22/18 20:46, Simon McVittie wrote:
> > I know the NM version we're using is a bit out of date, but I checked
> > upstream and Debian git and it doesn't look as though this was fixed
> > subsequently in the upstream 1.12.x branch or in Debian.

I've confirmed that 1.12.2-2 fails tests in the same way.

> > It appears to
> > have been fixed in upstream 1.13.3 by this commit:
> > 
> > https://gitlab.freedesktop.org/NetworkManager/NetworkManager/commit/3e8eef538987c909e87b871a6b8c74aee08661a3
> 
> Lubo, could you cherry-pick that patch for the nm-1-12 branch?

It needs some adjustment for 1.12: the attached version seems to work.

    smcv
From: Lubomir Rintel <lkund...@v3.sk>
Date: Sat, 11 Aug 2018 11:08:42 +0200
Subject: utils/test: don't assert on debug level messages

They come and go in GLib core for all sorts of purposes. Don't let that
break our tests.

Origin: backport, 1.13.3, commit:3e8eef538987c909e87b871a6b8c74aee08661a3
---
 shared/nm-utils/nm-test-utils.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/shared/nm-utils/nm-test-utils.h b/shared/nm-utils/nm-test-utils.h
index 743893f..d29e9ae 100644
--- a/shared/nm-utils/nm-test-utils.h
+++ b/shared/nm-utils/nm-test-utils.h
@@ -573,8 +573,9 @@ __nmtst_init (int *argc, char ***argv, gboolean assert_logging, const char *log_
 #endif
 	} else {
 		/* We were called not to set logging levels. This means, that the user
-		 * expects to assert against (all) messages. Any uncought message is fatal. */
-		g_log_set_always_fatal (G_LOG_LEVEL_MASK);
+		 * expects to assert against (all) messages.
+		 * Any uncaught message on >debug level is fatal. */
+		g_log_set_always_fatal (G_LOG_LEVEL_MASK & ~G_LOG_LEVEL_DEBUG);
 	}
 
 	if ((!__nmtst_internal.assert_logging || (__nmtst_internal.assert_logging && __nmtst_internal.no_expect_message)) &&

Reply via email to