On 3/29/23 11:52, Andrea Bolognani wrote: > On Wed, Mar 29, 2023 at 11:08:56AM +0200, Michal Prívozník wrote: >> On 3/28/23 14:54, Andrea Bolognani wrote: >>> Anyway my point is that, at least as far as I can tell, all of the >>> test programs that use virgdbusmock are effectively no-op on Windows, >>> which means that mocking gdbus on Windows should not be necessary and >>> thus not building the mock library on that platform should be viable. >>> >>> Other mocks might work on Windows, I'm not sure. I haven't >>> investigated, and I'm not making blanket statements about the topic. >>> I'm only discussing this specific mock, which is the one currently >>> causing us grief and which looks like we could simply stop building >>> on Windows without losing anything in the process. >> >> Ha, so after many failed attempts I am able to compile and *RUN* our >> test suite under wine. I needed to hack the meson cross file mingw >> ships. Anyway, what I'm seeing is couple of failed tests: >> >> >> 14/213 libvirt / domaincapstest FAIL 0.84s exit status 1 >> 27/213 libvirt / sockettest FAIL 0.42s exit status 1 >> 28/213 libvirt / sysinfotest FAIL 0.44s exit status 1 >> 29/213 libvirt / storagevolxml2xmltest FAIL 0.46s exit status 1 >> 38/213 libvirt / vircryptotest FAIL 0.42s exit status 1 >> 41/213 libvirt / virfilecachetest FAIL 0.44s exit status 1 >> 46/213 libvirt / viridentitytest FAIL 0.44s exit status 3 >> 50/213 libvirt / virlockspacetest FAIL 0.36s exit status 1 >> 57/213 libvirt / virrotatingfiletest FAIL 0.45s exit status 1 >> 59/213 libvirt / virstringtest FAIL 0.44s exit status 1 >> 65/213 libvirt / vshtabletest FAIL 0.44s exit status 1 >> >> >> Now, some of these are true bugs (either in our code or in wine). I'll >> try to post patches. Nevertheless, I can confirm that mocking works with >> .dll too. > > Excellent stuff! > >> Therefore, I'd like to continue building mocks AND keep this >> original patch as is. > > Can you please clarify whether the three tests[1] that use > virgdbusmock (networkxml2firewalltest, virsystemdtest, virpolkittest) networkxml2firewalltest and virpolkittest aren't even built, well, weren't in my setup. Which kind of makes sense as neither of the feature they test can work on Windows. And virsystemdtest is built but returns AM_SKIP instantly. > run successfully under Wine and, if so, whether they do anything more > interesting than returning EXIT_AM_SKIP? Or can be modified to do so? I don't think it's worth the effort. > > It seems to me that they're testing Unix-only features, so we're > never going to be able to meaningfully run them on Windows. And since > they're the only ones using virgdbusmock, going out of our way to > build that mock on Windows only for it to remain unused is pointless. Sure, but right now, without my patches (WIP) every test and every mock is just a compile-only test. We are not running any of the test so they are kind of pointless too. But if we are okay with just compile testing, then why not build the mock? But clearly you care more than I do, so please post a patch and I'm more than happy to review it. Michal