From patchwork Wed Jan 27 09:54:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12049541 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AE7BC433E0 for ; Wed, 27 Jan 2021 09:56:40 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B22BB2072C for ; Wed, 27 Jan 2021 09:56:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B22BB2072C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4hZ0-0000ib-6d for qemu-devel@archiver.kernel.org; Wed, 27 Jan 2021 04:56:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4hXR-0007X3-9a for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:01 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:55585) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l4hXP-00008X-9K for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611741298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lIS6r4vD9EK7AoHTV+uM5+/Te8r/Yu4dtKWLU95SY08=; b=UrCFUbVpg0S+DtBHdApTd4SoGZLeSEympZoo6wQV3GU6jwgnxKMGLj73cqLlvfdTKKyw6z Qa9jZ4RvCwz3FIh1d8qGOYHYR8NqwLeyyPq77v6exjpBhuoRFpBxXzl787jtd1WkFVr78x NaGYkpwl+64qgAmWh66i8PlBaDvkmIQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-381-ionFz7t9PZiI5p7KP6qs1Q-1; Wed, 27 Jan 2021 04:54:54 -0500 X-MC-Unique: ionFz7t9PZiI5p7KP6qs1Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C04DE59; Wed, 27 Jan 2021 09:54:52 +0000 (UTC) Received: from thuth.com (ovpn-112-136.ams2.redhat.com [10.36.112.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8FAC65D9C6; Wed, 27 Jan 2021 09:54:48 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 1/9] tests/docker: Install static libc package in CentOS 7 Date: Wed, 27 Jan 2021 10:54:36 +0100 Message-Id: <20210127095444.114495-2-thuth@redhat.com> In-Reply-To: <20210127095444.114495-1-thuth@redhat.com> References: <20210127095444.114495-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.255, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé We need to install the static libc package to be able to run the TCG tests: $ make check-tcg ... BUILD TCG tests for x86_64-softmmu BUILD x86_64-softmmu guest-tests with cc /usr/bin/ld: hello: warning: allocated section `.notes' not in segment /usr/bin/ld: memory: warning: allocated section `.notes' not in segment BUILD TCG tests for x86_64-linux-user BUILD x86_64-linux-user guest-tests with cc /usr/bin/ld: cannot find -lpthread /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status make[2]: *** [threadcount] Error 1 make[1]: *** [cross-build-guest-tests] Error 2 make: *** [build-tcg-tests-x86_64-linux-user] Error 2 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Wainer dos Santos Moschetta Message-Id: <20210121172829.1643620-2-f4bug@amsat.org> Signed-off-by: Thomas Huth --- tests/docker/dockerfiles/centos7.docker | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/docker/dockerfiles/centos7.docker b/tests/docker/dockerfiles/centos7.docker index 6f11af1989..75fdb53c7c 100644 --- a/tests/docker/dockerfiles/centos7.docker +++ b/tests/docker/dockerfiles/centos7.docker @@ -15,6 +15,7 @@ ENV PACKAGES \ gettext \ git \ glib2-devel \ + glibc-static \ gnutls-devel \ libaio-devel \ libepoxy-devel \ From patchwork Wed Jan 27 09:54:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12049549 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CE92C433E0 for ; Wed, 27 Jan 2021 09:58:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9C3020731 for ; Wed, 27 Jan 2021 09:58:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9C3020731 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4haX-00045i-Kk for qemu-devel@archiver.kernel.org; Wed, 27 Jan 2021 04:58:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4hXR-0007Xl-Ty for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:01 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:22222) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l4hXP-0000AF-Q4 for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611741299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vPgoZsuouhdZNP6+15iiRkfjNG6c1sOaA8KYB4jFe4E=; b=XvjNk06ks+lcGRhfMoDRKwuIwFwtWNX8iP4JClJf4yBx1jCyf8iovFz86WSjg3qWVHrVfa fJ3G5pwB6D96cuLLgpFs2+HrNyWzJqa+/90rqwcIdorI0nggKaqkvSKJuf/O7RpEB2fFg1 Lr2rdjsEoncTT/jBzOfFydtULfa4VP0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-208-3SGSpk9OMfCdAcQH6YxEVg-1; Wed, 27 Jan 2021 04:54:55 -0500 X-MC-Unique: 3SGSpk9OMfCdAcQH6YxEVg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CB79D8017FB; Wed, 27 Jan 2021 09:54:54 +0000 (UTC) Received: from thuth.com (ovpn-112-136.ams2.redhat.com [10.36.112.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2ACCA5D9C6; Wed, 27 Jan 2021 09:54:52 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 2/9] gitlab-ci: Test building linux-user targets on CentOS 7 Date: Wed, 27 Jan 2021 10:54:37 +0100 Message-Id: <20210127095444.114495-3-thuth@redhat.com> In-Reply-To: <20210127095444.114495-1-thuth@redhat.com> References: <20210127095444.114495-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.255, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Wainer dos Santos Moschetta Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Add a configuration tested by Peter Maydell (see [1] and [2]) but not covered in our CI [3]: [705/2910] Compiling C object libqemu-arm-linux-user.fa.p/linux-user_strace.c.o FAILED: libqemu-arm-linux-user.fa.p/linux-user_strace.c.o ../linux-user/strace.c: In function 'do_print_sockopt': ../linux-user/strace.c:2831:14: error: 'IPV6_ADDR_PREFERENCES' undeclared (first use in this function) case IPV6_ADDR_PREFERENCES: ^ This job currently takes 31 minutes 32 seconds ([4]). [1] https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg05086.html [2] https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg05379.html [3] https://gitlab.com/philmd/qemu/-/jobs/977408284 [4] https://gitlab.com/philmd/qemu/-/jobs/978223286 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Reviewed-by: Wainer dos Santos Moschetta Message-Id: <20210121172829.1643620-3-f4bug@amsat.org> Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index de3a3d25b5..af4d74757d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -411,6 +411,13 @@ build-user-plugins: MAKE_CHECK_ARGS: check-tcg timeout: 1h 30m +build-user-centos7: + <<: *native_build_job_definition + variables: + IMAGE: centos7 + CONFIGURE_ARGS: --disable-system --disable-tools --disable-docs + MAKE_CHECK_ARGS: check-tcg + build-some-softmmu-plugins: <<: *native_build_job_definition variables: From patchwork Wed Jan 27 09:54:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12049543 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21BEBC433E6 for ; Wed, 27 Jan 2021 09:56:42 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AB7B92072C for ; Wed, 27 Jan 2021 09:56:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AB7B92072C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4hZ2-0000nm-Dd for qemu-devel@archiver.kernel.org; Wed, 27 Jan 2021 04:56:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4hXU-0007a0-9C for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:04 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:37018) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l4hXS-0000Az-AK for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611741301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HQbcHRdG9sK3vpO/CuXlBsJB40dCosv4RvKUjCYu7Gs=; b=XsIpyB7w7w/muKOQEu+KHbNJrSCT2+Jd1Ek3UubpoEk/rk91BLog8s3MkjfAomOsogn1bZ PSoDT5vMDW+EtZPlq6i92w2qsZRxDIkPpNR5EDdEPywYJpz9Xc/SZD8YPG7onLV1SVkiUI 0MJ+kuTjMiwaWsdiGy8lgRn0JDCIdVc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-256-wCIMhVvmOnGYggpXZP7xcg-1; Wed, 27 Jan 2021 04:54:57 -0500 X-MC-Unique: wCIMhVvmOnGYggpXZP7xcg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 43CCBCE646; Wed, 27 Jan 2021 09:54:56 +0000 (UTC) Received: from thuth.com (ovpn-112-136.ams2.redhat.com [10.36.112.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 246F35D9C6; Wed, 27 Jan 2021 09:54:54 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 3/9] gitlab-ci.yml: Avoid some submodules to speed up the CI a little bit Date: Wed, 27 Jan 2021 10:54:38 +0100 Message-Id: <20210127095444.114495-4-thuth@redhat.com> In-Reply-To: <20210127095444.114495-1-thuth@redhat.com> References: <20210127095444.114495-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.255, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Since the meson build system rework, the configure script prefers the git submodules over the system libraries. So we are testing compilation with capstone, fdt and libslirp as a submodule all over the place, burning CPU cycles by recompiling these third party modules and wasting some network bandwidth in the CI by cloning the submodules each time. Let's stop doing that in at least a couple of jobs and use the system libraries instead. While we're at it, also install meson in the Fedora container, since it is new enough already, so we do not need to check out the meson submodule here. Message-Id: <20210121174451.658924-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 6 +++++- tests/docker/dockerfiles/centos8.docker | 1 + tests/docker/dockerfiles/debian-amd64.docker | 1 + tests/docker/dockerfiles/fedora.docker | 3 +++ tests/docker/dockerfiles/ubuntu2004.docker | 1 + 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index af4d74757d..a7bdf419d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -109,6 +109,7 @@ build-system-ubuntu: <<: *native_build_job_definition variables: IMAGE: ubuntu2004 + CONFIGURE_ARGS: --enable-fdt=system --enable-slirp=system TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu moxie-softmmu microblazeel-softmmu mips64el-softmmu MAKE_CHECK_ARGS: check-build @@ -140,6 +141,7 @@ build-system-debian: <<: *native_build_job_definition variables: IMAGE: debian-amd64 + CONFIGURE_ARGS: --enable-fdt=system TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu MAKE_CHECK_ARGS: check-build @@ -185,6 +187,7 @@ build-system-fedora: variables: IMAGE: fedora CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs + --enable-fdt=system --enable-slirp=system --enable-capstone=system TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu MAKE_CHECK_ARGS: check-build @@ -216,7 +219,7 @@ build-system-centos: <<: *native_build_job_definition variables: IMAGE: centos8 - CONFIGURE_ARGS: --disable-nettle --enable-gcrypt + CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu MAKE_CHECK_ARGS: check-build @@ -248,6 +251,7 @@ build-system-opensuse: <<: *native_build_job_definition variables: IMAGE: opensuse-leap + CONFIGURE_ARGS: --enable-fdt=system TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu MAKE_CHECK_ARGS: check-build artifacts: diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker index 64cb7a6eda..a763d55730 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -15,6 +15,7 @@ ENV PACKAGES \ glib2-devel \ libaio-devel \ libepoxy-devel \ + libfdt-devel \ libgcrypt-devel \ lzo-devel \ make \ diff --git a/tests/docker/dockerfiles/debian-amd64.docker b/tests/docker/dockerfiles/debian-amd64.docker index a98314757d..ed546edcd6 100644 --- a/tests/docker/dockerfiles/debian-amd64.docker +++ b/tests/docker/dockerfiles/debian-amd64.docker @@ -21,6 +21,7 @@ RUN apt update && \ libbz2-dev \ liblzo2-dev \ libgcrypt20-dev \ + libfdt-dev \ librdmacm-dev \ libsasl2-dev \ libsnappy-dev \ diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index 0b5053f2d0..0d7602abbe 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -6,6 +6,7 @@ ENV PACKAGES \ brlapi-devel \ bzip2 \ bzip2-devel \ + capstone-devel \ ccache \ clang \ cyrus-sasl-devel \ @@ -37,6 +38,7 @@ ENV PACKAGES \ libpng-devel \ librbd-devel \ libseccomp-devel \ + libslirp-devel \ libssh-devel \ libubsan \ libudev-devel \ @@ -46,6 +48,7 @@ ENV PACKAGES \ llvm \ lzo-devel \ make \ + meson \ mingw32-bzip2 \ mingw32-curl \ mingw32-glib2 \ diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker index ae889d8482..8519584d2b 100644 --- a/tests/docker/dockerfiles/ubuntu2004.docker +++ b/tests/docker/dockerfiles/ubuntu2004.docker @@ -37,6 +37,7 @@ ENV PACKAGES flex bison \ libsasl2-dev \ libsdl2-dev \ libseccomp-dev \ + libslirp-dev \ libsnappy-dev \ libspice-protocol-dev \ libspice-server-dev \ From patchwork Wed Jan 27 09:54:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12049547 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F6F0C433E0 for ; Wed, 27 Jan 2021 09:58:11 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 95D4720731 for ; Wed, 27 Jan 2021 09:58:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95D4720731 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4haT-0003xd-Ex for qemu-devel@archiver.kernel.org; Wed, 27 Jan 2021 04:58:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4hXZ-0007bq-Gg for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:11 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:59186) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l4hXV-0000D9-9P for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611741304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pp8aHOJvJQH4XkvNiVMaJt/D/Zzo0t+c6mHIDJ+0w84=; b=cEo8m1mbAwZyY/7Kk3ZilkNiRVNqgBrQU0UD7m3RpkbuvNsO6O/zX/PcnOStSd9yTp37VI YRMrv6ZtLPgYXjUx3bXh4GPydkF09ZEXL2w+6YZNFDioS3gEPPtHkHJByQrAkwM6RL90KP DCLD1iGemDXpm3brX801YGVmks8KH3k= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-462-mMzuCtqeOQG1AeqanpR4mg-1; Wed, 27 Jan 2021 04:55:02 -0500 X-MC-Unique: mMzuCtqeOQG1AeqanpR4mg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 43F188017FB; Wed, 27 Jan 2021 09:55:01 +0000 (UTC) Received: from thuth.com (ovpn-112-136.ams2.redhat.com [10.36.112.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 965DD5D9C6; Wed, 27 Jan 2021 09:54:56 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 4/9] configure: Only check for audio drivers if system-mode is selected Date: Wed, 27 Jan 2021 10:54:39 +0100 Message-Id: <20210127095444.114495-5-thuth@redhat.com> In-Reply-To: <20210127095444.114495-1-thuth@redhat.com> References: <20210127095444.114495-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.255, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Acked-by: Gerd Hoffmann Message-Id: <20210122204441.2145197-2-philmd@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- configure | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure b/configure index dcc5ea7d63..87de49e2c2 100755 --- a/configure +++ b/configure @@ -2319,6 +2319,12 @@ if test -z "$want_tools"; then fi fi +########################################## +# Disable features only meaningful for system-mode emulation +if test "$softmmu" = "no"; then + audio_drv_list="" +fi + ########################################## # Some versions of Mac OS X incorrectly define SIZE_MAX cat > $TMPC << EOF From patchwork Wed Jan 27 09:54:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12049551 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1F07C433E0 for ; Wed, 27 Jan 2021 09:58:17 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 44E2820731 for ; Wed, 27 Jan 2021 09:58:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 44E2820731 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4haa-0004BB-7t for qemu-devel@archiver.kernel.org; Wed, 27 Jan 2021 04:58:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56794) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4hXf-0007d5-CL for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:15 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:60018) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l4hXZ-0000EV-6X for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611741308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gt6o8Xp/wAqUATnm+FeMbImFHdA/73Z6EYs0CbV3iuw=; b=JIR8iqj4tZxPtH7tT94ivZx1sTXkO/VsxO+grAgWAFmxuwBY3P4ng/zDbAYGVw4jAmsX7w 8+piKy4bINERU/pc2bwFmjomxjNL+fyg32kHmZjHXQ34exBTySHno3jOpcgd5C7epIwevY y7wLfaaKslW+8/hr3nfIocWyb6Fotmg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-476-tkBK1xzSPne1s-xDTR28HQ-1; Wed, 27 Jan 2021 04:55:05 -0500 X-MC-Unique: tkBK1xzSPne1s-xDTR28HQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 11CCC1005513; Wed, 27 Jan 2021 09:55:05 +0000 (UTC) Received: from thuth.com (ovpn-112-136.ams2.redhat.com [10.36.112.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACD515D9C6; Wed, 27 Jan 2021 09:55:01 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 5/9] meson: Do not build optional libraries by default Date: Wed, 27 Jan 2021 10:54:40 +0100 Message-Id: <20210127095444.114495-6-thuth@redhat.com> In-Reply-To: <20210127095444.114495-1-thuth@redhat.com> References: <20210127095444.114495-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.255, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé The following libraries will be selected if a feature requires it: - capstone - fdt - SLiRP Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210122204441.2145197-5-philmd@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meson.build b/meson.build index 35a9eddf5c..a58c6f6785 100644 --- a/meson.build +++ b/meson.build @@ -1460,6 +1460,7 @@ if capstone_opt == 'internal' ] libcapstone = static_library('capstone', + build_by_default: false, sources: capstone_files, c_args: capstone_cargs, include_directories: 'capstone/include') @@ -1537,6 +1538,7 @@ if have_system slirp_inc = include_directories('slirp', 'slirp/src') libslirp = static_library('slirp', + build_by_default: false, sources: slirp_files, c_args: slirp_cargs, include_directories: slirp_inc) @@ -1582,6 +1584,7 @@ if have_system fdt_inc = include_directories('dtc/libfdt') libfdt = static_library('fdt', + build_by_default: false, sources: fdt_files, include_directories: fdt_inc) fdt = declare_dependency(link_with: libfdt, From patchwork Wed Jan 27 09:54:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12049563 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6C96C433E0 for ; Wed, 27 Jan 2021 10:02:06 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2014B20781 for ; Wed, 27 Jan 2021 10:02:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2014B20781 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4heH-00008M-02 for qemu-devel@archiver.kernel.org; Wed, 27 Jan 2021 05:02:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4hXk-0007fP-4n for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:20 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51381) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l4hXf-0000FU-2r for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611741313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z6HWL/l6SmvKqnsERrtuOhTPSLvw2Ze75/8nt+uwqpo=; b=Vum424uJTi3vda1DQG/asa/AZLT8HgF3r1KdE19aDkGjeNm/QGsXyb/mZTQpvL+PxA/OpQ jNCBd7TrgIzzdQ/nf9Oi89AHWnZsrjyCyX6l/UljOMWLqvwrwvO2IsHT2i8RbquLJoD5kC vlBU1uceVzxwxSqZ8a4pJ7lqMRcGniY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-245-Byjnu5XEN4GsDMykMCiN0w-1; Wed, 27 Jan 2021 04:55:08 -0500 X-MC-Unique: Byjnu5XEN4GsDMykMCiN0w-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0B2468030A0; Wed, 27 Jan 2021 09:55:07 +0000 (UTC) Received: from thuth.com (ovpn-112-136.ams2.redhat.com [10.36.112.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8C5D55D9C6; Wed, 27 Jan 2021 09:55:05 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 6/9] gitlab-ci.yml: Exclude some redundant targets in build-without-default-features Date: Wed, 27 Jan 2021 10:54:41 +0100 Message-Id: <20210127095444.114495-7-thuth@redhat.com> In-Reply-To: <20210127095444.114495-1-thuth@redhat.com> References: <20210127095444.114495-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.255, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , Wainer dos Santos Moschetta Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The build-without-default-features job is running quite long and sometimes already hits the 1h time limit. Exclude some targets which do not provide additional test coverage here (since we e.g. also already test other targets of the same type, just with different endianess, or a 64-bit superset) to avoid that we hit the timeout here so easily. Message-Id: <20210126172345.15947-1-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Wainer dos Santos Moschetta Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7bdf419d5..d0d8914bff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -617,6 +617,7 @@ build-without-default-features: variables: IMAGE: debian-amd64 CONFIGURE_ARGS: --without-default-features --disable-user + --target-list-exclude=arm-softmmu,i386-softmmu,mipsel-softmmu,mips64-softmmu,ppc-softmmu MAKE_CHECK_ARGS: check-unit check-patch: From patchwork Wed Jan 27 09:54:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12049555 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0954FC433DB for ; Wed, 27 Jan 2021 10:00:07 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 970302076E for ; Wed, 27 Jan 2021 10:00:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 970302076E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4hcL-0006eq-IM for qemu-devel@archiver.kernel.org; Wed, 27 Jan 2021 05:00:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4hXj-0007eu-VJ for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:19 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:29309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l4hXf-0000GE-8B for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611741314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=40G235UCo6fIJ8By216DE+BEp8DoyEqHC0zVvy1j5pw=; b=InUwKFxjDdApQdjbZJn1R+RanA/MDQCc9bmc7Xi9wergsmVTG183WbWhIJ32PtdsURjZAM 4uBg5uY3Mge2NXazr8R+2i7e/fv4mReJkOD5t30+W5j052ooOFi6/+f6k2zhLrK2/mRlH1 CVJEIQ1B6gZKn+gMC6Yhpq6kKlUa4W8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-434-nXZ6E4OZP1CYQyZi2TVCgg-1; Wed, 27 Jan 2021 04:55:12 -0500 X-MC-Unique: nXZ6E4OZP1CYQyZi2TVCgg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DE541107ACE4; Wed, 27 Jan 2021 09:55:11 +0000 (UTC) Received: from thuth.com (ovpn-112-136.ams2.redhat.com [10.36.112.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 640BA5D9C6; Wed, 27 Jan 2021 09:55:07 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 7/9] gitlab-ci.yml: Avoid recompiling the sources in the test jobs Date: Wed, 27 Jan 2021 10:54:42 +0100 Message-Id: <20210127095444.114495-8-thuth@redhat.com> In-Reply-To: <20210127095444.114495-1-thuth@redhat.com> References: <20210127095444.114495-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.255, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Currently, our check-system-* jobs are recompiling the whole sources again. This happens due to the fact that the jobs are checking out the whole source tree and required submodules again, and only try to use the "build" directory with the binaries and object files as an artifact from the previous stage - which simply does not work right anymore (with the current version of meson). Due to some changed time stamps, meson/ninja are always trying to rebuild the whole tree. In the long run, we could likely use "meson test --no-rebuild", but there is still some work going on in that area to improve the user experience. So until this has been done, simply avoid recompiling the sources with a trick: pass NINJA=":" to the make process in the test jobs. Also check out the submodules manually before updating the timestamps in the build folder, so that the binaries are definitely newer that all the source files. This saves ca. 10 - 15 minutes of precious CI cycles in each run. Suggested-by: Paolo Bonzini Message-Id: <20210126065757.403853-1-thuth@redhat.com> Tested-by: Philippe Mathieu-Daudé Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d0d8914bff..7c0db64710 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,9 +38,12 @@ include: stage: test image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest script: + - scripts/git-submodule.sh update + $(grep GIT_SUBMODULES build/config-host.mak | sed 's/GIT_SUBMODULES=//') - cd build - find . -type f -exec touch {} + - - make $MAKE_CHECK_ARGS + # Avoid recompiling by hiding ninja with NINJA=":" + - make NINJA=":" $MAKE_CHECK_ARGS .acceptance_template: &acceptance_definition cache: From patchwork Wed Jan 27 09:54:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12049545 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F6E4C433E6 for ; Wed, 27 Jan 2021 09:56:47 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EACA12072E for ; Wed, 27 Jan 2021 09:56:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EACA12072E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4hZ7-00011L-Ij for qemu-devel@archiver.kernel.org; Wed, 27 Jan 2021 04:56:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4hXl-0007it-Iy for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:21 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:26498) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l4hXj-0000Ga-EP for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611741317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FvzDvrq1UMMHgygqzWp1Kvh+XEJnHp4rIrPCRPhyIpw=; b=iUrPvFgZtNuL6d8tv8kqJXrPnHI9B86esEO8bWHcnXeAUZAY4txF8fkQSFAi5ehqBwYRTf Q9IQddT46mIbAmU17uJ7JhKgnLO8HBV1F3obBSndxQ7SwNbc3Ey8Tox4FWou8tegTq6o/h eQYkhxF1mYpjfNZL+UAReng5mHKDB8Q= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-536-exQgzM0BNAGSUN5AetVCTA-1; Wed, 27 Jan 2021 04:55:14 -0500 X-MC-Unique: exQgzM0BNAGSUN5AetVCTA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7A3DF801FD8; Wed, 27 Jan 2021 09:55:13 +0000 (UTC) Received: from thuth.com (ovpn-112-136.ams2.redhat.com [10.36.112.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4EEFD5D9C6; Wed, 27 Jan 2021 09:55:12 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 8/9] docs/devel: Explain how acceptance tests can be skipped Date: Wed, 27 Jan 2021 10:54:43 +0100 Message-Id: <20210127095444.114495-9-thuth@redhat.com> In-Reply-To: <20210127095444.114495-1-thuth@redhat.com> References: <20210127095444.114495-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.255, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Wainer dos Santos Moschetta Documented under the "Acceptance tests using the Avocado Framework" section in testing.rst how environment variables are used to skip tests. Signed-off-by: Wainer dos Santos Moschetta Message-Id: <20210115210022.417996-1-wainersm@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- docs/devel/testing.rst | 62 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 0aa7a13bba..9f8b77c8ec 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -871,6 +871,68 @@ qemu_bin The exact QEMU binary to be used on QEMUMachine. +Skipping tests +-------------- +The Avocado framework provides Python decorators which allow for easily skip +tests running under certain conditions. For example, on the lack of a binary +on the test system or when the running environment is a CI system. For further +information about those decorators, please refer to:: + + https://avocado-framework.readthedocs.io/en/latest/guides/writer/chapters/writing.html#skipping-tests + +While the conditions for skipping tests are often specifics of each one, there +are recurring scenarios identified by the QEMU developers and the use of +environment variables became a kind of standard way to enable/disable tests. + +Here is a list of the most used variables: + +AVOCADO_ALLOW_LARGE_STORAGE +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Tests which are going to fetch or produce assets considered *large* are not +going to run unless that `AVOCADO_ALLOW_LARGE_STORAGE=1` is exported on +the environment. + +The definition of *large* is a bit arbitrary here, but it usually means an +asset which occupies at least 1GB of size on disk when uncompressed. + +AVOCADO_ALLOW_UNTRUSTED_CODE +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +There are tests which will boot a kernel image or firmware that can be +considered not safe to run on the developer's workstation, thus they are +skipped by default. The definition of *not safe* is also arbitrary but +usually it means a blob which either its source or build process aren't +public available. + +You should export `AVOCADO_ALLOW_UNTRUSTED_CODE=1` on the environment in +order to allow tests which make use of those kind of assets. + +AVOCADO_TIMEOUT_EXPECTED +~~~~~~~~~~~~~~~~~~~~~~~~ +The Avocado framework has a timeout mechanism which interrupts tests to avoid the +test suite of getting stuck. The timeout value can be set via test parameter or +property defined in the test class, for further details:: + + https://avocado-framework.readthedocs.io/en/latest/guides/writer/chapters/writing.html#setting-a-test-timeout + +Even though the timeout can be set by the test developer, there are some tests +that may not have a well-defined limit of time to finish under certain +conditions. For example, tests that take longer to execute when QEMU is +compiled with debug flags. Therefore, the `AVOCADO_TIMEOUT_EXPECTED` variable +has been used to determine whether those tests should run or not. + +GITLAB_CI +~~~~~~~~~ +A number of tests are flagged to not run on the GitLab CI. Usually because +they proved to the flaky or there are constraints on the CI environment which +would make them fail. If you encounter a similar situation then use that +variable as shown on the code snippet below to skip the test: + +.. code:: + + @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') + def test(self): + do_something() + Uninstalling Avocado -------------------- From patchwork Wed Jan 27 09:54:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12049553 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AC5EC433E0 for ; Wed, 27 Jan 2021 09:59:58 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 910A72076D for ; Wed, 27 Jan 2021 09:59:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 910A72076D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4hcC-0006ZD-G1 for qemu-devel@archiver.kernel.org; Wed, 27 Jan 2021 04:59:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4hXq-0007ut-A7 for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:26 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:42183) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l4hXo-0000Il-AL for qemu-devel@nongnu.org; Wed, 27 Jan 2021 04:55:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611741323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xuPdsf0uHIljSG9Nzfpqv+nnFv7ukQAoQSktRwPuMyY=; b=S1u26LQ4/uKRlVFk4IDiPjFIg3157fxnySS9ue9uAKS40LMRze7/8ySXSlIV9twOZG8mTm QBBQ1g4BuTTWW4UtlFybGZao5wFZQJ8l2bfSOvKyRD2X6WculLaVFzzLKbZpSt/u/4sf1l 5B/728OTPDDwjcqsa7J+D1Ch/rN7IYg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-151-59p4p1_8NIi56BM7-HubfQ-1; Wed, 27 Jan 2021 04:55:19 -0500 X-MC-Unique: 59p4p1_8NIi56BM7-HubfQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5ECCDCE648; Wed, 27 Jan 2021 09:55:18 +0000 (UTC) Received: from thuth.com (ovpn-112-136.ams2.redhat.com [10.36.112.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB08B5D9C6; Wed, 27 Jan 2021 09:55:13 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 9/9] libqtest: Rework qtest_rsp() Date: Wed, 27 Jan 2021 10:54:44 +0100 Message-Id: <20210127095444.114495-10-thuth@redhat.com> In-Reply-To: <20210127095444.114495-1-thuth@redhat.com> References: <20210127095444.114495-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.255, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Markus Armbruster Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Markus Armbruster qtest_rsp() is used in two different ways: (1) return some arguments to caller, which the caller must free, and (2) return no arguments to caller. Passing non-zero @expected_args gets you (1), and passing zero gets you (2). Having "the return value must be freed" depend on an argument this way is less than ideal. Provide separate functions for the two ways: (1) qtest_rsp_args() takes @expected_args (possibly zero), and returns that number of arguments. Caller must free the return value always. (2) qtest_rsp() assumes zero, and returns nothing. Signed-off-by: Markus Armbruster Reviewed-by: Thomas Huth Reviewed-by: Marc-André Lureau Message-Id: <20210126151649.2220902-1-armbru@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/libqtest.c | 50 ++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index 5249a628cc..fd043b0570 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -503,7 +503,7 @@ static GString *qtest_client_socket_recv_line(QTestState *s) return line; } -static gchar **qtest_rsp(QTestState *s, int expected_args) +static gchar **qtest_rsp_args(QTestState *s, int expected_args) { GString *line; gchar **words; @@ -539,25 +539,27 @@ redo: g_assert(words[0] != NULL); g_assert_cmpstr(words[0], ==, "OK"); - if (expected_args) { - for (i = 0; i < expected_args; i++) { - g_assert(words[i] != NULL); - } - } else { - g_strfreev(words); - words = NULL; + for (i = 0; i < expected_args; i++) { + g_assert(words[i] != NULL); } return words; } +static void qtest_rsp(QTestState *s) +{ + gchar **words = qtest_rsp_args(s, 0); + + g_strfreev(words); +} + static int qtest_query_target_endianness(QTestState *s) { gchar **args; int big_endian; qtest_sendf(s, "endianness\n"); - args = qtest_rsp(s, 1); + args = qtest_rsp_args(s, 1); g_assert(strcmp(args[1], "big") == 0 || strcmp(args[1], "little") == 0); big_endian = strcmp(args[1], "big") == 0; g_strfreev(args); @@ -892,14 +894,14 @@ bool qtest_get_irq(QTestState *s, int num) void qtest_module_load(QTestState *s, const char *prefix, const char *libname) { qtest_sendf(s, "module_load %s %s\n", prefix, libname); - qtest_rsp(s, 0); + qtest_rsp(s); } static int64_t qtest_clock_rsp(QTestState *s) { gchar **words; int64_t clock; - words = qtest_rsp(s, 2); + words = qtest_rsp_args(s, 2); clock = g_ascii_strtoll(words[1], NULL, 0); g_strfreev(words); return clock; @@ -926,13 +928,13 @@ int64_t qtest_clock_set(QTestState *s, int64_t val) void qtest_irq_intercept_out(QTestState *s, const char *qom_path) { qtest_sendf(s, "irq_intercept_out %s\n", qom_path); - qtest_rsp(s, 0); + qtest_rsp(s); } void qtest_irq_intercept_in(QTestState *s, const char *qom_path) { qtest_sendf(s, "irq_intercept_in %s\n", qom_path); - qtest_rsp(s, 0); + qtest_rsp(s); } void qtest_set_irq_in(QTestState *s, const char *qom_path, const char *name, @@ -942,13 +944,13 @@ void qtest_set_irq_in(QTestState *s, const char *qom_path, const char *name, name = "unnamed-gpio-in"; } qtest_sendf(s, "set_irq_in %s %s %d %d\n", qom_path, name, num, level); - qtest_rsp(s, 0); + qtest_rsp(s); } static void qtest_out(QTestState *s, const char *cmd, uint16_t addr, uint32_t value) { qtest_sendf(s, "%s 0x%x 0x%x\n", cmd, addr, value); - qtest_rsp(s, 0); + qtest_rsp(s); } void qtest_outb(QTestState *s, uint16_t addr, uint8_t value) @@ -973,7 +975,7 @@ static uint32_t qtest_in(QTestState *s, const char *cmd, uint16_t addr) unsigned long value; qtest_sendf(s, "%s 0x%x\n", cmd, addr); - args = qtest_rsp(s, 2); + args = qtest_rsp_args(s, 2); ret = qemu_strtoul(args[1], NULL, 0, &value); g_assert(!ret && value <= UINT32_MAX); g_strfreev(args); @@ -1000,7 +1002,7 @@ static void qtest_write(QTestState *s, const char *cmd, uint64_t addr, uint64_t value) { qtest_sendf(s, "%s 0x%" PRIx64 " 0x%" PRIx64 "\n", cmd, addr, value); - qtest_rsp(s, 0); + qtest_rsp(s); } void qtest_writeb(QTestState *s, uint64_t addr, uint8_t value) @@ -1030,7 +1032,7 @@ static uint64_t qtest_read(QTestState *s, const char *cmd, uint64_t addr) uint64_t value; qtest_sendf(s, "%s 0x%" PRIx64 "\n", cmd, addr); - args = qtest_rsp(s, 2); + args = qtest_rsp_args(s, 2); ret = qemu_strtou64(args[1], NULL, 0, &value); g_assert(!ret); g_strfreev(args); @@ -1082,7 +1084,7 @@ void qtest_memread(QTestState *s, uint64_t addr, void *data, size_t size) } qtest_sendf(s, "read 0x%" PRIx64 " 0x%zx\n", addr, size); - args = qtest_rsp(s, 2); + args = qtest_rsp_args(s, 2); for (i = 0; i < size; i++) { ptr[i] = hex2nib(args[1][2 + (i * 2)]) << 4; @@ -1098,7 +1100,7 @@ uint64_t qtest_rtas_call(QTestState *s, const char *name, { qtest_sendf(s, "rtas %s %u 0x%"PRIx64" %u 0x%"PRIx64"\n", name, nargs, args, nret, ret); - qtest_rsp(s, 0); + qtest_rsp(s); return 0; } @@ -1134,7 +1136,7 @@ void qtest_bufwrite(QTestState *s, uint64_t addr, const void *data, size_t size) qtest_sendf(s, "b64write 0x%" PRIx64 " 0x%zx ", addr, size); s->ops.send(s, bdata); s->ops.send(s, "\n"); - qtest_rsp(s, 0); + qtest_rsp(s); g_free(bdata); } @@ -1144,7 +1146,7 @@ void qtest_bufread(QTestState *s, uint64_t addr, void *data, size_t size) size_t len; qtest_sendf(s, "b64read 0x%" PRIx64 " 0x%zx\n", addr, size); - args = qtest_rsp(s, 2); + args = qtest_rsp_args(s, 2); g_base64_decode_inplace(args[1], &len); if (size != len) { @@ -1174,14 +1176,14 @@ void qtest_memwrite(QTestState *s, uint64_t addr, const void *data, size_t size) } qtest_sendf(s, "write 0x%" PRIx64 " 0x%zx 0x%s\n", addr, size, enc); - qtest_rsp(s, 0); + qtest_rsp(s); g_free(enc); } void qtest_memset(QTestState *s, uint64_t addr, uint8_t pattern, size_t size) { qtest_sendf(s, "memset 0x%" PRIx64 " 0x%zx 0x%02x\n", addr, size, pattern); - qtest_rsp(s, 0); + qtest_rsp(s); } void qtest_qmp_assert_success(QTestState *qts, const char *fmt, ...)