libvirt/f536b0dd-tests-arch-independent-hash.patch
James Fehlig 0d01ad3986 Accepting request 514264 from home:jfehlig:branches:Virtualization
- Update to libvirt 3.6.0
  - Many incremental improvements and bug fixes, see
    http://libvirt.org/news.html
- Fix unit tests on s390x and ppc64
  8982f3ab-util-hash-header.patch,
  0b1ecf7b-virHashCodeGen-mockable.patch.
  f536b0dd-tests-arch-independent-hash.patch
- Patch cleanup
  - Renamed libvirtd-defaults.patch to
    suse-libvirtd-disable-tls.patch
  - Renamed libvirtd-init-script.patch to
    suse-libvirtd-sysconfig-settings.patch
  - Renamed virtlockd-init-script.patch to
    suse-virtlockd-sysconfig-settings.patch
  - Renamed virtlogd-init-script.patch to
    suse-virtlogd-sysconfig-settings.patch
  - Renamed libvirt-guests-init-script.patch to
    suse-libvirt-guests-service.patch
  - Combined suse-libvirtd-service.patch and
    systemd-service-xen.patch to suse-libvirtd-service-xen.patch
    since both patches add Xen support to libvirtd service file
  - Pull OVMF-related changes from suse-qemu-conf.patch into a
    new suse-ovmf-paths.patch

- Add a supportconfig plugin
  libvirt-supportconfig
  FATE#323661

OBS-URL: https://build.opensuse.org/request/show/514264
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=615
2017-08-03 17:28:59 +00:00

140 lines
4.3 KiB
Diff

commit f536b0dd7318c736c20ae646209671011d16c12c
Author: Peter Krempa <pkrempa@redhat.com>
Date: Wed Aug 2 17:23:51 2017 +0200
tests: deterministichash: Make hash tables arch-independent
It turns out that our implementation of the hashing function is
endian-dependent and thus if used on various architectures the testsuite
may have different results. Work this around by mocking virHashCodeGen
to something which does not use bit operations instead of just setting a
deterministic seed.
Index: libvirt-3.6.0/tests/qemumonitorjsondata/qemumonitorjson-nodename-relative.result
===================================================================
--- libvirt-3.6.0.orig/tests/qemumonitorjsondata/qemumonitorjson-nodename-relative.result
+++ libvirt-3.6.0/tests/qemumonitorjsondata/qemumonitorjson-nodename-relative.result
@@ -1,15 +1,3 @@
-drive-ide0-0-1
-filename : '/var/lib/libvirt/images/relsnap.qcow2'
-format node : '#block1290'
-format drv : 'qcow2'
-storage node: '#block1107'
-storage drv : 'file'
- filename : '/var/lib/libvirt/images/base.qcow2'
- format node : '#block927'
- format drv : 'qcow2'
- storage node: '#block800'
- storage drv : 'file'
-
drive-ide0-0-0
filename : '/var/lib/libvirt/images/img3'
format node : '#block118'
@@ -31,3 +19,15 @@ storage drv : 'file'
format drv : 'qcow2'
storage node: '#block614'
storage drv : 'file'
+
+drive-ide0-0-1
+filename : '/var/lib/libvirt/images/relsnap.qcow2'
+format node : '#block1290'
+format drv : 'qcow2'
+storage node: '#block1107'
+storage drv : 'file'
+ filename : '/var/lib/libvirt/images/base.qcow2'
+ format node : '#block927'
+ format drv : 'qcow2'
+ storage node: '#block800'
+ storage drv : 'file'
Index: libvirt-3.6.0/tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing.result
===================================================================
--- libvirt-3.6.0.orig/tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing.result
+++ libvirt-3.6.0/tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing.result
@@ -1,15 +1,3 @@
-drive-sata0-0-1
-filename : '/var/lib/libvirt/images/b.qcow2'
-format node : '#block548'
-format drv : 'qcow2'
-storage node: '#block487'
-storage drv : 'file'
- filename : '/var/lib/libvirt/images/base.qcow2'
- format node : '#block771'
- format drv : 'qcow2'
- storage node: '#block692'
- storage drv : 'file'
-
drive-sata0-0-0
filename : '/var/lib/libvirt/images/a.qcow2'
format node : '#block132'
@@ -21,3 +9,15 @@ storage drv : 'file'
format drv : 'qcow2'
storage node: '#block224'
storage drv : 'file'
+
+drive-sata0-0-1
+filename : '/var/lib/libvirt/images/b.qcow2'
+format node : '#block548'
+format drv : 'qcow2'
+storage node: '#block487'
+storage drv : 'file'
+ filename : '/var/lib/libvirt/images/base.qcow2'
+ format node : '#block771'
+ format drv : 'qcow2'
+ storage node: '#block692'
+ storage drv : 'file'
Index: libvirt-3.6.0/tests/virdeterministichashmock.c
===================================================================
--- libvirt-3.6.0.orig/tests/virdeterministichashmock.c
+++ libvirt-3.6.0/tests/virdeterministichashmock.c
@@ -20,10 +20,19 @@
#include <config.h>
-#include "virrandom.h"
+#include "util/virhashcode.h"
-uint64_t virRandomBits(int nbits ATTRIBUTE_UNUSED)
+uint32_t
+virHashCodeGen(const void *key,
+ size_t len,
+ uint32_t seed ATTRIBUTE_UNUSED)
{
- return 4; /* chosen by fair dice roll.
- guaranteed to be random. */
+ const uint8_t *k = key;
+ uint32_t h = 0;
+ size_t i;
+
+ for (i = 0; i < len; i++)
+ h += k[i];
+
+ return h;
}
Index: libvirt-3.6.0/tests/virmacmaptestdata/simple2.json
===================================================================
--- libvirt-3.6.0.orig/tests/virmacmaptestdata/simple2.json
+++ libvirt-3.6.0/tests/virmacmaptestdata/simple2.json
@@ -1,16 +1,16 @@
[
{
- "domain": "f25",
+ "domain": "f24",
"macs": [
- "00:11:22:33:44:55",
- "aa:bb:cc:00:11:22"
+ "aa:bb:cc:dd:ee:ff",
+ "a1:b2:c3:d4:e5:f6"
]
},
{
- "domain": "f24",
+ "domain": "f25",
"macs": [
- "aa:bb:cc:dd:ee:ff",
- "a1:b2:c3:d4:e5:f6"
+ "00:11:22:33:44:55",
+ "aa:bb:cc:00:11:22"
]
}
]