On Wed, Mar 23, 2016 at 10:15:31AM +0100, Michal Privoznik wrote:
When constructing SCSI hostdev command line for qemu, the
/sys/bus/scsi/devices/... dir is scanned. Unfortunately, even in
the tests. This is needed to determine the name of SCSI device to
passthrough to qemu, because in the domain XML we were given its
address instead. Anyway, we should not be touching live system
data in our test suite as it produced unpredictable results. The
test is regressing from 1e9a083742efe on.
That commit stopped using testCallbacks from tests/testutilsqemu.c
If we mock the function, the commit that added them (to solve this exact
bug) can be reverted:
commit 3a6204cbbdf60b24f67ab48997598a88063264d6
qemu: Add callback struct for qemuBuildCommandLine
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tests/qemuxml2argvmock.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
ACK
diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c
index 8426108..b7dfebb 100644
--- a/tests/qemuxml2argvmock.c
+++ b/tests/qemuxml2argvmock.c
@@ -26,6 +26,7 @@
#include "virutil.h"
#include "virstring.h"
#include "virtpm.h"
+#include "virscsi.h"
Nitpick: this would look nicer sorted alphabetically.
Jan