From 6aec72d58aa77cd9a629a57f391f16f38390d88d Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 1 Aug 2022 10:38:14 +0100 Subject: [PATCH] Allow self tests to pass when run in LXC zones Fixes https://github.com/fwupd/fwupd/issues/4684 --- plugins/linux-swap/fu-self-test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/linux-swap/fu-self-test.c b/plugins/linux-swap/fu-self-test.c index 694031b76..97a4f671c 100644 --- a/plugins/linux-swap/fu-self-test.c +++ b/plugins/linux-swap/fu-self-test.c @@ -43,6 +43,10 @@ fu_linux_swap_plain_func(void) g_test_skip(error->message); return; } + if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CONNECTION_REFUSED)) { + g_test_skip(error->message); + return; + } g_assert_no_error(error); g_assert_nonnull(swap); }