[libvirt] [PATCH 0/5] Use-after-free fix and cleanups
by Marc Hartmayer
While looking at a use-after-free situation going through how the QEMU
monitor is set up I noticed some things. These cleanups and the fix
for the use-after-free are the result of that.
Marc Hartmayer (5):
qemu: Fix two use-after-free situations
qemu: Turn qemuDomainLogContext into virObject
qemu: Implement qemuMonitorRegister()
qemu: remove ATTRIBUTE_UNUSED in qemuProcessHandleMonitorEOF
refactoring: Use the return value of virObjectRef directly
src/datatypes.c | 6 ++--
src/qemu/qemu_domain.c | 72 ++++++++++++++++++++------------------
src/qemu/qemu_domain.h | 2 --
src/qemu/qemu_monitor.c | 82 ++++++++++++++++++++++++++++++++++----------
src/qemu/qemu_monitor.h | 6 ++++
src/qemu/qemu_process.c | 12 +++----
src/rpc/virnetclientstream.c | 4 +--
src/rpc/virnetserver.c | 9 ++---
tests/qemumonitortestutils.c | 3 +-
9 files changed, 121 insertions(+), 75 deletions(-)
--
2.5.5
7 years, 7 months
[libvirt] [PATCH] hyperv: recognize array property as distinct type.
by Dawid Zamirski
When hyperv code generator for WMI classes identifies common
properties, it needs to take into account array type as a distinct
type, i.e string != string[]. This is the case where v1 of the
Msvm_VirtualSystemSettingData has Notes property as string whereas v2
uses Notes[], therefore they have to be treated as different fields and
cannot be placed in the "common" struct.
---
src/hyperv/hyperv_driver.c | 26 ++++++++++++++++++++++++--
src/hyperv/hyperv_wmi_generator.py | 2 +-
2 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index 090ea24..5a27908 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -894,8 +894,30 @@ hypervDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
if (VIR_STRDUP(def->name, computerSystem->data.common->ElementName) < 0)
goto cleanup;
- if (VIR_STRDUP(def->description, virtualSystemSettingData->data.common->Notes) < 0)
- goto cleanup;
+ if (priv->wmiVersion == HYPERV_WMI_VERSION_V1) {
+ if (VIR_STRDUP(def->description,
+ virtualSystemSettingData->data.v1->Notes) < 0)
+ goto cleanup;
+ } else if (priv->wmiVersion == HYPERV_WMI_VERSION_V2 &&
+ virtualSystemSettingData->data.v2->Notes.data != NULL) {
+ char **notes = NULL;
+ virBuffer buf = VIR_BUFFER_INITIALIZER;
+ size_t i = 0;
+
+ /* in practice Notes has 1 element */
+ for (i = 0; i < virtualSystemSettingData->data.v2->Notes.count; i++) {
+ /* but if there's more than 1, separate by double new line */
+ if (virBufferUse(&buf) > 0)
+ virBufferAddLit(&buf, "\n\n");
+
+ notes = (char **) virtualSystemSettingData->data.v2->Notes.data;
+ virBufferAdd(&buf, *notes, -1);
+ notes++;
+ }
+
+ def->description = virBufferContentAndReset(&buf);
+ }
+
virDomainDefSetMemoryTotal(def, memorySettingData->data.common->Limit * 1024); /* megabyte to kilobyte */
def->mem.cur_balloon = memorySettingData->data.common->VirtualQuantity * 1024; /* megabyte to kilobyte */
diff --git a/src/hyperv/hyperv_wmi_generator.py b/src/hyperv/hyperv_wmi_generator.py
index c15d97a..9aee0b9 100755
--- a/src/hyperv/hyperv_wmi_generator.py
+++ b/src/hyperv/hyperv_wmi_generator.py
@@ -251,7 +251,7 @@ class WmiClass:
for cls in self.versions:
for prop in cls.properties:
# consdered same if matches by name AND type
- key = "%s_%s" % (prop.name, prop.type)
+ key = "%s_%s_%s" % (prop.name, prop.type, prop.is_array)
if key in property_info:
property_info[key][1] += 1
--
2.9.3
7 years, 7 months
[libvirt] How do you use Ceph/RBD pools with a VM?
by Erik Andersen
I have used Ceph/RBD images for libvirt manage KVM virtual machines before.
I did this by including the Monitor addresses and Ceph authentication
details directly in the <disk> section of the Domain's XML.
I'm trying to add Ceph support to the Kimchi project. They use pools for
disk storage. So I attempted to add support for adding pools to Kimchi, and
that seems to have worked. The resulting pool definition is such:
<pool type='rbd'>
<name>cephpooltest3</name>
<uuid>ed08f580-f841-48cb-ba05-747aef3cee12</uuid>
<capacity unit='bytes'>144881172480</capacity>
<allocation unit='bytes'>114</allocation>
<available unit='bytes'>139953623040</available>
<source>
<host name='192.168.122.254'/>
<host name='192.168.122.253'/>
<host name='192.168.122.252'/>
<name>prod-virt-pool</name>
<auth type='ceph' username='libvirt'>
<secret usage='cephpooltest3'/>
</auth>
</source>
</pool>
But the thing I can't seem to figure out is what XML should I be using
under a VM/Domain to have a disk that is stored on that pool? Is this even
possible right now? I found
https://www.redhat.com/archives/libvirt-users/2015-March/msg00123.html
which seems to indicate that this was not possible as of about a year ago.
If that is still the case, is there any usefulness to being able to define
an RBD pool? What needs to be done before the patches mentioned could be
applied?
7 years, 7 months
[libvirt] [PATCH 1/2] vz: support virDomainSetVcpus
by Konstantin Neumoin
Acked-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
Signed-off-by: Konstantin Neumoin <kneumoin(a)virtuozzo.com>
---
src/vz/vz_driver.c | 43 +++++++++++++++++++++++++++++++++++++++++++
src/vz/vz_sdk.c | 23 +++++++++++++++++++++++
src/vz/vz_sdk.h | 1 +
3 files changed, 67 insertions(+)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index da83a8f..ed7132f 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -3905,6 +3905,47 @@ vzDomainReset(virDomainPtr domain, unsigned int flags)
return ret;
}
+static int vzDomainSetVcpusFlags(virDomainPtr domain, unsigned int nvcpus,
+ unsigned int flags)
+{
+ virDomainObjPtr dom = NULL;
+ int ret = -1;
+ bool job = false;
+
+ virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
+ VIR_DOMAIN_AFFECT_CONFIG, -1);
+
+ if (!(dom = vzDomObjFromDomainRef(domain)))
+ goto cleanup;
+
+ if (vzCheckConfigUpdateFlags(dom, &flags) < 0)
+ goto cleanup;
+
+ if (virDomainSetVcpusFlagsEnsureACL(domain->conn, dom->def, flags) < 0)
+ goto cleanup;
+
+ if (vzDomainObjBeginJob(dom) < 0)
+ goto cleanup;
+ job = true;
+
+ if (vzEnsureDomainExists(dom) < 0)
+ goto cleanup;
+
+ ret = prlsdkSetCpuCount(dom, nvcpus);
+
+ cleanup:
+ if (job)
+ vzDomainObjEndJob(dom);
+ virDomainObjEndAPI(&dom);
+ return ret;
+}
+
+static int vzDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus)
+{
+ return vzDomainSetVcpusFlags(dom, nvcpus,
+ VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG);
+}
+
static virHypervisorDriver vzHypervisorDriver = {
.name = "vz",
.connectOpen = vzConnectOpen, /* 0.10.0 */
@@ -3954,6 +3995,8 @@ static virHypervisorDriver vzHypervisorDriver = {
.domainDetachDeviceFlags = vzDomainDetachDeviceFlags, /* 1.2.15 */
.domainIsActive = vzDomainIsActive, /* 1.2.10 */
.domainIsUpdated = vzDomainIsUpdated, /* 1.2.21 */
+ .domainSetVcpus = vzDomainSetVcpus, /* 3.3.0 */
+ .domainSetVcpusFlags = vzDomainSetVcpusFlags, /* 3.3.0 */
.domainGetVcpusFlags = vzDomainGetVcpusFlags, /* 1.2.21 */
.domainGetMaxVcpus = vzDomainGetMaxVcpus, /* 1.2.21 */
.domainSetUserPassword = vzDomainSetUserPassword, /* 2.0.0 */
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index c1a50fd..2daa44a 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -4902,3 +4902,26 @@ int prlsdkMigrate(virDomainObjPtr dom, virURIPtr uri,
cleanup:
return ret;
}
+
+int prlsdkSetCpuCount(virDomainObjPtr dom, unsigned int count)
+{
+ vzDomObjPtr privdom = dom->privateData;
+ PRL_HANDLE job;
+ PRL_RESULT pret;
+
+ job = PrlVm_BeginEdit(privdom->sdkdom);
+ if (PRL_FAILED(waitDomainJob(job, dom)))
+ goto error;
+
+ pret = PrlVmCfg_SetCpuCount(privdom->sdkdom, count);
+ prlsdkCheckRetGoto(pret, error);
+
+ job = PrlVm_CommitEx(privdom->sdkdom, 0);
+ if (PRL_FAILED(waitDomainJob(job, dom)))
+ goto error;
+
+ return 0;
+
+ error:
+ return -1;
+}
diff --git a/src/vz/vz_sdk.h b/src/vz/vz_sdk.h
index f8da2ad..100a5e3 100644
--- a/src/vz/vz_sdk.h
+++ b/src/vz/vz_sdk.h
@@ -71,6 +71,7 @@ int
prlsdkGetMemoryStats(PRL_HANDLE sdkstas, virDomainMemoryStatPtr stats, unsigned int nr_stats);
/* memsize is in MiB */
int prlsdkSetMemsize(virDomainObjPtr dom, unsigned int memsize);
+int prlsdkSetCpuCount(virDomainObjPtr dom, unsigned int count);
int
prlsdkDomainSetUserPassword(virDomainObjPtr dom,
const char *user,
--
2.7.4
7 years, 7 months
[libvirt] [PATCH 1/2] vz: support virDomainSetVcpus
by Konstantin Neumoin
Signed-off-by: Konstantin Neumoin <kneumoin(a)virtuozzo.com>
---
src/vz/vz_driver.c | 43 +++++++++++++++++++++++++++++++++++++++++++
src/vz/vz_sdk.c | 23 +++++++++++++++++++++++
src/vz/vz_sdk.h | 1 +
3 files changed, 67 insertions(+)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index da83a8f..ed7132f 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -3905,6 +3905,47 @@ vzDomainReset(virDomainPtr domain, unsigned int flags)
return ret;
}
+static int vzDomainSetVcpusFlags(virDomainPtr domain, unsigned int nvcpus,
+ unsigned int flags)
+{
+ virDomainObjPtr dom = NULL;
+ int ret = -1;
+ bool job = false;
+
+ virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
+ VIR_DOMAIN_AFFECT_CONFIG, -1);
+
+ if (!(dom = vzDomObjFromDomainRef(domain)))
+ goto cleanup;
+
+ if (vzCheckConfigUpdateFlags(dom, &flags) < 0)
+ goto cleanup;
+
+ if (virDomainSetVcpusFlagsEnsureACL(domain->conn, dom->def, flags) < 0)
+ goto cleanup;
+
+ if (vzDomainObjBeginJob(dom) < 0)
+ goto cleanup;
+ job = true;
+
+ if (vzEnsureDomainExists(dom) < 0)
+ goto cleanup;
+
+ ret = prlsdkSetCpuCount(dom, nvcpus);
+
+ cleanup:
+ if (job)
+ vzDomainObjEndJob(dom);
+ virDomainObjEndAPI(&dom);
+ return ret;
+}
+
+static int vzDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus)
+{
+ return vzDomainSetVcpusFlags(dom, nvcpus,
+ VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG);
+}
+
static virHypervisorDriver vzHypervisorDriver = {
.name = "vz",
.connectOpen = vzConnectOpen, /* 0.10.0 */
@@ -3954,6 +3995,8 @@ static virHypervisorDriver vzHypervisorDriver = {
.domainDetachDeviceFlags = vzDomainDetachDeviceFlags, /* 1.2.15 */
.domainIsActive = vzDomainIsActive, /* 1.2.10 */
.domainIsUpdated = vzDomainIsUpdated, /* 1.2.21 */
+ .domainSetVcpus = vzDomainSetVcpus, /* 3.3.0 */
+ .domainSetVcpusFlags = vzDomainSetVcpusFlags, /* 3.3.0 */
.domainGetVcpusFlags = vzDomainGetVcpusFlags, /* 1.2.21 */
.domainGetMaxVcpus = vzDomainGetMaxVcpus, /* 1.2.21 */
.domainSetUserPassword = vzDomainSetUserPassword, /* 2.0.0 */
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index c1a50fd..2daa44a 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -4902,3 +4902,26 @@ int prlsdkMigrate(virDomainObjPtr dom, virURIPtr uri,
cleanup:
return ret;
}
+
+int prlsdkSetCpuCount(virDomainObjPtr dom, unsigned int count)
+{
+ vzDomObjPtr privdom = dom->privateData;
+ PRL_HANDLE job;
+ PRL_RESULT pret;
+
+ job = PrlVm_BeginEdit(privdom->sdkdom);
+ if (PRL_FAILED(waitDomainJob(job, dom)))
+ goto error;
+
+ pret = PrlVmCfg_SetCpuCount(privdom->sdkdom, count);
+ prlsdkCheckRetGoto(pret, error);
+
+ job = PrlVm_CommitEx(privdom->sdkdom, 0);
+ if (PRL_FAILED(waitDomainJob(job, dom)))
+ goto error;
+
+ return 0;
+
+ error:
+ return -1;
+}
diff --git a/src/vz/vz_sdk.h b/src/vz/vz_sdk.h
index f8da2ad..100a5e3 100644
--- a/src/vz/vz_sdk.h
+++ b/src/vz/vz_sdk.h
@@ -71,6 +71,7 @@ int
prlsdkGetMemoryStats(PRL_HANDLE sdkstas, virDomainMemoryStatPtr stats, unsigned int nr_stats);
/* memsize is in MiB */
int prlsdkSetMemsize(virDomainObjPtr dom, unsigned int memsize);
+int prlsdkSetCpuCount(virDomainObjPtr dom, unsigned int count);
int
prlsdkDomainSetUserPassword(virDomainObjPtr dom,
const char *user,
--
2.7.4
7 years, 7 months
[libvirt] [PATCH] virConfSaveValue: protect against a NULL pointer reference
by Wim Ten Have
From: Wim ten Have <wim.ten.have(a)oracle.com>
This patch protects against a NULL pointer dereference leading to a SEGV
under xlconfigtest per DO_TEST("channel-pty");
VIR_TEST_OOM=1 VIR_TEST_RANGE=29 ./tests/xlconfigtest
Wim ten Have (1):
virConfSaveValue: protect against a NULL pointer reference
src/util/virconf.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
--
2.9.3
7 years, 7 months
[libvirt] [PATCH] virpci: Enable GEN4 card Link speed (16GT/s)
by Shivaprasad G Bhat
This enables GEN4 link speed (16GT/s) property to be fetched properly and thus
allows the detach/reattach/dumpxml to work.
Signed-off-by: Shivaprasad G Bhat <sbhat(a)linux.vnet.ibm.com>
---
Verified on Mellanox MT27800 Family ConnectX-5 IB card.
# lspci -kvvvs 0001:01:00.4
0001:01:00.4 Infiniband controller: Mellanox Technologies MT27800 Family [ConnectX-5 Virtual Function]
Subsystem: IBM MT28800 Family [ConnectX-5 Virtual Function]
Control: I/O- Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Region 0: [virtual] Memory at 21000e000000 (64-bit, prefetchable) [size=32M]
Capabilities: [60] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset+
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop- FLReset-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 16GT/s, Width x16, ASPM not supported, Exit Latency L0s unlimited, L1 unlimited
ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed unknown, Width x0, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Range ABCD, TimeoutDis+, LTR-, OBFF Not Supported
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
Capabilities: [48] Vital Product Data
Product Name: PCIe4 2-port 100Gb EDR Adapter x16
Read-only fields:
[PN] Part number: 00WT174
[EC] Engineering changes: P40094
[VF] Vendor specific: 00WT176
[SN] Serial number: YA50YF6AL00B
[Z0] Unknown: 49 42 4d 30 30 30 30 30 30 30 30 30 32
[VC] Vendor specific: EC64
[MN] Manufacture ID: 36 34 31 58 34 38 31 31 37 34 30 30 33 34 20
[VH] Vendor specific: 2CF2
[VK] Vendor specific: ipzSeries
[RV] Reserved: checksum good, 0 byte(s) reserved
End
Capabilities: [9c] MSI-X: Enable+ Count=12 Masked-
Vector table: BAR=0 offset=00002000
PBA: BAR=0 offset=00003000
Kernel driver in use: mlx5_core
Kernel modules: mlx5_core
Before fix :
# virsh nodedev-dumpxml pci_0001_01_00_4
<device>
<name>pci_0001_01_00_4</name>
<path>/sys/devices/pci0001:00/0001:00:00.0/0001:01:00.4</path>
<parent>pci_0001_00_00_0</parent>
<driver>
<name>vfio-pci</name>
</driver>
<capability type='pci'>
<domain>1</domain>
<bus>1</bus>
<slot>0</slot>
<function>4</function>
<product id='0x1018'>MT27800 Family [ConnectX-5 Virtual Function]</product>
<vendor id='0x15b3'>Mellanox Technologies</vendor>
<capability type='phys_function'>
<address domain='0x0001' bus='0x01' slot='0x00' function='0x0'/>
</capability>
<iommuGroup number='10'>
<address domain='0x0001' bus='0x01' slot='0x00' function='0x4'/>
</iommuGroup>
<numa node='0'/>
<pci-express>
<link validity='cap' port='0' speed='(null)' width='16'/>
<link validity='sta' width='0'/>
</pci-express>
</capability>
</device>
# virsh nodedev-detach pci_0001_01_00_4
error: Failed to detach device pci_0001_01_00_4
error: malformed 'speed' attribute: (null)
After Fix:
# ./run tools/virsh nodedev-dumpxml pci_0001_01_00_4
<device>
<name>pci_0001_01_00_4</name>
<path>/sys/devices/pci0001:00/0001:00:00.0/0001:01:00.4</path>
<parent>pci_0001_00_00_0</parent>
<driver>
<name>mlx5_core</name>
</driver>
<capability type='pci'>
<domain>1</domain>
<bus>1</bus>
<slot>0</slot>
<function>4</function>
<product id='0x1018'>MT27800 Family [ConnectX-5 Virtual Function]</product>
<vendor id='0x15b3'>Mellanox Technologies</vendor>
<capability type='phys_function'>
<address domain='0x0001' bus='0x01' slot='0x00' function='0x0'/>
</capability>
<iommuGroup number='10'>
<address domain='0x0001' bus='0x01' slot='0x00' function='0x4'/>
</iommuGroup>
<numa node='0'/>
<pci-express>
<link validity='cap' port='0' speed='16' width='16'/>
<link validity='sta' width='0'/>
</pci-express>
</capability>
</device>
# ./run tools/virsh nodedev-detach pci_0001_01_00_4
Device pci_0001_01_00_4 detached
---
src/util/virpci.c | 4 ++--
src/util/virpci.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/util/virpci.c b/src/util/virpci.c
index 3c1e13b..1e0d903 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -53,7 +53,7 @@ VIR_LOG_INIT("util.pci");
#define PCI_ADDR_LEN 13 /* "XXXX:XX:XX.X" */
VIR_ENUM_IMPL(virPCIELinkSpeed, VIR_PCIE_LINK_SPEED_LAST,
- "", "2.5", "5", "8")
+ "", "2.5", "5", "8", "16")
VIR_ENUM_IMPL(virPCIStubDriver, VIR_PCI_STUB_DRIVER_LAST,
"none",
@@ -147,7 +147,7 @@ struct _virPCIDeviceList {
#define PCI_EXP_DEVCAP 0x4 /* Device capabilities */
#define PCI_EXP_DEVCAP_FLR (1<<28) /* Function Level Reset */
#define PCI_EXP_LNKCAP 0xc /* Link Capabilities */
-#define PCI_EXP_LNKCAP_SPEED 0x0000f /* Maximum Link Speed */
+#define PCI_EXP_LNKCAP_SPEED 0x0001f /* Maximum Link Speed */
#define PCI_EXP_LNKCAP_WIDTH 0x003f0 /* Maximum Link Width */
#define PCI_EXP_LNKSTA 0x12 /* Link Status */
#define PCI_EXP_LNKSTA_SPEED 0x000f /* Negotiated Link Speed */
diff --git a/src/util/virpci.h b/src/util/virpci.h
index a5e8d00..50e8b3c 100644
--- a/src/util/virpci.h
+++ b/src/util/virpci.h
@@ -58,6 +58,7 @@ typedef enum {
VIR_PCIE_LINK_SPEED_25,
VIR_PCIE_LINK_SPEED_5,
VIR_PCIE_LINK_SPEED_8,
+ VIR_PCIE_LINK_SPEED_16,
VIR_PCIE_LINK_SPEED_LAST
} virPCIELinkSpeed;
7 years, 7 months
[libvirt] [PATCH] xenFormatXLDomainDisks: avoid double free on OOM testing
by Wim Ten Have
From: Wim ten Have <wim.ten.have(a)oracle.com>
This patch fixes a double free that exposed under OOM testing
xlconfigtest per DO_TEST("new-disk");
VIR_TEST_OOM=1 VIR_TEST_RANGE=5 ./tests/xlconfigtest
Wim ten Have (1):
xenFormatXLDomainDisks: avoid double free on OOM testing
src/xenconfig/xen_xl.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
--
2.9.3
7 years, 7 months
[libvirt] [RFC PATCH] Drop autobuild.sh
by Andrea Bolognani
The Test-AutoBuild project, that this script is supposed to
be used with, hasn't seen any activity in ~6 years; libvirt's
own CI is running on Jenkins with a completely independent
setup that doesn't use the script at all.
---
autobuild.sh | 122 -----------------------------------------------------------
1 file changed, 122 deletions(-)
delete mode 100755 autobuild.sh
diff --git a/autobuild.sh b/autobuild.sh
deleted file mode 100755
index 2143479..0000000
--- a/autobuild.sh
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/bin/sh
-
-set -e
-set -v
-
-# Make things clean.
-
-test -n "$1" && RESULTS=$1 || RESULTS=results.log
-: ${AUTOBUILD_INSTALL_ROOT=$HOME/builder}
-
-# If run under the autobuilder, we must use --nodeps with rpmbuild;
-# but this can lead to odd error diagnosis for normal development.
-nodeps=
-if test "${AUTOBUILD_COUNTER+set}"; then
- nodeps=--nodeps
-fi
-
-test -f Makefile && make -k distclean || :
-rm -rf coverage
-
-rm -rf build
-mkdir build
-cd build
-
-# Run with options not normally exercised by the rpm build, for
-# more complete code coverage.
-../autogen.sh --prefix="$AUTOBUILD_INSTALL_ROOT" \
- --enable-expensive-tests \
- --enable-test-coverage \
- --disable-nls \
- --enable-werror \
- --enable-static
-
-# If the MAKEFLAGS envvar does not yet include a -j option,
-# add -jN where N depends on the number of processors.
-case $MAKEFLAGS in
- *-j*) ;;
- *) n=$(getconf _NPROCESSORS_ONLN 2> /dev/null)
- test "$n" -gt 0 || n=1
- n=$(expr $n + 1)
- MAKEFLAGS="$MAKEFLAGS -j$n"
- export MAKEFLAGS
- ;;
-esac
-
-make
-make install
-
-# set -o pipefail is a bashism; this use of exec is the POSIX alternative
-exec 3>&1
-st=$(
- exec 4>&1 >&3
- { make check syntax-check 2>&1 3>&- 4>&-; echo $? >&4; } | tee "$RESULTS"
-)
-exec 3>&-
-test "$st" = 0
-test -x /usr/bin/lcov && make cov
-
-rm -f *.tar.xz
-make dist
-
-if test -n "$AUTOBUILD_COUNTER" ; then
- EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
-else
- NOW=`date +"%s"`
- EXTRA_RELEASE=".$USER$NOW"
-fi
-
-if test -f /usr/bin/rpmbuild ; then
- rpmbuild $nodeps \
- --define "extra_release $EXTRA_RELEASE" \
- --define "_sourcedir `pwd`" \
- -ba --clean libvirt.spec
-fi
-
-# Test mingw32 cross-compile
-if test -x /usr/bin/i686-w64-mingw32-gcc ; then
- make distclean
-
- PKG_CONFIG_LIBDIR="/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/share/pkgconfig" \
- PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig" \
- CC="i686-w64-mingw32-gcc" \
- ../configure \
- --build=$(uname -m)-w64-linux \
- --host=i686-w64-mingw32 \
- --prefix="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
- --enable-expensive-tests \
- --enable-werror
-
- make
- make install
-
-fi
-
-# Test mingw64 cross-compile
-if test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
- make distclean
-
- PKG_CONFIG_LIBDIR="/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/x86_64-w64-mingw32/sys-root/mingw/share/pkgconfig" \
- PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig" \
- CC="x86_64-w64-mingw32-gcc" \
- ../configure \
- --build=$(uname -m)-w64-linux \
- --host=x86_64-w64-mingw32 \
- --prefix="$AUTOBUILD_INSTALL_ROOT/x86_64-w64-mingw32/sys-root/mingw" \
- --enable-expensive-tests \
- --enable-werror
-
- make
- make install
-
-fi
-
-
-if test -x /usr/bin/i686-w64-mingw32-gcc && test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
- if test -f /usr/bin/rpmbuild ; then
- rpmbuild $nodeps \
- --define "extra_release $EXTRA_RELEASE" \
- --define "_sourcedir `pwd`" \
- -ba --clean mingw-libvirt.spec
- fi
-fi
--
2.7.4
7 years, 7 months
[libvirt] [PATCH] Don't ship autogen.sh in release tarballs
by Andrea Bolognani
autogen.sh is only useful for developers, not users, and we
expect developers to have a git checkout handy, so there's
no point in shipping the script in release tarballs.
autobuild.sh uses autogen.sh, so don't ship that either.
---
Makefile.am | 2 --
1 file changed, 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index c6324f5..0efd8be 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,9 +36,7 @@ EXTRA_DIST = \
libvirt-qemu.pc.in \
libvirt-lxc.pc.in \
libvirt-admin.pc.in \
- autobuild.sh \
Makefile.nonreentrant \
- autogen.sh \
cfg.mk \
run.in \
AUTHORS.in
--
2.7.4
7 years, 7 months