On 17.07.2018 14:04, Juan Quintela wrote: > Hi > > Notice that this is an RFC because they don't work. As said on my > previous submmision, we need <foo>-softmmu/config-devices.h to make > this work. This series just allow us to disable the devices, but not > to enable it back O:-) > > Notice: > > - scsi stuff: we are testing they in cdrom-test.c, so we need to be > able to config them out. Notice also that #ifdefs only go in tests/<...> > > - virtio stuff: see how we need to also change hw/virtio/virtio-pci.c > to disable it. The problem appears in the device-instropect-test.c. > As they are defined in the binary, but not complied in. We can > change for a registration appreach, but that is more work that what > I intended for this series. > > What do you think?
I think this is the wrong way to go. If you add #ifdefs to the sources, you have to make the binaries target-specific. Currently each test binary can work for each target architecture. With #ifdefs, that's not possible anymore. So please don't do that. If you want to make the tests more flexible for configuration, please use QOM instead to check whether the devices are available or not. Thomas