From nobody Sun Sep 8 02:38:35 2024 Delivered-To: importer2@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+importer2=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=OyEsNDW8zgLAHu+/TcsoZ6aeHHZvpAwlnI5TK9KMHJ4ruVDNwYykNMw3Gyz9LrjbZ7IrsLrOR7iQ3PwlvXXs23bd2iQNNj+In/Dnac49L3l345DP73PL0yQCLSB5jWDjTpZ2rFRQHijxFoTRIFl3GyncW0V0StEt0Vf/WNOkBlo= 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=eOmYzGFNU3/ZIGZ/fX86PDDbnrPbvjof9zUgOYOojwD/DiylgKpJO6UGLTJw4ODOnDIaB7WHeVNjenEfpDt6ix3p9iPSm5ORqZEugmHp4pW3QHTk+mKjqZmj9GFZJPX/vvMrHiVha7+8FhsqVcm78VGT3eNbPr2dgP7TZeKDvx8= 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+importer2=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 1695632509938214.52894559718357; 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+importer2=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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695632510945100003 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 Sun Sep 8 02:38:35 2024 Delivered-To: importer2@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+importer2=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=hcIBPjajMRsZFEZwLH9jP4dnq30FztAiUGtHeu2J5Xo/G1/pvlxtGDSGmaqJEcnOJ0Ag9UPVYDxLOpEjnz3S0AlHxZeEES6uqJxpUnm0650lgz9d+ROmihYALgb4J67JTjwQ5FLdoIECpwx/MQYygjbV0NvTj9KS2kZfNLNUz7M= 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=Vh7EXdPPfi306v8R4wpqQx6Yth3Y/6UOmltvAiWIXdM24FmrbNqLeypzqPdlq7c4BgbUDVILB/AUxRpYX00Hz/kevgnoj1MiPC+6oyyxIiw8Px2Hh89oT49wXNhZqPlKnpGm0zMs/jHyH9eejmq01gdXtUJ0j4EImJu/mbFPRg0= 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+importer2=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 1695632527516269.67119789085825; 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+importer2=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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695632528881100001 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 Sun Sep 8 02:38:35 2024 Delivered-To: importer2@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+importer2=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=V92qaeR+g2O20VG2QUMSIrGmp+Egq40LjrQN5XbJL2cthmzfT//Ld7h7/K00idCGlyo05iJ4XyJw8ChtJ7I1F7HK9e8rDtwfDy2rZ5zDo9QhIJK4zqdaHTSXTenkIcMmNzIaEnHN/5E2J8wDYImG6ZzwpK4Ghnv1glL38hikuvs= 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=NDA243+Fd+viutmWDWv6L2rURwdkXPbCalclQGqhZJheYKnxW1nQOIVK+6MVXcKNB/xkAAbUh6WyDC/XnnBkNsSviOPpRJhBHYa8vyO2xqMSicI0RmKG0sGeaf8Wx1EVCGsW3w+4qaAWs759ohfTNRZjJ7oRmaHioDbVdRAdXfI= 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+importer2=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 1695632538634332.2953101955708; 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+importer2=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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695632540801100003 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 Sun Sep 8 02:38:35 2024 Delivered-To: importer2@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+importer2=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=WRM1MvqXmp98GmQk/3EllAOusdyuFt3uN5y6AnkXjmh+ZXFe4EwE4lR23taGJrexUS2ZIOoioQ2rH5JKQWS2iKim1H4yqXsizGGP13HJ4K/gLMTwpUMihCDxQCm/3PAeIMrTCiClCJX/jtbREYrCuUPCiF/pl1zREs8u+pEibzY= 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=biPKk9hMnr8Lq1Su+eEayNzPWFdsWLHmAGNTq2OwAnQpRFHBrU00f2R7OWB61kU7ZJQEXJv0qQu8iQ/SMI3LqETU5ri/k50uFkCMpwNjT+2KG9uw/8H6HK0EpQaw+6IF4XxX+nT9qiky91M0ZdTq49hUeps3tWiS6Ly61Gnxtqs= 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+importer2=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 1695632514129403.1019908473561; 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+importer2=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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695632514911100001 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 Sun Sep 8 02:38:35 2024 Delivered-To: importer2@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+importer2=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=EtLY9Nldfix8/RA/eiKJSG4o8tlmK8GIaAUQoWq1HvC9zJz2RKJxFgxEN+/BpAhzqKBva3FHq+P65EnII/yOOYMI22AnIvMeoGmoIufoljTWe9bh5bT7QDX0rWzSUeRkNSDYeLxiHAX3SPdmvYpBOolB30fCP0UCcmMOM5MimTY= 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=jNUCqgDZvgIvGIE+NqOi/6oc4nQM4KPPbosZvjFBkAvDy7Tx9AAm//PTn+7SFqFr/mOJWvIMwcU/AsqjK0OXilxy4bwoitijEz4Ns9RaqVkhIbDMyFuxiVWMj8frL/jCySt61FC1fyCT+CZ83iqfUxMwQ4sj/dN1R9Hf2/zd2QE= 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+importer2=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 1695632579645629.739900797793; 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+importer2=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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695632581071100003 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 Sun Sep 8 02:38:35 2024 Delivered-To: importer2@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+importer2=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=QQSXYuG/YkdTcO4stJQ0GkrCwNEebUvcYWCa8bGpqO0qDx3PCRk6TXOXnZEBeSFf9Fp/eN34mBYt5km22mFeTRDMpJyvGOmyMo0CckXVvga9fsfu7P9wExoO7Kt8ysesNEmfaObCiGK5tdGOoUKK4SNA0wXS+8sg1pqXK9yG+uI= 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=VgdKvvvLWCElFwHaLKFEEehaSfo80I1x2TIbrkOu43ScRgzJzhF8lWXZSMzCTKZxqNPnCM5T4sn6w4gBE4oNHPghF0djWev+Ly9XvuJo8ZQ0UqoeGHEWqNHdSgvoqw3WaeZHceV6XRxhofHbd4yKu+Af2K0r1BoCi9Pn7UJZdwg= 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+importer2=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 1695632592447405.80958034515857; 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+importer2=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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695632594155100003 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 Sun Sep 8 02:38:35 2024 Delivered-To: importer2@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+importer2=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=GY73fP3+eQx6sLVfvVfs7EJSzGmSdZrJ/N5oxnq6gWq6HWRiL3ohXYPHe2xvGnqC1RyRxBzpqdlbGiMW8FK7lsr8JLJ729Jl2l4b9MPuLsq29E2nADx9OobsMeJFvEWGDzXCmUHAo7jTmM0kDQ1NKAdZJ+lpzQK8PsqA+e9IuIc= 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=H6aQ38Q0BKAKa0+1XWIWNxCD5hfjmAguoLElymWMvdlik0UBIeFMXun95zQHR5uf3VY5PcpRZ5vCutz42vaw9oLGKD+t6aeUUDIxeVzjTG8RtKPiJ+SgPoCeOLN0K14JxTHEW6A6ejT30dJ8virkVjh2cwSC2D4cVlI+KCDBbRQ= 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+importer2=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 1695632554083489.5673390545562; 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+importer2=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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695632555024100002 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