From patchwork Thu Sep 3 11:21:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 248991 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp348996ilg; Thu, 3 Sep 2020 04:21:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwO+6qUFp3rfmZ6GqykTwaCC8NWDchj2NATYQbuEJu9m2FKcdewXBlIg5vGnJt9wBW+es8R X-Received: by 2002:a25:6808:: with SMTP id d8mr2014959ybc.265.1599132085284; Thu, 03 Sep 2020 04:21:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599132085; cv=none; d=google.com; s=arc-20160816; b=QskQjo3MbN5c31Y1tIKywEwgkWHBwWZ6ZCXIatSqmSZaf8/YAfxGC8OW/6qHP6k9k6 e8Nb/UXo6/DiWlJA8NOqk2h+YZhL6HOdLSkco1dFLjFAiyUdLbriyy1E2EKa2X13QGgm hp/QMr50Sl/jGQpCeKdx5PHJhBljGGilAVPvmkiISoxJOqTaAq5DKRO/Wy6CrdVpdRfX HbabDuKfRgxO7FY438cN22P/TcVMLzYCHMAG7J3qFZCi359c7NE4yNElrV8PzAT9abNn MVWEQEdmbML+AQRuY51qGDgi5Nf9yP4RZLRRRWUFDs0UjJGFHyTo1P9aa8XSI8UjyT+I VfCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=3s9Lh9SuoJBT80PUo0orwYBl9/LamoZzVpQf4w/nqoI=; b=oQcZ0rJKhYxizk2fLrkhATmqpGoedcwluRujYYgOwWhTt3ZuQxK0MjYUYNGWlVW8ob FYbKV+T5anUxTQgeh3jN5cqSmEpWs4h02lPWK0kUNwloxkdIAjN+3e17cijGxVh+vav5 BllD84ITaCVeeqhDYsl0rBxIKRhZ7wKGbENU1uMtDv7Y/twEan21R+uo79bbr5VlKPK7 1XXfT08YDGfXlgZ1VGgMwUvp9kThIis3sYpWglN0gqDk+dL2KcePM1X9GZO4y4uJmMW8 suB2m/Hb6GV5A0ysD8P2QlXBfsrLtBdbuNfpZJmG91m+vwvuvgekvJdKALoFWke/7CVZ xurA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="jaCLO/l9"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k134si2000164ybk.215.2020.09.03.04.21.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Sep 2020 04:21:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="jaCLO/l9"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDnIy-0002Rc-L8 for patch@linaro.org; Thu, 03 Sep 2020 07:21:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDnIn-0002PS-He for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:13 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:36345) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDnIl-0007Ym-MM for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:13 -0400 Received: by mail-wr1-x444.google.com with SMTP id z1so2822581wrt.3 for ; Thu, 03 Sep 2020 04:21:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3s9Lh9SuoJBT80PUo0orwYBl9/LamoZzVpQf4w/nqoI=; b=jaCLO/l9mIRhNmiQJdUnQk9OxdfYDXeIv76Wq5ChLQDA6An5SvICISX/a6k5Q+Ee3x QvW+m/uTUUtmGyhX01vO5gITrGOu4HeCQkP9CP6x6vGtM4o/oRyMXQgYRUSBGKtzA/h0 elB23/zv9rCvouuIjlRpEB/G6ABVr3Y0oXahli7gHKcuB2nTZHKgNnQDLsNvwCodZMjI KEZdnvCCqwDPCxUBs6fiUCGRpZGvrsdj0YCU7Z2ZCdC86NcAhNAb+Gulh9sMlA1avNVr EZjy1ExDCbukJTk0XHocKQfF3LE0++0t/ByM73idRxjjhOxaVAon8aUXuStPBVUPgNvI ecfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3s9Lh9SuoJBT80PUo0orwYBl9/LamoZzVpQf4w/nqoI=; b=siWBC/uvRzEgmE6XhoD1zcf0DAZg5MsnTntlKpsbFy84+Nf6rN3uHbfcxi5UEMkiyh wKZxPsbAtvmdCNmAsZehxV17qVty63JVGwQ5UAA+F7fRcCdnAFSyihed9uhfqew08BSv mfvSIOl6+QH76txKhjrbD3z01gECMjKDTSkRYo8F849BUeUOGvB/D67ICnBfe6aqj8Af r8dZrIQJXb7h8WnoBHZL2EeommtWeGlE8CLCTyDziXs9Wled+r4oLs+RmtzAxs2y6dKo 7HazTctgq3ZdOhG+n1xRTPav5hXFujCPJvjmYpLzRBMlVpXNrzo5i2J/DyvZ4uv0yQxk ILug== X-Gm-Message-State: AOAM530bGrfDYm5VWOzVBPmNUdGvy9pGKTMbHr6S3O2wL/lDkH5APC7m 9YwJiMSWDD/FsxqAhneD+9TOhw== X-Received: by 2002:adf:82cb:: with SMTP id 69mr1957623wrc.222.1599132070341; Thu, 03 Sep 2020 04:21:10 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q15sm4393314wrr.8.2020.09.03.04.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 04:21:08 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C71CD1FF87; Thu, 3 Sep 2020 12:21:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 1/8] CODING_STYLE.rst: flesh out our naming conventions. Date: Thu, 3 Sep 2020 12:21:00 +0100 Message-Id: <20200903112107.27367-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200903112107.27367-1-alex.bennee@linaro.org> References: <20200903112107.27367-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: fam@euphon.net, berrange@redhat.com, stefanb@linux.vnet.ibm.com, =?utf-8?q?Alex_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, stefanha@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Mention a few of the more common naming conventions we follow in the code base including common variable names and function prefix and suffix examples. Signed-off-by: Alex Bennée --- v2 - punctuation fixes suggested by Cornelia - re-worded section on qemu_ prefix - expanded on _locked suffix v3 - re-order phrasing around qemu_ prefix - drop "while actual..." shortname examples squash! CODING_STYLE.rst: flesh out our naming conventions. --- CODING_STYLE.rst | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/CODING_STYLE.rst b/CODING_STYLE.rst index 427699e0e42..fd8ce9ceaba 100644 --- a/CODING_STYLE.rst +++ b/CODING_STYLE.rst @@ -109,8 +109,35 @@ names are lower_case_with_underscores_ending_with_a_t, like the POSIX uint64_t and family. Note that this last convention contradicts POSIX and is therefore likely to be changed. -When wrapping standard library functions, use the prefix ``qemu_`` to alert -readers that they are seeing a wrapped version; otherwise avoid this prefix. +Variable Naming Conventions +--------------------------- + +A number of short naming conventions exist for variables that use +common QEMU types. For example, the architecture independent CPUState +is often held as a ``cs`` pointer variable, whereas the concrete +CPUArchState is usually held in a pointer called ``env``. + +Likewise, in device emulation code the common DeviceState is usually +called ``dev``. + +Function Naming Conventions +--------------------------- + +The ``qemu_`` prefix is used for utility functions that are widely +called from across the code-base. This includes wrapped versions of +standard library functions (e.g. ``qemu_strtol``) where the prefix is +added to the library function name to alert readers that they are +seeing a wrapped version. + +Public functions from a file or subsystem (declared in headers) tend +to have a consistent prefix to show where they came from. For example, +``tlb_`` for functions from ``cputlb.c`` or ``cpu_`` for functions +from cpus.c. + +If there are two versions of a function to be called with or without a +lock held, the function that expects the lock to be already held +usually uses the suffix ``_locked``. + Block structure =============== From patchwork Thu Sep 3 11:21:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 248994 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp350031ilg; Thu, 3 Sep 2020 04:23:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTO0xeWEcycveWLFZIcIxR/vvuvfy60+4BsAieJcyW6GAud0w4fy0GdY9YxDrmYTb9sY+W X-Received: by 2002:a5b:450:: with SMTP id s16mr2046195ybp.237.1599132179941; Thu, 03 Sep 2020 04:22:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599132179; cv=none; d=google.com; s=arc-20160816; b=GiaXUPcz7VSq1uCR1YcSlp5C4egndXHcpfi2v5NjWq9EZ+Cp7cEqTf752mdaXDT1S2 GuO5KsSbz+CH2cxOFsse/D8YItXoItfBotdernhxnvuMNGAp1S7N2cwjSBKk2mh8awBr vDOUMqzdJWUg9iDgDVPZ72qOrCugFk5K1YDlwAFntQPq67RRQUNjz95T4B0FTRY02RDw QDEnsiHw7l9VPoU0wqRwumBXQwjdzBykrLK51BN1n3WRqJTGBcJFfVcKT8LfOmdUnerA M0xP2c8HQ/rz75sFaLuSDatmRFzWhd5ibb0oKz2IAnGvvYtUTs504pLXts7huCnKytRv Mmrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=z5RvT4eB7MnQELSA2qZHA1d+KPyyThIlq3rK75djlgU=; b=H7qRHd+eFdNaUCG1v3O6li92rk+VsBhbLHzYhGU7RJeuVntreVZPc6QU6hq2XAb8Zq vtr7b2I8M3nf9QFNP5gK+azkVU5GfSSBI1QmFMHf6y0yzsuetSfT1igxuyvt+bPBXZd1 YpJdo3bwFWhVK7Pn1NodSeIoeye4GOd0L7XDgozZySiqxM4ri0IzXo2nWW34XByUOvlX OoWTKfCuXyQcaadt7fyJgUadhmfnHMFQEjPlPyJt7V16D1uOFUr9la3dAlPr3UrfAtl4 /+NsP3rYsTOn4raabCNPn1NjB/wTLhFa/G1/fMSWzQWSDVh0hdmGs7Ug8eV1X88rlX4s BffA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X6GtVzYW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z14si1021763ybp.423.2020.09.03.04.22.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Sep 2020 04:22:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X6GtVzYW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDnKV-00051K-ES for patch@linaro.org; Thu, 03 Sep 2020 07:22:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDnIp-0002Rq-UD for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:15 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:55513) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDnIo-0007ZB-0G for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:15 -0400 Received: by mail-wm1-x330.google.com with SMTP id a65so2459391wme.5 for ; Thu, 03 Sep 2020 04:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z5RvT4eB7MnQELSA2qZHA1d+KPyyThIlq3rK75djlgU=; b=X6GtVzYWz+SPJh7EUuaGmaf+o6y55m2OL85XdfGSbHoDWVCmjqRCS+CJGFQ3P0v4RO pzc4mogmTeB/dmYuIghrn/jj50TuOVpnsLCt6Okkbvd9i3cCQRY5ljPJjPhURM+n56TG tkk/g+mdtmAeC6JRtmvUDhHCkc8/S0HYj2kvG41rxVr3dN0ysAiTl+gzwjYqBrZtojST f1CYO8qtQc+q+hGKBIgMubSYbPt1JkoxBPZs4Cjbqitx3k3hO2KQf8eRx0yW/f4rwvVl LXmtNDV7hrZ2+OBZiIoJ+EnD3vf23s/8qOWYWWdbEY9qs+RwgOH5HLQc99Ce2ddlqG2C ARNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z5RvT4eB7MnQELSA2qZHA1d+KPyyThIlq3rK75djlgU=; b=Yp1JUvRz3P/79JVUo9sf4U7zoMcORPnjVU/H/oPOYf3yw8M079p3S5INJihYw3CY1M wSR6uEhquNhVFPPNT1/aX3HbQuHfp3Ap738qksugzZ1Cn2Znf4lXRjqsYYFPJHJytnwP jLfxOjd4LCR1p4X4IzQeGaJ32ddTGFbx+8FAwr5QFTg1dmEdmOEIiEtlZ+aeKIOd/oMN X7OnsPE1pZR7S2qmSjRjtNV5YOawpCblP0ARMHg51IcdmQ2Ro/SFwTdB3kkDMD1tUJ1a 4aOg+o4vcd3HWtJyp+kJSn4TnUtgcPwb/rhggehkUvv7/1jJZPk1BcBCWP7KkAsXutXM gzwA== X-Gm-Message-State: AOAM532OcmnW5TY9nSHpuQYBvMV4DPLwOs8veJP23NfCuaCCu9ZMCWN/ iffR+qT4jtwh73iYpeR+1ruSHA== X-Received: by 2002:a7b:c38f:: with SMTP id s15mr963802wmj.16.1599132072571; Thu, 03 Sep 2020 04:21:12 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e18sm3977022wrx.50.2020.09.03.04.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 04:21:08 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E2F161FF8C; Thu, 3 Sep 2020 12:21:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 2/8] crypto: fix build with gcrypt enabled Date: Thu, 3 Sep 2020 12:21:01 +0100 Message-Id: <20200903112107.27367-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200903112107.27367-1-alex.bennee@linaro.org> References: <20200903112107.27367-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: fam@euphon.net, berrange@redhat.com, stefanb@linux.vnet.ibm.com, =?utf-8?q?Alex_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, stefanha@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé If nettle is disabled and gcrypt enabled, the compiler and linker flags needed for gcrypt are not passed. Gnutls was also not added as a dependancy when gcrypt is enabled. Attempting to add the library dependencies at the same time as the source dependencies is error prone, as there are alot of different rules for picking which sources to use, and some of the source files use code level conditionals intead. It is thus clearer to add the library dependencies separately. Signed-off-by: Daniel P. Berrangé Signed-off-by: Alex Bennée Message-Id: <20200901133050.381844-2-berrange@redhat.com> --- configure | 2 ++ crypto/meson.build | 42 +++++++++++++++++++++++++++++++----------- meson.build | 5 +++++ 3 files changed, 38 insertions(+), 11 deletions(-) -- 2.20.1 Tested-by: Richard Henderson Reviewed-by: Richard Henderson diff --git a/configure b/configure index cc9af723580..1f61e363a18 100755 --- a/configure +++ b/configure @@ -6953,6 +6953,8 @@ if test "$gcrypt" = "yes" ; then if test "$gcrypt_hmac" = "yes" ; then echo "CONFIG_GCRYPT_HMAC=y" >> $config_host_mak fi + echo "GCRYPT_CFLAGS=$gcrypt_cflags" >> $config_host_mak + echo "GCRYPT_LIBS=$gcrypt_libs" >> $config_host_mak fi if test "$nettle" = "yes" ; then echo "CONFIG_NETTLE=y" >> $config_host_mak diff --git a/crypto/meson.build b/crypto/meson.build index 18da7c8541d..f6f5ce1ecd0 100644 --- a/crypto/meson.build +++ b/crypto/meson.build @@ -23,24 +23,35 @@ crypto_ss.add(files( 'tlssession.c', )) -if 'CONFIG_GCRYPT' in config_host - wo_nettle = files('hash-gcrypt.c', 'pbkdf-gcrypt.c') +if 'CONFIG_NETTLE' in config_host + crypto_ss.add(files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c')) +elif 'CONFIG_GCRYPT' in config_host + crypto_ss.add(files('hash-gcrypt.c', 'pbkdf-gcrypt.c')) + if 'CONFIG_GCRYPT_HMAC' in config_host + crypto_ss.add(files('hmac-gcrypt.c')) + else + crypto_ss.add(files('hmac-glib.c')) + endif else - wo_nettle = files('hash-glib.c', 'pbkdf-stub.c') -endif -if 'CONFIG_GCRYPT_HMAC' not in config_host - wo_nettle += files('hmac-glib.c') + crypto_ss.add(files('hash-glib.c', 'hmac-glib.c', 'pbkdf-stub.c')) endif -crypto_ss.add(when: [nettle, 'CONFIG_NETTLE'], - if_true: files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c'), - if_false: wo_nettle) crypto_ss.add(when: 'CONFIG_SECRET_KEYRING', if_true: files('secret_keyring.c')) crypto_ss.add(when: 'CONFIG_QEMU_PRIVATE_XTS', if_true: files('xts.c')) -crypto_ss.add(when: 'CONFIG_GCRYPT_HMAC', if_true: files('hmac-gcrypt.c')) crypto_ss.add(when: 'CONFIG_AF_ALG', if_true: files('afalg.c', 'cipher-afalg.c', 'hash-afalg.c')) crypto_ss.add(when: 'CONFIG_GNUTLS', if_true: files('tls-cipher-suites.c')) +if 'CONFIG_NETTLE' in config_host + crypto_ss.add(nettle) +elif 'CONFIG_GCRYPT' in config_host + crypto_ss.add(gcrypt) +endif + +if 'CONFIG_GNUTLS' in config_host + crypto_ss.add(gnutls) +endif + + crypto_ss = crypto_ss.apply(config_host, strict: false) libcrypto = static_library('crypto', crypto_ss.sources() + genh, dependencies: [crypto_ss.dependencies()], @@ -52,12 +63,21 @@ crypto = declare_dependency(link_whole: libcrypto, util_ss.add(files('aes.c')) util_ss.add(files('init.c')) + if 'CONFIG_GCRYPT' in config_host util_ss.add(files('random-gcrypt.c')) elif 'CONFIG_GNUTLS' in config_host - util_ss.add(files('random-gnutls.c'), gnutls) + util_ss.add(files('random-gnutls.c')) elif 'CONFIG_RNG_NONE' in config_host util_ss.add(files('random-none.c')) else util_ss.add(files('random-platform.c')) endif + +if 'CONFIG_GCRYPT' in config_host + util_ss.add(gcrypt) +endif + +if 'CONFIG_GNUTLS' in config_host + util_ss.add(gnutls) +endif diff --git a/meson.build b/meson.build index 55c7d2318cd..9b5076452b2 100644 --- a/meson.build +++ b/meson.build @@ -116,6 +116,11 @@ urcubp = not_found if 'CONFIG_TRACE_UST' in config_host urcubp = declare_dependency(link_args: config_host['URCU_BP_LIBS'].split()) endif +gcrypt = not_found +if 'CONFIG_GCRYPT' in config_host + gcrypt = declare_dependency(compile_args: config_host['GCRYPT_CFLAGS'].split(), + link_args: config_host['GCRYPT_LIBS'].split()) +endif nettle = not_found if 'CONFIG_NETTLE' in config_host nettle = declare_dependency(compile_args: config_host['NETTLE_CFLAGS'].split(), From patchwork Thu Sep 3 11:21:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 248993 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp350009ilg; Thu, 3 Sep 2020 04:22:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvtq0dmA6Xlul+RJNBhdrpV3DeFOiinzq1YQlfeHR9BrE0c+x8xnLhoHUWD3rH+tqSfawS X-Received: by 2002:a25:902:: with SMTP id 2mr1884994ybj.366.1599132178675; Thu, 03 Sep 2020 04:22:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599132178; cv=none; d=google.com; s=arc-20160816; b=USTECi7qnrIfThdUwtqCfRXs3PDoUUCVq4CTfBIvRn4xdYi1Cfb/PaxHC+g9vWmzaN a07UV/1MxxnoibL4TAAsXpNb6bWSgIVgzfCeM7+7JDYks8lkWzrFjayP3iXH5ab2J/1K vSV71+6U3yz8Ez2KWcOsmgEauZzXU9n3ChzlqgsJFW0LHv7+6Z9g2sJx+pr/DyCROLJ3 VB8jOjtWfxqnpfgie/ciX7nfoo/9HNZJGqwNImceGjgfX/GDHgXC5YEuBa5qOWn5+2YF fZm7GKLvWVOdR262/J5N1kKevyvYqG+HWgJq95y7L0+pL1UGks7KQxObeQsU+Jkoj35j XREg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=yx117BKiV22Q73t4X6K8k+bAWttmepupVY+4lQVfzhA=; b=rOw/TmMOlZPn+KLcQP620Z5V3Zo/UorJs70lSA/FDGky5DWlN9HszjX8muLrVGCzoc qxESqUS93kWiD2a3icqKtw4nXnLbn/ik08jLcfR7r/RHfOlOLVPHdnHS53vuzwZqz+aO qE/JKgk2zuuDDXXy0pqCVybSasjJnDr1UxtMIXq+dZd4UZ3ikYNoU3Vc8q1LO7g0ES63 /Xdp+G43m9KEsTSTY/wVKdyRo7Zie+n9iimjCGGPV2UG8Pi4ZfVMq4zlfz+FYgJNn9zL eb7zcZ0q6qox54BnwJF3JG2o4HlKA2sAICj0nD5vhDycCYaEnRUK6lVp2q43xIUd99wa v9hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jqdjz3Oj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p9si3025204ybe.353.2020.09.03.04.22.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Sep 2020 04:22:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jqdjz3Oj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDnKU-0004wt-5x for patch@linaro.org; Thu, 03 Sep 2020 07:22:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDnIr-0002VR-PC for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:17 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:34865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDnIq-0007ZR-1B for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:17 -0400 Received: by mail-wm1-x32a.google.com with SMTP id o21so2518204wmc.0 for ; Thu, 03 Sep 2020 04:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yx117BKiV22Q73t4X6K8k+bAWttmepupVY+4lQVfzhA=; b=jqdjz3OjPBvO/kBpkhyV+3iLnJOMUDlSYj0vVhB5PgwvLyxUH8dSXfiK2iXagh58Ei zls0/kTn77HispDdMmMes+JeU9ooaQZ3mlKKMnavTkqB84Grz5AAzOM19nE76+6I03Wr Le/sebSh90fnqWD5hYrsGp6KtBx8YKqJyQd9ECitMWd8S1IZ8wB51/NzFHgZXazVwwBn V2KgTF3g89ZMwTO1QX2Wk6tGjVk2qPkNldXCTFZcNK4YRiHRGyO9b7taEY+lXYlkaSDc ojOEv/yUzbeo8dBfiVHqzYg4llVoDNsQYqDwHV9cNR0HwH4OfDSx4Pc682aEPc9O94MS F2Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yx117BKiV22Q73t4X6K8k+bAWttmepupVY+4lQVfzhA=; b=oC52rTFG42I+BqupNhrJrad90KOWuB1b8pOJGbq1aicA/Mcg3X2pBBIQz2ai52pe3i m5yKX2FoJ6hP9ZSpc2iM1SO74F2iYPIMtAX4LqHYkArFWkGJFmK6o+YxWrmjSeCYva4w E0mLU2FKs+cvUOvoJo0PBYGQe+MbGhDYka7tWxvsKDupEPSwSbdcMDqjV+lxZzxiTTqS JfMg1Qhi1UXUVppMDq3+PYTTvxhuSoxORZiL/vQXtkbqVXIjgQ/Eckp7DTEch2xy1FjN S9eRM14dhnGoltwkibwVneBnbyVxiWUzBd9bm4hQYpaldq9YtXfQoj6eluoEbwYRISyQ aUlQ== X-Gm-Message-State: AOAM533jaCfNELIAubA/YNZ5vFj91SfnIqkSLmobelbTLzMXYMw7mCTU nHBTo1N6rAbDe7zyhafMMtw6Bg== X-Received: by 2002:a1c:e256:: with SMTP id z83mr2097421wmg.137.1599132074579; Thu, 03 Sep 2020 04:21:14 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n17sm638180wrw.0.2020.09.03.04.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 04:21:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 093F41FF8F; Thu, 3 Sep 2020 12:21:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 3/8] tests/docker: add python3-setuptools the docker images Date: Thu, 3 Sep 2020 12:21:02 +0100 Message-Id: <20200903112107.27367-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200903112107.27367-1-alex.bennee@linaro.org> References: <20200903112107.27367-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: fam@euphon.net, berrange@redhat.com, stefanb@linux.vnet.ibm.com, =?utf-8?q?Alex_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, stefanha@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We need these now for builds to work. Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/debian10.docker | 1 + tests/docker/dockerfiles/debian9.docker | 1 + 2 files changed, 2 insertions(+) -- 2.20.1 Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé diff --git a/tests/docker/dockerfiles/debian10.docker b/tests/docker/dockerfiles/debian10.docker index bcdff04ddfe..e3c11a454ee 100644 --- a/tests/docker/dockerfiles/debian10.docker +++ b/tests/docker/dockerfiles/debian10.docker @@ -29,6 +29,7 @@ RUN apt update && \ pkg-config \ psmisc \ python3 \ + python3-setuptools \ python3-sphinx \ texinfo \ $(apt-get -s build-dep qemu | egrep ^Inst | fgrep '[all]' | cut -d\ -f2) diff --git a/tests/docker/dockerfiles/debian9.docker b/tests/docker/dockerfiles/debian9.docker index 0f0ebe530af..3edb5147ef3 100644 --- a/tests/docker/dockerfiles/debian9.docker +++ b/tests/docker/dockerfiles/debian9.docker @@ -28,4 +28,5 @@ RUN apt update && \ pkg-config \ psmisc \ python3 \ + python3-setuptools \ $(apt-get -s build-dep qemu | egrep ^Inst | fgrep '[all]' | cut -d\ -f2) From patchwork Thu Sep 3 11:21:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 248995 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp351292ilg; Thu, 3 Sep 2020 04:24:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYeYzynRDy2DvCLqOaaNPink3YO21pFdgcj6uRf4BP1v/5WNtckmYphp0QDrwl6vyqhlXC X-Received: by 2002:a25:2fcc:: with SMTP id v195mr1763439ybv.145.1599132287519; Thu, 03 Sep 2020 04:24:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599132287; cv=none; d=google.com; s=arc-20160816; b=KDTOF9yVCp7dyKEroEKSgzCoPIh1FSiT9muagLtyu1VGE/sFfDAncZriWrmL2V3w1B 6G2m3/HbGjqLh6gKcsr8RKfb4Y0+DZvL5cwSZBuuurJbGq+Fm6bHsX9G/uQGEGSXLKwk oX36QQAgFsM2gB998gDe97LQ1pcQRjAoUkeC8q4sQIDBWVmp6+VF9Q5+J5XZhM9JIITT pHbgB1YcTQYvHF8Y82lg6kmxj9paCM8ouz/AuadL6bdH9ffa2Tw1IXBh/WOH38Sv3rke meDSAjDBubOEVw4q0lUv17TEGUvE7gCBe1FxX/coIniXdNlpUcz1zZ9xNKUtVN//A83E cwkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=UfLmeyinwTfx2td9nAoql0B4G0Y9Mq+vo4wZTVDMAU8=; b=zyuhScVUaQompPW3BsOZw2tbRDWzELfNvRLCAQDz6f8HDvKDM5twMrchwD72opUnSm FnZLxsMGM3tQdtoUiZfMoZdijBAifX/ylQEYMbLl5Ku1ltXwVnKGB9HXx6vf2W4EWs08 VsYwyoF59QAfd6H84evaIRV2hSFlTzfIIgTzAXhJ+NVaUXINUq8xwUtwgtKKKF6T2q8p z19GL9FzZmtwb97OlXq9n+Mx2OV0nOU2OSFcuowbV4BJEjUl+9yEL8ZHIdZX6NPsTB1I emtQsr6FLBgXDkASYnrZ31aZe0K7aoUpZAp4NbsVPQUjoW6NJBW81IbWNcujKs1ILtfg yXaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=wF0awVtB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l9si2466306ybb.254.2020.09.03.04.24.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Sep 2020 04:24:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=wF0awVtB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDnMF-0007ts-25 for patch@linaro.org; Thu, 03 Sep 2020 07:24:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDnIs-0002X5-Ns for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:18 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:44984) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDnIq-0007ZZ-Vy for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:18 -0400 Received: by mail-wr1-x443.google.com with SMTP id c15so2748623wrs.11 for ; Thu, 03 Sep 2020 04:21:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UfLmeyinwTfx2td9nAoql0B4G0Y9Mq+vo4wZTVDMAU8=; b=wF0awVtBYPJArW7TWAsBK0ccboGjoqzO51X6s9PioA8XT0x5TU38ibBcQUNAYmYOxu GgwA74/wL4FSNIrLZSSeTNfCYPLExPlJN/+MdvMgeZAkk/+qlH3MMSTmSiheRSaiXtV+ a+6vpjsMHlhcKpMtJVup9CjjVJtMluPt+NuncRGroynfPrAGVS48n267uEWa/VK8VFP3 KvgC4MCfA/qLkljDvYujZ6MfKn7L2CA/G1X5A5O6YE/dO6Pjvo2rnpNeM0xI2aDcoyhz bGmLliAu6SNt84YjaUgKvAIr2HDbo4t7Soq+BZGdZSiGvg7DmW7z0VrE0U7Y12splMSJ oUug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UfLmeyinwTfx2td9nAoql0B4G0Y9Mq+vo4wZTVDMAU8=; b=PYNfEqDHhi6gq/KUvvVpi9QGQTLtUd0PJoEdF/WuTtor7q0qZKxKTkR31jEewhyOaf /3MQoq/J/eAtaKAqE14qb5Rk4drXqMEy5skm+4BmaMyyqPddKTN8bNPtyb5eZdUK/Ot+ feRUwGQ30o1scMrbJaIsGiC7IEG6k6bUhVGt3ziTrtG5zem1qzf0hPYbLv9R9PQ0Djty g9dqTA2AuzQV3KoasHOa050bQUpKXK2A/ZksO/gyZ1Q38FUXN+0UW1DxDcCM4HUZDjkL l9udFA+5LgjgcA1/Cs7slm4G0oxcUXiTqCdcI1XnXB4joBWbIUs21dioMu6R1X2tPyRl lXAQ== X-Gm-Message-State: AOAM533m8Uk6wGYSyY2NyRcnltK5uixVtjqOjTZDzzeeiB1QqkQSgnO7 eyLDKkKwQwneVfwVu9c+rXUlfQ== X-Received: by 2002:adf:f3c6:: with SMTP id g6mr2091917wrp.340.1599132075605; Thu, 03 Sep 2020 04:21:15 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 2sm3825191wrs.64.2020.09.03.04.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 04:21:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 217B51FF90; Thu, 3 Sep 2020 12:21:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 4/8] usb-host: restrict workaround to new libusb versions Date: Thu, 3 Sep 2020 12:21:03 +0100 Message-Id: <20200903112107.27367-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200903112107.27367-1-alex.bennee@linaro.org> References: <20200903112107.27367-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::443; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: fam@euphon.net, berrange@redhat.com, stefanb@linux.vnet.ibm.com, =?utf-8?q?Alex_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, Gerd Hoffmann , stefanha@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Fixes build failures with old kernels (USBDEVFS_GET_SPEED missing), on the assumtion that distros with old kernels also have old libusb. Reported-by: Alex Bennée Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20200902081445.3291-1-kraxel@redhat.com> --- hw/usb/host-libusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 08604f787fd..c5d38cb09c0 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -942,7 +942,7 @@ static int usb_host_open(USBHostDevice *s, libusb_device *dev, int hostfd) usb_host_ep_update(s); libusb_speed = libusb_get_device_speed(dev); -#ifdef CONFIG_LINUX +#if LIBUSB_API_VERSION >= 0x01000107 && defined(CONFIG_LINUX) if (hostfd && libusb_speed == 0) { /* * Workaround libusb bug: libusb_get_device_speed() does not From patchwork Thu Sep 3 11:21:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 248997 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp352311ilg; Thu, 3 Sep 2020 04:26:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCpvr8zu7xRJAFZfTLhZZR21rao/2kwAj0CNDwl3ohFPuSx0J2t91wUeiPEkDxH5KNF/pT X-Received: by 2002:a25:8812:: with SMTP id c18mr2233822ybl.330.1599132383295; Thu, 03 Sep 2020 04:26:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599132383; cv=none; d=google.com; s=arc-20160816; b=F+TLXiAxOeoA1hEJDgKnN8klAx3agpXDHR/G/AC0nBbr9pUjQ7oHOCoD/TTpFdOFDa 1JeLDQFNn+2flZlVvO91AYktcQCxdaCK2y5gBOoGKgB0buIhabglSoI5kAJP/uXd+zT3 dzt6EfuNXkwhZ0zGSpl+DUNvW9GVGps6GxgwIcH+Y326+TiipPhtbs2sYBffk8xyR/lc /qgVGVFtqfDI2P3QbRqwRGpPm6ECsC8Syw21VPjl2Gwf5/fFr0UILbvXSlogDPkwJmkT EacAzmOQQSESB+Q3kqulC0ajo36eQ6sA4wsMB4EhS0YPjFKYD31rHTcPIoje7oIG7iBj SFsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=PKpstIcY7X4muCx/xVveAt+vF3elxwMvmZRPrfN9dSs=; b=vH+7cE7MSpwa9NRfdALd0ed5PgRiCRvJ7/dV3GDRwTFUtu5+pWvbTXQdWnfYci/PJL +OnC9OeNH5IeaDe/ZZpRxE9yHDLhszCsQT4jRl5zfhbN+yLFPtkGGCGWkkMoRpBh0mh0 ozzdwgdQ+yuiSya/ouqGzKAdNcrshgudSL3eBoPz7Gnik/oOvpGko2ROCl8BO36+SGaz lzaGb95FGP4rIiaUlyhAWmfs5pl0bLUKm7vfwdGUGAOzAp2MtQRNwPb5YoIMPG2XsdJ3 tNKf/FHPk+vd3rkQlYyWp/6LOfDIxm3Dw7SOyrpZjFiaOK7I0ubhOv4SPPHx4mGF2ORV 0Q1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jpLlMGhv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x2si2593348ybi.149.2020.09.03.04.26.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Sep 2020 04:26:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jpLlMGhv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDnNm-00027k-Qe for patch@linaro.org; Thu, 03 Sep 2020 07:26:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDnIv-0002bg-7O for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:21 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:54204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDnIt-0007Zo-3s for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:20 -0400 Received: by mail-wm1-x334.google.com with SMTP id u18so2476043wmc.3 for ; Thu, 03 Sep 2020 04:21:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PKpstIcY7X4muCx/xVveAt+vF3elxwMvmZRPrfN9dSs=; b=jpLlMGhvqRrbHJhLHm6S3PZrHwfXAZqWlfOx8zQCpZtQgAMUYmZ8ODF+wm9ATlYwAz xog77rfIIr1MbjXXW5PcGRbx7pOkckQXwUsw/JsSixbhqOA1zKeO/LWmktvBQsLfS5Op nt4f9JSOelcf+4DpGOxFJiYo/wlWvg5L7fmOli4UbZeLIIxcUyQdBQW0ib29Bxtd0p2y RaLkHsn3YJthEbyT/bBpDWqlnKSqdz2us/mCotrWFAlEJaJ9InGwtTau3pF37Qctap9T hrZfTWYbTX8cg9x5uxJqiMMMuiKKJnarWRU5F9YDDqkh0iFq6gW95ybu1OAv86yeoatl TAdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PKpstIcY7X4muCx/xVveAt+vF3elxwMvmZRPrfN9dSs=; b=eD6VMBV4+MxHBfjXdkoK5HmcMzGTnA+Eacz5s5DxGZT/ongPRhSmmHcydjsFpIcr0O UfcJNW59IIC4FYXx7FEk1fXI6/Xr5Vk+DIRVVRKcmdMLfOisPUgeV58KoFUJChUOMkpO 96fjFuGQ2tIU7P6edRSU4LwCET5BwmkgZ2fpFHFJdAa0gClnYCwvE1Bc6u9WdUQQ7ME9 TCyqv/LpPSHnIe7bNElG4wzzZadi+azM2f8pnemrJHvKwq0TsFNxMugZHeJAjubA94H8 4/Fh5rE3HcN/ou1Ak3Z9kNB9SUG67en08cZ1mc/F3fpjrrD8pH08NVkB6pqfNVFoxwms oK1g== X-Gm-Message-State: AOAM531yUCnzlrFDXMsANTDODWd+Fjkk2pCUfnrWsX9FxX1LEoamdu7t YbgjPCfwN+v2uq35iHAn31KZvQ== X-Received: by 2002:a1c:7418:: with SMTP id p24mr1970872wmc.123.1599132077590; Thu, 03 Sep 2020 04:21:17 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o2sm3907598wmo.37.2020.09.03.04.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 04:21:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3E7EE1FF91; Thu, 3 Sep 2020 12:21:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 5/8] qemu-iotests: move check-block back to Makefiles Date: Thu, 3 Sep 2020 12:21:04 +0100 Message-Id: <20200903112107.27367-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200903112107.27367-1-alex.bennee@linaro.org> References: <20200903112107.27367-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: fam@euphon.net, Kevin Wolf , berrange@redhat.com, "open list:Block layer core" , stefanb@linux.vnet.ibm.com, =?utf-8?q?Alex_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, Max Reitz , cota@braap.org, stefanha@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Paolo Bonzini check-block has its own test harness, unlike every other test. If we capture its output, as is in general nicer to do without V=1, there will be no sign of progress. So for lack of a better option just move the invocation of the test back to Makefile rules. As a side effect, this will also fix "make check" in --disable-tools builds, as they were trying to run qemu-iotests without having made qemu-img before. Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée Message-Id: <20200902080046.10412-1-pbonzini@redhat.com> --- meson.build | 2 -- tests/Makefile.include | 15 ++++++++++++--- tests/qemu-iotests/meson.build | 4 ---- 3 files changed, 12 insertions(+), 9 deletions(-) -- 2.20.1 diff --git a/meson.build b/meson.build index 9b5076452b2..599306f59ad 100644 --- a/meson.build +++ b/meson.build @@ -1100,11 +1100,9 @@ if have_tools dependencies: [authz, block, crypto, io, qom, qemuutil], install: true) qemu_io = executable('qemu-io', files('qemu-io.c'), dependencies: [block, qemuutil], install: true) - qemu_block_tools += [qemu_img, qemu_io] if targetos != 'windows' qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'), dependencies: [block, qemuutil], install: true) - qemu_block_tools += [qemu_nbd] endif subdir('storage-daemon') diff --git a/tests/Makefile.include b/tests/Makefile.include index 9ac8f5b86a6..08301f5bc9b 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -468,7 +468,6 @@ check-tcg: $(RUN_TCG_TARGET_RULES) .PHONY: clean-tcg clean-tcg: $(CLEAN_TCG_TARGET_RULES) - # Python venv for running tests .PHONY: check-venv check-acceptance @@ -523,8 +522,18 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images # Consolidated targets .PHONY: check-block check-unit check check-clean get-vm-images -check-block: -check-build: build-unit +check: + +ifeq ($(CONFIG_TOOLS)$(CONFIG_POSIX),yy) +QEMU_IOTESTS_HELPERS-$(CONFIG_LINUX) = tests/qemu-iotests/socket_scm_helper$(EXESUF) +check: check-block +check-block: $(SRC_PATH)/tests/check-block.sh qemu-img$(EXESUF) \ + qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \ + $(patsubst %-softmmu,qemu-system-%,$(filter %-softmmu,$(TARGET_DIRS))) + @$< +endif + +check-build: build-unit $(QEMU_IOTESTS_HELPERS-y) check-clean: rm -rf $(check-unit-y) tests/*.o tests/*/*.o $(QEMU_IOTESTS_HELPERS-y) diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build index 3de09fb8fab..60470936b45 100644 --- a/tests/qemu-iotests/meson.build +++ b/tests/qemu-iotests/meson.build @@ -4,7 +4,3 @@ if 'CONFIG_LINUX' in config_host else socket_scm_helper = [] endif -test('qemu-iotests', sh, args: [files('../check-block.sh')], - depends: [qemu_block_tools, emulators, socket_scm_helper], - suite: 'block', timeout: 10000) - From patchwork Thu Sep 3 11:21:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 248998 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp353247ilg; Thu, 3 Sep 2020 04:27:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzk+UX/OOq9IBvkXb18gDe87OW2IydKhR2LFPJslSlAfz8DMxGOoEVYfTdAbZKH43iBGtGH X-Received: by 2002:a25:b854:: with SMTP id b20mr1983834ybm.500.1599132468217; Thu, 03 Sep 2020 04:27:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599132468; cv=none; d=google.com; s=arc-20160816; b=gPkPQjxRi2updzhEJeQ9oVF7408ad0HBqrWYRpyWa6WTQpd5tKxy83sJ5nlnVYAklb xmNtMwuLuneJZg1AhUaS9SCtkYnphxOheQT6MqCdRQcy9V/NrGEdYoLVTCADSoUnAGQH aND+ReZ4By/bUfP4mNaYfrad39xghRpdAS9oJQUOtdhnTL0VA9BT9C0inN+s+IQgpBpZ 7LDwu81ZUW+18Zkx8zmbaPs7fVhTuoSVlEfvHM+YbDFR3njquSDKsrXZcvT7DT0XNIaA aklY2rB7UW1MkmKUtpH8qnhPR0wZxMUwCbRtIIgha3o2Shpyh+cN5n0+1NnQbNJBo6jB zIWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=3ol6/8ZnV+hKUM+GEucApUlAdOvqwrc7UlycrSSBdXg=; b=SkHZg5ihWKkwYFUVrISF+3pYzsnqihGTTx5+ZJTW98i8rjjKrCXsHCm6qlSzAiXjdp ermgk7qLxRuyS+lIclWRsCmtEHXN+FbP0pJBt359W2I0ihuCTU3+acRdIYgQsPjCetyM sXKIokshqX/XyzrUv/FpdK9CsFekqljgOzcMK5rm1g937ZSQGKjILyzP0IE0Q+toeZaf dSmwm13cRDYdUBOyhuy1WQkk5WoLWE0CfRaWbBim9LoNfhQDiXzm46VXsk1HUBUt6dGt VFEzNcfmsKPCJmLIJ3D9D2hYIdMt26ZgqkKbpDLiuUjjD+dbRtKIKdhp7t9XbHuEeVUt LTiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ykEB5jKk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w192si1452370ybe.322.2020.09.03.04.27.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Sep 2020 04:27:48 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ykEB5jKk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:46078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDnP9-00046L-P9 for patch@linaro.org; Thu, 03 Sep 2020 07:27:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDnIx-0002hm-Td for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:23 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:51276) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDnIw-0007aD-2e for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:23 -0400 Received: by mail-wm1-x342.google.com with SMTP id w2so2494747wmi.1 for ; Thu, 03 Sep 2020 04:21:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3ol6/8ZnV+hKUM+GEucApUlAdOvqwrc7UlycrSSBdXg=; b=ykEB5jKkuQonv4sTg8MopB9Qu0oWWXi8OyApbAPA2tENo5DiVVBF6ft591aq7oT8hM HkaxtpsH2jGVsbG66BKRNfZJIPiNgVSauliyC5hI+Hx2DdEsQPg//k4AFA7wBFpxsitG 1M2/1YLvaEdN5/sCIiYvjrhHoUHyKIBgnfhA29twUImbngfHLm4NxFSfFx3SB6cHRqHd jyqJ+2cV3qI/KsWUZqQPflM4Izi2rjUCUAUPcBD48qA7WZlhYlzOi2epg99Ssz9XwRhG pHu9RxVHOmy/7tnsX0IYFjGj3D1x69gZCe3CQpz0SvBHk4NXIWrcSADvXC/LmdOL+qlu UafQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3ol6/8ZnV+hKUM+GEucApUlAdOvqwrc7UlycrSSBdXg=; b=s2zZXLpuPkFTQFrUJqCJu7hgu2YL8INaVZrPTUASxswTedLZ2J+R9uKaE8Eut/RKU2 drYwejVOE2sK12ES4r0WtEnPKAxvsNir4Jq8T7u+gMYzuo85JnNJR+1NeV5+c7cjKLaK c2WMaH8lxHS5pFt6BklKJh7YsRjCoODmWD19qf9d7YtSwqN/w3mrlN6G0T1jWk/3yLQR zexv68PtPy/48GiNoU+3vsgvC1Sr50CIr3VplGOlIBVlYo3pOqVVjhWTYSiUQxEwhdWt JEOo8qFHJJ+mKW0KBg6R6/IoJ2kuOz2cSs9M77TrgzOrjygtcdpAI0EOuZcm9LpB2ogM w8Xg== X-Gm-Message-State: AOAM532xhUzOni0jiMkt7LcaHfoHtbxoTXn62o+ZNo51Czj99jil+Dhm IuwVVv4DjgabF1oVlxB0jGkVcQ== X-Received: by 2002:a1c:4e08:: with SMTP id g8mr1935906wmh.53.1599132080719; Thu, 03 Sep 2020 04:21:20 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g8sm3912454wmd.12.2020.09.03.04.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 04:21:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 58EC71FF92; Thu, 3 Sep 2020 12:21:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 6/8] tests/meson.build: fp tests don't need CONFIG_TCG Date: Thu, 3 Sep 2020 12:21:05 +0100 Message-Id: <20200903112107.27367-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200903112107.27367-1-alex.bennee@linaro.org> References: <20200903112107.27367-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x342.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: fam@euphon.net, berrange@redhat.com, stefanb@linux.vnet.ibm.com, =?utf-8?q?Alex_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, stefanha@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" As the tests build only softfloat.c no actual TCG machinary is neede to test them (as is evidenced by GCC check-softfloat). Might as well fix the wording on Travis while at it. Signed-off-by: Alex Bennée --- .travis.yml | 2 +- tests/meson.build | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.20.1 Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
diff --git a/.travis.yml b/.travis.yml index 1d0ade0a133..65341634d02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -138,7 +138,7 @@ jobs: # Just build tools and run minimal unit and softfloat checks - - name: "GCC check-softfloat (user)" + - name: "GCC check-unit and check-softfloat" env: - BASE_CONFIG="--enable-tools" - CONFIG="--disable-user --disable-system" diff --git a/tests/meson.build b/tests/meson.build index fe2c6d8e6b6..bdcc5d75293 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -7,8 +7,9 @@ test('decodetree', sh, workdir: meson.current_source_dir() / 'decode', suite: 'decodetree') +subdir('fp') + if 'CONFIG_TCG' in config_host - subdir('fp') if 'CONFIG_PLUGIN' in config_host subdir('plugin') endif From patchwork Thu Sep 3 11:21:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 248992 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp349445ilg; Thu, 3 Sep 2020 04:22:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFsXma+P1MXE/0RoXm98gChfBhQQue8axRJWOCNdoJlST26vdpyEeElukRUqt8/D9nCbv8 X-Received: by 2002:a25:c68b:: with SMTP id k133mr2113654ybf.186.1599132122097; Thu, 03 Sep 2020 04:22:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599132122; cv=none; d=google.com; s=arc-20160816; b=wNYczVyvG/Yu+QHlT3Prjw1jS2cRKsjWb/ceOhaZsvJbjpsCCr7cRP3Wgq4UkXNCe2 4KXdxTiid/558q4fFWQUZHozf7av8KhOiX8LDdcbRUGf2Yjpxw8Nz0idy85yqxg+VWCH 8rgeUhh8hvtr9JP53/8b5SXAg6lVB1xqR3aTIEduWEg92sxKrEtiHigc/HYznxnCkDMD sFXpcHesgPdUtoV871d9oLKoMtHG8x8RqMubv9YDX0hiYkXXWcLzHCuu16kYDGGWVXrz 9sg/I/r9n8VgMlzzqQDv6XUBLhlw5lMN3l8rlGwfkc47teuaXjSBNPZlzoc6wrsRn3A1 6aAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=cMROPLcTcDLsqz8ZyHuI3PmBlKUI5qkazLVoDFSt+zE=; b=OYH7Am4AFBKpnYH4guBRnunknNx+gXAc1AygYELSV8H7yF2xJMKzQF4BXd3rr8mk5o JYq8ld5TPO72u54vUkeh1qMQ/iSmMbkSY+QPwSt8k4g8hEPeTBYfiI9i2x85kkUNSCOz +hNJC+CwtGO03wPWaV1WY20Y3mg8NUnaj0tOSoFfOsHjle+LGh7idHw93s+3vVd4eLOo MGI94rQxBWGs3yL5Cy987lX0jCWlX2GvaUphLNq9NEHPozvPFRDYLuBW4/oyfaC99h+J bN3lUG0rloLxUCYwpblZJMkz/O/MlR/5VTUzFMfkdLuoCzG1T3gSADsAsr3bl6+PIV+I L3Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=d79wSgjg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s133si2994739yba.495.2020.09.03.04.22.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Sep 2020 04:22:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=d79wSgjg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDnJZ-0003eV-I9 for patch@linaro.org; Thu, 03 Sep 2020 07:22:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDnIz-0002l4-4Z for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:25 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:36413) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDnIx-0007aL-2y for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:24 -0400 Received: by mail-wm1-x344.google.com with SMTP id z9so2509178wmk.1 for ; Thu, 03 Sep 2020 04:21:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cMROPLcTcDLsqz8ZyHuI3PmBlKUI5qkazLVoDFSt+zE=; b=d79wSgjguVjpuWwN2r//uARngSrrvXyXdYbHUNYzGcU6XL993iR2xOXCZf2TJ+w2SE F1k1N1xBkEGJ0xoHqyVSMeXVyKKmkmDUarqHJyBYy/UBcazuNnKenkugEMSvdwRSSGwx +sR4wYvyu3bCVvqa4ji2NNUR/9CV8fztKjq0FLRDU40Hq92piIjaoc3ZBM6IShJqOB6N hVJlx36qgB/Yfz8BCDXF5vdRwAb3Xfikz2f7aRBgyWYzVjFuJZaa81sJxPKy7aWFH7WS 0ZEJILBEkYcbnAksQLqTLj1+EbFpl97HbpyKrl7+/1r7XrRFTE+kIQdM1iobmkHUzTwu e9Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cMROPLcTcDLsqz8ZyHuI3PmBlKUI5qkazLVoDFSt+zE=; b=a4Mm0rn7UC0fqDANBLcjEEKdxqz1B6iUkHlTXJ2FdFpD9zIsH+TqaWwYKUbmTpqwU7 jfDNVx32P8eaguSymW8Wgc7eVK3WB8Tkb6BQwjKXrxUBkQY7SC1DIOpsKGLGsYWvtl/V f/JU3xrBe85cnpkirwlg0naMlGZhzzA8+0vq/HJ0sAos/SF24eDxB1mk/EuEDq8fjJNR i/8uYc7orsep5S0pgMtfvpcVW6lrzIHck5tdSgaWg8hZFiIkoI76TSbRBYcD8MwoyzMa ixUZHcO5OXWnMubZPMaBfNFpN5ZPbh2M5zZVLxc0Ct4TuQgWE73NgpkSOWrLmtiWemE4 IpNQ== X-Gm-Message-State: AOAM530plcsXxW2QM1gYju/K/tjsc+JK2faWc0nUncJ8jCkcce08/pXL eDQdb80LvJowInAY76bZZcPoJw== X-Received: by 2002:a1c:105:: with SMTP id 5mr2076404wmb.83.1599132081691; Thu, 03 Sep 2020 04:21:21 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c205sm3850668wmd.33.2020.09.03.04.21.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 04:21:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7253C1FF93; Thu, 3 Sep 2020 12:21:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 7/8] target/mips: simplify gen_compute_imm_branch logic Date: Thu, 3 Sep 2020 12:21:06 +0100 Message-Id: <20200903112107.27367-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200903112107.27367-1-alex.bennee@linaro.org> References: <20200903112107.27367-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: fam@euphon.net, Aleksandar Rikalo , berrange@redhat.com, stefanb@linux.vnet.ibm.com, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , richard.henderson@linaro.org, f4bug@amsat.org, Aleksandar Markovic , cota@braap.org, stefanha@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" One of the Travis builds was complaining about: qemu/include/tcg/tcg.h:437:12: error: ‘cond’ may be used uninitialized in this function [-Werror=maybe-uninitialized] return (TCGCond)(c ^ 1); ../target/mips/translate.c:20031:13: note: ‘cond’ was declared here TCGCond cond; Rather than figure out exactly which one was causing the complaint I just defaulted to TCG_COND_ALWAYS and allowed that state to double up for the now defunct bcond_compute variable. Signed-off-by: Alex Bennée --- target/mips/translate.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/target/mips/translate.c b/target/mips/translate.c index 899b90ae0ff..398edf72898 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -20028,8 +20028,7 @@ static void gen_pool32axf_nanomips_insn(CPUMIPSState *env, DisasContext *ctx) static void gen_compute_imm_branch(DisasContext *ctx, uint32_t opc, int rt, int32_t imm, int32_t offset) { - TCGCond cond; - int bcond_compute = 0; + TCGCond cond = TCG_COND_ALWAYS; TCGv t0 = tcg_temp_new(); TCGv t1 = tcg_temp_new(); @@ -20046,7 +20045,6 @@ static void gen_compute_imm_branch(DisasContext *ctx, uint32_t opc, /* Treat as NOP */ goto out; } else { - bcond_compute = 1; cond = TCG_COND_EQ; } break; @@ -20065,7 +20063,6 @@ static void gen_compute_imm_branch(DisasContext *ctx, uint32_t opc, tcg_gen_shri_tl(t0, t0, imm); tcg_gen_andi_tl(t0, t0, 1); tcg_gen_movi_tl(t1, 0); - bcond_compute = 1; if (opc == NM_BBEQZC) { cond = TCG_COND_EQ; } else { @@ -20080,7 +20077,6 @@ static void gen_compute_imm_branch(DisasContext *ctx, uint32_t opc, } else if (rt == 0 && imm != 0) { /* Unconditional branch */ } else { - bcond_compute = 1; cond = TCG_COND_NE; } break; @@ -20088,24 +20084,20 @@ static void gen_compute_imm_branch(DisasContext *ctx, uint32_t opc, if (rt == 0 && imm == 0) { /* Unconditional branch */ } else { - bcond_compute = 1; cond = TCG_COND_GE; } break; case NM_BLTIC: - bcond_compute = 1; cond = TCG_COND_LT; break; case NM_BGEIUC: if (rt == 0 && imm == 0) { /* Unconditional branch */ } else { - bcond_compute = 1; cond = TCG_COND_GEU; } break; case NM_BLTIUC: - bcond_compute = 1; cond = TCG_COND_LTU; break; default: @@ -20118,7 +20110,7 @@ static void gen_compute_imm_branch(DisasContext *ctx, uint32_t opc, clear_branch_hflags(ctx); ctx->base.is_jmp = DISAS_NORETURN; - if (bcond_compute == 0) { + if (cond == TCG_COND_ALWAYS) { /* Uncoditional compact branch */ gen_goto_tb(ctx, 0, ctx->btarget); } else { From patchwork Thu Sep 3 11:21:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 248996 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp351580ilg; Thu, 3 Sep 2020 04:25:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4izIXvXZ3M2EZMh3RFwdFkLQ4HEy8oKC8/1OSyWC1Z70hMbj5EWRELjSqMq7odq+u+lfs X-Received: by 2002:a5b:f4e:: with SMTP id y14mr2217158ybr.71.1599132312527; Thu, 03 Sep 2020 04:25:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599132312; cv=none; d=google.com; s=arc-20160816; b=j9Di8Gdnu797USebr2I2RNwch+lMRUQI3QgjT5mxlLWlvu3F3uf3duedAjh6U/Dawf LmzpKQlD3E7lbFejkHvMi4TINT7NxgMlYCGcq0LD2TcYxAfJ7vdMydqQgaRRQaQytK6J KLXAZYi4q+8mAN+dHoGGZ3OkvjNDO6t5kUKDIEf0AvnodnDtYHQpOiU8udXXmW0/Hmeb sWdfvJzGbvEX356D1zClpaUxZthj5ymuCmiel3TbgO2oLcbxJEA5K8ONXEKLRB4AQusC WsT07HwZRarlfCXcXD0hqORgiRgr7YWbVAfAV5Nn2RxYbxIWmsywuT8MLy0q4uVGyKq5 yeWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=mJNKp9y1F6rLirIyiQ2tKjhVz1svga6dJmHJIZK3pwc=; b=y0+ebZSjLUTNWDqrgytCYr4XehruvDVffMcCcetSbqIhEcBsK91R41om01FH2Tbs+l J/JenZ6sX8aX3ukyx9zUofuh5pyUTajW6TwBu3YHo19ykzIKlytuvJ8522i3wu/hhrFH bczYhvhxsWgHiiom8qJ0nYFgk14MPwO9UFfPJOqGB5hthv7o34jN3VG7afz6hW58LQaf kRzOFYL2tOnoZMeJ7VQ7uIBm261Gsnc+sUDT784Y5hhPa9DgC8qSCpFrtHxxwtzGWcbk cJUmhuLsirfdxZXcjJCu5lFlpJndYrTI1V5rZaIfs65xBKcj3Fb5RXSjAuGIg6E6PC3Q YeVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=t1aDoHg3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c186si3008183yba.330.2020.09.03.04.25.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Sep 2020 04:25:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=t1aDoHg3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDnMe-0007zv-1I for patch@linaro.org; Thu, 03 Sep 2020 07:25:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37176) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDnIw-0002dT-Af for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:22 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:50352) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDnIt-0007a1-Td for qemu-devel@nongnu.org; Thu, 03 Sep 2020 07:21:21 -0400 Received: by mail-wm1-x342.google.com with SMTP id e17so2494405wme.0 for ; Thu, 03 Sep 2020 04:21:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mJNKp9y1F6rLirIyiQ2tKjhVz1svga6dJmHJIZK3pwc=; b=t1aDoHg3niacDPuDcWpr7qRaEPmYyH/SKmum2XKpJ/TVFZW7TZiEOphvFg7PiN0gni l8OfPZWnmnwCYb0jMIjLl8ouGm5y2QHldXvsPQkgHVdDyIYWVNlEyq0fInDIAJcvfErO B4HRS08UC3NvxxwRYuFiIt5bafDPrjoZrPfbwOZVmFP8/m0GGc2ptQdAjpon2cm6Jy3L 4/vWW+muyQh+FeK0iJTuEgFjvKw28DwEn/Iy662h+6jYWqRUh0jOwIw3TCOD1u0Zlwmh zTSUwtnZzOu2kCezKdsNqmPWcYBT1QHXU65ArJNtlZYU/BTPbGWTWI/EuIyxwi13BiAo m8Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mJNKp9y1F6rLirIyiQ2tKjhVz1svga6dJmHJIZK3pwc=; b=Lr631Tjekk4OPM/XWh+RA43INRebIKef7YkxNE9rmk9uJvNGFZ7BzMpjmN4lXt/WWT G9BohilfYyX/zgP5nZ4ZEOslK/wfWyLpXuJqFcLgXafPuFECAHUc7ac0VcGcj2sgRmnY f5sPkJ5GzkHy5ulv5xW7xbHCzB6mzkLz7zBUO6DPLf4Y97Yvtw6z7XpR6gG6+U1mtY2L rzJdrFVo27F0H/dHIWrb0KO3wgQyy0fq9UknGQf5EjdER393NToWmmY7ijHo9qP2PeCw ChSWiGrd+gESMK4kRwGlcmUfS3vTWu158eGNs0N0sA1djiprIY7EnVjwgaMAWzBoQQzm iBcQ== X-Gm-Message-State: AOAM530u409+jTg/BP2Tk7/TvGkpTL5Rwfl9ZDjoajbknFHWytueCOyL aII0wLqmpjlw6+EcDMHlwQhSqw== X-Received: by 2002:a1c:6a08:: with SMTP id f8mr156661wmc.151.1599132078701; Thu, 03 Sep 2020 04:21:18 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z203sm4057517wmc.31.2020.09.03.04.21.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 04:21:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 88E721FF96; Thu, 3 Sep 2020 12:21:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 8/8] migration: use pstrcpy to copy run state Date: Thu, 3 Sep 2020 12:21:07 +0100 Message-Id: <20200903112107.27367-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200903112107.27367-1-alex.bennee@linaro.org> References: <20200903112107.27367-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x342.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: fam@euphon.net, berrange@redhat.com, stefanb@linux.vnet.ibm.com, =?utf-8?q?Alex_Benn=C3=A9e?= , Juan Quintela , richard.henderson@linaro.org, f4bug@amsat.org, "Dr. David Alan Gilbert" , cota@braap.org, stefanha@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The gcov build triggered: ../../migration/global_state.c:47:5: error: ‘strncpy’ specified bound 100 equals destination size [-Werror=stringop-truncation] strncpy((char *)global_state.runstate As we shouldn't be using strncpy anyway lets use the suggested pstrcpy. Signed-off-by: Alex Bennée --- migration/global_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
diff --git a/migration/global_state.c b/migration/global_state.c index 25311479a4b..5fbe6d1ff07 100644 --- a/migration/global_state.c +++ b/migration/global_state.c @@ -44,8 +44,8 @@ void global_state_store_running(void) { const char *state = RunState_str(RUN_STATE_RUNNING); assert(strlen(state) < sizeof(global_state.runstate)); - strncpy((char *)global_state.runstate, - state, sizeof(global_state.runstate)); + pstrcpy((char *)global_state.runstate, sizeof(global_state.runstate), + state); } bool global_state_received(void)