From nobody Fri May 10 00:26:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1695632509; cv=none; d=zohomail.com; s=zohoarc; b=NbtYmJjohWXJZq6sN3hys6wobaG1s4GqZyHP92cVIJRZlVMNubB9n65cJKc9+0hyeefV8agd502G4iAB0DlJh0D8WXPJ4uCJeueaXtNn5o7kpU/Tfc3Wvhil3bT2fmlKtfqnUKLk+jdT9KfpQ0zMu1XuTHLOmr4zDtjwi7kOE1g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695632509; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=n4MdronCS1pIne/jgCEpECsQ9BNvIop52zCmFZcai/M=; b=MtQv++FLKu+RazgVZAelHgESR+K7BwORYyX3Y9rT+lc/lvui32qzbIULhfWUN6XUTuR/YH9HkQlzT3GnXHdkUuEH7vrVeCq0TCVMkWNNmLTAazyYilit2BkqxNBs6qr/AhnDpsjqaCe+hszp6JMPt8ZfbPh4nmcWyd8LXTQr2tk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1695632509868934.6437701579523; Mon, 25 Sep 2023 02:01:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkhT1-0002Ee-RL; Mon, 25 Sep 2023 05:01:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhSn-000255-CC for qemu-devel@nongnu.org; Mon, 25 Sep 2023 05:01:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhSk-0002ZY-09 for qemu-devel@nongnu.org; Mon, 25 Sep 2023 05:01:09 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-189-PvZBWoBlMZKGdjSX14rG1Q-1; Mon, 25 Sep 2023 05:01:03 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2CE2D8030A9 for ; Mon, 25 Sep 2023 09:01:03 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8744D140E953; Mon, 25 Sep 2023 09:01:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695632465; 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=n4MdronCS1pIne/jgCEpECsQ9BNvIop52zCmFZcai/M=; b=bOO0LnEFYPdJ0lBdU9lmm8giXF1x/zGd6ncPhA4z2aHGii6iPMWiZWSQtqyF81eCeW2cGb l9P+AELSw9sHOygiX+sMU6AxvEz5qUk1h+CTidXpl5xLfoDKJs6+XFHe35lvsQvyQmL8BD /l2LlyYoS6yntdHBt8u7Bn+PbFXHBUw= X-MC-Unique: PvZBWoBlMZKGdjSX14rG1Q-1 From: Thomas Huth To: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [PULL 1/7] meson.build: Make keyutils independent from keyring Date: Mon, 25 Sep 2023 11:00:54 +0200 Message-ID: <20230925090100.45632-2-thuth@redhat.com> In-Reply-To: <20230925090100.45632-1-thuth@redhat.com> References: <20230925090100.45632-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695632510453100001 Commit 0db0fbb5cf ("Add conditional dependency for libkeyutils") tried to provide a possibility for the user to disable keyutils if not required by makeing it depend on the keyring feature. This looked reasonable at a first glance (the unit test in tests/unit/ needs both), but the condition in meson.build fails if the feature is meant to be detected automatically, and there is also another spot in backends/meson.build where keyutils is used independently from keyring. So let's remove the dependency on keyring again and introduce a proper meson build option instead. Cc: qemu-stable@nongnu.org Fixes: 0db0fbb5cf ("Add conditional dependency for libkeyutils") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1842 Message-ID: <20230824094208.255279-1-thuth@redhat.com> Reviewed-by: "Daniel P. Berrang=C3=A9" Signed-off-by: Thomas Huth --- meson.build | 6 ++++-- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index f426861d90..5139db2ff7 100644 --- a/meson.build +++ b/meson.build @@ -1763,8 +1763,9 @@ if gnutls.found() method: 'pkg-config') endif keyutils =3D not_found -if get_option('keyring').enabled() - keyutils =3D dependency('libkeyutils', required: false, method: 'pkg-con= fig') +if not get_option('libkeyutils').auto() or have_block + keyutils =3D dependency('libkeyutils', required: get_option('libkeyutils= '), + method: 'pkg-config') endif =20 has_gettid =3D cc.has_function('gettid') @@ -4229,6 +4230,7 @@ endif summary_info +=3D {'AF_ALG support': have_afalg} summary_info +=3D {'rng-none': get_option('rng_none')} summary_info +=3D {'Linux keyring': have_keyring} +summary_info +=3D {'Linux keyutils': keyutils} summary(summary_info, bool_yn: true, section: 'Crypto') =20 # UI diff --git a/meson_options.txt b/meson_options.txt index 2ca40f22e9..57e265c871 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -121,6 +121,8 @@ option('avx512bw', type: 'feature', value: 'auto', description: 'AVX512BW optimizations') option('keyring', type: 'feature', value: 'auto', description: 'Linux keyring support') +option('libkeyutils', type: 'feature', value: 'auto', + description: 'Linux keyutils support') =20 option('af_xdp', type : 'feature', value : 'auto', description: 'AF_XDP network backend support') diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 230119346a..e4b46d5715 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -122,6 +122,7 @@ meson_options_help() { printf "%s\n" ' libdaxctl libdaxctl support' printf "%s\n" ' libdw debuginfo support' printf "%s\n" ' libiscsi libiscsi userspace initiator' + printf "%s\n" ' libkeyutils Linux keyutils support' printf "%s\n" ' libnfs libnfs block device driver' printf "%s\n" ' libpmem libpmem support' printf "%s\n" ' libssh ssh block device support' @@ -345,6 +346,8 @@ _meson_option_parse() { --libexecdir=3D*) quote_sh "-Dlibexecdir=3D$2" ;; --enable-libiscsi) printf "%s" -Dlibiscsi=3Denabled ;; --disable-libiscsi) printf "%s" -Dlibiscsi=3Ddisabled ;; + --enable-libkeyutils) printf "%s" -Dlibkeyutils=3Denabled ;; + --disable-libkeyutils) printf "%s" -Dlibkeyutils=3Ddisabled ;; --enable-libnfs) printf "%s" -Dlibnfs=3Denabled ;; --disable-libnfs) printf "%s" -Dlibnfs=3Ddisabled ;; --enable-libpmem) printf "%s" -Dlibpmem=3Denabled ;; --=20 2.41.0 From nobody Fri May 10 00:26:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1695632527; cv=none; d=zohomail.com; s=zohoarc; b=K7esVhGL23aTkzt1cD/5yMEz0EVkUt854MgACkeb64LjPciMyq4HmJSQoZMlDG3mkIOMqR9LmeDKDkh/Ahftlr1BTyLBTvoHSsAzJ+TzChosks3UHfe1kY0AAifexqxZEvmaxWOUfLBwGeZWmc/XmBDBVEAunyVCqTppgvIdahw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695632527; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bMH6LT8UbAY0xVZ6P5tVjLEizp8UwFrpI9CyGxulhp4=; b=MSGyxycrx2LGRt8W65w3y0NpSXl+ZUkudWZ8yd6l1BhDKNILF6/Y8izBsGmHn18e6zc1ymkeGZKw3qQD7/k0JRsc87zGTantb/a0+DjMg5SIXshJ62sXQ/4hrjNWt8nIgp2ShuFKqP/Vih/empGa1+zKcbZNWG19I9kdISYj8zY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 169563252785988.30570316168019; Mon, 25 Sep 2023 02:02:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkhSx-0002DL-4H; Mon, 25 Sep 2023 05:01:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhSo-00025A-Jh for qemu-devel@nongnu.org; Mon, 25 Sep 2023 05:01:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhSl-0002Zv-Gv for qemu-devel@nongnu.org; Mon, 25 Sep 2023 05:01:09 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-686-t7y1ZDvrNve_vqfkp54gLQ-1; Mon, 25 Sep 2023 05:01:04 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 315768007A4 for ; Mon, 25 Sep 2023 09:01:04 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7D10F140E962; Mon, 25 Sep 2023 09:01:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695632466; 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=bMH6LT8UbAY0xVZ6P5tVjLEizp8UwFrpI9CyGxulhp4=; b=cSWQL16zZrvEbxzptssHhmsehoJszBfkWg6W99ZlqcHT/TmSUjOgAWgW0QmeVK5OH/RT7C uo3MKUnWQkRAl+Dij2/RZv2hWKLg3tsd+K+Ph10UGrOWcjc/6UMUWtPs2f5b9D0VkyKFZ0 nU14RgUP6bf7vwzX+wwYQwUuds0wDfM= X-MC-Unique: t7y1ZDvrNve_vqfkp54gLQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [PULL 2/7] tests/qtest/netdev-socket: Raise connection timeout to 120 seconds Date: Mon, 25 Sep 2023 11:00:55 +0200 Message-ID: <20230925090100.45632-3-thuth@redhat.com> In-Reply-To: <20230925090100.45632-1-thuth@redhat.com> References: <20230925090100.45632-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695632528905100002 From: Stefan Hajnoczi The test still fails intermittently with a 60 second timeout in the GitLab CI environment. Raise the timeout to 120 seconds. 576/839 ERROR:../tests/qtest/netdev-socket.c:293:test_stream_unix: assertion failed (resp =3D=3D expect): ("st0: index=3D0,type=3Dstream,connection error\r\n" =3D=3D "st0: index= =3D0,type=3Dstream,unix:/tmp/netdev-socket.UW5IA2/stream_unix\r\n") ERROR 576/839 qemu:qtest+qtest-sh4 / qtest-sh4/netdev-socket ERROR 62.85s killed by signal 6 SI= GABRT >>> MALLOC_PERTURB_=3D249 QTEST_QEMU_BINARY=3D./qemu-system-sh4 QTEST_QEMU_STORAGE_DAEMON_BINARY=3D./storage-daemon/qemu-storage-daemon G_TEST_DBUS_DAEMON=3D/home/gitlab-runner/builds/-LCfcJ2T/0/qemu-project/= qemu/tests/dbus-vmstate-daemon.sh QTEST_QEMU_IMG=3D./qemu-img /home/gitlab-runner/builds/-LCfcJ2T/0/qemu-p= roject/qemu/build/tests/qtest/netdev-socket --tap -k =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95 =E2=9C=80 =E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95 stderr: ** ERROR:../tests/qtest/netdev-socket.c:293:test_stream_unix: assertion fail= ed (resp =3D=3D expect): ("st0: index=3D0,type=3Dstream,connection error\r\= n" =3D=3D "st0: index=3D0,type=3Dstream,unix:/tmp/netdev-socket.UW5IA2/stre= am_unix\r\n") (test program exited with status code -6) Buglink: https://gitlab.com/qemu-project/qemu/-/issues/1881 Fixes: 417296c8d858 ("tests/qtest/netdev-socket: Raise connection timeout t= o 60 seconds") Signed-off-by: Stefan Hajnoczi Reviewed-by: Laurent Vivier Reviewed-by: "Daniel P. Berrang=C3=A9" Message-ID: <20230912133310.60583-1-stefanha@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/netdev-socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/netdev-socket.c b/tests/qtest/netdev-socket.c index 8eed54801f..b2501d72a1 100644 --- a/tests/qtest/netdev-socket.c +++ b/tests/qtest/netdev-socket.c @@ -16,7 +16,7 @@ #include "qapi/qobject-input-visitor.h" #include "qapi/qapi-visit-sockets.h" =20 -#define CONNECTION_TIMEOUT 60 +#define CONNECTION_TIMEOUT 120 =20 #define EXPECT_STATE(q, e, t) \ do { \ --=20 2.41.0 From nobody Fri May 10 00:26:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1695632538; cv=none; d=zohomail.com; s=zohoarc; b=I5ytL4rylOpxjEhmGIMhsAHeKBB76FpDJGK5T5dRnnQb40AeX+8DCLSsSMJV/A1dPSrMPRjvf1l1RrtQJIunSmDHmjAskNXtHCtDF4B62cQAjFk0T5vEZWOpURYrLEUbRvuNl34fEH6E1o7EkJXlNRWwFuOXaInfCIZ/GB0anEI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695632538; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=f564zeEwTP2NCJ75yge0S7XrtEHt1dbx2+S/usTLRFA=; b=DyZ3kyWP3hv3zDrr5Nea2dVjekx8wYz2MuMCjzcY9taupKGrySIpV8isz9O1odEXcHZaBhG2G27gl2uRKmzy/5sUVTzVsXcFAW4NfMvtVN4JjSm8WKH6xF/X8vr16sFnojaanB3UhUb/ZwBIeoNKqXS4P20L5Z9m1Ead2Z12MWA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1695632538702117.82258249144536; Mon, 25 Sep 2023 02:02:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkhT1-0002F5-Sw; Mon, 25 Sep 2023 05:01:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhSo-000259-JJ for qemu-devel@nongnu.org; Mon, 25 Sep 2023 05:01:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhSm-0002a6-Fx for qemu-devel@nongnu.org; Mon, 25 Sep 2023 05:01:10 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-450-OOukDnTNMx65NHjz9N9iOw-1; Mon, 25 Sep 2023 05:01:05 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 16C55802C1A for ; Mon, 25 Sep 2023 09:01:05 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7768B140E953; Mon, 25 Sep 2023 09:01:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695632467; 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=f564zeEwTP2NCJ75yge0S7XrtEHt1dbx2+S/usTLRFA=; b=gyn5lizE/vC46KmzvFW2x3Sk0TqRg7EBcZBd/AzN7hGR5y+HFXtWpjYMPazEkiiB4SHmG2 boIgZmNxYhIdst8Mu434I2omVQdpAo+HeZi7XEv0MB4E2tOmcZAZKUBqTh4fHp4+T93AYv k5hS+hgx2X2GKT1IccyZs7f2zPbIRkA= X-MC-Unique: OOukDnTNMx65NHjz9N9iOw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [PULL 3/7] tests/qtest/m48t59-test: Silence compiler warning with -Wshadow Date: Mon, 25 Sep 2023 11:00:56 +0200 Message-ID: <20230925090100.45632-4-thuth@redhat.com> In-Reply-To: <20230925090100.45632-1-thuth@redhat.com> References: <20230925090100.45632-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695632539075100001 When compiling this file with -Wshadow=3Dlocal , we get: ../tests/qtest/m48t59-test.c: In function =E2=80=98bcd_check_time=E2=80=99: ../tests/qtest/m48t59-test.c:195:17: warning: declaration of =E2=80=98s=E2= =80=99 shadows a previous local [-Wshadow=3Dlocal] 195 | long t, s; | ^ ../tests/qtest/m48t59-test.c:158:17: note: shadowed declaration is here 158 | QTestState *s =3D m48t59_qtest_start(); | ^ Rename the QTestState variable to "qts" which is the common naming for such a variable in other tests. Reported-by: Markus Armbruster Message-ID: <20230922163742.149444-1-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: "Daniel P. Berrang=C3=A9" Signed-off-by: Thomas Huth --- tests/qtest/m48t59-test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/qtest/m48t59-test.c b/tests/qtest/m48t59-test.c index 843d2ced8e..9487faff1a 100644 --- a/tests/qtest/m48t59-test.c +++ b/tests/qtest/m48t59-test.c @@ -155,7 +155,7 @@ static void bcd_check_time(void) struct tm *datep; time_t ts; const int wiggle =3D 2; - QTestState *s =3D m48t59_qtest_start(); + QTestState *qts =3D m48t59_qtest_start(); =20 /* * This check assumes a few things. First, we cannot guarantee that w= e get @@ -173,10 +173,10 @@ static void bcd_check_time(void) ts =3D time(NULL); gmtime_r(&ts, &start); =20 - cmos_get_date_time(s, &date[0]); - cmos_get_date_time(s, &date[1]); - cmos_get_date_time(s, &date[2]); - cmos_get_date_time(s, &date[3]); + cmos_get_date_time(qts, &date[0]); + cmos_get_date_time(qts, &date[1]); + cmos_get_date_time(qts, &date[2]); + cmos_get_date_time(qts, &date[3]); =20 ts =3D time(NULL); gmtime_r(&ts, &end); @@ -207,7 +207,7 @@ static void bcd_check_time(void) g_assert_cmpint(ABS(t - s), <=3D, wiggle); } =20 - qtest_quit(s); + qtest_quit(qts); } =20 /* success if no crash or abort */ --=20 2.41.0 From nobody Fri May 10 00:26:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1695632514; cv=none; d=zohomail.com; s=zohoarc; b=jZ0FKzj3DLaG8rXkYWIB4Z2CKaQuK+eM3oOhYBg8JJu730e51TdNkm3dOJSHXgpos343dL/9TsG/Q46Ll1dJHSt15RT/hXErZ9mwdvlGgy/+Rr52HpXadwaa4GA/kYFE/F6D41TfW3a/XAm9o++nhaISqBB2c+/jAkrYaEwm4DA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695632514; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YNbt4mMQxIZuSano7DrCZJSwVfbGCiAqy4We2eNG4zk=; b=m9XpDNGQPJliGBvUFmZvcxgcjGh2/7pKBWRr6uoK2Ll6yFocRc1jGfiAFHk/0irJ+FMnzfL/J+xWavRTzbH4f0Jbkw9yYgMHjDZrUj/pyk50bvwnMewHf16t+paeNSbdgRv1xD2Wr+W7DeIdbr6H72vmt6VBo805o6cM6G7HbTY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1695632514143804.4069052845555; Mon, 25 Sep 2023 02:01:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkhTA-0002GZ-3c; Mon, 25 Sep 2023 05:01:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhSo-000258-JJ for qemu-devel@nongnu.org; Mon, 25 Sep 2023 05:01:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhSm-0002aA-PS for qemu-devel@nongnu.org; Mon, 25 Sep 2023 05:01:10 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-462-Z4jmOnyDOtGrmumF1tXFJA-1; Mon, 25 Sep 2023 05:01:06 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 31D5D185A790 for ; Mon, 25 Sep 2023 09:01:06 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5BEBF140E953; Mon, 25 Sep 2023 09:01:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695632468; 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=YNbt4mMQxIZuSano7DrCZJSwVfbGCiAqy4We2eNG4zk=; b=i2KF0Vmc4zyP+2YNpwCml0+KZUW6w4l3a+2mGgDDNM9fE5M842h/TTZAeugVy6xTIoozCg LLgZiLziDTeBf711gtA/24q2LVwS2DUwTVYiSdAwTrIvX2L0he5pIT5UGj2rJetY6s/tkT NproTZ41ruXpWVOZpOK3BXHpdUesL3o= X-MC-Unique: Z4jmOnyDOtGrmumF1tXFJA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [PULL 4/7] tests/qtest/netdev-socket: Do not test multicast on Darwin Date: Mon, 25 Sep 2023 11:00:57 +0200 Message-ID: <20230925090100.45632-5-thuth@redhat.com> In-Reply-To: <20230925090100.45632-1-thuth@redhat.com> References: <20230925090100.45632-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695632516099100003 From: Philippe Mathieu-Daud=C3=A9 Do not run this test on Darwin, otherwise we get: qemu-system-arm: -netdev dgram,id=3Dst0,remote.type=3Dinet,remote.host=3D= 230.0.0.1,remote.port=3D1234: can't add socket to multicast group 230.0.0.1: Can't assign requested ad= dress Broken pipe ../../tests/qtest/libqtest.c:191: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0) Abort trap: 6 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20230918062549.2363-1-philmd@linaro.org> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/qtest/netdev-socket.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/qtest/netdev-socket.c b/tests/qtest/netdev-socket.c index b2501d72a1..7ba1eff120 100644 --- a/tests/qtest/netdev-socket.c +++ b/tests/qtest/netdev-socket.c @@ -401,7 +401,7 @@ static void test_dgram_inet(void) qtest_quit(qts0); } =20 -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(CONFIG_DARWIN) static void test_dgram_mcast(void) { QTestState *qts; @@ -414,7 +414,9 @@ static void test_dgram_mcast(void) =20 qtest_quit(qts); } +#endif =20 +#ifndef _WIN32 static void test_dgram_unix(void) { QTestState *qts0, *qts1; @@ -511,7 +513,7 @@ int main(int argc, char **argv) if (has_ipv4) { qtest_add_func("/netdev/stream/inet/ipv4", test_stream_inet_ipv4); qtest_add_func("/netdev/dgram/inet", test_dgram_inet); -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(CONFIG_DARWIN) qtest_add_func("/netdev/dgram/mcast", test_dgram_mcast); #endif } --=20 2.41.0 From nobody Fri May 10 00:26:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1695632579; cv=none; d=zohomail.com; s=zohoarc; b=aFJ1ySJgGQY54JV9CdISVJ8hJu5E7cj86exzz5gibQV0oLEEkrsXtg4lmZY01O4z8HKYNO1MUKamr1UTCBCCO6/JWIAxktseM2MCFZxSuLRu3NDoWsTRmPvu1S7hZKZ/qvD1GePmeQ7ggcAnxXoCAI+9h5jULGWWWUA25oZDky0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695632579; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aHchjfTqqZnGn0E6iZZbL3pm13PJ7T/e9xuc7i/xkjU=; b=YsiKqHsdWI6C4YQu5drWDUCYx7wOu4+GNorrNuGAHFbjcmCLDNlR9tHloRfLRmgHQTL0lk86jyFmaeFbOK6+K41RF+mftMC2dgUReSKr8gMa2yeX96ywCFL47QLqDM3Wmmz5lFB1L4YCnl9jZzPgXl03ICMv7o/ZpgxacfAFFLQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 169563257964694.36097201924895; Mon, 25 Sep 2023 02:02:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkhTI-0002VT-KU; Mon, 25 Sep 2023 05:01:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhSq-00025G-32 for qemu-devel@nongnu.org; Mon, 25 Sep 2023 05:01:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhSo-0002aW-HU for qemu-devel@nongnu.org; Mon, 25 Sep 2023 05:01:11 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-215-AQPE6zl_Mn20uoLZWzjiKA-1; Mon, 25 Sep 2023 05:01:07 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1950A3C1F127 for ; Mon, 25 Sep 2023 09:01:07 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id 74156140E953; Mon, 25 Sep 2023 09:01:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695632469; 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=aHchjfTqqZnGn0E6iZZbL3pm13PJ7T/e9xuc7i/xkjU=; b=K3oEiqmQ3V0Q6tdFR/TjulNuZRXo312i9jNn+rldWkEdTMwydhR+MggUMqopKGkqPmJsPL Mhq3rBIonMFPdyx+YcN3jekxugF/psLmXgUHJsdSMMO1cNVueZyH1Vi1DepOTHiyo9Nrp6 jx31KAqKZk/jM6qNAl8EX2G6dyZxVK8= X-MC-Unique: AQPE6zl_Mn20uoLZWzjiKA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [PULL 5/7] hw/mips/jazz: Move the NIC init code into a separate function Date: Mon, 25 Sep 2023 11:00:58 +0200 Message-ID: <20230925090100.45632-6-thuth@redhat.com> In-Reply-To: <20230925090100.45632-1-thuth@redhat.com> References: <20230925090100.45632-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695632579884100001 The mips_jazz_init() function is already quite big, so moving away some code here can help to make it more understandable. Additionally, by moving this code into a separate function, the next patch (that will refactor the for-loop around the NIC init code) will be much shorter and easier to understand. Message-ID: <20230913160922.355640-2-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- hw/mips/jazz.c | 62 ++++++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index 0081dcf921..829c9248e5 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c @@ -114,6 +114,40 @@ static const MemoryRegionOps dma_dummy_ops =3D { .endianness =3D DEVICE_NATIVE_ENDIAN, }; =20 +static void mips_jazz_init_net(NICInfo *nd, IOMMUMemoryRegion *rc4030_dma_= mr, + DeviceState *rc4030, MemoryRegion *dp8393x_= prom) +{ + DeviceState *dev; + SysBusDevice *sysbus; + int checksum, i; + uint8_t *prom; + + qemu_check_nic_model(nd, "dp83932"); + + dev =3D qdev_new("dp8393x"); + qdev_set_nic_properties(dev, nd); + qdev_prop_set_uint8(dev, "it_shift", 2); + qdev_prop_set_bit(dev, "big_endian", TARGET_BIG_ENDIAN); + object_property_set_link(OBJECT(dev), "dma_mr", + OBJECT(rc4030_dma_mr), &error_abort); + sysbus =3D SYS_BUS_DEVICE(dev); + sysbus_realize_and_unref(sysbus, &error_fatal); + sysbus_mmio_map(sysbus, 0, 0x80001000); + sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(rc4030, 4)); + + /* Add MAC address with valid checksum to PROM */ + prom =3D memory_region_get_ram_ptr(dp8393x_prom); + checksum =3D 0; + for (i =3D 0; i < 6; i++) { + prom[i] =3D nd->macaddr.a[i]; + checksum +=3D prom[i]; + if (checksum > 0xff) { + checksum =3D (checksum + 1) & 0xff; + } + } + prom[7] =3D 0xff - checksum; +} + #define MAGNUM_BIOS_SIZE_MAX 0x7e000 #define MAGNUM_BIOS_SIZE = \ (BIOS_SIZE < MAGNUM_BIOS_SIZE_MAX ? BIOS_SIZE : MAGNUM_BIOS_SIZE_M= AX) @@ -287,33 +321,7 @@ static void mips_jazz_init(MachineState *machine, nd->model =3D g_strdup("dp83932"); } if (strcmp(nd->model, "dp83932") =3D=3D 0) { - int checksum, i; - uint8_t *prom; - - qemu_check_nic_model(nd, "dp83932"); - - dev =3D qdev_new("dp8393x"); - qdev_set_nic_properties(dev, nd); - qdev_prop_set_uint8(dev, "it_shift", 2); - qdev_prop_set_bit(dev, "big_endian", TARGET_BIG_ENDIAN); - object_property_set_link(OBJECT(dev), "dma_mr", - OBJECT(rc4030_dma_mr), &error_abort); - sysbus =3D SYS_BUS_DEVICE(dev); - sysbus_realize_and_unref(sysbus, &error_fatal); - sysbus_mmio_map(sysbus, 0, 0x80001000); - sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(rc4030, 4)); - - /* Add MAC address with valid checksum to PROM */ - prom =3D memory_region_get_ram_ptr(dp8393x_prom); - checksum =3D 0; - for (i =3D 0; i < 6; i++) { - prom[i] =3D nd->macaddr.a[i]; - checksum +=3D prom[i]; - if (checksum > 0xff) { - checksum =3D (checksum + 1) & 0xff; - } - } - prom[7] =3D 0xff - checksum; + mips_jazz_init_net(nd, rc4030_dma_mr, rc4030, dp8393x_prom); break; } else if (is_help_option(nd->model)) { error_report("Supported NICs: dp83932"); --=20 2.41.0 From nobody Fri May 10 00:26:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1695632592; cv=none; d=zohomail.com; s=zohoarc; b=IJUKVOBnfpS811ubDkNoOVA5nURGf93GNzlhS5eRiQ/YuD3W8taShvws/2Gq5a9gIEgDjoe4iACqxM5TUboSWtjWfXZfKAf5bVscvzrgv5sw/swYkZNM5m9fxwV5v9E+BZqQovIafNVzi9j0ppJkYD5e6JOU8390QJJPJ8OETTU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695632592; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8wiBtUIwZWG1NcwASG5tlHlj086mMXH7Dj/ZCetcMu8=; b=FKlOe4/a4Xp2lRo16HENmrvsbOyRIgjJgAnDLhe3xFYQpDcimtS0KLbQobIJVBk761ubBbpaRuvRULjfT6Hugb3vb86ygLFCn1BniFIqkWCmi9FA/enkkkbfxJNFRAQD/rwK3vTUReuHNhc5ZLvh2ufoUASFaPTCdN3iMQSMayQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1695632592497163.78451884093136; Mon, 25 Sep 2023 02:03:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkhTK-0002Yk-Dt; Mon, 25 Sep 2023 05:01:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhSv-0002Bd-3M for qemu-devel@nongnu.org; Mon, 25 Sep 2023 05:01:17 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhSt-0002bT-Jg for qemu-devel@nongnu.org; Mon, 25 Sep 2023 05:01:16 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-113-Hhc-blJqOGiXdyZE7UC6GA-1; Mon, 25 Sep 2023 05:01:13 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 190B71871DAA for ; Mon, 25 Sep 2023 09:01:08 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5AB40140E953; Mon, 25 Sep 2023 09:01:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695632474; 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=8wiBtUIwZWG1NcwASG5tlHlj086mMXH7Dj/ZCetcMu8=; b=L2y57xLD8A+evS5la4kpgbOPiRwDUn2VUC47FXa+Bhtfqc6mvPyNIJxbHT4OPD4Bmu3Wou HIOmIXhu67EZ4uIxmFlJHsZDxjIKzb46sN4kE7VRCeG/Lhvwc5e2YToesatzCktPz4h8K8 n68NjhrCOIQORkYJUqQOg/GLevSf3ow= X-MC-Unique: Hhc-blJqOGiXdyZE7UC6GA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [PULL 6/7] hw/mips/jazz: Simplify the NIC setup code Date: Mon, 25 Sep 2023 11:00:59 +0200 Message-ID: <20230925090100.45632-7-thuth@redhat.com> In-Reply-To: <20230925090100.45632-1-thuth@redhat.com> References: <20230925090100.45632-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695632593804100001 The for-loop does not make much sense here - it is always left after the first iteration, so we can also check for nb_nics =3D=3D 1 instead which is way easier to understand. Also, the checks for nd->model are superfluous since the code in mips_jazz_init_net() calls qemu_check_nic_model() that already takes care of this (i.e. initializing nd->model if it has not been set yet, and checking whether it is the "help" option or the supported NIC model). Message-ID: <20230913160922.355640-3-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- hw/mips/jazz.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index 829c9248e5..c32d2b0b0a 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c @@ -172,7 +172,6 @@ static void mips_jazz_init(MachineState *machine, MemoryRegion *rtc =3D g_new(MemoryRegion, 1); MemoryRegion *dma_dummy =3D g_new(MemoryRegion, 1); MemoryRegion *dp8393x_prom =3D g_new(MemoryRegion, 1); - NICInfo *nd; DeviceState *dev, *rc4030; MMIOKBDState *i8042; SysBusDevice *sysbus; @@ -315,21 +314,11 @@ static void mips_jazz_init(MachineState *machine, } =20 /* Network controller */ - for (n =3D 0; n < nb_nics; n++) { - nd =3D &nd_table[n]; - if (!nd->model) { - nd->model =3D g_strdup("dp83932"); - } - if (strcmp(nd->model, "dp83932") =3D=3D 0) { - mips_jazz_init_net(nd, rc4030_dma_mr, rc4030, dp8393x_prom); - break; - } else if (is_help_option(nd->model)) { - error_report("Supported NICs: dp83932"); - exit(1); - } else { - error_report("Unsupported NIC: %s", nd->model); - exit(1); - } + if (nb_nics =3D=3D 1) { + mips_jazz_init_net(&nd_table[0], rc4030_dma_mr, rc4030, dp8393x_pr= om); + } else if (nb_nics > 1) { + error_report("This machine only supports one NIC"); + exit(1); } =20 /* SCSI adapter */ --=20 2.41.0 From nobody Fri May 10 00:26:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1695632554; cv=none; d=zohomail.com; s=zohoarc; b=EJ2seYhgRa2pIV7CMdmP/ijkpVUFv59F0oZ1C2JGX4anfqBp3fqN0w9SPq8HgB/K6eQRZhMN+OVvumnz8d774b/oc/Ml8pTgrAxqIj+qAIeiqyUmBHiA1X+hDxUBDR9ywNuONUEJloTVCUGM4jiyGG5Che31gjBy5W6W2R1oYgg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695632554; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QdzTnFO+kiRG6HD6kNM9fZRiuFTjsqCmUDwA2ZI9yO0=; b=AEzBiQgfCMosuJR4/e7y2FwfnQIzw3kYzZxJDikLpAtaMqtLGL/6oWBdjCthhBzmbOWx3bGpyj4jSxMyXipu7+mJEfvidRy5YTWH4NO3DCx0QjJiRHOJHJ75jIqSe5fUjZBusXc/YyGSJfUkXZVu1OGSFdMB23Owqf92yr+GZUY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1695632554081146.1051491246883; Mon, 25 Sep 2023 02:02:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkhTH-0002Tv-Lx; Mon, 25 Sep 2023 05:01:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhSs-00026r-By for qemu-devel@nongnu.org; Mon, 25 Sep 2023 05:01:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhSq-0002aq-V2 for qemu-devel@nongnu.org; Mon, 25 Sep 2023 05:01:14 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-169--7v--3OcO1ez7TfMihtnzw-1; Mon, 25 Sep 2023 05:01:09 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9EC51803D69 for ; Mon, 25 Sep 2023 09:01:09 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id B460C140E965; Mon, 25 Sep 2023 09:01:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695632471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QdzTnFO+kiRG6HD6kNM9fZRiuFTjsqCmUDwA2ZI9yO0=; b=bQinq8RaoJc8tmudBEnRnMlAokzlm0PGCwDRGQ+KwEEpjV0hQC9NucPsLQYc0pk8QWQ5Sr /GHkRQJWT14K2MHHQ/R/ZLee9TQFnJ1Grm0yKvTjFFD+gOOy+xVLBXyNBmgG27d3UXbYJX nxsmK+CXxgp3aSRpUhbENCLk3dsc6f4= X-MC-Unique: -7v--3OcO1ez7TfMihtnzw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [PULL 7/7] tests/avocado: fix waiting for vm shutdown in replay_linux Date: Mon, 25 Sep 2023 11:01:00 +0200 Message-ID: <20230925090100.45632-8-thuth@redhat.com> In-Reply-To: <20230925090100.45632-1-thuth@redhat.com> References: <20230925090100.45632-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695632555002100001 Content-Type: text/plain; charset="utf-8" From: Pavel Dovgalyuk This patch fixes the race condition in waiting for shutdown of the replay linux test. Signed-off-by: Pavel Dovgalyuk Suggested-by: John Snow Message-ID: <20230811070608.3383343-4-pavel.dovgalyuk@ispras.ru> Signed-off-by: Thomas Huth --- tests/avocado/replay_linux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py index a76dd507fc..270ccc1eae 100644 --- a/tests/avocado/replay_linux.py +++ b/tests/avocado/replay_linux.py @@ -93,7 +93,7 @@ def launch_and_wait(self, record, args, shift): % os.path.getsize(replay_path)) else: vm.event_wait('SHUTDOWN', self.timeout) - vm.shutdown(True) + vm.wait() logger.info('successfully fihished the replay') elapsed =3D time.time() - start_time logger.info('elapsed time %.2f sec' % elapsed) --=20 2.41.0