On 02/06/2025 4:50 pm, Jan Beulich wrote: > On 02.06.2025 17:36, Andrew Cooper wrote: >> On 02/06/2025 4:09 pm, Michal Orzel wrote: >>> These tests are supposed to run on target. HOSTCC can be different than >>> CC (when cross-compiling). At the moment, tests installation would put >>> a binary of a wrong format in the destdir. >>> >>> Fixes: e90580f25bd7 ("vpci: introduce basic handlers to trap accesses to >>> the PCI config space") >>> Signed-off-by: Michal Orzel <michal.or...@amd.com> >> Oh. This didn't explode in GitlabCI because there's no ARM version of >> *-tools-tests-*. >> >> Can we fix that too please, seeing as there is a real ARM board? >> >> Also, I guess we have to finally sort out the CC vs HOSTCC debate. > I think the situation here makes pretty clear that HOSTCC is almost always > wrong to use for tests/. The emulator test harness is special in that it (in > principle) needs a target compiler (CC) and additionally an x86 one (with no > present representation). The present way of (partly) distinguishing the two > by using CC and HOSTCC was assigning wrong meaning to one (perhaps both) of > them. The (or maybe just my) problem is that in the toolchain world it is > build, host, and target which are distinguished. As per Michal's description > my understanding is that HOSTCC is matching "build" there, not "host".
vPCI is a true unit test. It can be run in the build environment. Installing it here was to get it run somewhere. x86_emulator is weird. It can be run in the build environment, but it is also dependent on CPUID so wants running on target environments too. Everything else (IIRC) needs a real dom0 to run in, because they make hypercalls. ~Andrew