[PATCH 0/2 v2] Fix the build failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As exposed by [1], qemuxml2argvtest fails because of it tries to
access non-existing sysfs files when building qemu command for
scsi-generic device.

This creates "tests/sysfsroot", uses it as the fake sysfs root,
any future sysfs test input files should be put into it.

[1] https://www.redhat.com/archives/libvir-list/2013-May/msg00923.html

v1 - v2:
  * Use callbacks instead of increasing the arguments

Osier Yang (2):
  qemu: Add callback struct for qemuBuildCommandLine
  tests: Move fchostdata into sysfsroot

 src/qemu/qemu_command.c                            | 31 ++++++++++++++-----
 src/qemu/qemu_command.h                            | 16 ++++++++--
 src/qemu/qemu_driver.c                             |  3 +-
 src/qemu/qemu_hotplug.c                            |  6 ++--
 src/qemu/qemu_process.c                            |  3 +-
 src/util/virscsi.c                                 | 35 ++++++++++++++++++----
 src/util/virscsi.h                                 |  3 +-
 tests/Makefile.am                                  |  2 +-
 tests/fchostdata/fc_host/host4/fabric_name         |  1 -
 tests/fchostdata/fc_host/host4/max_npiv_vports     |  1 -
 tests/fchostdata/fc_host/host4/node_name           |  1 -
 tests/fchostdata/fc_host/host4/npiv_vports_inuse   |  1 -
 tests/fchostdata/fc_host/host4/port_name           |  1 -
 tests/fchostdata/fc_host/host4/port_state          |  1 -
 tests/fchostdata/fc_host/host4/vport_create        |  0
 tests/fchostdata/fc_host/host4/vport_delete        |  0
 tests/fchostdata/fc_host/host5/fabric_name         |  1 -
 tests/fchostdata/fc_host/host5/max_npiv_vports     |  1 -
 tests/fchostdata/fc_host/host5/node_name           |  1 -
 tests/fchostdata/fc_host/host5/npiv_vports_inuse   |  1 -
 tests/fchostdata/fc_host/host5/port_name           |  1 -
 tests/fchostdata/fc_host/host5/port_state          |  1 -
 tests/fchostdata/fc_host/host5/vport_create        |  0
 tests/fchostdata/fc_host/host5/vport_delete        |  0
 tests/fchosttest.c                                 |  2 +-
 tests/qemuxml2argvtest.c                           | 18 ++++++++++-
 tests/qemuxmlnstest.c                              |  3 +-
 .../bus/scsi/devices/0:0:0:0/scsi_generic/sg0/dev  |  1 +
 .../class/fchostdata/fc_host/host4/fabric_name     |  1 +
 .../class/fchostdata/fc_host/host4/max_npiv_vports |  1 +
 .../class/fchostdata/fc_host/host4/node_name       |  1 +
 .../fchostdata/fc_host/host4/npiv_vports_inuse     |  1 +
 .../class/fchostdata/fc_host/host4/port_name       |  1 +
 .../class/fchostdata/fc_host/host4/port_state      |  1 +
 .../class/fchostdata/fc_host/host4/vport_create    |  0
 .../class/fchostdata/fc_host/host4/vport_delete    |  0
 .../class/fchostdata/fc_host/host5/fabric_name     |  1 +
 .../class/fchostdata/fc_host/host5/max_npiv_vports |  1 +
 .../class/fchostdata/fc_host/host5/node_name       |  1 +
 .../fchostdata/fc_host/host5/npiv_vports_inuse     |  1 +
 .../class/fchostdata/fc_host/host5/port_name       |  1 +
 .../class/fchostdata/fc_host/host5/port_state      |  1 +
 .../class/fchostdata/fc_host/host5/vport_create    |  0
 .../class/fchostdata/fc_host/host5/vport_delete    |  0
 44 files changed, 110 insertions(+), 37 deletions(-)
 delete mode 100644 tests/fchostdata/fc_host/host4/fabric_name
 delete mode 100644 tests/fchostdata/fc_host/host4/max_npiv_vports
 delete mode 100644 tests/fchostdata/fc_host/host4/node_name
 delete mode 100644 tests/fchostdata/fc_host/host4/npiv_vports_inuse
 delete mode 100644 tests/fchostdata/fc_host/host4/port_name
 delete mode 100644 tests/fchostdata/fc_host/host4/port_state
 delete mode 100644 tests/fchostdata/fc_host/host4/vport_create
 delete mode 100644 tests/fchostdata/fc_host/host4/vport_delete
 delete mode 100644 tests/fchostdata/fc_host/host5/fabric_name
 delete mode 100644 tests/fchostdata/fc_host/host5/max_npiv_vports
 delete mode 100644 tests/fchostdata/fc_host/host5/node_name
 delete mode 100644 tests/fchostdata/fc_host/host5/npiv_vports_inuse
 delete mode 100644 tests/fchostdata/fc_host/host5/port_name
 delete mode 100644 tests/fchostdata/fc_host/host5/port_state
 delete mode 100644 tests/fchostdata/fc_host/host5/vport_create
 delete mode 100644 tests/fchostdata/fc_host/host5/vport_delete
 create mode 100644 tests/sysfsroot/bus/scsi/devices/0:0:0:0/scsi_generic/sg0/dev
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host4/fabric_name
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host4/max_npiv_vports
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host4/node_name
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host4/npiv_vports_inuse
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host4/port_name
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host4/port_state
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host4/vport_create
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host4/vport_delete
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host5/fabric_name
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host5/max_npiv_vports
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host5/node_name
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host5/npiv_vports_inuse
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host5/port_name
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host5/port_state
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host5/vport_create
 create mode 100644 tests/sysfsroot/class/fchostdata/fc_host/host5/vport_delete

-- 
1.8.1.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]