From nobody Sat May 4 04:04:35 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513821272446792.6025851184813; Wed, 20 Dec 2017 17:54:32 -0800 (PST) Received: from localhost ([::1]:52603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRq44-00080Q-H3 for importer@patchew.org; Wed, 20 Dec 2017 20:54:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRq2M-0006lg-Jb for qemu-devel@nongnu.org; Wed, 20 Dec 2017 20:52:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRq2L-0001sy-Mm for qemu-devel@nongnu.org; Wed, 20 Dec 2017 20:52:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56924) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eRq2L-0001sV-Do for qemu-devel@nongnu.org; Wed, 20 Dec 2017 20:52:41 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7B49281DE5; Thu, 21 Dec 2017 01:52:40 +0000 (UTC) Received: from lemon.redhat.com (ovpn-12-48.pek2.redhat.com [10.72.12.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3041860C8E; Thu, 21 Dec 2017 01:52:37 +0000 (UTC) From: Fam Zheng To: qemu-devel@nongnu.org Date: Thu, 21 Dec 2017 09:52:33 +0800 Message-Id: <20171221015234.9912-2-famz@redhat.com> In-Reply-To: <20171221015234.9912-1-famz@redhat.com> References: <20171221015234.9912-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 21 Dec 2017 01:52:40 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/2] Revert "docker: Enable features explicitly in test-full" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This reverts commit 5e8a7fe673ca5949bd51939ee36faaf3b1320de8. It's hard to get all images to have all these packages, the usual "FEATURES" and "require" mechanism doesn't scale with so many features. With that change, the test basically only works in ubuntu. Until a better way comes up, leave the feature enabling to ./configure detection. But don't remove the "-e" removal. Reported-by: Paolo Bonzini Signed-off-by: Fam Zheng Message-Id: <20171018082002.9406-1-famz@redhat.com> Signed-off-by: Fam Zheng --- tests/docker/test-full | 79 +++-------------------------------------------= ---- 1 file changed, 4 insertions(+), 75 deletions(-) diff --git a/tests/docker/test-full b/tests/docker/test-full index 816d5a3eec..b4e42d25d7 100755 --- a/tests/docker/test-full +++ b/tests/docker/test-full @@ -1,8 +1,8 @@ #!/bin/bash # -# Compile all the targets with as many features enabled as possible +# Compile all the targets. # -# Copyright 2016, 2017 Red Hat Inc. +# Copyright (c) 2016 Red Hat Inc. # # Authors: # Fam Zheng @@ -13,77 +13,6 @@ =20 . common.rc =20 -cd "$BUILD_DIR" || exit 1 +cd "$BUILD_DIR" =20 -build_qemu \ - --enable-attr \ - --enable-bluez \ - --enable-brlapi \ - --enable-bsd-user \ - --enable-bzip2 \ - --enable-cap-ng \ - --enable-coroutine-pool \ - --enable-crypto-afalg \ - --enable-curl \ - --enable-curses \ - --enable-debug \ - --enable-debug-info \ - --enable-debug-tcg \ - --enable-docs \ - --enable-fdt \ - --enable-gcrypt \ - --enable-glusterfs \ - --enable-gnutls \ - --enable-gprof \ - --enable-gtk \ - --enable-guest-agent \ - --enable-jemalloc \ - --enable-kvm \ - --enable-libiscsi \ - --enable-libnfs \ - --enable-libssh2 \ - --enable-libusb \ - --enable-linux-aio \ - --enable-linux-user \ - --enable-live-block-migration \ - --enable-lzo \ - --enable-modules \ - --enable-numa \ - --enable-opengl \ - --enable-pie \ - --enable-profiler \ - --enable-qom-cast-debug \ - --enable-rbd \ - --enable-rdma \ - --enable-replication \ - --enable-sdl \ - --enable-seccomp \ - --enable-smartcard \ - --enable-snappy \ - --enable-spice \ - --enable-stack-protector \ - --enable-system \ - --enable-tcg \ - --enable-tcg-interpreter \ - --enable-tools \ - --enable-tpm \ - --enable-trace-backend=3Dftrace \ - --enable-usb-redir \ - --enable-user \ - --enable-vde \ - --enable-vhost-net \ - --enable-vhost-scsi \ - --enable-vhost-user \ - --enable-vhost-vsock \ - --enable-virtfs \ - --enable-vnc \ - --enable-vnc-jpeg \ - --enable-vnc-png \ - --enable-vnc-sasl \ - --enable-vte \ - --enable-werror \ - --enable-xen \ - --enable-xen-pci-passthrough \ - --enable-xen-pv-domain-build \ - --enable-xfsctl \ -&& make check $MAKEFLAGS && install_qemu +build_qemu && make check $MAKEFLAGS && install_qemu --=20 2.14.3 From nobody Sat May 4 04:04:35 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513821286291801.3423067951798; Wed, 20 Dec 2017 17:54:46 -0800 (PST) Received: from localhost ([::1]:52605 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRq45-00080z-3s for importer@patchew.org; Wed, 20 Dec 2017 20:54:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRq2O-0006nN-H6 for qemu-devel@nongnu.org; Wed, 20 Dec 2017 20:52:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRq2N-0001uK-Hn for qemu-devel@nongnu.org; Wed, 20 Dec 2017 20:52:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57900) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eRq2N-0001tk-Az for qemu-devel@nongnu.org; Wed, 20 Dec 2017 20:52:43 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6EC8683F3D; Thu, 21 Dec 2017 01:52:42 +0000 (UTC) Received: from lemon.redhat.com (ovpn-12-48.pek2.redhat.com [10.72.12.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E5A160C8E; Thu, 21 Dec 2017 01:52:40 +0000 (UTC) From: Fam Zheng To: qemu-devel@nongnu.org Date: Thu, 21 Dec 2017 09:52:34 +0800 Message-Id: <20171221015234.9912-3-famz@redhat.com> In-Reply-To: <20171221015234.9912-1-famz@redhat.com> References: <20171221015234.9912-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 21 Dec 2017 01:52:42 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/2] util: add is_equal to UUID API X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Roman Kagan It's going to be useful, in particular, in VMBus code massively using uuids aka GUIDs. Signed-off-by: Roman Kagan Message-Id: <20171127124355.26015-1-rkagan@virtuozzo.com> Signed-off-by: Fam Zheng --- include/qemu/uuid.h | 2 ++ tests/test-uuid.c | 8 +++++++- util/uuid.c | 7 ++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/include/qemu/uuid.h b/include/qemu/uuid.h index afe4840296..09489ce5c5 100644 --- a/include/qemu/uuid.h +++ b/include/qemu/uuid.h @@ -48,6 +48,8 @@ void qemu_uuid_generate(QemuUUID *out); =20 int qemu_uuid_is_null(const QemuUUID *uu); =20 +int qemu_uuid_is_equal(const QemuUUID *lhv, const QemuUUID *rhv); + void qemu_uuid_unparse(const QemuUUID *uuid, char *out); =20 char *qemu_uuid_unparse_strdup(const QemuUUID *uuid); diff --git a/tests/test-uuid.c b/tests/test-uuid.c index d3a2791fd4..22b4b0727d 100644 --- a/tests/test-uuid.c +++ b/tests/test-uuid.c @@ -93,12 +93,18 @@ static inline bool uuid_is_valid(QemuUUID *uuid) =20 static void test_uuid_generate(void) { + QemuUUID uuid_not_null =3D { { { + 0x58, 0x6e, 0xce, 0x27, 0x7f, 0x09, 0x41, 0xe0, + 0x9e, 0x74, 0xe9, 0x01, 0x31, 0x7e, 0x9d, 0x42 + } } }; QemuUUID uuid; int i; =20 for (i =3D 0; i < 100; ++i) { qemu_uuid_generate(&uuid); g_assert(uuid_is_valid(&uuid)); + g_assert_false(qemu_uuid_is_null(&uuid)); + g_assert_false(qemu_uuid_is_equal(&uuid_not_null, &uuid)); } } =20 @@ -168,8 +174,8 @@ static void test_uuid_unparse_strdup(void) int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); - g_test_add_func("/uuid/generate", test_uuid_generate); g_test_add_func("/uuid/is_null", test_uuid_is_null); + g_test_add_func("/uuid/generate", test_uuid_generate); g_test_add_func("/uuid/parse", test_uuid_parse); g_test_add_func("/uuid/unparse", test_uuid_unparse); g_test_add_func("/uuid/unparse_strdup", test_uuid_unparse_strdup); diff --git a/util/uuid.c b/util/uuid.c index dd6b5fdf05..ebf06c049a 100644 --- a/util/uuid.c +++ b/util/uuid.c @@ -41,7 +41,12 @@ void qemu_uuid_generate(QemuUUID *uuid) int qemu_uuid_is_null(const QemuUUID *uu) { static QemuUUID null_uuid; - return memcmp(uu, &null_uuid, sizeof(QemuUUID)) =3D=3D 0; + return qemu_uuid_is_equal(uu, &null_uuid); +} + +int qemu_uuid_is_equal(const QemuUUID *lhv, const QemuUUID *rhv) +{ + return memcmp(lhv, rhv, sizeof(QemuUUID)) =3D=3D 0; } =20 void qemu_uuid_unparse(const QemuUUID *uuid, char *out) --=20 2.14.3