From patchwork Sun Mar 21 17:18:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 1456301 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=U3tqw7Hb; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F3PYW2lT8z9sRR for ; Mon, 22 Mar 2021 04:21:19 +1100 (AEDT) Received: from localhost ([::1]:41748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lO1lN-0000Ae-9M for incoming@patchwork.ozlabs.org; Sun, 21 Mar 2021 13:21:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO1j2-0007NT-8d for qemu-devel@nongnu.org; Sun, 21 Mar 2021 13:18:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:52193) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lO1is-0005Qt-Pl for qemu-devel@nongnu.org; Sun, 21 Mar 2021 13:18:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616347121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EO6Fw4yK5qsJ1EoHIreQTy0BukXrVQzeo/4y1pbu9YU=; b=U3tqw7HbBa2jP97x5hAMIJAm4PVSXXNq7BhFa5HWl1QUkwOm9FjLeibZqqRfwLX39aiZDC zA/jl116lXahezQhXNt/Tdu+04+XHB0RYJtbESaTLW/hKW2zfRQYJf6IcGMZ0Jy1MZMcnF y4gTCBPwdS0CRCzj0nixJjW0uZxagOY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-469-ssBhl1GnPeyBymHc-vw0Vw-1; Sun, 21 Mar 2021 13:18:38 -0400 X-MC-Unique: ssBhl1GnPeyBymHc-vw0Vw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B11D5190A7A1; Sun, 21 Mar 2021 17:18:37 +0000 (UTC) Received: from thuth.com (ovpn-112-125.ams2.redhat.com [10.36.112.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id D99B05D9CD; Sun, 21 Mar 2021 17:18:36 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 1/5] docs/devel/testing.rst: Fix references to unit tests Date: Sun, 21 Mar 2021 18:18:29 +0100 Message-Id: <20210321171833.20736-2-thuth@redhat.com> In-Reply-To: <20210321171833.20736-1-thuth@redhat.com> References: <20210321171833.20736-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Wainer dos Santos Moschetta With the recent move of the unit tests to tests/unit directory some instructions under the "Unit tests" section became imprecise, which are fixed by this change. Fixes: da668aa15b99 ("tests: Move unit tests into a separate directory") Signed-off-by: Wainer dos Santos Moschetta Reviewed-by: Thomas Huth Reviewed-by: Willian Rampazzo Message-Id: <20210318174407.2299930-1-wainersm@redhat.com> Signed-off-by: Thomas Huth --- docs/devel/testing.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 1434a50cc4..1da4c4e4c4 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -34,17 +34,17 @@ If you are writing new code in QEMU, consider adding a unit test, especially for utility modules that are relatively stateless or have few dependencies. To add a new unit test: -1. Create a new source file. For example, ``tests/foo-test.c``. +1. Create a new source file. For example, ``tests/unit/foo-test.c``. 2. Write the test. Normally you would include the header file which exports the module API, then verify the interface behaves as expected from your test. The test code should be organized with the glib testing framework. Copying and modifying an existing test is usually a good idea. -3. Add the test to ``tests/meson.build``. The unit tests are listed in a +3. Add the test to ``tests/unit/meson.build``. The unit tests are listed in a dictionary called ``tests``. The values are any additional sources and dependencies to be linked with the test. For a simple test whose source - is in ``tests/foo-test.c``, it is enough to add an entry like:: + is in ``tests/unit/foo-test.c``, it is enough to add an entry like:: { ... From patchwork Sun Mar 21 17:18:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 1456299 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=W3QBrI8R; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F3PXQ3lS8z9sVb for ; Mon, 22 Mar 2021 04:20:21 +1100 (AEDT) Received: from localhost ([::1]:39046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lO1kQ-0007Qv-AM for incoming@patchwork.ozlabs.org; Sun, 21 Mar 2021 13:20:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO1j0-0007NK-SS for qemu-devel@nongnu.org; Sun, 21 Mar 2021 13:18:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:29814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lO1it-0005Ra-LX for qemu-devel@nongnu.org; Sun, 21 Mar 2021 13:18:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616347122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=02DGbrUqtjcx+KvCxlPP539DjQ82K7xeYKUDqDDUnwQ=; b=W3QBrI8RyDVOISSqiAcJa6u/qCyeyNfcLBkRtL+C0DpQApSCnT7OCORbfmgdx87YW0IcgS elJSQugap47NItVHKSYdlfuLsoUGyttqAtXdvbjwzpzzpe/M3x4VJTNcIcDzVRe6P77IRx QxZLdfexWX4zNPfdFVqQzz7vBPCYQGU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-575-L7VOJT2MNpyeMny5xQV1Kg-1; Sun, 21 Mar 2021 13:18:40 -0400 X-MC-Unique: L7VOJT2MNpyeMny5xQV1Kg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E97CD108BD06; Sun, 21 Mar 2021 17:18:38 +0000 (UTC) Received: from thuth.com (ovpn-112-125.ams2.redhat.com [10.36.112.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C14C295D8; Sun, 21 Mar 2021 17:18:37 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 2/5] tests/unit/test-block-iothread: fix maybe-uninitialized error on GCC 11 Date: Sun, 21 Mar 2021 18:18:30 +0100 Message-Id: <20210321171833.20736-3-thuth@redhat.com> In-Reply-To: <20210321171833.20736-1-thuth@redhat.com> References: <20210321171833.20736-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Emanuele Giuseppe Esposito When building qemu with GCC 11, test-block-iothread produces the following warning: ../tests/unit/test-block-iothread.c:148:11: error: ‘buf’ may be used uninitialized [-Werror=maybe-uninitialized] This is caused by buf[512] left uninitialized and passed to bdrv_save_vmstate() that expects a const uint8_t *, so the compiler assumes it will be read and expects the parameter to be initialized. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Paolo Bonzini Message-Id: <20210319112218.49609-1-eesposit@redhat.com> Signed-off-by: Thomas Huth --- tests/unit/test-block-iothread.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/test-block-iothread.c b/tests/unit/test-block-iothread.c index 3f866a35c6..8cf172cb7a 100644 --- a/tests/unit/test-block-iothread.c +++ b/tests/unit/test-block-iothread.c @@ -89,7 +89,7 @@ static void test_sync_op_pread(BdrvChild *c) static void test_sync_op_pwrite(BdrvChild *c) { - uint8_t buf[512]; + uint8_t buf[512] = { 0 }; int ret; /* Success */ @@ -117,7 +117,7 @@ static void test_sync_op_blk_pread(BlockBackend *blk) static void test_sync_op_blk_pwrite(BlockBackend *blk) { - uint8_t buf[512]; + uint8_t buf[512] = { 0 }; int ret; /* Success */ @@ -141,7 +141,7 @@ static void test_sync_op_load_vmstate(BdrvChild *c) static void test_sync_op_save_vmstate(BdrvChild *c) { - uint8_t buf[512]; + uint8_t buf[512] = { 0 }; int ret; /* Error: Driver does not support snapshots */ From patchwork Sun Mar 21 17:18:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 1456302 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=CXqLeteq; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F3Pc6383Nz9sWF for ; Mon, 22 Mar 2021 04:23:34 +1100 (AEDT) Received: from localhost ([::1]:47572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lO1nY-0002fn-Ca for incoming@patchwork.ozlabs.org; Sun, 21 Mar 2021 13:23:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO1j4-0007Ov-OD for qemu-devel@nongnu.org; Sun, 21 Mar 2021 13:18:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36021) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lO1iu-0005Rv-1a for qemu-devel@nongnu.org; Sun, 21 Mar 2021 13:18:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616347123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iMxlVTJlwTWszth46Tb6T+koSZbQnej0xUVwac2Dysk=; b=CXqLeteq+QflVU+I/qYFL2Y1trrJbjdor9TxBajRtNt6RA0f0nxToHLZ8E04SAMHGlHJkM ywt0Bf8zOLwuQ/xx62X6UDdeV765JqTIBIAYJc+kn0LSKmbdYNueftlp/Iw+UcbTy4B/0u LPWrCvBZL3flFrdErlTFHoW7o5e0BZA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-509-R7rEicHnPOWdqB6pWm76ug-1; Sun, 21 Mar 2021 13:18:41 -0400 X-MC-Unique: R7rEicHnPOWdqB6pWm76ug-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EEE2F80006E; Sun, 21 Mar 2021 17:18:39 +0000 (UTC) Received: from thuth.com (ovpn-112-125.ams2.redhat.com [10.36.112.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id 438305D9CD; Sun, 21 Mar 2021 17:18:39 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 3/5] configure: fix for SunOS based systems Date: Sun, 21 Mar 2021 18:18:31 +0100 Message-Id: <20210321171833.20736-4-thuth@redhat.com> In-Reply-To: <20210321171833.20736-1-thuth@redhat.com> References: <20210321171833.20736-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: David CARLIER local directive make the configure fails on these systems. Signed-off-by: David Carlier Message-Id: Signed-off-by: Thomas Huth --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 847bc4d095..61872096a8 100755 --- a/configure +++ b/configure @@ -111,7 +111,7 @@ error_exit() { do_compiler() { # Run the compiler, capturing its output to the log. First argument # is compiler binary to execute. - local compiler="$1" + compiler="$1" shift if test -n "$BASH_VERSION"; then eval ' echo >>config.log " From patchwork Sun Mar 21 17:18:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 1456300 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=EDakf4oB; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F3PXQ43rLz9sWD for ; Mon, 22 Mar 2021 04:20:21 +1100 (AEDT) Received: from localhost ([::1]:39110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lO1kR-0007Sq-1x for incoming@patchwork.ozlabs.org; Sun, 21 Mar 2021 13:20:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO1j5-0007PS-32 for qemu-devel@nongnu.org; Sun, 21 Mar 2021 13:18:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:52022) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO1ix-0005SO-6G for qemu-devel@nongnu.org; Sun, 21 Mar 2021 13:18:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616347124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FgR8P8LBujVI1zEdlxhu1f4ooV8WhIFRGs8Z2ivAdeM=; b=EDakf4oBIP26EMUd2toX3lUo+hePSCuuEt73lrnuc0IHqx1fmsLxdiDk4Bl6ps6uvLUHK0 DbMCBr0yDC4PbJdkzUnsTc+cqj78hZaFXM2nkAyZRF0Wbs+z2PFqB2/sqnkSYTBNK9ivsX oxmGx5Rc7zxIcK0XXpo9dFSc4Lm0PZc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-258-sgoBH2qiNAK-7QPYyeYBOQ-1; Sun, 21 Mar 2021 13:18:42 -0400 X-MC-Unique: sgoBH2qiNAK-7QPYyeYBOQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1A6685700D; Sun, 21 Mar 2021 17:18:41 +0000 (UTC) Received: from thuth.com (ovpn-112-125.ams2.redhat.com [10.36.112.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4FC2A5D9CD; Sun, 21 Mar 2021 17:18:40 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 4/5] contrib: ivshmem client and server build fix for SunOS. Date: Sun, 21 Mar 2021 18:18:32 +0100 Message-Id: <20210321171833.20736-5-thuth@redhat.com> In-Reply-To: <20210321171833.20736-1-thuth@redhat.com> References: <20210321171833.20736-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: David CARLIER sun is a macro on these systems, thus renaming the variables on the client and server. Signed-off-by: David Carlier Message-Id: Reviewed-by: Peter Maydell Signed-off-by: Thomas Huth --- contrib/ivshmem-client/ivshmem-client.c | 12 ++++++------ contrib/ivshmem-server/ivshmem-server.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/ivshmem-client/ivshmem-client.c b/contrib/ivshmem-client/ivshmem-client.c index b1274b236a..182c79d27c 100644 --- a/contrib/ivshmem-client/ivshmem-client.c +++ b/contrib/ivshmem-client/ivshmem-client.c @@ -178,7 +178,7 @@ ivshmem_client_init(IvshmemClient *client, const char *unix_sock_path, int ivshmem_client_connect(IvshmemClient *client) { - struct sockaddr_un sun; + struct sockaddr_un s_un; int fd, ret; int64_t tmp; @@ -192,16 +192,16 @@ ivshmem_client_connect(IvshmemClient *client) return -1; } - sun.sun_family = AF_UNIX; - ret = snprintf(sun.sun_path, sizeof(sun.sun_path), "%s", + s_un.sun_family = AF_UNIX; + ret = snprintf(s_un.sun_path, sizeof(s_un.sun_path), "%s", client->unix_sock_path); - if (ret < 0 || ret >= sizeof(sun.sun_path)) { + if (ret < 0 || ret >= sizeof(s_un.sun_path)) { IVSHMEM_CLIENT_DEBUG(client, "could not copy unix socket path\n"); goto err_close; } - if (connect(client->sock_fd, (struct sockaddr *)&sun, sizeof(sun)) < 0) { - IVSHMEM_CLIENT_DEBUG(client, "cannot connect to %s: %s\n", sun.sun_path, + if (connect(client->sock_fd, (struct sockaddr *)&s_un, sizeof(s_un)) < 0) { + IVSHMEM_CLIENT_DEBUG(client, "cannot connect to %s: %s\n", s_un.sun_path, strerror(errno)); goto err_close; } diff --git a/contrib/ivshmem-server/ivshmem-server.c b/contrib/ivshmem-server/ivshmem-server.c index 88daee812d..39a6ffdb5d 100644 --- a/contrib/ivshmem-server/ivshmem-server.c +++ b/contrib/ivshmem-server/ivshmem-server.c @@ -288,7 +288,7 @@ ivshmem_server_init(IvshmemServer *server, const char *unix_sock_path, int ivshmem_server_start(IvshmemServer *server) { - struct sockaddr_un sun; + struct sockaddr_un s_un; int shm_fd, sock_fd, ret; /* open shm file */ @@ -327,15 +327,15 @@ ivshmem_server_start(IvshmemServer *server) goto err_close_shm; } - sun.sun_family = AF_UNIX; - ret = snprintf(sun.sun_path, sizeof(sun.sun_path), "%s", + s_un.sun_family = AF_UNIX; + ret = snprintf(s_un.sun_path, sizeof(s_un.sun_path), "%s", server->unix_sock_path); - if (ret < 0 || ret >= sizeof(sun.sun_path)) { + if (ret < 0 || ret >= sizeof(s_un.sun_path)) { IVSHMEM_SERVER_DEBUG(server, "could not copy unix socket path\n"); goto err_close_sock; } - if (bind(sock_fd, (struct sockaddr *)&sun, sizeof(sun)) < 0) { - IVSHMEM_SERVER_DEBUG(server, "cannot connect to %s: %s\n", sun.sun_path, + if (bind(sock_fd, (struct sockaddr *)&s_un, sizeof(s_un)) < 0) { + IVSHMEM_SERVER_DEBUG(server, "cannot connect to %s: %s\n", s_un.sun_path, strerror(errno)); goto err_close_sock; } From patchwork Sun Mar 21 17:18:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 1456303 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YZGHHsM7; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F3PdZ6q2dz9sVb for ; Mon, 22 Mar 2021 04:24:50 +1100 (AEDT) Received: from localhost ([::1]:49070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lO1on-0003Jj-0e for incoming@patchwork.ozlabs.org; Sun, 21 Mar 2021 13:24:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO1j3-0007O1-I8 for qemu-devel@nongnu.org; Sun, 21 Mar 2021 13:18:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:52453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO1ix-0005Sc-T2 for qemu-devel@nongnu.org; Sun, 21 Mar 2021 13:18:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616347126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qH9Y6qjjeiKVP2v7yOq1evrnjl8KGdPB1T+dq7N0qtM=; b=YZGHHsM7fnnwbL6dV+bLX8rkj9B6qd0tV6LnFh0dUDKn8ux6xcWEcQepF+ZjFjuelR05c/ Kyv1Cup1ruM5YQfEQRhYmG5YJ0GEsVPDMMK/KVZRy0VC3MvxH95NIWLvguzTDTZ8TXd0uF asRfiwuZGMHl9FkuXQ/rJU6d7PQGEok= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-182-iZIeqNhDNFWKs_7e6OzaKg-1; Sun, 21 Mar 2021 13:18:43 -0400 X-MC-Unique: iZIeqNhDNFWKs_7e6OzaKg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 54625801597; Sun, 21 Mar 2021 17:18:42 +0000 (UTC) Received: from thuth.com (ovpn-112-125.ams2.redhat.com [10.36.112.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6E85E5D9CD; Sun, 21 Mar 2021 17:18:41 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 5/5] FreeBSD: Upgrade to 12.2 release Date: Sun, 21 Mar 2021 18:18:33 +0100 Message-Id: <20210321171833.20736-6-thuth@redhat.com> In-Reply-To: <20210321171833.20736-1-thuth@redhat.com> References: <20210321171833.20736-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Warner Losh FreeBSD 12.1 has reached end of life. Use 12.2 instead so that FreeBSD's project's packages will work. Update which timezone to pick. Work around a QEMU bug that incorrectly raises an exception on a CRC32 instruction with the FPU disabled. The qemu bug is described here: https://www.mail-archive.com/qemu-devel@nongnu.org/msg784158.html Signed-off-by: Warner Losh Message-Id: <20210307155654.993-2-imp@bsdimp.com> [thuth: Disable gnutls to work-around a problem with libtasn1] Signed-off-by: Thomas Huth --- tests/vm/freebsd | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/vm/freebsd b/tests/vm/freebsd index 09f3ee6cb8..6e20e84322 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -20,12 +20,16 @@ import socket import subprocess import basevm +FREEBSD_CONFIG = { + 'cpu' : "max,sse4.2=off", +} + class FreeBSDVM(basevm.BaseVM): name = "freebsd" arch = "x86_64" - link = "https://download.freebsd.org/ftp/releases/ISO-IMAGES/12.1/FreeBSD-12.1-RELEASE-amd64-disc1.iso.xz" - csum = "7394c3f60a1e236e7bd3a05809cf43ae39a3b8e5d42d782004cf2f26b1cfcd88" + link = "https://download.freebsd.org/ftp/releases/ISO-IMAGES/12.2/FreeBSD-12.2-RELEASE-amd64-disc1.iso.xz" + csum = "a4530246cafbf1dd42a9bd3ea441ca9a78a6a0cd070278cbdf63f3a6f803ecae" size = "20G" pkgs = [ # build tools @@ -61,6 +65,8 @@ class FreeBSDVM(basevm.BaseVM): "zstd", ] + # TODO: Enable gnutls again once FreeBSD's libtasn1 got fixed + # See: https://gitlab.com/gnutls/libtasn1/-/merge_requests/71 BUILD_SCRIPT = """ set -e; rm -rf /home/qemu/qemu-test.* @@ -68,7 +74,7 @@ class FreeBSDVM(basevm.BaseVM): mkdir src build; cd src; tar -xf /dev/vtbd1; cd ../build - ../src/configure --python=python3.7 {configure_opts}; + ../src/configure --python=python3.7 --disable-gnutls {configure_opts}; gmake --output-sync -j{jobs} {target} {verbose}; """ @@ -125,7 +131,7 @@ class FreeBSDVM(basevm.BaseVM): self.console_wait_send("IPv6", "n") self.console_wait_send("Resolver", "\n") - self.console_wait_send("Time Zone Selector", "a\n") + self.console_wait_send("Time Zone Selector", "0\n") self.console_wait_send("Confirmation", "y") self.console_wait_send("Time & Date", "\n") self.console_wait_send("Time & Date", "\n") @@ -206,4 +212,4 @@ class FreeBSDVM(basevm.BaseVM): self.print_step("All done") if __name__ == "__main__": - sys.exit(basevm.main(FreeBSDVM)) + sys.exit(basevm.main(FreeBSDVM, config=FREEBSD_CONFIG))