Accepting request 328678 from home:jfehlig:branches:Virtualization
- Update to libvirt 1.2.19
- Improved ppc64 support
- New virDomainRename API
- Support for new QEMU pci emulations
- Many incremental improvements and bug fixes, see
http://libvirt.org/news.html
- Dropped upstream patches:
269d39af-storage-allocation-fix.patch,
26c5fa3a-virt-aa-helper-missing-doc.patch,
d25a5e08-virt-aa-helper-simplify-restriction-logic.patch,
2f01cfdf-virt-aa-helper-allow-ovmf.patch,
91fdcefa-virt-aa-helper-allow-nvram.patch,
52970dec-virt-aa-helper-improve-valid-path.patch,
44a54eb0-libxl-fix-refcnt-MigrationDstArgs.patch,
15120b8c-libxl-no-resume-on-suspend-fail.patch,
e80b84a7-libxl-acquire-job-on-migrate.patch,
60acb38-revert-curmem-inactive-dom.patch
OBS-URL: https://build.opensuse.org/request/show/328678
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=481
2015-09-02 17:27:32 +02:00
|
|
|
Index: libvirt-1.2.19/tests/vircgrouptest.c
|
2014-03-03 05:22:57 +01:00
|
|
|
===================================================================
|
Accepting request 328678 from home:jfehlig:branches:Virtualization
- Update to libvirt 1.2.19
- Improved ppc64 support
- New virDomainRename API
- Support for new QEMU pci emulations
- Many incremental improvements and bug fixes, see
http://libvirt.org/news.html
- Dropped upstream patches:
269d39af-storage-allocation-fix.patch,
26c5fa3a-virt-aa-helper-missing-doc.patch,
d25a5e08-virt-aa-helper-simplify-restriction-logic.patch,
2f01cfdf-virt-aa-helper-allow-ovmf.patch,
91fdcefa-virt-aa-helper-allow-nvram.patch,
52970dec-virt-aa-helper-improve-valid-path.patch,
44a54eb0-libxl-fix-refcnt-MigrationDstArgs.patch,
15120b8c-libxl-no-resume-on-suspend-fail.patch,
e80b84a7-libxl-acquire-job-on-migrate.patch,
60acb38-revert-curmem-inactive-dom.patch
OBS-URL: https://build.opensuse.org/request/show/328678
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=481
2015-09-02 17:27:32 +02:00
|
|
|
--- libvirt-1.2.19.orig/tests/vircgrouptest.c
|
|
|
|
+++ libvirt-1.2.19/tests/vircgrouptest.c
|
2015-04-02 18:20:09 +02:00
|
|
|
@@ -34,7 +34,6 @@
|
2014-03-03 05:22:57 +01:00
|
|
|
# include "virfile.h"
|
2015-04-02 18:20:09 +02:00
|
|
|
# include "virbuffer.h"
|
2014-03-03 05:22:57 +01:00
|
|
|
# include "testutilslxc.h"
|
|
|
|
-# include "nodeinfo.h"
|
|
|
|
|
|
|
|
# define VIR_FROM_THIS VIR_FROM_NONE
|
|
|
|
|
2015-08-04 17:13:51 +02:00
|
|
|
@@ -607,90 +606,6 @@ static int testCgroupControllerAvailable
|
2015-05-04 18:52:19 +02:00
|
|
|
return ret;
|
2014-03-03 05:22:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
-static int testCgroupGetPercpuStats(const void *args ATTRIBUTE_UNUSED)
|
|
|
|
-{
|
|
|
|
- virCgroupPtr cgroup = NULL;
|
|
|
|
- size_t i;
|
|
|
|
- int rv, ret = -1;
|
2015-01-28 05:12:58 +01:00
|
|
|
- virTypedParameterPtr params = NULL;
|
|
|
|
-# define EXPECTED_NCPUS 160
|
2014-03-03 05:22:57 +01:00
|
|
|
-
|
2015-01-28 05:12:58 +01:00
|
|
|
- unsigned long long expected[EXPECTED_NCPUS] = {
|
|
|
|
- 0, 0, 0, 0, 0, 0, 0, 0,
|
2015-05-04 18:52:19 +02:00
|
|
|
- 7059492996ULL, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 4180532496ULL, 0, 0, 0, 0, 0, 0, 0,
|
2015-01-28 05:12:58 +01:00
|
|
|
- 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 0, 0, 0, 0, 0, 0, 0, 0,
|
2015-05-04 18:52:19 +02:00
|
|
|
- 1957541268ULL, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 2065932204ULL, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 18228689414ULL, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 4245525148ULL, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 2911161568ULL, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 1407758136ULL, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 1836807700ULL, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 1065296618ULL, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 2046213266ULL, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 747889778ULL, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 709566900ULL, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 444777342ULL, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 5683512916ULL, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
- 635751356ULL, 0, 0, 0, 0, 0, 0, 0,
|
2014-03-03 05:22:57 +01:00
|
|
|
- };
|
|
|
|
-
|
2015-01-28 05:12:58 +01:00
|
|
|
- if (VIR_ALLOC_N(params, EXPECTED_NCPUS) < 0)
|
|
|
|
- goto cleanup;
|
|
|
|
-
|
2014-03-03 05:22:57 +01:00
|
|
|
- if ((rv = virCgroupNewPartition("/virtualmachines", true,
|
|
|
|
- (1 << VIR_CGROUP_CONTROLLER_CPU) |
|
|
|
|
- (1 << VIR_CGROUP_CONTROLLER_CPUACCT),
|
|
|
|
- &cgroup)) < 0) {
|
|
|
|
- fprintf(stderr, "Could not create /virtualmachines cgroup: %d\n", -rv);
|
|
|
|
- goto cleanup;
|
|
|
|
- }
|
|
|
|
-
|
2015-08-04 17:13:51 +02:00
|
|
|
- if (nodeGetCPUCount(NULL) != EXPECTED_NCPUS) {
|
|
|
|
- fprintf(stderr, "Unexpected: nodeGetCPUCount() yields: %d\n", nodeGetCPUCount(NULL));
|
2014-03-03 05:22:57 +01:00
|
|
|
- goto cleanup;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if ((rv = virCgroupGetPercpuStats(cgroup,
|
|
|
|
- params,
|
2015-01-28 05:12:58 +01:00
|
|
|
- 1, 0, EXPECTED_NCPUS, 0)) < 0) {
|
2014-03-03 05:22:57 +01:00
|
|
|
- fprintf(stderr, "Failed call to virCgroupGetPercpuStats for /virtualmachines cgroup: %d\n", -rv);
|
|
|
|
- goto cleanup;
|
|
|
|
- }
|
|
|
|
-
|
2015-01-28 05:12:58 +01:00
|
|
|
- for (i = 0; i < EXPECTED_NCPUS; i++) {
|
2014-03-03 05:22:57 +01:00
|
|
|
- if (!STREQ(params[i].field, VIR_DOMAIN_CPU_STATS_CPUTIME)) {
|
|
|
|
- fprintf(stderr,
|
2015-01-28 05:12:58 +01:00
|
|
|
- "Wrong parameter name value from virCgroupGetPercpuStats at %zu (is: %s)\n",
|
|
|
|
- i, params[i].field);
|
2014-03-03 05:22:57 +01:00
|
|
|
- goto cleanup;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (params[i].type != VIR_TYPED_PARAM_ULLONG) {
|
|
|
|
- fprintf(stderr,
|
2015-01-28 05:12:58 +01:00
|
|
|
- "Wrong parameter value type from virCgroupGetPercpuStats at %zu (is: %d)\n",
|
|
|
|
- i, params[i].type);
|
2014-03-03 05:22:57 +01:00
|
|
|
- goto cleanup;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (params[i].value.ul != expected[i]) {
|
|
|
|
- fprintf(stderr,
|
2015-01-28 05:12:58 +01:00
|
|
|
- "Wrong value from virCgroupGetMemoryUsage at %zu (expected %llu)\n",
|
|
|
|
- i, params[i].value.ul);
|
2014-03-03 05:22:57 +01:00
|
|
|
- goto cleanup;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- ret = 0;
|
|
|
|
-
|
2014-04-02 14:48:46 +02:00
|
|
|
- cleanup:
|
2014-03-03 05:22:57 +01:00
|
|
|
- virCgroupFree(&cgroup);
|
2015-01-28 05:12:58 +01:00
|
|
|
- VIR_FREE(params);
|
2014-03-03 05:22:57 +01:00
|
|
|
- return ret;
|
|
|
|
-}
|
2015-08-04 17:13:51 +02:00
|
|
|
|
2014-03-03 05:22:57 +01:00
|
|
|
static int testCgroupGetMemoryUsage(const void *args ATTRIBUTE_UNUSED)
|
|
|
|
{
|
2015-08-04 17:13:51 +02:00
|
|
|
@@ -919,9 +834,6 @@ mymain(void)
|
2014-03-03 05:22:57 +01:00
|
|
|
if (virtTestRun("virCgroupGetMemoryUsage works", testCgroupGetMemoryUsage, NULL) < 0)
|
|
|
|
ret = -1;
|
|
|
|
|
|
|
|
- if (virtTestRun("virCgroupGetPercpuStats works", testCgroupGetPercpuStats, NULL) < 0)
|
|
|
|
- ret = -1;
|
|
|
|
-
|
|
|
|
setenv("VIR_CGROUP_MOCK_MODE", "allinone", 1);
|
|
|
|
if (virtTestRun("New cgroup for self (allinone)", testCgroupNewForSelfAllInOne, NULL) < 0)
|
|
|
|
ret = -1;
|