
On 05/07/2018 01:51 PM, John Ferlan wrote:
[...]
Someone may also want to consider creating a s390 specific version of what Peter did for x86_64 for VIR_TEST_CAPS_LATEST in order to then have/use the "latest" capabilities instead of adding bits to xml2argv tests. I'm curious why the xml2xml test needed the bit adjustment - did something fail? Since there were no xml output data changes, that would seem to indicate there isn't a need to modify the xml2xml test source. I am not sure if I understood you correctly. Are you referring to patch 1? If so the changes are caused by a new QEMU_CAPS_CCW capability replacing the QEMU_CAPS_VIRTIO_CCW capability. More is explained in the commit message of the patch. In short: With support of vfio-ccw it became apparent that the existence of the ccw bus is not well sourced by observing virtio-ccw and therefore we replaced it with the detection of the virtual-css-bridge. Let me know if I understood you wrong.
Sorry it wasn't clear enough - changes were recently made to tests/qemuxml2argvtest.c in order to run the tests using the latest capabilities rather than needing to pass each capability through the test. The macros also have a version specific macro which allows for checking/output from "previous" QEMU releases.
However, the changes only modified macros for x86_64 - so my comment was if someone felt so inclined to avoid needing/checking specific/certain caps and only cared that the latest caps did something a certain way, then adjusting those macros/tests to handle s390* specific things would perhaps helps achieve that. Furthermore, if previous QEMU versions would produce different results, then using the version specific checks/output would provide that support.
Oh, I tried to connect your comment to the vfio-ccw passthrough patch series but it seems rather unrelated to me. Anyway you are right that it could be useful to extend the macros DO_TEST_CAPS_LATEST and DO_TEST_CAPS_VER beyond x86_64 arch. I do see these macros more like additional test scenarios that are a bit more reality oriented. The currently used approach of explicitly setting the minimum required capabilities for a single test case is still making sense to me as well since it allows to (slightly) narrow down the tested code path to the actual to be tested code/feature. -- Mit freundlichen Grüßen/Kind regards Boris Fiuczynski IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martina Köderitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294