087a74e qemu_capabilities; Drop virQEMUCapsSetVAList

Authored and Committed by mprivozn 5 years ago
    qemu_capabilities; Drop virQEMUCapsSetVAList
    
    There is one specific caller (testInfoSetArgs() in
    qemuxml2argvtest.c) which expect the va_list argument to change
    after returning from the virQEMUCapsSetVAList() function.
    However, since we are passing plain va_list this is not
    guaranteed. The man page of stdarg(3) says:
    
      If ap is passed to a function that uses va_arg(ap,type), then
      the value of ap is undefined after the return of that function.
    
    (ap is a variable of type va_list)
    
    I've seen this in action in fact: on i686 the qemuxml2argvtest
    fails on the second test case because testInfoSetArgs() sees
    ARG_QEMU_CAPS and calls virQEMUCapsSetVAList to process the
    capabilities (in this case there's just one
    QEMU_CAPS_SECCOMP_BLACKLIST). But since the changes are not
    reflected in the caller, in the next iteration testInfoSetArgs()
    sees the QEMU capability and not ARG_END.
    
    Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
    Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
    
        
file modified
+3 -12
file modified
+0 -2
file modified
+5 -1