[libvirt PATCH 0/3] tests: Don't use GIO_COMPILATION

See patch 3/3 for the rationale. Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/823120265 Andrea Bolognani (3): tests: Drop dead code tests: Don't build virgdbusmock on Windows tests: Don't use GIO_COMPILATION tests/meson.build | 11 ++++++----- tests/virfirewalltest.c | 4 ---- 2 files changed, 6 insertions(+), 9 deletions(-) -- 2.39.2

Left behind by commit 35eb484 ("tests: remove firewalld backend tests from virfirewalltest.c"). Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- tests/virfirewalltest.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/virfirewalltest.c b/tests/virfirewalltest.c index 51c8006331..e676a434c8 100644 --- a/tests/virfirewalltest.c +++ b/tests/virfirewalltest.c @@ -788,10 +788,6 @@ mymain(void) return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } -# if 0 -VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virgdbus"), - VIR_TEST_MOCK("virfirewall")) -# endif VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virfirewall")) #else /* ! defined (__linux__) */ -- 2.39.2

All of the tests that use this mock (networkxml2firewalltest, virsystemdtest, virpolkittest) are either no-ops on Windows, or are not compiled at all on the target. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- tests/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/meson.build b/tests/meson.build index 6be806f4ae..fa3d5380d4 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -82,7 +82,6 @@ mock_libs = [ { 'name': 'virdnsmasqmock' }, { 'name': 'virfilecachemock' }, { 'name': 'virfirewallmock' }, - { 'name': 'virgdbusmock', 'deps': [ virgdbusmock_dep] }, { 'name': 'virhostcpumock' }, { 'name': 'virhostdevmock' }, { 'name': 'virnetdaemonmock' }, @@ -104,6 +103,12 @@ if host_machine.system() == 'linux' ] endif +if host_machine.system() != 'windows' + mock_libs += [ + { 'name': 'virgdbusmock', 'deps': [ virgdbusmock_dep] }, + ] +endif + # build libraries used by tests -- 2.39.2

This flag is intended to be used exclusively in the context of building GLib itself and should not be passed to the compiler by a third-party project such as libvirt. Reverts: 77d1fa5 ("tests: Compile virgdbusmock.c with GIO_COMPILATION enabled") Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- tests/meson.build | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index fa3d5380d4..3b77973742 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -65,10 +65,6 @@ else endif -virgdbusmock_dep = declare_dependency( - compile_args: [ '-DGIO_COMPILATION' ] -) - # mock_libs: # each entry is a dictionary with following items: # * name - mock library name which is also used as default source file name (required) @@ -105,7 +101,7 @@ endif if host_machine.system() != 'windows' mock_libs += [ - { 'name': 'virgdbusmock', 'deps': [ virgdbusmock_dep] }, + { 'name': 'virgdbusmock' }, ] endif -- 2.39.2

On 3/30/23 9:39 AM, Andrea Bolognani wrote:
See patch 3/3 for the rationale.
Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/823120265
Andrea Bolognani (3): tests: Drop dead code tests: Don't build virgdbusmock on Windows tests: Don't use GIO_COMPILATION
tests/meson.build | 11 ++++++----- tests/virfirewalltest.c | 4 ---- 2 files changed, 6 insertions(+), 9 deletions(-)
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>

On a Thursday in 2023, Andrea Bolognani wrote:
See patch 3/3 for the rationale.
Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/823120265
Andrea Bolognani (3): tests: Drop dead code tests: Don't build virgdbusmock on Windows tests: Don't use GIO_COMPILATION
tests/meson.build | 11 ++++++----- tests/virfirewalltest.c | 4 ---- 2 files changed, 6 insertions(+), 9 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> However I'm not convinced this is post-rc2 material. Jano

On Thu, Mar 30, 2023 at 04:59:38PM +0200, Ján Tomko wrote:
On a Thursday in 2023, Andrea Bolognani wrote:
tests: Drop dead code tests: Don't build virgdbusmock on Windows tests: Don't use GIO_COMPILATION
tests/meson.build | 11 ++++++----- tests/virfirewalltest.c | 4 ---- 2 files changed, 6 insertions(+), 9 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com>
However I'm not convinced this is post-rc2 material.
It's good that I had no intention of pushing it until after the release of 9.2.0 then :) -- Andrea Bolognani / Red Hat / Virtualization
participants (3)
-
Andrea Bolognani
-
Jonathon Jongsma
-
Ján Tomko