From patchwork Wed May 20 14:05:27 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: 186981 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp650726ilb; Wed, 20 May 2020 07:07:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxG7wJbWcUEdQVFDxkWYUzrZXnWvn/YxVJAH3nP6faURsAL5aPWnqDsXQVOFDpavUwR25rj X-Received: by 2002:a05:620a:13b2:: with SMTP id m18mr4490455qki.459.1589983650344; Wed, 20 May 2020 07:07:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589983650; cv=none; d=google.com; s=arc-20160816; b=hlHKs3ZoU5lDfPzRgZayE+R0voQvcLX0UmQ5r0+2/3Q/IidBy+OgqfgE10jNbowSmk lRBWsOZyLhd29od4Ly8+eOHLZRthq8muIJGh+CqhyVNQU7suf5ueUaEDPPTx2lNBKLR/ fsDahrLwKzZuTe5YnMEYTMg6xH2SsowOH12d5GuQsvwp4nMdggiStaF0fli/dYE/AGZ7 H3h9KqdQdOsJEQ6u0b7Lk8b5AdMm0bE2buNedtw60UxsjuYwFY+ctINIHRAPnr3b8b+g XDAt0ZoEkbiFeOYhTkkruXovXYo1NvgT1mI08e5yeAFhWdGH6tCZnX5GQoQA5q3HvG3C evDQ== 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=mvfZ9b5X++pjGPlHODQLP+73HAFs/zH+An8fEoHT3r0=; b=D8wHLoxOzgmtqBKaXxMMS5qyDgcW1K6usomTzPEfEVqlCWSI33O7kY/PLRcxDqlZQA +LmGDT1CgEPnObO3bZimAVhb95RQbxBVoWJrXSrJdpD212jaihephnaHxU4CLeDCT7jL S8uOB4qRTPTppv6UI2pflz9z8YViW9pGIgG20QOgS5RrSzYk5vWQhGThtV7Ls8E3CbtT VlhmEuZG+EeDLlMFtGzCuOyB93Wevpga8pzeuJ9R5NAMWetGkGqU/Nkwto2oVgEK52g6 u4M28GHtmj3oaIQyTS3oczlm0GbjOqh1LZt4QF55juQWQL6sNK2mecNGqw2GnsHmqQGJ Bjrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lbqpozNm; 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=pass (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 h9si530214qvf.20.2020.05.20.07.07.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 07:07:30 -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=pass header.i=@linaro.org header.s=google header.b=lbqpozNm; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPNZ-0002qB-Sm for patch@linaro.org; Wed, 20 May 2020 10:07:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPM1-0008Qz-Hd for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:53 -0400 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]:35291) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPM0-0001tc-O7 for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:53 -0400 Received: by mail-ej1-x642.google.com with SMTP id s21so3982580ejd.2 for ; Wed, 20 May 2020 07:05:49 -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=mvfZ9b5X++pjGPlHODQLP+73HAFs/zH+An8fEoHT3r0=; b=lbqpozNmAb3aRO7b+SST0+hxyC4PY7mto6WovSWVkUo3NE6DY4rIqhynN7k3L6FWfH MNrijzr+8Krb6W8ERK/b1GxWSm0qYnFtZX1kA4RjnG7mi2Kovm0yR5tolGF/BhIFrGTf kv+oqzgEUlgr4FRJaHj7YKm6b0oZGomWcnV6JLVI65p9H4aREhp728lJeeHjOsfg2SmI rG6gvcC/oKUtN66IYfnPA8yWIXUBI+rEaWuDS4dfeCNR9j7d29P8NkWakIsR+odvk/+z O0ojMCOiZNq8hhPQKQM/QXNsQ3n8WiYQ3rHSYc9fwHD8PRV1044YTR6ZRajB/+joI/M4 ptcA== 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=mvfZ9b5X++pjGPlHODQLP+73HAFs/zH+An8fEoHT3r0=; b=G58ZyDmD0dLnCaYSaxfX6AhSaU8qoczpzLaxFIxztIot+neCe6PlvUwF6r61c2C/1b Yjq9278zkWLc9ayuy9VYE5VdRih/HvtxRVqbWFyKcA96CJkvoLACDoNNPMO1knUPR7hI Z4tXJnoSZ638uo1fc7ZiBIFu2PDfc4nf89IbXKU1hliQxq9JXPdSQmMJ6LGiiC7sUzEA aDLJacmblBylA6ajcYZoqLnosDOC9iIQEe+aMYs8VKID+TG1tWYCnJoCqTigftql7O3n 1Qhxryv/mqeK/OFpdLKHOfhECmmABSrN+/+Zqmrhn9wbHP0XH48TUQG8debD4RoiL+Ub 41bg== X-Gm-Message-State: AOAM533Noev1J3qphx1EKwFix3MTs5oTIW52veKXOd3/xNcyUsamM3FL zRBrq0ytFn84O/l8kx9c7iNQU3cCO6M= X-Received: by 2002:a17:906:9404:: with SMTP id q4mr3769343ejx.138.1589983548742; Wed, 20 May 2020 07:05:48 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k3sm1844624edi.60.2020.05.20.07.05.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 07:05:42 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4E2A01FF87; Wed, 20 May 2020 15:05:41 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 01/15] configure: add alternate binary for genisoimage Date: Wed, 20 May 2020 15:05:27 +0100 Message-Id: <20200520140541.30256-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520140541.30256-1-alex.bennee@linaro.org> References: <20200520140541.30256-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::642; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x642.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Not all distros ship genisoimage which is a Debian fork from the original cdrtools. As the options are pretty much the same support it as a fallback binary. Signed-off-by: Alex Bennée --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/configure b/configure index 26084fc53ad..a574250524f 100755 --- a/configure +++ b/configure @@ -941,7 +941,7 @@ done # Check for ancillary tools used in testing genisoimage= -for binary in genisoimage +for binary in genisoimage mkisofs do if has $binary then From patchwork Wed May 20 14:05:28 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: 186979 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp649870ilb; Wed, 20 May 2020 07:06:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfYbuDGL+skWs/EGirsv8CcM7s3olmPggH3PwtP3yD42TImX4+f6lUmYvO1jdv1NC8bVhG X-Received: by 2002:ae9:c311:: with SMTP id n17mr4981239qkg.51.1589983597111; Wed, 20 May 2020 07:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589983597; cv=none; d=google.com; s=arc-20160816; b=GgU7TViOmCQujvDDQkg0JPPMEAlTkA6NMCOOKWxlUHd2HzSK0qniRa820rlF4Ns5H7 1sLyFnWd9f+9Ow1cNpg0C5xw4K7Q1Jd+od/NdG2zsP0XUXYOu/ZeATroZNakJun7BTd4 +IeU9erypGQHFSkURheNAhNWiUur5SYCoMwoOW+cJUOPPyH0m+frTEJVzM7y26pPULlL o8gu1RrdDJNDbVEKN2TA5H5CxocYGAqtG9CzAzn7eo1lbzvbYcI7K5PzhHas/KK3JBHG hw8JqYzVJ6ru3Tshfc4gtZ3sTZLLmx0Xlke0zoNO8Q+cLBRaX3T4RzRJWUh9NyK+mHQk wRpw== 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=UeeEkoEdpVqBre5kbf2Z3iGxDOkRZkflMSZw9nUZHA0=; b=a0nDvWxagenQXqFJ2KCDHd9hMUcKfppmBzBT9++euNoqdhbmqq6Mz8hivMCP0srZR2 M0SnZ7I89s+jZ5QTnl/YqCGkOgDyYtwc8aZAO7EQO8L+zp9GOR6y9ks/GnCVNjRYED9l lWNXZnV0FMtt46cdWxQ2Nd6XPnhlsKLgiYRfq6MSivSbIWf1dtqbRaeYGq5aRLlVPUrT vBNHPBpjQwD+le3nRNygVBfkEHjZc5RI57f8MHH+Nc0THKr5s5To9qBl5YYnNtsvFJ9v 7DutPQrImtU5UbZTQmK5iea7tXMcWlY26YabdVZRKMV7fEyZ6dsvHSrzIDYaDJjk7xW8 Npnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="CX57/snS"; 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 198si1754853qkn.258.2020.05.20.07.06.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 07:06:37 -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="CX57/snS"; 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]:55694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPMh-0000Ei-Ez for patch@linaro.org; Wed, 20 May 2020 10:06:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55146) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPLw-0008Lt-0h for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:48 -0400 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]:37226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPLu-0001nS-O6 for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:47 -0400 Received: by mail-ed1-x544.google.com with SMTP id l25so3187035edj.4 for ; Wed, 20 May 2020 07:05:46 -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=UeeEkoEdpVqBre5kbf2Z3iGxDOkRZkflMSZw9nUZHA0=; b=CX57/snSsRC+YCnc4Wm2N6rdthktOl5UNJv6i/0jLSWSf/BGXt+JqN+Qc37XKVo35U gZSCVxiPf334fxDMS3bc293fwQyL5D69AYd/0i+D1VpXWMe7AAS/xUSrTgZLoYM1Sn7u EuICP4yKqpp2ji3PRQ3vjZvCJVOMgFpGk2s+f+2LIgX+Xh2PLFzDlCN46bDhqIzEKvmI kOVi32a2YGv92iSXA2azpoynaVJBIG3i6L5p4gozY0Y1wcLn4sLas0hdrOcTqik55smh LG9miTda51rA4hFH4bQFWyXCXRQvN2IY733uEQGiewcUA2lFOqonnBDKySyX9fbefPCt jYsw== 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=UeeEkoEdpVqBre5kbf2Z3iGxDOkRZkflMSZw9nUZHA0=; b=jLkps2DSJniZ7SME3ZgbFZwM7s+kaDH/70er0K7a/p5ystmObDTLPLbGDjoPJWi1wU +GIYV88LzMcRGKXmVANh0NfaXdGPTLpWZlEFH94BzjtcC1G6VwVz7JlbhF+kMe93C5b6 9SsCxQjNn341Ejsf9gteEnxGDZ2O2AO1PECDw7h1Pr4s4KEFAxvPdejLwDfagbgMDqez Z6AtSvroUHQk/QMnfHIuSE4YtbPqA81UjqoOrsXN5biWDYx7Vb7Myu2l47hgJ4QR4mit V2U0GEn6nU29GlfxdYstI8fMB8pRe5jHS3I+lZ//zwnjv4LhMxr8maWANOadI0CSGdHK 0B0Q== X-Gm-Message-State: AOAM531urxhCpYvsVrMI4Q0Quxc1R5p548zfNuD9W5UBDu37RpY1eTn4 UmB1GHOiQYZj4+aEF/pegkDUxA== X-Received: by 2002:a50:870c:: with SMTP id i12mr3723574edb.258.1589983544813; Wed, 20 May 2020 07:05:44 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e18sm1978935ejr.2.2020.05.20.07.05.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 07:05:42 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 680E31FF8C; Wed, 20 May 2020 15:05:41 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 02/15] tests/vm: pass --genisoimage to basevm script Date: Wed, 20 May 2020 15:05:28 +0100 Message-Id: <20200520140541.30256-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520140541.30256-1-alex.bennee@linaro.org> References: <20200520140541.30256-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::544; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x544.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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 Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" If we have an alternative to genisoimage we really need to tell the script about it as well so it can use it. It will still default to genisoimage in case it is run outside our build machinery. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/vm/Makefile.include | 1 + tests/vm/basevm.py | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) -- 2.20.1 diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 1bf9693d195..74ab522c55d 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -56,6 +56,7 @@ $(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \ $(call quiet-command, \ $(PYTHON) $< \ $(if $(V)$(DEBUG), --debug) \ + $(if $(GENISOIMAGE),--genisoimage $(GENISOIMAGE)) \ --image "$@" \ --force \ --build-image $@, \ diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 756ccf7acae..a2d4054d72b 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -61,8 +61,9 @@ class BaseVM(object): # 4 is arbitrary, but greater than 2, # since we found we need to wait more than twice as long. tcg_ssh_timeout_multiplier = 4 - def __init__(self, debug=False, vcpus=None): + def __init__(self, debug=False, vcpus=None, genisoimage=None): self._guest = None + self._genisoimage = genisoimage self._tmpdir = os.path.realpath(tempfile.mkdtemp(prefix="vm-test-", suffix=".tmp", dir=".")) @@ -381,12 +382,12 @@ class BaseVM(object): udata.writelines(["apt:\n", " proxy: %s" % proxy]) udata.close() - subprocess.check_call(["genisoimage", "-output", "cloud-init.iso", + subprocess.check_call([self._genisoimage, "-output", "cloud-init.iso", "-volid", "cidata", "-joliet", "-rock", "user-data", "meta-data"], - cwd=cidir, - stdin=self._devnull, stdout=self._stdout, - stderr=self._stdout) + cwd=cidir, + stdin=self._devnull, stdout=self._stdout, + stderr=self._stdout) return os.path.join(cidir, "cloud-init.iso") @@ -424,6 +425,8 @@ def parse_args(vmcls): help="Interactively run command") parser.add_option("--snapshot", "-s", action="store_true", help="run tests with a snapshot") + parser.add_option("--genisoimage", default="genisoimage", + help="iso imaging tool") parser.disable_interspersed_args() return parser.parse_args() @@ -435,7 +438,8 @@ def main(vmcls): return 1 logging.basicConfig(level=(logging.DEBUG if args.debug else logging.WARN)) - vm = vmcls(debug=args.debug, vcpus=args.jobs) + vm = vmcls(debug=args.debug, vcpus=args.jobs, + genisoimage=args.genisoimage) if args.build_image: if os.path.exists(args.image) and not args.force: sys.stderr.writelines(["Image file exists: %s\n" % args.image, From patchwork Wed May 20 14:05:29 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: 186992 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp660633ilb; Wed, 20 May 2020 07:18:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvCz2n0iw2fyqabCA3TkMq7g6FfXdAFKrCoPts4P8YOqg1LcqeOTxw6CpLTPpM2QNbRANl X-Received: by 2002:a05:620a:914:: with SMTP id v20mr4870134qkv.107.1589984336651; Wed, 20 May 2020 07:18:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589984336; cv=none; d=google.com; s=arc-20160816; b=PWW+EXcHz50/eFSPMA73IEq5DywXZ+6c4azpwy1+NccwS28YbyS+2zIOKC5YypGPq+ 94EvOq2qdEPNnFms5Q7FDE5W1lHrrx3+tfdER0lzf16PImHSWUgZOHkpVH81+nxtwwjz lvmV7B+uL6eol1iHdmSdOrR1N++HAt4etQGwdwDchxWd1uKicER6F5XLBGFuTthraMa8 qENzhElX0/YB2l1K4agdY9phsq7buY79KH+PurgXSZpwqhEhNGx0Y+BPFSvU6lb24W4W aCmnVNXF2LomnERVYedSd6IoGFBVNX2nqoZrFkKlW99dYymJjmolN3/9A+t+me86Szlp gWxg== 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=m1zXruZIXUvjwU/PTNcJ1tB+FSG/kUrku9mORQV4WDg=; b=HvUHc/1ETxg3lbNER2HO4ZVPMBSqpp0PO/Q2wAp04s0BxwTHcfMOx3ezPVVNLUQiE2 uEEuhYogqrxrRQUE2Yvzt1Ys+8z7IToWi+gN80YHNDVzEX7xFjcd8COrtLHzMmv7qW2/ 2qQejo3MxFQkiCaNI7rt+nFhh+J+1U39+zUpO8c6l2BhtrE1rSS/VIlDGGNne9SdEroz QSDwZDP1jOwCNd5T/BWN4CHb5ImJDtwwYnE/7rJCFq4r2D8O6X+1ABroCATdhmqeF4vd thAF1ZIRslSM+ST2ZNpFJRl5Be0PKBIKD2sR+f5ZgiLsmaZZswwGxxlRQxOFk7IxPvmo pGWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="imZ/76FX"; 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 d11si1547850qtb.280.2020.05.20.07.18.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 07:18:56 -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="imZ/76FX"; 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]:48348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPYe-0005Ct-0D for patch@linaro.org; Wed, 20 May 2020 10:18:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPM3-00005X-KW for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:55 -0400 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]:35290) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPM0-0001r9-M7 for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:55 -0400 Received: by mail-ej1-x641.google.com with SMTP id s21so3982450ejd.2 for ; Wed, 20 May 2020 07:05:48 -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=m1zXruZIXUvjwU/PTNcJ1tB+FSG/kUrku9mORQV4WDg=; b=imZ/76FXo4Z2H8/YMebPsY+A0NMizgUxrPiOhyiNbD9fBYI8jii/L0REdHqGRLU6Hf nq6p3ILZ2kHqkIXt/tE+Z0ShrhxwfXMJrdWSRNAvJK5JHFZYu0vMR+4s8hZSnwiNAKfG vRQKev+segCqVigpQEk0ZkVseSJyb8oKveNnRhUa/YJ2WrUhFBJJEjB3zqw6aN7Lq5Jr 8JXfNdJgjkm1JQKTqPN8PjSCJ4T1CdzXk0q8wzVtEf36jUzN7PEmVYv+mSt59EgH48Nt 8vhugxz171mKrKRf3b677s5YoEwp4AigMChit8eOho7SFn5aoqwFg5WHg6piMSFPDRSD FXGA== 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=m1zXruZIXUvjwU/PTNcJ1tB+FSG/kUrku9mORQV4WDg=; b=iMDlu1EINDZ49Rxy0z+CPcIwVxIx5+qZm4Q6XQjdFC3XgkTJH28P771k6IBe+kBo53 P+EVVaE6+aw13+2+tFKkBXZBtgcMtAt/Mnf50RtAWnsELqozmyMhtUiz0OGgJxcuQYzb aZVPrVEZW6veXyPu/KYj+VRp/+AFP/y+gCIsD1qtSH+7OqiKUIQqBTR2ii9bN0MOm3Ze 5sX0NYV8tQRT2qssw25WQja+8+aRRxQKH46qatf0Q9hCKjMyDJMXt3UalN2b7dNjjCOH CRRLMKhi2LOv/VU6/5/A0BtkQuA32PqaoLjTnBpprEtMcusyrgCFhgekTotUm/fN9XkJ 1Ocg== X-Gm-Message-State: AOAM531EJtOxy2nLG5WEcsABM/c+S6FjKjUD27fJ7KBDHbdw+9LKR8RN oX4+hqDDsyfWdPfMbvKpYlpP5A== X-Received: by 2002:a17:906:aad8:: with SMTP id kt24mr4127743ejb.54.1589983547251; Wed, 20 May 2020 07:05:47 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id t16sm1927404edy.20.2020.05.20.07.05.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 07:05:42 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7C61D1FF8F; Wed, 20 May 2020 15:05:41 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 03/15] travis.yml: Use clang++ in the Clang tests Date: Wed, 20 May 2020 15:05:29 +0100 Message-Id: <20200520140541.30256-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520140541.30256-1-alex.bennee@linaro.org> References: <20200520140541.30256-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::641; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x641.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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 Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth Our configure script does not look for clang++ automatically, so we should use --cxx=clang++ to make sure that we test our C++ code with Clang, too. And while we're at it, also use --host-cc=clang here to avoid that we use the normal "cc" as host C compiler. Signed-off-by: Thomas Huth Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200518083316.25065-1-thuth@redhat.com> --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/.travis.yml b/.travis.yml index 1ec8a7b4657..564be50a3c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -205,14 +205,15 @@ jobs: # Test with Clang for compile portability (Travis uses clang-5.0) - name: "Clang (user)" env: - - CONFIG="--disable-system" + - CONFIG="--disable-system --host-cc=clang --cxx=clang++" - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default" compiler: clang - name: "Clang (main-softmmu)" env: - - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS} " + - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS} + --host-cc=clang --cxx=clang++" - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize" compiler: clang before_script: @@ -222,7 +223,8 @@ jobs: - name: "Clang (other-softmmu)" env: - - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}" + - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS} + --host-cc=clang --cxx=clang++" - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default" compiler: clang From patchwork Wed May 20 14:05:30 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: 186978 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp649432ilb; Wed, 20 May 2020 07:06:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCqdbODiGvTzKVXtvrfE0G0JYZ1DWtTqfduXnZHkTJ4mPIZc2e8kfetQf0qeRm9R2uY+Z5 X-Received: by 2002:ac8:76d2:: with SMTP id q18mr514765qtr.322.1589983566715; Wed, 20 May 2020 07:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589983566; cv=none; d=google.com; s=arc-20160816; b=s1zvWqDOMKJK2Yv1HlUXeA2eOypb/WX3SWtpGS5xSpdT4T1yoDERcHyKzrdqqvLmno i2hdNkaoYNxzeQEPSW7IDCzcMnIfZJMEH1AWhmoiXKNNzxKeqXlB9QWeG8EDkz3Qea1T JfPhxtPBtdiB0Dr7Ahcj0GGtuY+6J0sBn56p2W5U0jwQBOqMVTEzRes5as9sqBRai7is 6W5IjmW3DkRQ87R7U3IL5B3a55uzV6N+ZOduTXOW7ZHUMXLjqRHH6p5NktcWi5Kf8Wc9 WoPoWUqtvZbWmkEXrHmcxQXvDBWtm7cLDFWIL8mMTW0F69IjrLYrsIkVLOnMUdr7djBH FIsA== 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=6y8fucjPdtyjNnMKl8OrXnEZUIzt60LCNpIsgO/fm5g=; b=DHrGjsTiKx1LckMzh0h2rDFC7xuJKwSDOId1iBqC4rMU796MD4zX5/HDc9U1q07PgB VkGtPmNGz0xMFN+wJsV/vqBOQgfIUnKgFvTyFG0dwwcB+8rq9dbbHyOIUOnXlb33+e60 97XVwbhVV6UJyyMsD22Vs+gTxxTEuGox+jaHet6u5PFtCvQ8I1u13/h61dH6TS+v7uHT ljfa59dDtx/u/PPr0UcPXAsqZbBmFHoSIS/Wk6pbTBP0bP7jIin37vkKVzm5Mq3Grmke 0Wku7gk9VWserwgs97jFnAPcbhIx/6tsnLe3P+CGFBFj9kD5HQKJZz8LszhPYRHJpddH nv9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="Bgt/shIF"; 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 t186si1621152qka.232.2020.05.20.07.06.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 07:06:06 -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="Bgt/shIF"; 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]:55196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPME-0008QC-7x for patch@linaro.org; Wed, 20 May 2020 10:06:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPLw-0008Mh-Fo for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:48 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:33093) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPLv-0001pM-Ju for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:48 -0400 Received: by mail-ej1-x633.google.com with SMTP id n24so3987196ejd.0 for ; Wed, 20 May 2020 07:05:47 -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=6y8fucjPdtyjNnMKl8OrXnEZUIzt60LCNpIsgO/fm5g=; b=Bgt/shIFfwALhzWWD+GbalBr99hky/pdn82uT3CgjYg+1rojxpQAaSnA8uJQj7vKku AalpZfJRXFnNoypYWHlOnBUk2pdxgiPDgK3z9q4tUTd4q4fOOxWIYMy134Tn0QDta+XV lxD3i6whrWtMz0Z2TQ4s6f925K50y+tvNITn8AxOpaoa5i5dDJ93hyP3+SKDGeQrBKkw Aa4NWDwdq9bg1AVB6yb+BYnLFbQeFyrBKiqlL9sMdTrpuzvwzwrSwMk8+Opz65wmUm3I uKG/fveaiCjVrpGfLBZm0ONG6cvNCh1xFULPZLPj8MgMmJKoe9nRrKHTpvNrJibebzR4 L9lQ== 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=6y8fucjPdtyjNnMKl8OrXnEZUIzt60LCNpIsgO/fm5g=; b=AULDAG85vwG+cK7Tas8hJzY6rmHoxahVz/pOIcvm/XUmg8CTXzDx4HuW7IKlYiZaOx o+75MtVlZOU1kDp6ewXhG3PjdShjjOlmdx46mM6AvFpzJUsGgA9gapx91fk/ZIXSFsqe NJQ4XHV8RqIdOYu+Y8xCm6tDhmg6VwhuFDaxaObzC77ZMRf7MCv+3ruYClEafbmEvgkv 9vy0HOFL6Q2D3Ka82hyj1AxmUoNwhA7Gk++JmN29hnXlSlhtJ6fza1RC8n192Kn9MCQa s6tRWADJOoTkjce1RXJ1e8+fdwB+DMfdQVmUOxVq5eqDA6TVXletMKxc2nZSuYU00hOB X7NA== X-Gm-Message-State: AOAM530v1e9w+rM6HvaEJNc7TZe1TV2BBhGhKtmshIlFQOmFKt8ZtlTD nOLwwUZT6HwMNJsiYkzjfyqC4g== X-Received: by 2002:a17:906:dbef:: with SMTP id yd15mr3761002ejb.5.1589983546008; Wed, 20 May 2020 07:05:46 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g20sm2001567ejx.85.2020.05.20.07.05.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 07:05:42 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 902471FF90; Wed, 20 May 2020 15:05:41 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 04/15] tests/tcg: fix invocation of the memory record/replay tests Date: Wed, 20 May 2020 15:05:30 +0100 Message-Id: <20200520140541.30256-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520140541.30256-1-alex.bennee@linaro.org> References: <20200520140541.30256-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x633.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: Richard Henderson , "open list:ARM TCG CPUs" , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" I'm not sure when this broke but we should use EXTRA_RUNS for "virtual" tests which are not generated from the binary names. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- v2 - keep the PHONY's for the benefit of output --- tests/tcg/aarch64/Makefile.softmmu-target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/tests/tcg/aarch64/Makefile.softmmu-target b/tests/tcg/aarch64/Makefile.softmmu-target index 71f72cfbe34..1057a8ac498 100644 --- a/tests/tcg/aarch64/Makefile.softmmu-target +++ b/tests/tcg/aarch64/Makefile.softmmu-target @@ -61,7 +61,7 @@ run-memory-replay: memory-replay run-memory-record $(QEMU_OPTS) memory, \ "$< on $(TARGET_NAME)") -EXTRA_TESTS+=memory-record memory-replay +EXTRA_RUNS+=run-memory-replay ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_ARMV8_3),) pauth-3: CFLAGS += -march=armv8.3-a From patchwork Wed May 20 14:05:31 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: 186988 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp655542ilb; Wed, 20 May 2020 07:12:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBclvKOTKYIKAoWT0LIPvNlFJvyF/zo6fKYnTERsrbHdJwadLdW8P5Oc8+kucNPTzegred X-Received: by 2002:a05:620a:2157:: with SMTP id m23mr4842264qkm.381.1589983966169; Wed, 20 May 2020 07:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589983966; cv=none; d=google.com; s=arc-20160816; b=HqenOsVcLRbDn67iUsCZKsUm1+Bu3BbZaVxOmBBOvD9EySwe7daQK7PVXPeOHixuel 6XjhLfYrOJLakg1/VxkRaCkk6y2sUW53aOcJUuXxrpIrAiqbXc1VjDCLfQz726MylRtE oxh0C+OLzAxPSw/07BFK4uxQJYr11HN/ziZea/7rg6I5nDsyEjf3XR/19G7tvYlcb+f+ VLVtgfjfOWwEx1LPkbqqESvCvRvTT5I21DZ3kEqpk+akXqn9l3LApR1Q4TxRcql2Xvh7 tKegrzq2dx7MpvgDjTkwIXczBRlv9EAdx9OQhQ6HGBSxJ4Gag7XQ4rU3tZghkGft6Ate S3jQ== 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=Qlw02NVecU/ZV81h9ZnM/tUYlZiIp12SHyZcSJattzs=; b=LtanvNGxkUB1g2VZ+AkjPhpesY3+ftX3AfyAcnNJbsPBAg7b1lCsDq6kkJL5I3OC9o yQEnYc6+OD/8yJptOqn6Oj0TrHLai1+kyzBItEfWcLNlJK520O4i+KRQbdrRb3ygcQXO hyJBOi5aXRAkkh3HHR+RyZ0+jv9MGW4KMu5Avu0sMkuXJ9LVl1WtNGVGEG+bYirIZZgp xI3hFbx+7xbRreduJkzH66PfRBzvx8kRFZX/KXjt9eU7wwIl5rAku6mT3g5uR0jITmBr LUd9HKUzZ0bsC8ORDGifCagaCfaAXX4Fe7/gwe6Qn0A6+rjZ3J3M7c92tEcN2EYrq4dG L/hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="GsU/pvJ/"; 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=pass (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 x83si1798441qka.75.2020.05.20.07.12.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 07:12:46 -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=pass header.i=@linaro.org header.s=google header.b="GsU/pvJ/"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPSf-0002IB-M9 for patch@linaro.org; Wed, 20 May 2020 10:12:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPM2-0008S8-2b for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:54 -0400 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]:42853) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPM0-0001w4-No for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:53 -0400 Received: by mail-ed1-x544.google.com with SMTP id k19so3171064edv.9 for ; Wed, 20 May 2020 07:05:51 -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=Qlw02NVecU/ZV81h9ZnM/tUYlZiIp12SHyZcSJattzs=; b=GsU/pvJ/JHy8w8Ig8FKbPM88bWyQGq4vVeUgJlAytd9wp1HL1+gUZC7Q5GJe9PkIDn AZ2AHbpneM034tY5zqEu0D17nBfZpCyKbDM79aKcQ6G3xQzvr09n3pBl+gppS8kU00BD bNFJpn2waToX2wc4ijSvJz9h5a5xEWDUM62YK9dDs04KsizFoVS7HrnHOFwpMacJp5/J TFQfz6fPVoFTZyCEtkAp045fofCHKfFEgX6e3cT1EL9NPot185bMY1SlVd1Y2UEjABPl 5qnOrFHu2DTqyUsH9iQJ19o2Y7nQa84i5Whj2om3+69r6SB0aiWlqk3zk+1TvRyns0sq SaZQ== 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=Qlw02NVecU/ZV81h9ZnM/tUYlZiIp12SHyZcSJattzs=; b=WSi+8917AeAQpih/Qet/GtrFPyW9nUrh4Y8oAfTymKuIOj18UrML3cXOTq77pND0s2 vHkFwx1QmJif/y09yc+I3uBdnoqiH3ZaZdlVYH7dghosnCXC0qMhdrQ8vEyK+RC1VtLi AlvUgynU2Ls9CLBjjY4UU3QaqOFB0aaAJJzP2Q1nAw8qcjOgDKYYM7eKLCLkke//qaTG GLasr0GEd/UIEKrTJ+FyZp/rzX7b58IF5lDlFC0ev7P8IpfJUPANadqgEmY2dy6YIPP3 lcrxf7o9e8kqr43/p0VIIldpMbFTXNGwr3/WdsX+oUaLRpTks/bbvwsO95fD6a/R69Xj K0xg== X-Gm-Message-State: AOAM533QoyZ0ZaW7nC2iLM2sLYqIsqslEaxRVcY1v/ZSfDlOm4M5VjQC kzwWVgxyleSSn1H9bIpTs2U458/6mR0= X-Received: by 2002:aa7:db45:: with SMTP id n5mr3355029edt.147.1589983550701; Wed, 20 May 2020 07:05:50 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id gf25sm1973382ejb.54.2020.05.20.07.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 07:05:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A39DE1FF91; Wed, 20 May 2020 15:05:41 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 05/15] tests/fp: enable extf80_le_quite tests Date: Wed, 20 May 2020 15:05:31 +0100 Message-Id: <20200520140541.30256-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520140541.30256-1-alex.bennee@linaro.org> References: <20200520140541.30256-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::544; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x544.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" These have been fixed now so we no longer need a special version of the le_quiet rule to skip the test. Signed-off-by: Alex Bennée --- tests/Makefile.include | 7 ------- 1 file changed, 7 deletions(-) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/tests/Makefile.include b/tests/Makefile.include index 03a74b60f6b..e6d87fcbf0e 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -741,13 +741,6 @@ check-softfloat-%: $(FP_TEST_BIN) SF_COMPARE_OPS=eq eq_signaling le le_quiet lt_quiet SF_COMPARE_RULES=$(patsubst %,check-softfloat-%, $(SF_COMPARE_OPS)) -# FIXME: extF80_le_quiet (broken) -check-softfloat-le_quiet: $(FP_TEST_BIN) - $(call test-softfloat, \ - f16_le_quiet f32_le_quiet f64_le_quiet \ - f128_le_quiet, \ - le_quiet) - # FIXME: extF80_lt_quiet (broken) check-softfloat-lt_quiet: $(FP_TEST_BIN) $(call test-softfloat, \ From patchwork Wed May 20 14:05:32 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: 186991 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp658720ilb; Wed, 20 May 2020 07:16:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXHpCQHnZ3Zh13ZIZEr5v4w2IH/KnDdpTDK+zYDIXCg1UtSLFPzQU4e8uDyfuz/P4GWDWY X-Received: by 2002:ac8:8f7:: with SMTP id y52mr5625911qth.104.1589984189256; Wed, 20 May 2020 07:16:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589984189; cv=none; d=google.com; s=arc-20160816; b=kVb/soC+mZrJGxQ8HK7uhvJ+iD847BSuC3wVVhhHQTSrgc7gUhnoGZkj9TTN68seob QUFSC6Yp9QfvylgAHm0/jAJAEosP75sOYOhDsJdSBWi7di8w9l5ZfnrHHyQmdWsZk5AD 7XV16VfNeh8egZOFIhz1m29pLkj6KjSDsQjBCXSDZ7aILtPZTiPUgVn9o3RLzNLY4jx0 y6DaZJw2/sN/gagRUnf+OMCqCQ9FD3KCDMaD5hhXmng3mdmwqE3dn/FWFEnmGBiu/w9k 3/GlBAX9EkFHTgou4hGjlk2TM3GqmV5mqXJQH0YjBofYAFNhX5FyVQxldcaW45PaYq98 cBtA== 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=6AuJncFd/Ok9B8fiGwq2VbdoGBxgxt1TjrXD5Ap1HKs=; b=XGlkDFp77P1fhZuzOPCRnuT2lZK3Rrq7tNL+iDVPODZ+QBjdhAb0gEtch9Tg/qKKQI TTsDgwHZg8bR94VeMhb1M46KUsKCvJ4st8ctks4BLLdo0hxucLnfdn64WzzQoQF0x584 AmwWw2lX+rWGaV92elcxt1o6X8IkcjAOuFUcmi8zivstcaCjfz+VTS/yWsWjXiJ2QCxw V1cEkaA9koN7dJpM2Zx9cwe8bbKbDeiwPPMaCfuwkRN4mlIbJd/1U0CI7OMc6/gEOzRe /cXvXfkzsOVrKeSqmp+zolAqnKBAuhM6v7mumk7nkDSb9HXQpyLG2rdF43IzYDZvTqij UjMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tNPpU6C0; 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=pass (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 b197si1824801qkg.321.2020.05.20.07.16.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 07:16:29 -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=pass header.i=@linaro.org header.s=google header.b=tNPpU6C0; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPWG-0001SE-M6 for patch@linaro.org; Wed, 20 May 2020 10:16:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPM2-0008Tk-Oo for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:54 -0400 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]:42781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPM1-0001xj-C8 for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:54 -0400 Received: by mail-ej1-x643.google.com with SMTP id se13so3922029ejb.9 for ; Wed, 20 May 2020 07:05:52 -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=6AuJncFd/Ok9B8fiGwq2VbdoGBxgxt1TjrXD5Ap1HKs=; b=tNPpU6C0A1kGGe5FJwWmzvRV2JCheNZ5RR5pmpB5Jqzpx4yFl8Dc5WzLzIUVZKuHWV d00BFjBmjSPHRF/UEwL41UbJcXY4/AvplY8J2NsqKwcHbPZa5lYoxozEZCmYQn6Y0OZV ZgXIM2fjJh4wKqJ3ZpCH23Aindr/nUJbRo/y55zdLvz6uV5rqaSzeKgBf3q6DTxHEas+ oW5fnjYcQM6GQ4yPxGDL6Mufssf5Nh0e/QpWksBuzckKBSYt+dU+Ti3/wl9LQCMqru+z pIhHm+leAVRHkeUXvkRNdzynhyaMgBuusHXQxm+Y50un12Z5LBOTtADBIM+smYwb7mdu mbnQ== 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=6AuJncFd/Ok9B8fiGwq2VbdoGBxgxt1TjrXD5Ap1HKs=; b=tEh/0Ae52sLWMPeGTwgCz9EYIPAsYFjTcPeuXHa7Ypy5GnL+l4MJeRTkf0FWr1fQnX 3GU3SvL+5+Wq8SLU7fZj8efyv+uCXU2Smg5YrnZT+oZkrftkxJcXd/lrDMGCO8EBZEtg MdV4mCJZIUyhs9jwQ/cYoMXCWIu+z9XuiXNGFou96khkSdJlx4Mma5SLxaTPmyXoX1G+ hjTf0Hw4QKhVtAWoSnwppL3m+xf8E3VE0jR3/rvX9ub6e6Pfz/jd1IeqShe1ilSjCGS2 kRVEZ97nvWVizeQ57gk/2JEpLW0k/+cJhAWaGBuBmpObFyzS4cTe6LSJYAsHOodOtJLb g6rA== X-Gm-Message-State: AOAM533tWeOue9oTR43QtBpemDcK7y5L7BRAsGcX+/tL2SZenI8OPeFJ fNbiXLbVuH+9b6UiRH9SsgxOa/r6w+Y= X-Received: by 2002:a17:906:b2c6:: with SMTP id cf6mr3855268ejb.210.1589983551950; Wed, 20 May 2020 07:05:51 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b16sm1873467edu.89.2020.05.20.07.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 07:05:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B781B1FF92; Wed, 20 May 2020 15:05:41 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 06/15] tests/fp: split and audit the conversion tests Date: Wed, 20 May 2020 15:05:32 +0100 Message-Id: <20200520140541.30256-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520140541.30256-1-alex.bennee@linaro.org> References: <20200520140541.30256-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::643; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x643.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Split the float conversion tests into separate groups and audit the tests to check what is still broken. I was able to enable a bunch of tests that had been missed before: all the float to float conversions ui32_to_extF80 ui64_to_extF80 extF80_to_ui32 extF80_to_ui32_r_minMag extF80_to_ui64 extF80_to_ui64_r_minMag Signed-off-by: Alex Bennée --- tests/Makefile.include | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/tests/Makefile.include b/tests/Makefile.include index e6d87fcbf0e..a00ccc94b8b 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -687,11 +687,26 @@ test-softfloat = $(call quiet-command, \ (cat $2.out && exit 1;), \ "FLOAT TEST", $2) -# Conversion Routines: +# Conversion Routines: Float to Float +# FIXME: f32_to_f128 (broken), f64_to_f128 (broken) +# FIXME: f128_to_f32(broken), f128_to_f64 (broken) +# FIXME: f128_to_extF80 (broken) +check-softfloat-conv-f2f: $(FP_TEST_BIN) + $(call test-softfloat, \ + f16_to_f32 f16_to_f64 \ + f16_to_extF80 f16_to_f128 \ + f32_to_f16 f32_to_f64 \ + f32_to_extF80 \ + f64_to_f16 f64_to_f32 \ + extF80_to_f16 extF80_to_f32 \ + extF80_to_f64 extF80_to_f128 \ + f128_to_f16, \ + float-to-float) + +# Conversion Routines: Int and Uint to Float # FIXME: i32_to_extF80 (broken), i64_to_extF80 (broken) -# ui32_to_f128 (not implemented), extF80_roundToInt (broken) -# -check-softfloat-conv: $(FP_TEST_BIN) +# ui32_to_f128 (not implemented) +check-softfloat-conv-to-float: $(FP_TEST_BIN) $(call test-softfloat, \ i32_to_f16 i64_to_f16 \ i32_to_f32 i64_to_f32 \ @@ -701,7 +716,12 @@ check-softfloat-conv: $(FP_TEST_BIN) ui32_to_f16 ui64_to_f16 \ ui32_to_f32 ui64_to_f32 \ ui32_to_f64 ui64_to_f64 \ + ui32_to_extF80 ui64_to_extF80 \ ui64_to_f128, uint-to-float) + +# Conversion Routines: Float to integers +# FIXME: extF80_roundToInt (broken) +check-softfloat-conv-to-int: $(FP_TEST_BIN) $(call test-softfloat, \ f16_to_i32 f16_to_i32_r_minMag \ f32_to_i32 f32_to_i32_r_minMag \ @@ -718,10 +738,12 @@ check-softfloat-conv: $(FP_TEST_BIN) f16_to_ui32 f16_to_ui32_r_minMag \ f32_to_ui32 f32_to_ui32_r_minMag \ f64_to_ui32 f64_to_ui32_r_minMag \ + extF80_to_ui32 extF80_to_ui32_r_minMag \ f128_to_ui32 f128_to_ui32_r_minMag \ f16_to_ui64 f16_to_ui64_r_minMag \ f32_to_ui64 f32_to_ui64_r_minMag \ f64_to_ui64 f64_to_ui64_r_minMag \ + extF80_to_ui64 extF80_to_ui64_r_minMag \ f128_to_ui64 f128_to_ui64_r_minMag, \ float-to-uint) $(call test-softfloat, \ @@ -729,9 +751,14 @@ check-softfloat-conv: $(FP_TEST_BIN) f64_roundToInt f128_roundToInt, \ round-to-integer) +.PHONY: check-softfloat-conv +check-softfloat-conv: check-softfloat-conv-f2f +check-softfloat-conv: check-softfloat-conv-to-float +check-softfloat-conv: check-softfloat-conv-to-int + # Generic rule for all float operations # -# Some patterns are overidden due to broken or missing tests. +# Some patterns are overridden due to broken or missing tests. # Hopefully these can be removed over time. check-softfloat-%: $(FP_TEST_BIN) From patchwork Wed May 20 14:05:33 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: 186985 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp654115ilb; Wed, 20 May 2020 07:11:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXaqMBY+NfY57fHWkMJKYT+31EmCNI0xGkpl8lxeYEfOk8I4jg4T+k3X+E848vboG1sfFu X-Received: by 2002:aed:2a11:: with SMTP id c17mr5377918qtd.178.1589983863751; Wed, 20 May 2020 07:11:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589983863; cv=none; d=google.com; s=arc-20160816; b=Pi91YrTtJhFAF4/qcYoTD4yHsKHSkoasHaEUZ3aUhqJpZ+ng4ZQN04tx9LanWG8f1s HbznhGD/fxF8tZVCFNUC4m591P47S4NBFU3g6dUzHmSJzGbA1ZbcEa2LvY0UmBjZF01O xYKuTK87CQTs4Qg0op78JAACHTi9yqVsieowUPpPgZmwaKhkqhmfTqhDzzvbOLu2l541 ykpxjA55waElctq3p3ZGlr5q/q3z/NlblCZ6DClM3hIXHIuahe7VH4CqaOJ6ePBYcYKF vwoBoaiGW7MaslCbWljmZmAIhekM9/cCQbjh2aDhmp5CWJqJ0Axn2IVyifkpGlaU09kA K0sw== 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=sKR6q5Rw9VEFb3A0dJqchg5Eh5EneIbh7z8JPrBYd9A=; b=Mv1M6J2RS2xuLhQsstJbmmK3Oq4bbGFZQnuR/2n3cG/YLk8qZ/owV5YdNdtIBsc0Ux g12txYH4pLosycJRg6H71g3Rpv95ErollnILSh+yuW8r6AGtdwv+UROoG6XFVvD6x/B2 RSYgDZH3BUE6xgHVShaMV4fphTQNZX1f22tn3LAS90nV4DSesL45wcaBh13fwSaLkPtE Wzg1djPQsEWzn6zyrjQOtGJsAcxkHCfegdP/7qMdD8RFu7us1w9QteQtq/sWz7bNsVg6 ttLDll+oQ/QCGoA45PBirkwJOd9eJrgLViwOJfdaHgz9PWiaXd/jr3OzIasuEN5QMJCp QtKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Px0ECHj9; 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=pass (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 w29si892787qkw.325.2020.05.20.07.11.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 07:11:03 -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=pass header.i=@linaro.org header.s=google header.b=Px0ECHj9; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPR1-0007Kj-9L for patch@linaro.org; Wed, 20 May 2020 10:11:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPM5-0000Aw-Mh for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:57 -0400 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]:43045) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPM4-0001z9-0o for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:57 -0400 Received: by mail-ed1-x544.google.com with SMTP id g9so3163979edw.10 for ; Wed, 20 May 2020 07:05:55 -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=sKR6q5Rw9VEFb3A0dJqchg5Eh5EneIbh7z8JPrBYd9A=; b=Px0ECHj9eowUQxmO4+i+eHa76wcPHGUG4sI98PHR+lxiuyvOlZPwizeOIZZlSdQ69u TmXOTKm+Ajw/NZ0zzXagykvbQ1gryE35h17wsKCbXal7Zy7U8ttt3NlNS5HphgGaSvqb CYYwsQo3skGaqF62R6VBu3NREu7EGCznLoj3J5GxGozx1ZRMWwsslp4eYkzQRaUb+6kz V5NBJCjE992qvhFjW9Te8W6N1EXU8qb3OgowVOijudUCkPofIwrclH9E6/NPDlSXu6Vs VyQRXZI/OOR+SiEK2ZsiyhnR6Hi7QwyAcTUFWehBwaf++O1CyMszL4hTpVlELN+THMfb a0Aw== 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=sKR6q5Rw9VEFb3A0dJqchg5Eh5EneIbh7z8JPrBYd9A=; b=JzntNJLN6J/ehHV6QBeSbZw74xxWC2O/olNAVpwHGwofep05JtnSIu7NqgBIZxKxuI FUTW3TAJ3LRIcrfQY6EKPGRAtzDSm16Jt/po/kET2QLvQYS/6p2T896sQPFHG8IIcNJO bhF+IUb+R02lOn9g9aJPynmVbk7sozy3KKtM/7mFSwb4UCuiO52cNj7Cqdi2Wg5sFFfl OXZs+AX9jT9EgznMSxbQvjyK8YNHEEY6vXh4Stf8DVSMeB7JhwkCDStxFs5dgE5qxJ0q i++5f7Jd+p1l2zEYW8ZOIdEBdGSo7NnSrHvn6RMr26thLB6wAenHqzV1hIqBFRqMu6gG jq+g== X-Gm-Message-State: AOAM531KQhb584ihNGr/wx8PO7BV0UtVOtkcC/GSWj7ImxEVIQ7Qa6rZ DH1ykJrGuXCC9LW74JODYlufPNx4PaI= X-Received: by 2002:aa7:d590:: with SMTP id r16mr1627020edq.304.1589983554663; Wed, 20 May 2020 07:05:54 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x8sm1998151edj.53.2020.05.20.07.05.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 07:05:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CBB751FF93; Wed, 20 May 2020 15:05:41 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 07/15] tests/tcg: better detect confused gdb which can't connect Date: Wed, 20 May 2020 15:05:33 +0100 Message-Id: <20200520140541.30256-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520140541.30256-1-alex.bennee@linaro.org> References: <20200520140541.30256-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::544; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x544.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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?= , Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" While we may gamely give the right information it can still confuse the wide range of GDBs out there. For example ppc64abi32-linux-user reports: warning: Selected architecture powerpc:common is not compatible with reported target architecture powerpc:common64 warning: Architecture rejected target-supplied description but still connects. Add a test for a 0 pc and exit early if that is the case. This may actually be a bug we need to fix? Signed-off-by: Alex Bennée Cc: Richard Henderson --- tests/tcg/multiarch/gdbstub/sha1.py | 4 ++++ 1 file changed, 4 insertions(+) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/tests/tcg/multiarch/gdbstub/sha1.py b/tests/tcg/multiarch/gdbstub/sha1.py index 734553b98bb..2bfde49633c 100644 --- a/tests/tcg/multiarch/gdbstub/sha1.py +++ b/tests/tcg/multiarch/gdbstub/sha1.py @@ -65,6 +65,10 @@ except (gdb.error, AttributeError): print("SKIPPING (not connected)", file=sys.stderr) exit(0) +if gdb.parse_and_eval('$pc') == 0: + print("SKIP: PC not set") + exit(0) + try: # These are not very useful in scripts gdb.execute("set pagination off") From patchwork Wed May 20 14:05:34 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: 186983 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp652225ilb; Wed, 20 May 2020 07:09:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ3oUikKEKpEE+qM/Vby1GA1wLzzhZJDw5kDMjRPX76mB3L0UvF/IpKAyZOjK9b0pFyud3 X-Received: by 2002:ad4:4b01:: with SMTP id r1mr4922799qvw.38.1589983745626; Wed, 20 May 2020 07:09:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589983745; cv=none; d=google.com; s=arc-20160816; b=oA7ebbI5VGOUBCpK82FMDm5c3PpYpTM7lyxRwg0cK/lOAbpxflzVwwbV1JmXlmbbtd +ykTJkblVkMFtkB4kvtgt1w5jwo4u7D5P2UKXLVYXbkdD8hdaZ1/mVPjq4BQ1K6U2LKU 9KHrYPJTdAsOoF/w4CnbJ4OVoSXrM+4jftBHfJE5niIBajguoG6UbRSpd3CrFxuLgzxb vuxZDnHdqJt19XDP1p3kkERaGu2R0H3pjD5rhzjP7N18LL91ldJG+VGcD6I9Q3Iwhx4M OdH/qewdYiOGVcCIMTGcL1yJMwmNayah6Z8RQMal362+gTZktXDjKQkx6zVF/JNqF2tq fS2w== 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=dnU7gW5Cd1Qobc/cZXPkaWez6sVKYdN9N3HtZBS9Vzk=; b=J8ZM6fIoOsZn5fnQTC+3CO/rjkbFqc9t/oPRPIe60SaSdPxF8OUKbejmsustSxLFmE weafYIaiKxcl2s95ud43elQV6YzAijKLuoJAA6aMlAVXL0QDBB89S+E+2LUJCXZ3TKYp gRHueXObbaAXdAEojBZBltwMaB00AjO05hgX1MExiIav/BACljorZzlHV/lpHnFrEaow rUgV9Uq5nZFLoLWIsQT9HH3NdnUX2YcF5NezfQG1xEFFJvhyKtRI5vJ1pqsmwAcF9xbs BrRhRKfTojnjrqJEsMNQ6FWgMG+AJKpK+McxcylmpENbXEoVtKbORrwGk/qNLVTJEqrx me7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=lMZSqeIQ; 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 s10si1754937qkg.328.2020.05.20.07.09.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 07:09:05 -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=lMZSqeIQ; 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]:39382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPP7-0005Bw-5X for patch@linaro.org; Wed, 20 May 2020 10:09:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPM4-00007M-2O for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:56 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:34584) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPM3-0001yf-5r for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:55 -0400 Received: by mail-ed1-x529.google.com with SMTP id i16so3198885edv.1 for ; Wed, 20 May 2020 07:05:54 -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=dnU7gW5Cd1Qobc/cZXPkaWez6sVKYdN9N3HtZBS9Vzk=; b=lMZSqeIQ/8aqCxdKE0tDiEXCjyjlt2AmIIYUTS+gS/OaBpPKPQBrofZFjAg1YpOI0H 94t2R8Ic2009Vq72J6LoGtbAK3EmqQCyyOOpfEunhO9g2NyYNcJB7sJdTHVM2hdTPA4p 7zhVT64UV30AhYpDedx0klZY7S+HCyH7seH4NhaHIQVM3H31fynRNLUD7IQjIxijDhRZ uMNBzb6Xbjmp1g2msluyul46+/htzzoV8CrPMiHEwjFsxGliGW/btq/QflCaeD1rwE8v kEKmsiru8ALFcOG4Jqp8NuZfCi2en3e5vINzKwnXFkzVM665Dbf4CTuWexVSYCQf0Z/I WTNQ== 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=dnU7gW5Cd1Qobc/cZXPkaWez6sVKYdN9N3HtZBS9Vzk=; b=RpE+EggQnQ4KmPmZPatWUdVwv2LCYm1zBgtf6mtPuNiB/QT/BLRcOoMewdTSmTmMc3 6MkNIednE9g6VVJTYH5OhA8j1UjqryLp05vQqx5VYNJzLI43qthmJlNWNTDABvo14NTa LXJYD9F5e7eLPEUYiDeTDL+cAQ8eNCKF3HhaGP3sStF4cnAQkgPZHWZzqg7SDGSWcou7 vcHv1UlghjnxlJ+3tW7DItE723sHYhqgmp1B5NYQNO627fm01PwR51eSexAGlITjlThZ N4/9LJ0C3Fvs1qnJd22zk/Xsv65GkFL3SVw5H+DvAsmXkFhgWqcWX9cei7ofFmuBV3K+ skuw== X-Gm-Message-State: AOAM533+7DWnsfwhGmk2lcxTJE/BzK5ebE71eILZlrJO+vybAdBnupjW fyAyJYWX+Kl6yaG/j8z5CfCnsQ== X-Received: by 2002:aa7:c6c6:: with SMTP id b6mr3481695eds.53.1589983553667; Wed, 20 May 2020 07:05:53 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h18sm2054301eji.86.2020.05.20.07.05.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 07:05:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DEF971FF96; Wed, 20 May 2020 15:05:41 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 08/15] tests/docker: bump fedora to 32 Date: Wed, 20 May 2020 15:05:34 +0100 Message-Id: <20200520140541.30256-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520140541.30256-1-alex.bennee@linaro.org> References: <20200520140541.30256-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x529.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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 Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We should be keeping this up to date as Fedora goes out of support quite quickly. Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/fedora.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index 179575ecaaa..92204dc79eb 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -1,4 +1,4 @@ -FROM fedora:30 +FROM fedora:32 # Please keep this list sorted alphabetically ENV PACKAGES \ From patchwork Wed May 20 14:05:35 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: 186986 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp654470ilb; Wed, 20 May 2020 07:11:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJys6tBfvy57XjZ6v0lCO9ZYlFstpiiPW2HhhnJPR+A/EDeA5TqzlT0/jqEm1OyvuvG4Bdvx X-Received: by 2002:a0c:906e:: with SMTP id o101mr5027535qvo.180.1589983888519; Wed, 20 May 2020 07:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589983887; cv=none; d=google.com; s=arc-20160816; b=KNo5KDZNIO5ME6I3sYoKZ3i66kLd3+irPX/i19t9A9m3iTupdsPKDSzL4XJ/1C9KgD eyySl0czJrcQHJNxhyj0RPtrfKe76p8+PgyWTiZeW6WuKxTrC9ijxuOlB0slXhneUuz6 cQKLirU3dtYkgQi76ug3jFdq/5Hxc20u/+ob0fXoG/KrCLBkt67CPakUWDBrcpHfiQMA PZFQgIwDadFDbd2XE3orDZLdLfjkvsj8UAq7x6bopx8Ei7BrZpVDBOJIFCLFYmACIm61 hLu8zzevaTyVaVg0sIZ8Mt+gD5ROzp0SqRItPYmw5WliawaoYEHjrgr1i8GpPu3qMO+3 0Kmg== 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=YNz4cR2RJqYNSGkM/23ZopCXsChGl4cQuLehMB9w6UY=; b=CkAsyVrIezi6juztDPjNiJrTqiuuUsV6iGv+hAidCGTwkyWJ0ac4jmuUN8rWhaI4Q/ TAuT/ocJdeFNtqSD0VpQy7xGpzw7lKa8V680btz8B6r6WrDADu1YTBL483X0TsrNJvLJ 1n0Tk9MvEdPQ5DQmHHraWpw6V2Kz+ZG4F0Ipqk7qVzhyYuIj5DWf8WKo0lBZLzUJsN4n x+TLcz7nyhFsYrmCwuCdcW4h9cTHoMO1m0erf1uzP/qHtbl6rJvA9UjFqw6g4MajSqzX i2ffV5o4zdRZFUuyPEK2LNfGhhJjo9/XlGytXfrLxpuJ6vOG090PwmJTqAXeg9qok8SG /ngw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=H7wnbwfj; 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 a15si1829991qko.24.2020.05.20.07.11.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 07:11:27 -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=H7wnbwfj; 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]:46298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPRO-00081q-Vy for patch@linaro.org; Wed, 20 May 2020 10:11:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPMP-0000r6-AS for qemu-devel@nongnu.org; Wed, 20 May 2020 10:06:17 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:46742) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPM9-00021v-SE for qemu-devel@nongnu.org; Wed, 20 May 2020 10:06:17 -0400 Received: by mail-ej1-x62b.google.com with SMTP id e2so3891187eje.13 for ; Wed, 20 May 2020 07:06:01 -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=YNz4cR2RJqYNSGkM/23ZopCXsChGl4cQuLehMB9w6UY=; b=H7wnbwfjnT17W6xqZy4tx6t9DcaNBGCIWgmexo/FTYMhPT+wzOE1RXtqfKBfS0vI5I xzohZPu7KU6v45Iue0kAlTzlhhp82SEHq0S8tn8Yxs8HM4ByfCE/0K1f7NcuLNurDlbn oWdQgtgC5/ZrWAY+ha8Oe+EHl/Tp6tks4icRXQvMCoTiSpCkoR0g12JBLcUc5JAw1zhx Oq7CmcAGXGts9WZSv9ud3L9nW7g+QLti7Oknlr9sdrYFWfoVcjjxuwzW5DqMe99U7qXD qxnI72rqrbu+KApPCp2yl/dwdGYeHF9VSj/tVXLRAHznO8TY4l9fWB8O5e/rJJ3NbnLc 5Lww== 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=YNz4cR2RJqYNSGkM/23ZopCXsChGl4cQuLehMB9w6UY=; b=E2DI4aWMxDhz8kagqn0WpdVTza/ZGAPEQTmIUC9mfziFPVi9pckW7XlDB5fSWXWaPR yqew9iq7bvkhBHp9Dv7c01vRMhhU8pXz3WYeWBXAIjup+ImN8Jb9B9y8KwY2tbJ8kdJg ofkQ0I8UKIvPbcz8jyy7bEyrfO0Lgvi5w9kqA0fpvr803UQWd9+IOGHg1hLm6I86Xep5 z5kmeRxbG3KXJTL+nw+2OLTmIvN2TSLyOnGVIel+GrR9g6+ed0LaGEytLgE9A8KMl4rG 1fjRl+T2AjuWxWgHdU07971QWXdXctsiBqbqWQvNwRp/2PMX6Q8mMgyRefvsgiu9WzRN qBwQ== X-Gm-Message-State: AOAM533a9ao4nhbBfGRCAIup3sxIb9MBX14zxY47Kz285rZACsJ/ZYz4 kndWj1cRRbgWz7gS8BIb7GZSxkui2rI= X-Received: by 2002:a17:906:2dc8:: with SMTP id h8mr4080737eji.108.1589983560483; Wed, 20 May 2020 07:06:00 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g20sm2001782ejx.85.2020.05.20.07.05.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 07:05:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 001721FF98; Wed, 20 May 2020 15:05:42 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 09/15] tests/docker: add debian11 base image Date: Wed, 20 May 2020 15:05:35 +0100 Message-Id: <20200520140541.30256-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520140541.30256-1-alex.bennee@linaro.org> References: <20200520140541.30256-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62b.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, SPF_PASS=-0.001 autolearn=_AUTOLEARN 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 Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We won't use this for building QEMU but we do need newer GCC's and binutils for building some of our test cases. Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 2 +- tests/docker/dockerfiles/debian11.docker | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tests/docker/dockerfiles/debian11.docker -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 43a86786882..3596b589307 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -7,7 +7,7 @@ HOST_ARCH = $(if $(ARCH),$(ARCH),$(shell uname -m)) DOCKER_SUFFIX := .docker DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles # we don't run tests on intermediate images (used as base by another image) -DOCKER_PARTIAL_IMAGES := debian9 debian10 +DOCKER_PARTIAL_IMAGES := debian9 debian10 debian11 DOCKER_PARTIAL_IMAGES += debian9-mxe debian-bootstrap DOCKER_IMAGES := $(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))) DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES)) diff --git a/tests/docker/dockerfiles/debian11.docker b/tests/docker/dockerfiles/debian11.docker new file mode 100644 index 00000000000..5adfd62d553 --- /dev/null +++ b/tests/docker/dockerfiles/debian11.docker @@ -0,0 +1,18 @@ +# +# Docker multiarch cross-compiler target +# +# This docker target uses the current development version of Debian as +# a base for cross compilers for building test binaries. We won't +# attempt to build QEMU on it yet given it is still in development. +# +# On its own you can't build much but the docker-foo-cross targets +# build on top of the base debian image. +# +FROM debian:bullseye-slim + +# Duplicate deb line as deb-src +RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list + +# Install common build utilities +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata From patchwork Wed May 20 14:05:36 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: 186982 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp651449ilb; Wed, 20 May 2020 07:08:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9Nl00gNxmjGmSmXcGrEeQ46iZtAYUTQs41a/KaTBHfNuasNEi/iuh60pgk2iZ3mMMS64w X-Received: by 2002:a37:d89:: with SMTP id 131mr2593301qkn.454.1589983698466; Wed, 20 May 2020 07:08:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589983698; cv=none; d=google.com; s=arc-20160816; b=hO4cICO4l1ESJyWr20ShZV9C/GGsoRyjdqZS1ahqFZUQod0pa/kGGm0wA42KgEnyvE IH/mZIXxPQ/8rx7drC8vl+rQZkHDLqQB4aKxaEyvf/80/U0gRUnaukO4OXmvztcT4Snv +9JbMPfSM2DBRKweF8FT1FGv/OTUx6oku9QbMlD9bWFK94x8a3dHQo45n43BmVGdlZFO 6WmuVKcrGtWc9CFuBkcW44gKdqERJXAC5iX9UlLt8SwT0Kc4ebXjeZsVI/7vD4CQ2PpZ vKXrdYAeBoetFxQpc6GTwV8JDzo/fcATrk51NNFAQQxnsEBRal3JRMsz+wuh3WkyHlEZ jVxQ== 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=dnix+tfq2fdfws6TsVzkTHLlR4M0EwyavqIhHiXG7vU=; b=qp0g76KzXdJsUasnkNRMBvJYgoSpL4QXAJWRm5hf7uf4EdjenCveyZxisCdRqKNeZ4 7yqY6oTkacjuYgAXoVAWQpsKxfLh3lK+B/9xMJuH49qrO0xUnhy1j7HW15jo1DB645hY 1WGrARpkymP8mQBfjCls09XEoN12t5804fHtLxustZHE++R/i6zahahfu0Q2LH//7Hyl uBruLyeR07xSOtAoFEqKi1DCuauc8Cq/moRCTPuPZtWz41KMMQT6HP/5oGs48lHHs/lF BYb3a/Kg7RSUJXcJtfUIc5xz9dlAbvNCJsB2BjjXcIT73Zl7yZGMSgRrbXRccAqtyjiz MPJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X5HHixyO; 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 e23si1711847qkm.207.2020.05.20.07.08.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 07:08:18 -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=X5HHixyO; 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]:35152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPOL-0003SR-WB for patch@linaro.org; Wed, 20 May 2020 10:08:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPM6-0000C0-71 for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:58 -0400 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]:32869) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPM5-0001za-7E for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:57 -0400 Received: by mail-ej1-x644.google.com with SMTP id n24so3987990ejd.0 for ; Wed, 20 May 2020 07:05:56 -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=dnix+tfq2fdfws6TsVzkTHLlR4M0EwyavqIhHiXG7vU=; b=X5HHixyOI99g+WiUaQD8pYhavhfEXVgxEeZlenYNgBDtrxHOoAkneZTL2JLiStsqV8 /MiErkGxdpVR9/uOl7lZzeugFLuhkdppf8Jwgd5J7Xn0ts+m9ufm2Nzq2XP18PpejV7D uPLeZOWCX5b0ISiaiI1pmKtwYdbPwypNC2e9HkhYO/3v14WjyEcMfig2X/46Ad5JD7Tk i5ljhwGtM+UenXpnox5vExj+gaeHlYCeB3xR9oWodpvsXtpPXZ3dWCmECO8fZDZVdDoJ iWQHHOI9NbtIVxhVXkAvtJuDu5zdkCNQf6X0Alk+ytco7n4R/628WTyUyhp2z4/1UxcH yQeQ== 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=dnix+tfq2fdfws6TsVzkTHLlR4M0EwyavqIhHiXG7vU=; b=MPtBW+nwapC2aRNG/K2XujXV9XdBL733LVwpM0SiCV+bMFxVdYpmZL9srOUyEpr1Q1 09JWhafmwZ4RU4DK2AA/TZmE4DCMWeSO8X7nKVlf40VI7J3QMv4TpIZpGX3NgilpuiEc E2RtdH+ALa2G8XiVz3TgzFfhdbuDUkjifOpH67u8E+NAZ3Cb/JUeDXRNQj4N9twQp0IN /vqL3rBhislpCc3P977KGaM6/7PSgw9YN64wkGrzQ8dhOp9WUsidVqmnovSI9fUiR+7y nmpHaKm2DjwSpH0m22t94jGqCpY5SDlkPuONc7P95eI54P054s//VGRA92l++OGsNnog gbKg== X-Gm-Message-State: AOAM532bl723x3/w13qc8C6WMflNps9HwOr4tHzzvmLkCosQXinO+O4/ jLIUwZErRk8hoSYz/Q4a3bozcg== X-Received: by 2002:a17:906:a417:: with SMTP id l23mr3753999ejz.213.1589983555832; Wed, 20 May 2020 07:05:55 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b23sm1985096ejz.121.2020.05.20.07.05.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 07:05:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 19D701FF99; Wed, 20 May 2020 15:05:42 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 10/15] tests/docker: use a gcc-10 based image for arm64 tests Date: Wed, 20 May 2020 15:05:36 +0100 Message-Id: <20200520140541.30256-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520140541.30256-1-alex.bennee@linaro.org> References: <20200520140541.30256-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::644; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x644.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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 Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" As we enable newer features that we want to test on arm64 targets we need newer compilers. Split off a new debian-arm64-test-cross image which we can use to build these new tests. Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 2 ++ .../dockerfiles/debian-arm64-test-cross.docker | 13 +++++++++++++ tests/tcg/configure.sh | 4 ++-- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 tests/docker/dockerfiles/debian-arm64-test-cross.docker -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 3596b589307..ed46bd98eb5 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -131,9 +131,11 @@ docker-image-travis: NOUSER=1 # Specialist build images, sometimes very limited tools docker-image-tricore-cross: docker-image-debian9 +docker-image-debian-arm64-test-cross: docker-image-debian11 # These images may be good enough for building tests but not for test builds DOCKER_PARTIAL_IMAGES += debian-alpha-cross +DOCKER_PARTIAL_IMAGES += debian-arm64-test-cross DOCKER_PARTIAL_IMAGES += debian-hppa-cross DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross DOCKER_PARTIAL_IMAGES += debian-powerpc-cross debian-ppc64-cross diff --git a/tests/docker/dockerfiles/debian-arm64-test-cross.docker b/tests/docker/dockerfiles/debian-arm64-test-cross.docker new file mode 100644 index 00000000000..a44e76d9421 --- /dev/null +++ b/tests/docker/dockerfiles/debian-arm64-test-cross.docker @@ -0,0 +1,13 @@ +# +# Docker arm64 cross-compiler target (tests only) +# +# This docker target builds on the debian Bullseye base image. +# +FROM qemu:debian11 + +# Add the foreign architecture we want and install dependencies +RUN dpkg --add-architecture arm64 +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt install -y --no-install-recommends \ + crossbuild-essential-arm64 gcc-10-aarch64-linux-gnu diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index eaaaff6233a..2326f978562 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -97,8 +97,8 @@ for target in $target_list; do case $target in aarch64-*) # We don't have any bigendian build tools so we only use this for AArch64 - container_image=debian-arm64-cross - container_cross_cc=aarch64-linux-gnu-gcc + container_image=debian-arm64-test-cross + container_cross_cc=aarch64-linux-gnu-gcc-10 ;; alpha-*) container_image=debian-alpha-cross From patchwork Wed May 20 14:05:37 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: 186984 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp652807ilb; Wed, 20 May 2020 07:09:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+JOK5btIIpzypvKk9SalqX8CaI8gR9BaW0P0rPUz+AKq3gTUFejlJIfrQKNriKU//woIj X-Received: by 2002:ac8:4a88:: with SMTP id l8mr5184424qtq.337.1589983779301; Wed, 20 May 2020 07:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589983779; cv=none; d=google.com; s=arc-20160816; b=YNr7iiww88yXgDVbXZ/qpA3eyGgiPCcxqQAspap5RmUNJ0YJH6rUjmugkRzIu0dsBI 1qS4CasIEUIJxiTe6Tmhit+GkN5+rUmf77BGb23dN0jaUaxM8Ll6r+Awlso62KBhO0+3 tCDSInRcGej2NNz5f44EK9hAHk3yAGPqcjTOnSsBGmn3JuLOjX4NnzVq5hGTwqqnD+74 +XWeyTXTRqO7wYhORJEO4lHdCmyC5WH6qKBcLXATBewstFUzP6a4Z88hc7R520PepISG StQkhiGL2QWSMLKXkKNCd3prFutjs+eGPJHQnvL72X+cD49CXiqIoIK+BS3VVO854tGn KgwA== 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=OnH5KqCVhWj9cyXiWz451vuApV6MafEp8c06IXaPDWI=; b=DhExLeL9lFjOXC7Kw/aDQAF6Nin8u6mAQyttGd3nNxChN9FewufyYfo9eNyyHeaiXk ueUMSE3kJdibFm1+xX6cKqg3U+UkzfxqMaxPeOdP/5Y114nN1Efi4zn7bVUEPeOqL4oD 9hYPJe43pgI0aoQbni7G0gxH7GkzsLW7Z4DBrQR61LAVK9OfVo6tsSu1MXIeJO4IPwhA 6JuD8S1dVgQRCy8NwqBXOqCnOKBi5ryRBnAmqFwqOPCKQj75B/w+HIyLxV+Ludsw7zCl XMGbSeUTCW7jHyGMQmcfJ9bDduz1obwlQn82wAmpfQ8Z8IyswE7hfV2FLClnVm385+kg t5cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MEb5p9Fq; 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 e9si1645261qtg.398.2020.05.20.07.09.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 07:09:39 -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=MEb5p9Fq; 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]:40466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPPe-0005cT-ND for patch@linaro.org; Wed, 20 May 2020 10:09:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPM9-0000Jl-VO for qemu-devel@nongnu.org; Wed, 20 May 2020 10:06:05 -0400 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]:35269) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPM7-00021P-TA for qemu-devel@nongnu.org; Wed, 20 May 2020 10:06:01 -0400 Received: by mail-ed1-x541.google.com with SMTP id be9so3198333edb.2 for ; Wed, 20 May 2020 07:05:59 -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=OnH5KqCVhWj9cyXiWz451vuApV6MafEp8c06IXaPDWI=; b=MEb5p9Fq08K/9ndYREC/gwvkLrVm8MJVEgOVEZcaTRlqPmqmNCscLj8vk3s3GFJzhS xfqzARF8aFGNXUVbQZRkuqWyexguHlZUyqgp7lvIfqg9fIu+Q/7ygC6uWAbwra3pLvjH kq0P5XxSnQcw9URbzTubjYFYSZceSjI6OzOUaFUhGsJWqMrBJZIlAOLp3I3mMXWhVGU+ UWPG1nYAFHC9WRIoFflSarx6Avs8tQ7i4BGQb16ILKl77s6wuy/KqgOkCbA1qMp5iwLC C/WtcMm15fcvhAWctIT9O4WOcp6izd/4VpWAilGKTTsdo4Qvckny05ZcukGafSGLlhyp CnyQ== 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=OnH5KqCVhWj9cyXiWz451vuApV6MafEp8c06IXaPDWI=; b=dcWSFsF5EJwqoqPzCarcr/yB/vAEkZxoywecLhlvb+aIV0OqWlFglBGTM2nGP3DvyA fYO3+rn4EkMjgxUF6kPuueMQ+ilfmRCFRLKUXUJ8eM6pqWmIE+eS9fUH/ix+3HCMyGi1 /tjTJYQ3LvipRDRAGF3g353GPaO7BWpccy9iBYk7HJESSFjnLQ69gQXH2ZW4IopGXI7J QtQxfymdAmNOtr+WDfBv3502yuLseUuyv6lCeoREIvhlIMANzgkR9tcMsKurkyNBtQLn AHSiN9v/bhDzg2ec0H1adNVOu+pkflcFjZ595lMNI77WjZFHpzxFPjM4kOFNmGbYI28W wKLw== X-Gm-Message-State: AOAM5321UU54mrP5ovK7ClDmjzGPQz3qeA8k8qPILJnkOD7gDC5UADCc Unb5lz2HfNQvTldUd99pjLzhhxu/kSU= X-Received: by 2002:a05:6402:c11:: with SMTP id co17mr3630780edb.218.1589983558259; Wed, 20 May 2020 07:05:58 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id bi7sm1984952edb.17.2020.05.20.07.05.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 07:05:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 356041FF9A; Wed, 20 May 2020 15:05:42 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 11/15] tests/tcg/aarch64: Add bti smoke test Date: Wed, 20 May 2020 15:05:37 +0100 Message-Id: <20200520140541.30256-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520140541.30256-1-alex.bennee@linaro.org> References: <20200520140541.30256-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::541; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x541.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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?= , "open list:ARM TCG CPUs" , Richard Henderson , Peter Maydell Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Requires gcc 10 for -mbranch-protection=standard. Signed-off-by: Richard Henderson Message-Id: <20200520023139.9812-3-richard.henderson@linaro.org> [AJB: add CROSS_CC_HAS_ARMV8_BTI check] Signed-off-by: Alex Bennée --- tests/tcg/aarch64/bti-1.c | 62 +++++++++++++++++++++++++++++++ tests/tcg/aarch64/bti-crt.inc.c | 51 +++++++++++++++++++++++++ tests/tcg/aarch64/Makefile.target | 9 +++++ tests/tcg/configure.sh | 4 ++ 4 files changed, 126 insertions(+) create mode 100644 tests/tcg/aarch64/bti-1.c create mode 100644 tests/tcg/aarch64/bti-crt.inc.c -- 2.20.1 diff --git a/tests/tcg/aarch64/bti-1.c b/tests/tcg/aarch64/bti-1.c new file mode 100644 index 00000000000..61924f0d7a4 --- /dev/null +++ b/tests/tcg/aarch64/bti-1.c @@ -0,0 +1,62 @@ +/* + * Branch target identification, basic notskip cases. + */ + +#include "bti-crt.inc.c" + +static void skip2_sigill(int sig, siginfo_t *info, ucontext_t *uc) +{ + uc->uc_mcontext.pc += 8; + uc->uc_mcontext.pstate = 1; +} + +#define NOP "nop" +#define BTI_N "hint #32" +#define BTI_C "hint #34" +#define BTI_J "hint #36" +#define BTI_JC "hint #38" + +#define BTYPE_1(DEST) \ + asm("mov %0,#1; adr x16, 1f; br x16; 1: " DEST "; mov %0,#0" \ + : "=r"(skipped) : : "x16") + +#define BTYPE_2(DEST) \ + asm("mov %0,#1; adr x16, 1f; blr x16; 1: " DEST "; mov %0,#0" \ + : "=r"(skipped) : : "x16", "x30") + +#define BTYPE_3(DEST) \ + asm("mov %0,#1; adr x15, 1f; br x15; 1: " DEST "; mov %0,#0" \ + : "=r"(skipped) : : "x15") + +#define TEST(WHICH, DEST, EXPECT) \ + do { WHICH(DEST); fail += skipped ^ EXPECT; } while (0) + + +int main() +{ + int fail = 0; + int skipped; + + /* Signal-like with SA_SIGINFO. */ + signal_info(SIGILL, skip2_sigill); + + TEST(BTYPE_1, NOP, 1); + TEST(BTYPE_1, BTI_N, 1); + TEST(BTYPE_1, BTI_C, 0); + TEST(BTYPE_1, BTI_J, 0); + TEST(BTYPE_1, BTI_JC, 0); + + TEST(BTYPE_2, NOP, 1); + TEST(BTYPE_2, BTI_N, 1); + TEST(BTYPE_2, BTI_C, 0); + TEST(BTYPE_2, BTI_J, 1); + TEST(BTYPE_2, BTI_JC, 0); + + TEST(BTYPE_3, NOP, 1); + TEST(BTYPE_3, BTI_N, 1); + TEST(BTYPE_3, BTI_C, 1); + TEST(BTYPE_3, BTI_J, 0); + TEST(BTYPE_3, BTI_JC, 0); + + return fail; +} diff --git a/tests/tcg/aarch64/bti-crt.inc.c b/tests/tcg/aarch64/bti-crt.inc.c new file mode 100644 index 00000000000..ef7831ad76a --- /dev/null +++ b/tests/tcg/aarch64/bti-crt.inc.c @@ -0,0 +1,51 @@ +/* + * Minimal user-environment for testing BTI. + * + * Normal libc is not built with BTI support enabled, and so could + * generate a BTI TRAP before ever reaching main. + */ + +#include +#include +#include +#include + +int main(void); + +void _start(void) +{ + exit(main()); +} + +void exit(int ret) +{ + register int x0 __asm__("x0") = ret; + register int x8 __asm__("x8") = __NR_exit; + + asm volatile("svc #0" : : "r"(x0), "r"(x8)); + __builtin_unreachable(); +} + +/* + * Irritatingly, the user API struct sigaction does not match the + * kernel API struct sigaction. So for simplicity, isolate the + * kernel ABI here, and make this act like signal. + */ +void signal_info(int sig, void (*fn)(int, siginfo_t *, ucontext_t *)) +{ + struct kernel_sigaction { + void (*handler)(int, siginfo_t *, ucontext_t *); + unsigned long flags; + unsigned long restorer; + unsigned long mask; + } sa = { fn, SA_SIGINFO, 0, 0 }; + + register int x0 __asm__("x0") = sig; + register void *x1 __asm__("x1") = &sa; + register void *x2 __asm__("x2") = 0; + register int x3 __asm__("x3") = sizeof(unsigned long); + register int x8 __asm__("x8") = __NR_rt_sigaction; + + asm volatile("svc #0" + : : "r"(x0), "r"(x1), "r"(x2), "r"(x3), "r"(x8) : "memory"); +} diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target index 312f36cde5f..8d39f4b2f45 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -24,6 +24,15 @@ run-pauth-%: QEMU_OPTS += -cpu max pauth-%: CFLAGS += -march=armv8.3-a endif +# We need binutils-2.32 to link this test case without warnings. +# And if we know that we have 2.32, we also don't need the linker script. +# In the meantime, disable the test by default. +ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_ARMV8_BTI),) +AARCH64_TESTS += bti-1 +bti-%: CFLAGS += -mbranch-protection=standard +bti-1: LDFLAGS += -nostdlib +endif + # Semihosting smoke test for linux-user AARCH64_TESTS += semihosting run-semihosting: semihosting diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 2326f978562..ebfe3e2ce5a 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -231,6 +231,10 @@ for target in $target_list; do -march=armv8.3-a -o $TMPE $TMPC; then echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -mbranch-protection=standard -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_BTI=y" >> $config_target_mak + fi ;; esac From patchwork Wed May 20 14:05:38 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: 186987 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp655262ilb; Wed, 20 May 2020 07:12:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzT9OHTJ3wWNvt4dxH+SzYHvuX7BsKSM6qqvDkKsOwgeRc7Jt7V0z/jK4X7Nebhc3eZBI+y X-Received: by 2002:a37:9781:: with SMTP id z123mr4395872qkd.266.1589983945560; Wed, 20 May 2020 07:12:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589983945; cv=none; d=google.com; s=arc-20160816; b=MQffBc01rTP5ZlsHsdidei/RNbibMy9gdeEytZmgnh36LuJlsh+EqNdrJRa5nD1lSH yR//+htr5RLJbJ211HITVcWNcOaaYnrGlu/AxmAEEtOoRNfIgleE2H002NmFVOHEh17C 4jmqunQRdUshtZgSFXWp6A7AbjAksQJUsX569vS8CSw5iIOjeA22MB4ibnntdSRKrcJZ +btU86aANALMODWYJJub6l2v4xLMDLxQJgfQHZfUJUwk1e3CWzcgUNqTz90oJT4T2PJs hji2XGF1pNXfmYdQ+gfaeleZoNMTfFG+s/38hA5dlSkK+DQCnknlPEWVKZDNzSL2XBJS RBEQ== 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=+LGH6cEsciAiwVyXb+MVUWk2m7FbTfgK1AGU3Atbb6c=; b=h5fyWRrhNLUKILZdEHcuNDwpl7tzpzNI8cUNZGGLUwUuB84NRS8Po8VbcvI4Lxnj6Q N7LJFF2Vy8z3PVik40vo9NByEbG7ufpuCUNL3z0znvekISmKQYLQwoo2mHyseqVx/H0I ggPqgVEQgOAdppUTmHQo8wCuPGYpo0Kfovr/19EOJonzLUKx9hh5g/kfenxboJTZX4lR x4gh6nDaqFlleqPUoGECIHv/L1wnP2BeqUXD4607Q1i7xiPRYbjKjaL3NIbWP3bZ0VGo rjUQwQZVc4AcCGRal2AdBXI/HnHbmwKHm3jdXERfmqu/qpY30XbQDmgfXXUBBIV3upLC gXOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tCnOefJA; 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 a21si1557794qkk.341.2020.05.20.07.12.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 07:12: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=tCnOefJA; 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]:52686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPSL-0002LV-0Q for patch@linaro.org; Wed, 20 May 2020 10:12:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPM7-0000Dl-7c for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:59 -0400 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]:45592) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPM6-0001zr-BQ for qemu-devel@nongnu.org; Wed, 20 May 2020 10:05:58 -0400 Received: by mail-ed1-x544.google.com with SMTP id s19so3151565edt.12 for ; Wed, 20 May 2020 07:05:57 -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=+LGH6cEsciAiwVyXb+MVUWk2m7FbTfgK1AGU3Atbb6c=; b=tCnOefJAPSgNssrx7Mqr6fwaYfBkYwjbKjD01MQnAfIMEpCA+h3AcWI6YIGsu4AnJL 1wKPAlaCQszIXvxzyunpgiJ2NcwV5HxN3e83fzrYcAcWo/oXhmDl0TVFFKOEgI7CwF6h R7XG9OD9ZjPTP0PcbDLbztZ6gU5U4cKOzCCAOYAZ8zEh/dtijjoRvNWzlhYAf4V3nnTL 243rLu16SSQr0cdXn6KYpPfedN4lypsvvA7MGR+gyiYretHRPq4F69XkMzOXDz0XIN1c oE5znS/0Dpsy5OLO+2p9gapwgryMOwEhIssR2h+vhRblx4fo//1GqZRw37tR/ULDnVTK 3T1w== 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=+LGH6cEsciAiwVyXb+MVUWk2m7FbTfgK1AGU3Atbb6c=; b=fKsODiwd3O3erfyRydXNgfQj3xQMUVSMDzt2rMe9J26obIOtSxqCY1sPis442Q+WD7 PBqCNfpvoVH3xy4UISEsaNzVH8SZlQOZLJnaCFKsUz4HIqnYm4Fa+M3pYFA2HAiVM556 toBlBA5AU6SiGUbDKnjQPZFxotv1gccIKDtpKvgA6gvC6EKvlVHIT+DvILBsdYUk61A/ aQfZ7tcqaVrsDIjfJk2+SeYTvlEjI4tNQ+J1nJlTjSpUyTopF93qij/lp+cv7GdlRa2u v64Gw0JO0GvA+T0Upz8+Kzfi8uYPWAugE/HIEYB4Tv/4a9xDksO4vtAmbYyZ8KWeQVWJ v6bQ== X-Gm-Message-State: AOAM533hOqpOdwWReXHlPPP4HWx9trp9rYTA2oOplvBQ4Kcav+D5kEdV IgD+38APpQOhep9z0fZ0i3Zbww== X-Received: by 2002:a05:6402:c87:: with SMTP id cm7mr3452099edb.96.1589983557054; Wed, 20 May 2020 07:05:57 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id ch8sm1994503ejb.53.2020.05.20.07.05.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 07:05:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 490351FF9B; Wed, 20 May 2020 15:05:42 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 12/15] cpus-common: ensure auto-assigned cpu_indexes don't clash Date: Wed, 20 May 2020 15:05:38 +0100 Message-Id: <20200520140541.30256-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520140541.30256-1-alex.bennee@linaro.org> References: <20200520140541.30256-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::544; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x544.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: Eduardo Habkost , Nikolay Igotti , Igor Mammedov , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Basing the cpu_index on the number of currently allocated vCPUs fails when vCPUs aren't removed in a LIFO manner. This is especially true when we are allocating a cpu_index for each guest thread in linux-user where there is no ordering constraint on their allocation and de-allocation. [I've dropped the assert which is there to guard against out-of-order removal as this should probably be caught higher up the stack. Maybe we could just ifdef CONFIG_SOFTTMU it?] Signed-off-by: Alex Bennée Cc: Nikolay Igotti Cc: Paolo Bonzini Cc: Igor Mammedov Cc: Eduardo Habkost --- v2 - slightly tweak the index algorithm to preserve cpu_index = 0 --- cpus-common.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/cpus-common.c b/cpus-common.c index 55d5df89237..70a9d12981a 100644 --- a/cpus-common.c +++ b/cpus-common.c @@ -61,13 +61,15 @@ static bool cpu_index_auto_assigned; static int cpu_get_free_index(void) { CPUState *some_cpu; - int cpu_index = 0; + int max_cpu_index = 0; cpu_index_auto_assigned = true; CPU_FOREACH(some_cpu) { - cpu_index++; + if (some_cpu->cpu_index >= max_cpu_index) { + max_cpu_index = some_cpu->cpu_index + 1; + } } - return cpu_index; + return max_cpu_index; } void cpu_list_add(CPUState *cpu) @@ -90,8 +92,6 @@ void cpu_list_remove(CPUState *cpu) return; } - assert(!(cpu_index_auto_assigned && cpu != QTAILQ_LAST(&cpus))); - QTAILQ_REMOVE_RCU(&cpus, cpu, node); cpu->cpu_index = UNASSIGNED_CPU_INDEX; } From patchwork Wed May 20 14:05:39 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: 186993 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp661938ilb; Wed, 20 May 2020 07:20:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWBTR+1FqXysV/gfie6OMbrbei1z9Cabxw8/WGrAx81CB53g8/iOveEucVU2uyKHMTkSOk X-Received: by 2002:aed:2565:: with SMTP id w34mr5559062qtc.54.1589984434071; Wed, 20 May 2020 07:20:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589984434; cv=none; d=google.com; s=arc-20160816; b=mspkRFFagDit/GPTw7W3S/jiwUNQZ5pdzn3xZFkJvScZwpr6sdOGMtV05wJ+R25Y+1 i7CLGw/lOWbw5JEV46AfoXo3EuDHFy8/O4K+MUUDHJlD5gvnLe7aVPVJavvTeztW+Cu+ 1cvh5bH7I7J8Bho02y1H8x3bGAIg5Iit27I42Ijma8gwi5xJP6UJDyamD3qQStazXJ3+ yCDkZ6cJnj1EjSZgedjrpwhgvSHrOwEfDcsOuLvgQxtUgVMYgmDq4zxABHuy33+97NnP B/W5kDaRW4qVXRv8sxBGmqyg4a+aLg9OFkJzD22+KMOvk63+NkkQK1Na8Yi8mxO6yV66 vmOw== 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=Z8jXpAxep38NH+tQtqiVR0PvMkfpz3aIN7XElkKMn28=; b=b55keHXCBbAiEnu+9wwl/S2WJqEu4Od2/gElggwYYhf+cmTPG/kBnJuDqQ9+dvCThS gNnV86BbXZ0b0NYQbY5wB/KBSXlft+X07NNzR3RlmmaJUV3ghgUG1GThymEBqMNzNIuE fL3WyTUZrn98H+P/FjtEB6qcbMLTT4txdtLXYbTqOqKmUz40kZP9AvXmZRZ0FYoBf/QG X9BDhj9zGt5N0FlAdoGze/tphW/iYVTlxLPlUED3KOwqPweKQQS/8fsx9hvuD5Tp/OCm ZgMDR9G1408a+OUHwqniwzbPFlA++PVkB/BB4Wod8gfq+29zHx3SWxnsytR2LOoRV4+B 0sDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ngKMFjy9; 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 f2si1767308qkm.81.2020.05.20.07.20.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 07:20:34 -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=ngKMFjy9; 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]:55874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPaD-0000DL-IA for patch@linaro.org; Wed, 20 May 2020 10:20:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPMF-0000N5-13 for qemu-devel@nongnu.org; Wed, 20 May 2020 10:06:07 -0400 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]:32870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPME-00022V-18 for qemu-devel@nongnu.org; Wed, 20 May 2020 10:06:06 -0400 Received: by mail-ej1-x643.google.com with SMTP id n24so3988681ejd.0 for ; Wed, 20 May 2020 07:06:05 -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=Z8jXpAxep38NH+tQtqiVR0PvMkfpz3aIN7XElkKMn28=; b=ngKMFjy9TO80XtZGn7uw142jNG5nWlbLPqGX4DdQkMMcM7q7jNMvyYpTGezLwpMKgJ PwjEyr4Trv1+fWaVw7Dlq0z2FJOmAUh6Qi9EN2ljfPHhBwcMwMLKR2YUN+l1HrhIYMVA NRQvcQdwE7WPgNTcLVjmjsTnuU5q5oXstqAoHYCczWtei3dOZOd5CyTgDGTu1IeqJoQC KhzpefSQ5WelDOtLP1ezZaa35zST+Fi6+KkVfSx8C5EUY5UCvFDneyvVR2TX2fG3ULOd aVOYFRNduRMTbG8Lgofmn2auhkZpBZdeCU9QnQdPH7f4AbXMZ8xnh1bQF6XEgDrO7LSL +PZQ== 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=Z8jXpAxep38NH+tQtqiVR0PvMkfpz3aIN7XElkKMn28=; b=rGd4BDcdKSB3wpFU+KDDkjWgp6YC5bL8g8tKqExWj3Ui63qtreKlHHY9HHeMgiyoO4 BaJ9tjGuMVDpxsJxdNeoqw359WAqwU2YyWIaLVBjp9dKDYNLZbUkBzQdZtGeLhIZV1BF hWUWbArb8wpScbShNSMLnng+tUZVj1kgLuLYB1oXnKJdnVBX5B9o2FB63Oz5N4v3Pq+s HubGbPJ1CwxHJB+iEr5LweTICtQx9NP7vTXXTcfPP+kGcDzkyUk5fgHdo04r+vkzxcMJ tNjKs/IeKXk72smutEOVj1wZVaEpAj4sO/yr9/fJliEki0B+mUe4g9ZmWPA2swCWJNyG E6cg== X-Gm-Message-State: AOAM532FN2vY77ziXAuecH09+vnghKjGDyQx/o8r5tkIJPPMchbjEVdt 4t9FAqNdVXvVS9Xs5I8v8decyQ== X-Received: by 2002:a17:906:ce39:: with SMTP id sd25mr3749331ejb.482.1589983564722; Wed, 20 May 2020 07:06:04 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id m5sm1965236ejk.27.2020.05.20.07.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 07:05:54 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5E95E1FF9C; Wed, 20 May 2020 15:05:42 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 13/15] linux-user: properly "unrealize" vCPU object Date: Wed, 20 May 2020 15:05:39 +0100 Message-Id: <20200520140541.30256-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520140541.30256-1-alex.bennee@linaro.org> References: <20200520140541.30256-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::643; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x643.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: "Daniel P . Berrange" , Eduardo Habkost , Nikolay Igotti , Riku Voipio , Markus Armbruster , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We shouldn't be messing around with the CPU list in linux-user save for the very special case of do_fork(). When threads end we need to properly follow QOM object lifetime handling and allow the eventual cpu_common_unrealizefn to both remove the CPU and ensure any clean-up actions are taken place, for example calling plugin exit hooks. There is still a race condition to avoid so use the linux-user specific clone_lock instead of the cpu_list_lock to avoid it. Signed-off-by: Alex Bennée Cc: Nikolay Igotti Cc: Paolo Bonzini Cc: Daniel P. Berrange Cc: Eduardo Habkost Cc: Markus Armbruster --- v2 - expand Cc list to QOM/QMP object lifetime experts --- linux-user/syscall.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) -- 2.20.1 diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 05f03919ff0..7f6700c54e3 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7635,30 +7635,33 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, return -TARGET_ERESTARTSYS; } - cpu_list_lock(); + pthread_mutex_lock(&clone_lock); if (CPU_NEXT(first_cpu)) { - TaskState *ts; + TaskState *ts = cpu->opaque; - /* Remove the CPU from the list. */ - QTAILQ_REMOVE_RCU(&cpus, cpu, node); + object_property_set_bool(OBJECT(cpu), false, "realized", NULL); + object_unref(OBJECT(cpu)); + /* + * At this point the CPU should be unrealized and removed + * from cpu lists. We can clean-up the rest of the thread + * data without the lock held. + */ - cpu_list_unlock(); + pthread_mutex_unlock(&clone_lock); - ts = cpu->opaque; if (ts->child_tidptr) { put_user_u32(0, ts->child_tidptr); do_sys_futex(g2h(ts->child_tidptr), FUTEX_WAKE, INT_MAX, NULL, NULL, 0); } thread_cpu = NULL; - object_unref(OBJECT(cpu)); g_free(ts); rcu_unregister_thread(); pthread_exit(NULL); } - cpu_list_unlock(); + pthread_mutex_unlock(&clone_lock); preexit_cleanup(cpu_env, arg1); _exit(arg1); return 0; /* avoid warning */ From patchwork Wed May 20 14:05:40 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: 186990 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp657840ilb; Wed, 20 May 2020 07:15:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+vsX8beXJb9zsvlNKo0QJgeC0C0IklaL3k0X8ur8InjJapsSc8JVZJwy5eTFkOOQa56B2 X-Received: by 2002:a37:b303:: with SMTP id c3mr4749612qkf.397.1589984124059; Wed, 20 May 2020 07:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589984124; cv=none; d=google.com; s=arc-20160816; b=OfU19H0XT/zVxlNhWEt3yNgV+b8kY1evqVGp8IdsWRCcQkIiMtx16kmfZ/CwVNTTBn wkpA3WfvR9dnx4K/Bgl7SiQxHBf7KMNGZkxKx+CcFhqb9JhR/ugNgEaes4tztyyXfsQe x7ZYqKr6PfUizR8sWiTCz8hg/hqC97nkaSNkKGOlJQAnxW4XGQ3O1tS8SvtXxcV0qhwm ebS+oRsQ5hFrGcnVvmx6OabAFIEo6BDmve0uStxXNQ1Cgw7emls+dKZ4/0WmvFqmEPfq 3fNElXvUqY0i0oOhb9XZ7CBpYFCWVwstZ2J+UtqJMzJSr4IZue9+DhVyhMsAAXulYvEk j/Hg== 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=tVaA6VVKMxT5atPOq3mupoaoOxw2j2mNyFQd2GQU77U=; b=o5QV/seMtJH+cfp2/uSyH+IDVrmKm6xe6byeY6wryuJPEIeJKe6KRDHtz/BMzj0+lO oQgQB0kK5nmh1YkkC2nLxdjRFvCjVt+0PNCaQC0KUvl/tn4uF06EK35+Z05DijNsD0kT twUyL5r9svgaoTa6ECMifV/3/ib+t0ELDqZ5ceS6z1M7qXAnIJXLHxRomtFXhcyWDg/+ jnbWe82nxlopwVbJ4QjUA12B4GeNA8jN0v4JwNm6J4T2D9ca+xxEtB2NrTZyNkIY0xgI 2hz3CNSTDTzausB7XO+88a6Y0sKlTrX0zBX8uUiXdDUSGaQvL+y4DqB5k4neeVtSihT9 PUGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FcGiZMh0; 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=pass (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 l17si1733698qki.167.2020.05.20.07.15.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 07:15:24 -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=pass header.i=@linaro.org header.s=google header.b=FcGiZMh0; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPVD-0006jL-Ge for patch@linaro.org; Wed, 20 May 2020 10:15:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPME-0000LO-5G for qemu-devel@nongnu.org; Wed, 20 May 2020 10:06:06 -0400 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]:34020) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPMC-00022Q-Pj for qemu-devel@nongnu.org; Wed, 20 May 2020 10:06:05 -0400 Received: by mail-ej1-x643.google.com with SMTP id j21so3986517ejy.1 for ; Wed, 20 May 2020 07:06:04 -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=tVaA6VVKMxT5atPOq3mupoaoOxw2j2mNyFQd2GQU77U=; b=FcGiZMh0mR/7XmqKUTy7DPfOsaqDwIbdy4LZrUUlNMvGnlptykNuU61UfgovyZMh0T L29g1s2OvORb//bFqpZUsoOPfAUwEdJ9cjzMV6wkZU1UGiSL11YQyZWOWlYSldh+Zjvh 3bq6NwVHikpdhpg6eKFLWDFrV+wpTKrhz7ENdG4pqg6tPcABUlqlUweRofaobCOXaGnx ETOyygfgqABLLwXc3lY7LOsdGvrhKBmO+CXkv87xyjEtcfkOvC4fx5EVUc5poibIA2UQ wQuSrlN8s+9jQp8GPDts0HsaipNWuGa8rjB205Gb7s3nUimPrm5zPmjXy8GkIafZ+Orw cFSA== 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=tVaA6VVKMxT5atPOq3mupoaoOxw2j2mNyFQd2GQU77U=; b=sOlhn92b6zcXsWv4bbalqVKzvCQlqvg/5Gj3vzycD8MGM1MrzGiBHkqwqEgLZyGG9X 5bNBsj8ILld9+RZLC0K/tpVlwgJgsdQh8DRwiAQZvk32S94OuraVJjExFXoruvXksTIc Wt9rY6xS38ab+usCLlpTRKWDYua8tKOLVdMsagMxavVFC9ECOYYqZqcH8+zRMI2OvldJ Vq+iIuXIpuHS1sV9n3bXIhNzNoKuZrXX+P6TCbeQyzldHLky5Ubdj9lyWtvkVh09M//9 vrswu6+3uj6/Zi5kCqk2r7TaxAwc+p5jZkbE+NTg7UargV77tr/vVLbR9eGS63KErzMw VfkQ== X-Gm-Message-State: AOAM533U5HhiOd/3kk/v6fi5M0eReKwxX64IC2CAMpWRdgNvorsw7jRh pEXEUY5EEhgPmM5VxrnCywhwQg== X-Received: by 2002:a17:906:780b:: with SMTP id u11mr3625508ejm.341.1589983563430; Wed, 20 May 2020 07:06:03 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id dt12sm2017082ejb.102.2020.05.20.07.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 07:05:54 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 750B41FF9D; Wed, 20 May 2020 15:05:42 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 14/15] tests/tcg: add new threadcount test Date: Wed, 20 May 2020 15:05:40 +0100 Message-Id: <20200520140541.30256-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520140541.30256-1-alex.bennee@linaro.org> References: <20200520140541.30256-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::643; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x643.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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?= , Nikolay Igotti Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Based on the original testcase by Nikolay Igotti. Message-ID: Signed-off-by: Nikolay Igotti Signed-off-by: Alex Bennée --- v2 - add Nikolay's s-o-b - checkpatch fixes --- tests/tcg/multiarch/threadcount.c | 64 +++++++++++++++++++++++++++++ tests/tcg/multiarch/Makefile.target | 2 + 2 files changed, 66 insertions(+) create mode 100644 tests/tcg/multiarch/threadcount.c -- 2.20.1 diff --git a/tests/tcg/multiarch/threadcount.c b/tests/tcg/multiarch/threadcount.c new file mode 100644 index 00000000000..545a1c81466 --- /dev/null +++ b/tests/tcg/multiarch/threadcount.c @@ -0,0 +1,64 @@ +/* + * Thread Exerciser + * + * Unlike testthread which is mainly concerned about testing thread + * semantics this test is used to exercise the thread creation and + * accounting. A version of this test found a problem with clashing + * cpu_indexes which caused a break in plugin handling. + * + * Based on the original test case by Nikolay Igotti. + * + * Copyright (c) 2020 Linaro Ltd + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include +#include +#include +#include +#include + +int max_threads = 10; + +typedef struct { + int delay; +} ThreadArg; + +static void *thread_fn(void* varg) +{ + ThreadArg *arg = varg; + usleep(arg->delay); + free(arg); + return NULL; +} + +int main(int argc, char **argv) +{ + int i; + pthread_t *threads; + + if (argc > 1) { + max_threads = atoi(argv[1]); + } + threads = calloc(sizeof(pthread_t), max_threads); + + for (i = 0; i < max_threads; i++) { + ThreadArg *arg = calloc(sizeof(ThreadArg), 1); + arg->delay = i * 100; + pthread_create(threads + i, NULL, thread_fn, arg); + } + + printf("Created %d threads\n", max_threads); + + /* sleep until roughly half the threads have "finished" */ + usleep(max_threads * 50); + + for (i = 0; i < max_threads; i++) { + pthread_join(threads[i], NULL); + } + + printf("Done\n"); + + return 0; +} diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target index 51fb75ecfdd..cb49cc9ccb2 100644 --- a/tests/tcg/multiarch/Makefile.target +++ b/tests/tcg/multiarch/Makefile.target @@ -28,6 +28,8 @@ run-float_%: float_% testthread: LDFLAGS+=-lpthread +threadcount: LDFLAGS+=-lpthread + # We define the runner for test-mmap after the individual # architectures have defined their supported pages sizes. If no # additional page sizes are defined we only run the default test. From patchwork Wed May 20 14:05:41 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: 186980 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp650083ilb; Wed, 20 May 2020 07:06:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLl2yj1lgXH7/tm2CjyENRO5vjlrR1b4/8EsYCBNpiDR8PplDpKr/9tpX5UZW1wvlDf3lu X-Received: by 2002:a37:aad3:: with SMTP id t202mr5051032qke.186.1589983609400; Wed, 20 May 2020 07:06:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589983609; cv=none; d=google.com; s=arc-20160816; b=TIx4RczTkE/DTutaCCHJwN828hHUhiANjKW85dGdpDZaIi47JF0xDN74NNEsKGQ5rj QDTye5IIGmDCqSjlHZ1BBHpio8kUCDC0YJLqqEqsmGV2v2YEo32cvLBXoLcht8HMS6nV +TYqWhuM8q5a9hqYaNezVaDkH5YQ9b/Xkwl1sOza1E+vgOhvup6NE9fL2j/nsCVYmmuX B23XLl7RBUoa18CWrHC2iCuvT05++qn6m8JVhPZxo8NN9gf2pq/AyQ0TQhyCE2F6/ovW KVcH+RLqEIsV9oUVcfxtgN8b88zQ67o4gbq0uL2cF6loNnR+ximXmu6UwLiGxQ8GNoCi MAKQ== 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=t6TltwBrO/H4+UuBeh2Az6/wBriymiMCvdLIFdXcB4g=; b=cgaU0NFTbiTLPbIpgdaXRzti5dxlrjUBi9lPSCRs3ZhJ4y5AfrPz1Njny+oqqcK1Ct eIW5hc7Imi13q3VKdYSheTxWLZGM1DvtAFDToAK5F7FC7ypyjeQaHtPRoUoAMh7awKQq Wr1ogGJOHvjAgCfniGcii8E6XaOvtw22WNjuHvZpnuhjlhG+ju15CiY4LD/gxD2+x15R KMo37K2UDXaOCEnmemyJ5XtBK8I0ucC2nOwSj0N5WgeoSZTptDnKrF+cC5OrcakIYVxM QzkT77sBz9WdmZkMvkNMywQbqZEvUJwIru+6dEvLT6UKEprO+aYVo4az8YqHWSyIxUUl t3fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=yhroG4jC; 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 df10si1598338qvb.34.2020.05.20.07.06.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 07:06:49 -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=yhroG4jC; 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]:56938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPMu-0000r1-RC for patch@linaro.org; Wed, 20 May 2020 10:06:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPMH-0000Rd-36 for qemu-devel@nongnu.org; Wed, 20 May 2020 10:06:09 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:42292) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPMF-00022l-KG for qemu-devel@nongnu.org; Wed, 20 May 2020 10:06:08 -0400 Received: by mail-ed1-x52f.google.com with SMTP id k19so3172005edv.9 for ; Wed, 20 May 2020 07:06:07 -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=t6TltwBrO/H4+UuBeh2Az6/wBriymiMCvdLIFdXcB4g=; b=yhroG4jCYwyX/UD8U3zoSwycRQhRZyCcKjTyEtkWfeG7a5LahM3FGwHnO/NSeYmDQE v8n5Zm05pl3ELypCUP7lXZudFsYCOH7qKz7kr+wFkQw3T4D2jjS/mfykkj2XxSPbhhsM FBbmfZPW9Dv+gb2a5NZA2n0/9ANdlZv0FMi16kWiHsDd1qWkoRTGOLissBYAPVKz5MGJ SAwKechVnNma/VCpsyOs90r/dt71RkRLUuK6Ir+FkexYGxLWdx7+5n46ZIsOdvJ0OYcY L4MAveTUI18q0suIrJCLZt+w0jKBMhr6IzL2QDobdKp9kUe30BXqkyRJTjrfZ7qCmLeZ /fjw== 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=t6TltwBrO/H4+UuBeh2Az6/wBriymiMCvdLIFdXcB4g=; b=auyMuDBcvLFajXIdrai2F2kJQfGxAJIn2CRuLP9f0IH1IAS9NN7ciSDXVpSgG83KwN xqXr+5iWb+M+kMciBAxSVTaTK11d5SZwhG/iVVTAaeHgthcdtDFthgb6qFV84XklUelM 0IAK/fLEAe3sm/FTK0u3PLjmJEJ7uw1NURNJ2wHGyXXO1XYSBsWiFJTyBY1CYVSQOMj3 C7KNZSxw23vARqkBcWBJdOoqnG4VhHe2BSbkRqu0QEWaeYXgfz0MHBx9sNfc3t71cW9f ezi+myheFutt2hBqKi2J4DK5hWpkNKJxumrhOVRlwiJwF561XLAJmOxGvxXLj4oaxnc0 38dw== X-Gm-Message-State: AOAM533ox6+zjwNDoAH5oc822/jH/oNvJMJAMo5eTWfRTrgyooc78/oB Nkek3lhAm+CaOsnVcdPU+gZodA== X-Received: by 2002:a50:d513:: with SMTP id u19mr3697893edi.173.1589983565998; Wed, 20 May 2020 07:06:05 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id bz8sm1927221ejc.94.2020.05.20.07.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 07:06:00 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8F0021FF9E; Wed, 20 May 2020 15:05:42 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 15/15] plugins: new lockstep plugin for debugging TCG changes Date: Wed, 20 May 2020 15:05:41 +0100 Message-Id: <20200520140541.30256-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520140541.30256-1-alex.bennee@linaro.org> References: <20200520140541.30256-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52f.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: Richard Henderson , Mark Cave-Ayland , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When we make changes to the TCG we sometimes cause regressions that are deep into the execution cycle of the guest. Debugging this often requires comparing large volumes of trace information to figure out where behaviour has diverged. The lockstep plugin utilises a shared socket so two QEMU's running with the plugin will write their current execution position and wait to receive the position of their partner process. When execution diverges the plugins output where they were and the previous few blocks before unloading themselves and letting execution continue. Originally I planned for this to be most useful with -icount but it turns out you can get divergence pretty quickly due to asynchronous qemu_cpu_kick_rr_cpus() events causing one side to eventually run into a short block a few cycles before the other side. For this reason I've added a bit of tracking and I think the divergence reporting could be finessed to report only if we really start to diverge in execution. An example run would be: qemu-system-sparc -monitor none -parallel none -net none \ -M SS-20 -m 256 -kernel day11/zImage.elf \ -plugin ./tests/plugin/liblockstep.so,arg=lockstep-sparc.sock \ -d plugin,nochain with an identical command in another window in the same working directory. Signed-off-by: Alex Bennée Cc: Richard Henderson Cc: Mark Cave-Ayland Message-Id: <20200429200754.18327-1-alex.bennee@linaro.org> --- v3 - added verbose flag - basic heuristics to detect "real" divergence - checkpatch tweaks --- tests/plugin/lockstep.c | 340 ++++++++++++++++++++++++++++++++++++++ tests/plugin/Makefile | 1 + tests/tcg/Makefile.target | 2 +- 3 files changed, 342 insertions(+), 1 deletion(-) create mode 100644 tests/plugin/lockstep.c -- 2.20.1 diff --git a/tests/plugin/lockstep.c b/tests/plugin/lockstep.c new file mode 100644 index 00000000000..a696673dff3 --- /dev/null +++ b/tests/plugin/lockstep.c @@ -0,0 +1,340 @@ +/* + * Lockstep Execution Plugin + * + * Allows you to execute two QEMU instances in lockstep and report + * when their execution diverges. This is mainly useful for developers + * who want to see where a change to TCG code generation has + * introduced a subtle and hard to find bug. + * + * Caveats: + * - single-threaded linux-user apps only with non-deterministic syscalls + * - no MTTCG enabled system emulation (icount may help) + * + * While icount makes things more deterministic it doesn't mean a + * particular run may execute the exact same sequence of blocks. An + * asynchronous event (for example X11 graphics update) may cause a + * block to end early and a new partial block to start. This means + * serial only test cases are a better bet. -d nochain may also help. + * + * This code is not thread safe! + * + * Copyright (c) 2020 Linaro Ltd + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; + +/* saved so we can uninstall later */ +static qemu_plugin_id_t our_id; + +static unsigned long bb_count; +static unsigned long insn_count; + +/* Information about a translated block */ +typedef struct { + uint64_t pc; + uint64_t insns; +} BlockInfo; + +/* Information about an execution state in the log */ +typedef struct { + BlockInfo *block; + unsigned long insn_count; + unsigned long block_count; +} ExecInfo; + +/* The execution state we compare */ +typedef struct { + uint64_t pc; + unsigned long insn_count; +} ExecState; + +typedef struct { + GSList *log_pos; + int distance; +} DivergeState; + +/* list of translated block info */ +static GSList *blocks; + +/* execution log and points of divergence */ +static GSList *log, *divergence_log; + +static int socket_fd; +static char *path_to_unlink; + +static bool verbose; + +static void plugin_cleanup(qemu_plugin_id_t id) +{ + /* Free our block data */ + g_slist_free_full(blocks, &g_free); + g_slist_free_full(log, &g_free); + g_slist_free(divergence_log); + + close(socket_fd); + if (path_to_unlink) { + unlink(path_to_unlink); + } +} + +static void plugin_exit(qemu_plugin_id_t id, void *p) +{ + g_autoptr(GString) out = g_string_new("No divergence :-)\n"); + g_string_append_printf(out, "Executed %ld/%d blocks\n", + bb_count, g_slist_length(log)); + g_string_append_printf(out, "Executed ~%ld instructions\n", insn_count); + qemu_plugin_outs(out->str); + + plugin_cleanup(id); +} + +static void report_divergance(ExecState *us, ExecState *them) +{ + DivergeState divrec = { log, 0 }; + g_autoptr(GString) out = g_string_new(""); + bool diverged = false; + + /* + * If we have diverged before did we get back on track or are we + * totally loosing it? + */ + if (divergence_log) { + DivergeState *last = (DivergeState *) divergence_log->data; + GSList *entry; + + for (entry = log; g_slist_next(entry); entry = g_slist_next(entry)) { + if (entry == last->log_pos) { + break; + } + divrec.distance++; + } + + /* + * If the last two records are so close it is likely we will + * not recover synchronisation with the other end. + */ + if (divrec.distance == 1 && last->distance == 1) { + diverged = true; + } + } + divergence_log = g_slist_prepend(divergence_log, + g_memdup(&divrec, sizeof(divrec))); + + /* Output short log entry of going out of sync... */ + if (verbose || divrec.distance == 1 || diverged) { + g_string_printf(out, "@ %#016lx vs %#016lx (%d/%d since last)\n", + us->pc, them->pc, g_slist_length(divergence_log), + divrec.distance); + qemu_plugin_outs(out->str); + } + + if (diverged) { + int i; + GSList *entry; + + g_string_printf(out, "Δ insn_count @ %#016lx (%ld) vs %#016lx (%ld)\n", + us->pc, us->insn_count, them->pc, them->insn_count); + + for (entry = log, i = 0; + g_slist_next(entry) && i < 5; + entry = g_slist_next(entry), i++) { + ExecInfo *prev = (ExecInfo *) entry->data; + g_string_append_printf(out, + " previously @ %#016lx/%ld (%ld insns)\n", + prev->block->pc, prev->block->insns, + prev->insn_count); + } + qemu_plugin_outs(out->str); + qemu_plugin_outs("too much divergence... giving up."); + qemu_plugin_uninstall(our_id, plugin_cleanup); + } +} + +static void vcpu_tb_exec(unsigned int cpu_index, void *udata) +{ + BlockInfo *bi = (BlockInfo *) udata; + ExecState us, them; + ssize_t bytes; + ExecInfo *exec; + + us.pc = bi->pc; + us.insn_count = insn_count; + + /* + * Write our current position to the other end. If we fail the + * other end has probably died and we should shut down gracefully. + */ + bytes = write(socket_fd, &us, sizeof(ExecState)); + if (bytes < sizeof(ExecState)) { + qemu_plugin_outs(bytes < 0 ? + "problem writing to socket" : + "wrote less than expected to socket"); + qemu_plugin_uninstall(our_id, plugin_cleanup); + return; + } + + /* + * Now read where our peer has reached. Again a failure probably + * indicates the other end died and we should close down cleanly. + */ + bytes = read(socket_fd, &them, sizeof(ExecState)); + if (bytes < sizeof(ExecState)) { + qemu_plugin_outs(bytes < 0 ? + "problem reading from socket" : + "read less than expected"); + qemu_plugin_uninstall(our_id, plugin_cleanup); + return; + } + + /* + * Compare and report if we have diverged. + */ + if (us.pc != them.pc) { + report_divergance(&us, &them); + } + + /* + * Assume this block will execute fully and record it + * in the execution log. + */ + insn_count += bi->insns; + bb_count++; + exec = g_new0(ExecInfo, 1); + exec->block = bi; + exec->insn_count = insn_count; + exec->block_count = bb_count; + log = g_slist_prepend(log, exec); +} + +static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +{ + BlockInfo *bi = g_new0(BlockInfo, 1); + bi->pc = qemu_plugin_tb_vaddr(tb); + bi->insns = qemu_plugin_tb_n_insns(tb); + + /* save a reference so we can free later */ + blocks = g_slist_prepend(blocks, bi); + qemu_plugin_register_vcpu_tb_exec_cb(tb, vcpu_tb_exec, + QEMU_PLUGIN_CB_NO_REGS, (void *)bi); +} + + +/* + * Instead of encoding master/slave status into what is essentially + * two peers we shall just take the simple approach of checking for + * the existence of the pipe and assuming if it's not there we are the + * first process. + */ +static bool setup_socket(const char *path) +{ + struct sockaddr_un sockaddr; + int fd; + + fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (fd < 0) { + perror("create socket"); + return false; + } + + sockaddr.sun_family = AF_UNIX; + g_strlcpy(sockaddr.sun_path, path, sizeof(sockaddr.sun_path) - 1); + if (bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) < 0) { + perror("bind socket"); + close(fd); + return false; + } + + /* remember to clean-up */ + path_to_unlink = g_strdup(path); + + if (listen(fd, 1) < 0) { + perror("listen socket"); + close(fd); + return false; + } + + socket_fd = accept(fd, NULL, NULL); + if (socket_fd < 0 && errno != EINTR) { + perror("accept socket"); + return false; + } + + qemu_plugin_outs("setup_socket::ready\n"); + + return true; +} + +static bool connect_socket(const char *path) +{ + int fd; + struct sockaddr_un sockaddr; + + fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (fd < 0) { + perror("create socket"); + return false; + } + + sockaddr.sun_family = AF_UNIX; + g_strlcpy(sockaddr.sun_path, path, sizeof(sockaddr.sun_path) - 1); + + if (connect(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) < 0) { + perror("failed to connect"); + return false; + } + + qemu_plugin_outs("connect_socket::ready\n"); + + socket_fd = fd; + return true; +} + +static bool setup_unix_socket(const char *path) +{ + if (g_file_test(path, G_FILE_TEST_EXISTS)) { + return connect_socket(path); + } else { + return setup_socket(path); + } +} + + +QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, + const qemu_info_t *info, + int argc, char **argv) +{ + int i; + + if (!argc || !argv[0]) { + qemu_plugin_outs("Need a socket path to talk to other instance."); + return -1; + } + + for (i = 0; i < argc; i++) { + char *p = argv[i]; + if (strcmp(p, "verbose") == 0) { + verbose = true; + } else if (!setup_unix_socket(argv[0])) { + qemu_plugin_outs("Failed to setup socket for communications."); + return -1; + } + } + + our_id = id; + + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); + return 0; +} diff --git a/tests/plugin/Makefile b/tests/plugin/Makefile index 75467b6db85..b3250e2504c 100644 --- a/tests/plugin/Makefile +++ b/tests/plugin/Makefile @@ -13,6 +13,7 @@ NAMES += mem NAMES += hotblocks NAMES += howvec NAMES += hotpages +NAMES += lockstep SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES))) diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index b3cff3cad1a..075daf3d22d 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -128,7 +128,7 @@ RUN_TESTS=$(patsubst %,run-%, $(TESTS)) ifeq ($(CONFIG_PLUGIN),y) PLUGIN_DIR=../../plugin VPATH+=$(PLUGIN_DIR) -PLUGINS=$(notdir $(wildcard $(PLUGIN_DIR)/*.so)) +PLUGINS=$(filter-out liblockstep.so,$(notdir $(wildcard $(PLUGIN_DIR)/*.so))) # We need to ensure expand the run-plugin-TEST-with-PLUGIN # pre-requistes manually here as we can't use stems to handle it. We