From patchwork Wed May 27 14:54:44 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: 1298962 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=GZGtQ/PG; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49XDSq4fTjz9sSd for ; Thu, 28 May 2020 00:57:15 +1000 (AEST) Received: from localhost ([::1]:51124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdxUW-0004c6-Hy for incoming@patchwork.ozlabs.org; Wed, 27 May 2020 10:57:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdxSP-0001gg-43 for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:01 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:45576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdxSN-00085b-K4 for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:00 -0400 Received: by mail-wr1-x42e.google.com with SMTP id c3so20025898wru.12 for ; Wed, 27 May 2020 07:54: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=Q0LNOa8nsE+fbJC1/7wmjeLH7Nwb81oPzvCmA/EHk64=; b=GZGtQ/PGLhy1yXHKmol/QXOeYUW22qxABlNkqtNYvsWFapcSDHmUcSJKlB9qxvNkHY fVjyP/irwtMhtzrS+lhj00+TV+wMU2Ki8658VZRYmub1Gm5Thb4GdRr+FH2S8nCZqFyA UNGcnSVVrp9N2DHVkS0rthNG4ZieKg08TmaxKcpGJHzyoj066qpgFecA4OmscMw80ePO fRYvYYP2QUwmvIrnH5MF4y/XLT0WYRsUoSsjV3iliFS8uNvZXM/JCuJ1kx2h2KcUjgvi yGIysAXqIIlaZl9Aa8A1rwxlQMO8nRUCrPVoF7CF0CxMlTbKGrqPvDSX3kOr6lnBc/6H 9MHQ== 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=Q0LNOa8nsE+fbJC1/7wmjeLH7Nwb81oPzvCmA/EHk64=; b=pKhHXS1Z51ja23/CPHVnsKQFlUsUhobnnN/fletkPSxoJOG4KbgWkDiUBAh0zHpMJJ Q79ICLtu3eAI8Cwn6ZtJmie9C+VYYGIK/6O6/4GJ92Jlzxu9aObkx2JuWzusq7g9o436 3Da1o/c7Krxq5hJfW9kONvzNQZAZ2XjgVI8ziuL0PeinMojg3RWTFYB3oXHjhv4SpbHf s6Ghdu/1473dIwQTDibpsbMkhmxj/ffd3ebq3ntm8DJkZdyGQsuPV2V6gR/d5BRUIzp3 nyXsL960bAWWYXxFhkF56Zgp0Ac+SBdLkL+zgymSdjKo2+6XApmm9tx9BJeEJWjfw5/r wUdA== X-Gm-Message-State: AOAM532yCLAaj+Y2mMIFBWGc53Waok9TuM6Wdmf1zCoaf3FOIYKaiDYJ pZawceevraRV3ffu5h0eaSfAiA== X-Google-Smtp-Source: ABdhPJzP4/fQyvgGB1s8K0AduePsWgAYrWi1C8kkmZQRLYub+FEITkNUs2pdf/YhejBLs4Y/GqvkFA== X-Received: by 2002:adf:f64e:: with SMTP id x14mr26226263wrp.426.1590591297872; Wed, 27 May 2020 07:54:57 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k131sm3433133wma.2.2020.05.27.07.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 07:54:56 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1E2DF1FF87; Wed, 27 May 2020 15:54:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 01/12] configure: add alternate binary for genisoimage Date: Wed, 27 May 2020 15:54:44 +0100 Message-Id: <20200527145455.2550-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200527145455.2550-1-alex.bennee@linaro.org> References: <20200527145455.2550-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.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?= , qemu-devel@nongnu.org, Robert Foley Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Signed-off-by: Robert Foley Message-Id: <20200519132259.405-2-robert.foley@linaro.org> diff --git a/configure b/configure index b969dee675b..af2ba83f0e2 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 27 14:54:45 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: 1298961 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=vhsRSyNv; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49XDR83q8bz9sSW for ; Thu, 28 May 2020 00:55:48 +1000 (AEST) Received: from localhost ([::1]:45630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdxT8-0002MT-4z for incoming@patchwork.ozlabs.org; Wed, 27 May 2020 10:55:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdxSR-0001jP-1P for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:03 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:40550) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdxSP-00086W-Mb for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:02 -0400 Received: by mail-wm1-x341.google.com with SMTP id r15so3312028wmh.5 for ; Wed, 27 May 2020 07:55: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=B5wSVizEtzyurTRIZ6Q2GLQ/Teo1CaqJnSNxTo1S1og=; b=vhsRSyNvXDVa+nwXEqr4NNxNQAfwb+uFFbXCPOWYE9z+2V70OBW1ph0PA7iaSbpZlM fQdFG800zXWb/gNxt49lN2D8JLjd/rp4L+vwPHRDhBwsvcCycyQQJR0XohPylSszzSnE XCvLqAd8LK5iFj66FNlMeron7f85lby6Ow3+mfPob38J9fgJKLHMxjIhOec724Iru8lx dZKTwTOVFxAsafkMS79/ZDLuAxl4T6i0CL/XmJAdSF1UVH7LmOkoyzqcx5hiAdZQncxV 04Zks0t7Z+QAs1BFtKJN2bBoBLhl51tZLJ8yM1BgtqV3BY51I/kkcgjPJdFdm5W9gK5a 6vTQ== 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=B5wSVizEtzyurTRIZ6Q2GLQ/Teo1CaqJnSNxTo1S1og=; b=ntFxH/GUD1f2UlKMM2w0ywePFDiw6p2WVj8HyTY9zeSL+gh2IdmiEHS55alJt6+6c7 z52UoEpKLX01UR8pr3kbUH12ELBxAe7BiMy4Z6cyBtp0TUicVuep9ymFf68PuGUbCXx7 Y3RMYSLHAt6RPBOxOQv6dTOQGwJ2u7J8hYqGA9Sk9EljRXd40QBOnb+kEiWUrhS7m4kf WDRkC+hRvkHN7rKc6hkwzLR+O11GMPizWtJdpq/kTlFbja2NYHy0nNOvya7/sCE816m+ esqlp+QmuQ1j4ZXUwRQFMJw8eEuJe1yWfVbIXFBcsg8oHrZyeHaribbU+Lp/dToq833A svyw== X-Gm-Message-State: AOAM533SebqRirjwU2GuvFlLdBiQa+GUoqmCSHX93POr1N7M7SWyr20K 7WyPK6/5aLWvySy5gy9AKtrCbA== X-Google-Smtp-Source: ABdhPJzQXbwzYL+X/nsczMEDX1vfafI6Qq4oik1ALAHIpfFLwls9QoMz0/JJXMfoNBWNv4fM1VXIWw== X-Received: by 2002:a1c:9e8a:: with SMTP id h132mr4660651wme.32.1590591300136; Wed, 27 May 2020 07:55:00 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q5sm3243635wmq.36.2020.05.27.07.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 07:54:58 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3CCDE1FF8C; Wed, 27 May 2020 15:54:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 02/12] tests/vm: pass --genisoimage to basevm script Date: Wed, 27 May 2020 15:54:45 +0100 Message-Id: <20200527145455.2550-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200527145455.2550-1-alex.bennee@linaro.org> References: <20200527145455.2550-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::341; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x341.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?= =?utf-8?q?_Benn=C3=A9e?= , qemu-devel@nongnu.org, Robert Foley Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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é Signed-off-by: Robert Foley Message-Id: <20200519132259.405-3-robert.foley@linaro.org> 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 27 14:54:46 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: 1298966 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=uqJr3GeB; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49XDVM4bv8z9sSn for ; Thu, 28 May 2020 00:58:35 +1000 (AEST) Received: from localhost ([::1]:59552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdxVp-00085a-98 for incoming@patchwork.ozlabs.org; Wed, 27 May 2020 10:58:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdxSS-0001lU-HK for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:04 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:51980) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdxSQ-00087K-M0 for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:04 -0400 Received: by mail-wm1-x32c.google.com with SMTP id u13so3350664wml.1 for ; Wed, 27 May 2020 07:55:02 -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=jrUkHAApHhp6xANTyxUoK7alihevxNR/A5+KN9e47UQ=; b=uqJr3GeBau4h3aIY5NIeHOjiOc3unA0hnmD5veTwEuuG/w0EU0UpjfBOENDFyl1xb+ jrN7KuHhTSuABTEhCyFg5kCl+MEdusFkuQI5tVTQsSGMhCW4NsubDN/V1Yiyv6gqgbZp xGR4slW0RP6TNcR5Hq4WuR1hRhgmVIz/2bmBUifcS15T2rKKDtGVHKG3ktn/DipB/Lg6 mdsaPSIbZ7mc5hqWC69Mlr2H+ycbf1fAi9jZgFu+AY4CnW5biCpAR5zm173e7mvZzOx+ lVIbnqBV9J0gmr1CVDZyYoJsIXY1gITo+rNEa6SHZbB2d6jSuIFyUeffmwVfQdU37yLg D6Bw== 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=jrUkHAApHhp6xANTyxUoK7alihevxNR/A5+KN9e47UQ=; b=LXe0v1Qs4CvOlnyu9ruPxs6HEYIccviMAQQvm6dMV/++flOaiGxuIYdCdf7wVyycpv Q6oyaNxZ4lNpSQoDBpa04IdZ2RAR3MJLJM5T9P65r4P3n0bMLQq/8N+rgwIGSKpJTx9k QCk6XH7MM5poCc/wN4p8IEbvy3v0Dl2XPeGbebrjZ6ppX8gHoAc8bRh3902K8YaX/qD7 VhLH9QPlyWUfR3dk4rJO85NyT0vAkspn0yo64zutzXYQVysoxHYn7B7qgkM4+eYCHTmZ AKcui71MPrn7uJ6jrH6qkh1EkpViD3cWcWz/CZm3rSOih0wyizTAOeIrY+iVCY/1XkBH ukXw== X-Gm-Message-State: AOAM530bfFFnS/LCqp4aKATkonsW3hULwi0qGONsrM3TOvyRoaeIy6qh 5YSu+F17eHR1a2ScxjWg/Uyl/g== X-Google-Smtp-Source: ABdhPJwpmROQj5Uk33IFFo8KdKUflXj0yd3Lop7lrVF5brXXq4Q4feo7GqZH/ZNc43MoLQyZ7T4f+w== X-Received: by 2002:a05:600c:1146:: with SMTP id z6mr4554192wmz.179.1590591301136; Wed, 27 May 2020 07:55:01 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z7sm3030126wrt.6.2020.05.27.07.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 07:54:58 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 54D891FF8F; Wed, 27 May 2020 15:54:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 03/12] travis.yml: Use clang++ in the Clang tests Date: Wed, 27 May 2020 15:54:46 +0100 Message-Id: <20200527145455.2550-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200527145455.2550-1-alex.bennee@linaro.org> References: <20200527145455.2550-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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> Message-Id: <20200520140541.30256-4-alex.bennee@linaro.org> 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 27 14:54:47 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: 1298968 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=hURhiBRM; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49XDX21pM0z9sSW for ; Thu, 28 May 2020 01:00:02 +1000 (AEST) Received: from localhost ([::1]:39066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdxXD-0002qd-T8 for incoming@patchwork.ozlabs.org; Wed, 27 May 2020 10:59:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdxST-0001mX-GN for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:05 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:40367) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdxSS-00087h-80 for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:05 -0400 Received: by mail-wm1-x335.google.com with SMTP id r15so3312204wmh.5 for ; Wed, 27 May 2020 07:55:03 -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=9HZ1EFz6RskQjzpAroacy545o4e5LlawaS4/URLolBY=; b=hURhiBRMam1thRAmzjVBDkG12amfK2VF8G0+QUzB3y7v/NLGOwZ3Gv28hyEa4hXQMn Sjscj0Cy4f6pkL7bWhOdngviRCDqk6feSQv/+ajPmH3vWz95L+Tn2s0UnMJAcA3qK0Yg jAfyIcNZuVUdXZdJHbcuHKFHUjd9WAMCtN9cTAPNqVmYn5vPCRbXK0SfAcFTJdRC0lf8 yIvpF/4zPM/vmy5EM7KnsCBNEzIikQRBW5Hy1+Msz10T2k7/XeovnoG7Py933ivaxFuB uxVR5M/Oqlzt/RcLmY7TRDkA9dJEF9ZRd6WoAt1we2x8pPf2MiqDDls1162+O/j8w//z v15w== 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=9HZ1EFz6RskQjzpAroacy545o4e5LlawaS4/URLolBY=; b=A5HC+IxhXPnFvQlhMQsPq64esTVlIemWO/kNZ+uikd+7dhGAntGuyfGdPgm1ts+y43 AgvTP4OCjuLb4++VGjydQIGsJIrEck8/7fMpkLb6MOndH9WhpGkv9S/sMYGPvbCKVSuT W0uXCWI63yZWMDcckZqvJS/Kq70qFm9DHCYdupcV6bkRajzkpxeaFV6RMDxGbDyfHlM0 O09G3Sjx/P/RRQAAad7nw7ZmoYvAxfleYwvD9WOXyGTp58Bm5pN184fkRD9f7v4+7FrN MYQaIql9gdzdV3A8GJ/CSu6GAJQxxK7L7lA53NUQuv0WSNo5ZNSGhMZ5QDVxCKtPdIZc 5tXA== X-Gm-Message-State: AOAM531dBh+tJ9CgjC/XTd01ajqLweMM4j7vPPdcBgkDMm6+alXaaaAh yL9UHUMa3ctY5KR8ef5+rE7lcA== X-Google-Smtp-Source: ABdhPJyWI2hvyq+gKhb/bpuahYmAW7OWmLMvtZCpYSzeghb2aeq0zrRbyndE9cNQjeuOKS9VuJeZkQ== X-Received: by 2002:a1c:9e43:: with SMTP id h64mr4555090wme.0.1590591302345; Wed, 27 May 2020 07:55:02 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w15sm3053551wmi.35.2020.05.27.07.54.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 07:54:58 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6D4081FF90; Wed, 27 May 2020 15:54:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 04/12] tests/tcg: fix invocation of the memory record/replay tests Date: Wed, 27 May 2020 15:54:47 +0100 Message-Id: <20200527145455.2550-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200527145455.2550-1-alex.bennee@linaro.org> References: <20200527145455.2550-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Message-Id: <20200520140541.30256-5-alex.bennee@linaro.org> 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 27 14:54:48 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: 1298969 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=nHUorLf0; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49XDYz3gyRz9sTG for ; Thu, 28 May 2020 01:01:43 +1000 (AEST) Received: from localhost ([::1]:41288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdxYr-0003wf-4S for incoming@patchwork.ozlabs.org; Wed, 27 May 2020 11:01:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdxST-0001mr-Qc for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:06 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:35871) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdxSS-00088W-QE for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:05 -0400 Received: by mail-wr1-x42e.google.com with SMTP id q11so12158767wrp.3 for ; Wed, 27 May 2020 07:55: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=8vupRe9jwuhTs7KToAQhEvgkiMcCUBt7Mkvk5TFUzZs=; b=nHUorLf0Pn4IZ7q0JQXkBRUnT3MZYUh2Ww9VNciYYAZN+d40i1yby4TuZ4P89NcO5c LFxXxeCwKrJQBoDWoBSeQPFEOXTnyLwsuzwq0l1AxyBifZCBh/gza0eFq94lNiE6jFfL Ce1mzFrs9kc6wH9TiLRgdBLyKaRB/jxZeOFhsqI804mpDIU8qqztplpjhn+Fx+QK2MXp IiE8vJ/F6NKaadtOjlVODFwWjrCYmwF5O3Gpj9/VKnJsCzqsjpJo+tyZatMSWLcyjtSK 8IZcipKz1f/LP6sbJeo+oZq7MunT+0zkIFIFfgsgrFpEkU6W9zgkQXJ7Vzb62OHcKpVb oqgQ== 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=8vupRe9jwuhTs7KToAQhEvgkiMcCUBt7Mkvk5TFUzZs=; b=H2A18UwtrTaYp6HqKPDYBtq2fTsCJHgWV08/kWKqeQh1/lq6c+DsTgqpBhNkM5UBfi lyKSET4blc2EkJ1R4cgFLnZjVrTIiF6dbejo/oGdAEFBCPCb1qcqqfUJwJkKMTh/Mfqx 6Q2sFP0BFEkAZoa7afuBSb/n22DsCUXUQp+UiMBLAZcL103Nfreef3vGp28ob89ndR4V JAKLvFvy7dYHD3WP6+gr7maj0dezk326U68FMMBd4mhyu5zv20LpFTWktGf99yEf4M1b 5CXf9zzhN3wXBe15JAWfywu8isMWIXGUy3ZahvigPpvkxkXTE7qM10Fab/ci9EdZmpfd zo6w== X-Gm-Message-State: AOAM533+PjT7h7TClkWt1nncnOg+xpDF+5JMWmR9u4ndAoyrl/yYfCY+ PsrhDoQeBZ8E52SrfTh0Fn41HAOCC+E= X-Google-Smtp-Source: ABdhPJyeT2NEB0Zbf5S9m40Ozq+xmLN2nu++ng0XDnBD4/ogjSBTgq4jU7o3e9yTtY9kPikgeQXG2w== X-Received: by 2002:adf:e883:: with SMTP id d3mr15356633wrm.274.1590591303447; Wed, 27 May 2020 07:55:03 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u74sm3027510wmu.13.2020.05.27.07.54.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 07:54:58 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 821D71FF91; Wed, 27 May 2020 15:54:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 05/12] tests/fp: enable extf80_le_quite tests Date: Wed, 27 May 2020 15:54:48 +0100 Message-Id: <20200527145455.2550-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200527145455.2550-1-alex.bennee@linaro.org> References: <20200527145455.2550-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.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 , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Reviewed-by: Richard Henderson Message-Id: <20200520140541.30256-6-alex.bennee@linaro.org> 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 27 14:54:49 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: 1298965 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=c0rAkQ25; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49XDTM6Mqbz9sSn for ; Thu, 28 May 2020 00:57:43 +1000 (AEST) Received: from localhost ([::1]:54226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdxUz-0005wL-CD for incoming@patchwork.ozlabs.org; Wed, 27 May 2020 10:57:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdxSV-0001oo-Dq for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:07 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:37084) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdxSU-000899-1p for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:07 -0400 Received: by mail-wm1-x334.google.com with SMTP id f5so3334963wmh.2 for ; Wed, 27 May 2020 07:55: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=QvhGNTeRA8q78PxbK23cSE9XvqC4pZ+Nj6yuRj0xIqM=; b=c0rAkQ25bQMBk/E31Bg12O8rDqZwfBdYiMvt4incWMn/iOIhs7+cRub9+gW9Gezl+T OEheBLqKRZZK+b8q+/ZQTdglYAZ1hn11YlcGPp0FcF1iIBEqSvx2J9GOrhfJljVfxB22 WBInBC91cJG4y4n78mbpOMCm4QMFGebEM7wEZBYiUtQXxv01Ch/tZVA8WGv9WkASxo6e 8YdI/mdHv0HXDTHMAh7I8/a+XFyiCS6jsitVJVZU+xg97fogPjWXAKl7SLl1IQYbPvzk DEcgl9Gn2hQ77QW60c2bvV3Hg8ZgDNf00xkS/i67FDs2s1zS1Ct9cX4+7Q8vhepIGCAS Wfkw== 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=QvhGNTeRA8q78PxbK23cSE9XvqC4pZ+Nj6yuRj0xIqM=; b=KFTM2U25KSBWmUlbMdiRRmrm1iaiUh31tCGhk9oUTL/flDYKuhGleuY5umPYEnEIqK wYdSP5wR+d57M8jEqVeG1O9Xsaojx1BsBRaUeiSXBKwoaQqE14cTB3TxNm7uHsn8JHcB vPRIocxXxJ0fw4ZasHBe1dLST6aMn907pKMCwt4kVj3QJSSNi5JpwBOZy6AsIz/rNcSM ZEdKRdCFUxnrCm97Z4oB2PB5e4Kx6h2lzQ5Cu0LoyYNuyXDy2llhblmIlRRSFzX1Htnp 7lHFY6GE730fIoYAxJqP9YkaP0klvbBHQqy9DbJDEbAX2+tq4xA8iafnb250s7sFdBLK PxAA== X-Gm-Message-State: AOAM532eTqsvwx/madQtdYrFHSBv/MFD2oXnreh2xSXXHD3BSmU/AjLY SResbL4AIfY1D8ljjnW8+H2pfLympkA= X-Google-Smtp-Source: ABdhPJy1X5elrHhjBImmEGiPFq43gWC7kX6ksWJAAU2wjMp1XQE+Lsghx3upAc0Ktv70luYYXswVMg== X-Received: by 2002:a7b:c7d8:: with SMTP id z24mr4456676wmk.28.1590591304616; Wed, 27 May 2020 07:55:04 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 23sm2862954wmg.10.2020.05.27.07.54.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 07:54:58 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9743D1FF92; Wed, 27 May 2020 15:54:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 06/12] tests/fp: split and audit the conversion tests Date: Wed, 27 May 2020 15:54:49 +0100 Message-Id: <20200527145455.2550-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200527145455.2550-1-alex.bennee@linaro.org> References: <20200527145455.2550-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_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 , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Reviewed-by: Richard Henderson Message-Id: <20200520140541.30256-7-alex.bennee@linaro.org> 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 27 14:54:50 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: 1298970 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=FYeYzNCy; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49XDbK3YSsz9sSk for ; Thu, 28 May 2020 01:02:53 +1000 (AEST) Received: from localhost ([::1]:45556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdxZy-0005jn-E5 for incoming@patchwork.ozlabs.org; Wed, 27 May 2020 11:02:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdxSY-0001rZ-Hv for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:10 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:46233) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdxSV-0008B3-R4 for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:10 -0400 Received: by mail-wr1-x42a.google.com with SMTP id x6so10675012wrm.13 for ; Wed, 27 May 2020 07:55: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=kYq+Iqo+cKi5UFcKLWoiaFCpkMVAa+BEZNXisFwmIpA=; b=FYeYzNCyCbTKOMRgCoghqQ7NbL+LGtxnqqP4nb2XQaThP37M1JgJTOcGjwxjXVXB3b +V9zTqkuipZ50eDBS7grJHTQaoGHAeqViIftxQD3+pjVu0BxdN9zabDgpJ+FGRIoPFXP xckGS4MschZeSWfFinyIIUD7BNztNCpXVCNtSv0VRFcuSXWFeeh/qwAwFmT7r5fQAWZb hxWO2z+nT7wJx5ksJ57qaK592TXhtV7Rl4ei1arBBtWBApn4oOGwuLtUm/GmD275WNuh LFg1fv7Jd84el5Kpy0ZRODGN5E27sCntkkBL0mV/KW0tBLSHXGSClVJzfLcD07oRq8lc FhbQ== 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=kYq+Iqo+cKi5UFcKLWoiaFCpkMVAa+BEZNXisFwmIpA=; b=CB2B//8BfVyfyfT6BXZP+tLf64bqAQD3mcxAc/fFhREpfn+aQT+qhX7fHTVoaLtzkR oZiVuuB1jg5J1edqFPVORkgNhHiPSZBAv/9iw0fg1s0Bjj9NDPQd+TnG4bemoqQPo86D 2EU8TgPdi0Dt04RidMqbLdc0hTNJnP6EL64brrmIuFDHH6ViSFkBl1M45Vj1s0+ZbiVq SysEkZxORJE2TcKjXKl8O8XanD5/615WuKTYO5w83MO4YjrIL3gWm7NGLRrqlIP+6eED xHJS70ruHZBq5yYtElJyKYbROmGqy66XMEO+h+bR3RLmqg600VejHoYn/mMF/NJTlNfI Ny+A== X-Gm-Message-State: AOAM533Jbh8OZ4KbsxgyuyENKqiNMA58tWEf4uj43EW+UZZYsHFX2Z+W UQND5jQE5JSpwkS+WIqawJwewFq5QJg= X-Google-Smtp-Source: ABdhPJxnFURYlwqnsSec+ayi88hb8qGzo3i1VGBhRd+3jSCfddXOkLO09fG/ldiQx0XugoLuBIWMaQ== X-Received: by 2002:adf:e381:: with SMTP id e1mr23933904wrm.320.1590591306344; Wed, 27 May 2020 07:55:06 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u74sm3027545wmu.13.2020.05.27.07.54.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 07:55:04 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AB9B51FF93; Wed, 27 May 2020 15:54:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 07/12] tests/tcg: better detect confused gdb which can't connect Date: Wed, 27 May 2020 15:54:50 +0100 Message-Id: <20200527145455.2550-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200527145455.2550-1-alex.bennee@linaro.org> References: <20200527145455.2550-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.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 , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Reviewed-by: Richard Henderson Message-Id: <20200520140541.30256-8-alex.bennee@linaro.org> 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 27 14:54:51 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: 1298971 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=dOf+EqVa; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49XDch0GQQz9sSk for ; Thu, 28 May 2020 01:04:03 +1000 (AEST) Received: from localhost ([::1]:47680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdxb6-0006dO-5e for incoming@patchwork.ozlabs.org; Wed, 27 May 2020 11:04:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44556) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdxSZ-0001tX-CZ for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:11 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:56274) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdxSY-0008CL-1s for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:10 -0400 Received: by mail-wm1-x32e.google.com with SMTP id c71so3314511wmd.5 for ; Wed, 27 May 2020 07:55:08 -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=pdHJ03eUq17CH67wGlCY4jhES9SA8aqc6XGoB7RnGR8=; b=dOf+EqVaHBorjVSTNKWMMLwyFoC1UpitEfqqzHLZq1/JcrLdZc7unN9SCnovymMrEx wAdJxeXJ0oc2grPQGgHGsaUFGIUPp1OmWDryM+x1zsus8VLWWsFjr/+MfyAGqGVku7uE QQjGCCMPkH0DMwiiuH25IxM7IPKtkWuJIIDb2JA/HYjlk68gZ/XUXeH08NlsMcwMFA1+ 3jKNsFVHoJ/0sUh8xEmDpCKL7rrH7pYdso2QTlcCKwXnNjzQTLjB25QJgElLWLMr/Hnt D7q5iR0ieybK+dAMK72gDGx5TZETB0E9swzzSJ+FSHxmHgzj3j+He2Yjh+1Ys388sLU3 eZsQ== 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=pdHJ03eUq17CH67wGlCY4jhES9SA8aqc6XGoB7RnGR8=; b=Xr8pJBZkBksItUVGwEUzAgEkKa1JmZysTB/tb3zEFWaeIiW/WVwQg5foibuFWzW56e 5jD/nez7u9EZwDwhSG6WRDPp+CRMAuehCK8qoJacCDz4TxOp90sYZMbsri2wKl7SYAhh tUHlIMjLGdo8SYFsOzoVPi/aIbSe3HLqz0QqKuwaUpKlPPWgcElKlzGVqrH+tO2qC1Q+ 0ZuHR2IGJ5xmkkHVYSwuZedtXTt8lgnhMCyeo5VA72x/T4mYsVv1P4nDFin0vVeJxme7 T8fK2ScacQB5ESTVzM1geKPxcBtsP6fpsQL+v7B+v/x7ornjoS4MauFhdio36XEiTNzy MnEA== X-Gm-Message-State: AOAM531EKrE8wNEkAn3WCBdCv2BMis0xeQwuLLN/OrhfQS5OUTDo6U72 c3gyFVqrvDzfUB2yDgfA5HwQHSnQVo0= X-Google-Smtp-Source: ABdhPJxmlQWiebq2oxO0/dHoeVuZFCkg7OnWDbcs3ejftHmfaoAhiwpEU0smFA730HVlPXWKOH+pow== X-Received: by 2002:a1c:2702:: with SMTP id n2mr4782561wmn.107.1590591307337; Wed, 27 May 2020 07:55:07 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h196sm3116565wme.22.2020.05.27.07.54.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 07:55:04 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C169F1FF96; Wed, 27 May 2020 15:54:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 08/12] tests/docker: add debian11 base image Date: Wed, 27 May 2020 15:54:51 +0100 Message-Id: <20200527145455.2550-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200527145455.2550-1-alex.bennee@linaro.org> References: <20200527145455.2550-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.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 , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , qemu-devel@nongnu.org, =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Reviewed-by: Richard Henderson Message-Id: <20200520140541.30256-10-alex.bennee@linaro.org> 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 27 14:54:52 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: 1298964 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=frz0aBzy; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49XDSt3QbHz9sSW for ; Thu, 28 May 2020 00:57:18 +1000 (AEST) Received: from localhost ([::1]:51446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdxUZ-0004jO-WC for incoming@patchwork.ozlabs.org; Wed, 27 May 2020 10:57:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdxSa-0001vt-Dd for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:12 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:56277) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdxSZ-0008Dw-1Z for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:11 -0400 Received: by mail-wm1-x331.google.com with SMTP id c71so3314627wmd.5 for ; Wed, 27 May 2020 07:55:10 -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=Dm74SlTEnZyxd4hI8XjcLMpSfE87lkjOy5GE4QJMVNA=; b=frz0aBzywnSTSWGwvUWtphMoIDMAotS0DsPg7ncp+DhFTrjTtKSAzlUoLWbLLRs8Yk 2W1GH9QYRcxW8p2lzPbqoMtdtAmaeNlBMOiEgLDj7lSXtMbl54MyZ0of6Jy/fPwdh4Ft uuBD5RqVQcTu222W8BIoi0sl/vhy9NGFl2iC/hn79k7rYQ8cSEEvh9SNVBHz3vA4IgkB tmDitPqnHS15O9ORlmnoMGdjPLX2dK+NeQ8NRDKZgoy6bFeoAHg6iTH8DHui8rmY++bB K4cgjvGDHCDv3BcrvvlPZ8RrXZcbWxF1JQGRv4Wf6YKAaicsJBDLo6rGQHx13wGUxrYs d/4Q== 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=Dm74SlTEnZyxd4hI8XjcLMpSfE87lkjOy5GE4QJMVNA=; b=WwItR8Ds60/6tGi7QTM1CYWpv4J+6Fm1FnkN7jBrX9lbhU4+RBh37GHeDiN66fgV3s QtoNk6zf/wSzTwtL3umhHv3inRWmFysYnDNjS3DVUwtyH/SkrNQXia/b3WJMkwDhOITE SjwvsKHaHZXDFfgk/ckj8sjdtTRQMcN1e2ut+J5QfQeRhlC4Out1GVxhPquESiNd3NXX 8040vQCyu1S5ONYeUyhQvYoxewhwbB6etNPGdE1LYz0bHZJArKAqAJajqQFOVMLKqMe2 DIOicRAhXqBHM7eNBe+452y+Otognyk3Y43FueQsKKKmUQxD2+4HTA8k0yj+ly/j3C7Y Tyjg== X-Gm-Message-State: AOAM532w8Yp4HHIMRTxb+7r99mI1AGTLD/XBI7JMPYz7EKdq42CLPcdE KjO+xV8gi05nfWyOrSgQYxMzDA== X-Google-Smtp-Source: ABdhPJxLWfwmrt9WFFKidhqVAIKb+7svcSx89nbP+VEjDN/eLF7pIkXK0rLZL45hrIvFBbl4UGddYg== X-Received: by 2002:a1c:a905:: with SMTP id s5mr4540623wme.120.1590591309385; Wed, 27 May 2020 07:55:09 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s19sm2869069wmj.21.2020.05.27.07.55.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 07:55:04 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DC4D61FF98; Wed, 27 May 2020 15:54:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 09/12] tests/docker: use a gcc-10 based image for arm64 tests Date: Wed, 27 May 2020 15:54:52 +0100 Message-Id: <20200527145455.2550-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200527145455.2550-1-alex.bennee@linaro.org> References: <20200527145455.2550-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.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 , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , qemu-devel@nongnu.org, =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Reviewed-by: Richard Henderson Message-Id: <20200520140541.30256-11-alex.bennee@linaro.org> 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 27 14:54:53 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: 1298967 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=sOuJUfkk; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49XDVd4QHZz9sT8 for ; Thu, 28 May 2020 00:58:49 +1000 (AEST) Received: from localhost ([::1]:59936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdxW3-0008Ey-25 for incoming@patchwork.ozlabs.org; Wed, 27 May 2020 10:58:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdxSa-0001wZ-QZ for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:12 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:43627) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdxSY-0008DY-2f for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:12 -0400 Received: by mail-wr1-x434.google.com with SMTP id l10so1538000wrr.10 for ; Wed, 27 May 2020 07:55:09 -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=aitRg9If761W1gcoFA+t9rMfX6i5VN1JLB5FFhcpUdo=; b=sOuJUfkkKq21pQOAkTABGqsTn0BnRJRVoham3SoPFFyazh1d0/l6Kt1j7KNJpSJCnA vsO3UNMZmR+0AfTd4CPnSro5JLqPSPVxNoJn1aBHPjDF6WABOwl+xfbc4CmCSCtnPMfs ayHL27lqrTE94Jo1Cm7MCUOkTuC94SDZjqi3DdfpAc4ks5HYAZ15fa3+k26zZhyIqK4z jdzArH3sJW1PLIRAMQgJ+x1h+nRd4xb+sNM1Vs8999uoK18LNKAgkbTwZc5R/VgLxaAU rH4TZS2K63EO0CG61vMUKdziakvYrBrfIELPmFfdnrqoSIF7YSFMOHIUDrUHDGaScQk4 dOhA== 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=aitRg9If761W1gcoFA+t9rMfX6i5VN1JLB5FFhcpUdo=; b=B8+V4fHzQoZtSUe+bSTuzB7I8ilkNrDffOCugTnPdp4c804nxQ42bDTYCswwuAgOwR 2svUDjRWl9fPWKOY3i2pX1XscRaxWfgieDGzgaF5SZxBmyeAX0l7yqdH6aWwXkPrIfsD nXXFAMvFSIRwxfnkYpaPCy9JSWS1VSOjfcb+jleGRKBSi/QwoJgOlGAytu/0e5nGxpO8 8YwLs9+aGyLnuAKOLqKMB+t4Qjh4EOsQYF2DW8aS1GyNHLmBzDFmM3TaVm6vHuHDWheM mkHauKE9IqR5rUGICMii8j+TtsDI5u1pSJQAN0G2Tmu/bI0c84ywJyvWbc60n8dkLLkw z2xA== X-Gm-Message-State: AOAM533dUys3LWqjEtVEBItG5bNYpMTCPU8Mi38SeqOjg/sxahIMPqkL IWpO0tKAoAYSNvrjW0/U22FI3A== X-Google-Smtp-Source: ABdhPJxZmCOOrz7N+olHlbIzzfs0mHjZkUY8mnW9KQIB9wdPGGzwv12ZHz3Fvv84cFqLOVZJWBC8uw== X-Received: by 2002:adf:a399:: with SMTP id l25mr24502400wrb.212.1590591308201; Wed, 27 May 2020 07:55:08 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x186sm3268618wmg.8.2020.05.27.07.55.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 07:55:04 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 001111FF99; Wed, 27 May 2020 15:54:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 10/12] cpus-common: ensure auto-assigned cpu_indexes don't clash Date: Wed, 27 May 2020 15:54:53 +0100 Message-Id: <20200527145455.2550-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200527145455.2550-1-alex.bennee@linaro.org> References: <20200527145455.2550-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.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 , Richard Henderson , qemu-devel@nongnu.org, Igor Mammedow , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Reviewed-by: Richard Henderson Acked-by: Igor Mammedow Cc: Nikolay Igotti Cc: Paolo Bonzini Cc: Eduardo Habkost Message-Id: <20200520140541.30256-13-alex.bennee@linaro.org> 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 27 14:54:54 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: 1298972 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=CbyLBUnv; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49XDdh1rsnz9sT8 for ; Thu, 28 May 2020 01:04:56 +1000 (AEST) Received: from localhost ([::1]:49972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdxbx-0007bW-UH for incoming@patchwork.ozlabs.org; Wed, 27 May 2020 11:04:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdxSc-00020J-FP for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:14 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:54101) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdxSa-0008FY-K5 for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:14 -0400 Received: by mail-wm1-x341.google.com with SMTP id l26so3322211wme.3 for ; Wed, 27 May 2020 07:55:12 -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=O14rdwBIfGRpuBDr9I2ETfU73nIhdtOBuqe+I2h5Fx0=; b=CbyLBUnvLVk7vdoH626HCWP6G+l08I9ZsdW26iA2YbqsfQ9K03Q/X/ELDuMmcCLTZK y/MyE3XJdGZYEHk7cjHY+QJH6JuqRmKytepkgjaG/tZL5Tmhre6ghGxmWQD/hXTuF40l k+yZEP0Yoid+wLU5l67xStImgqjsqcu1LoxELQPE8ClcVj1U+uKQMAHlu/mgwR4AXR+r XBLfCWJuXPEAg+EavnAAVWAzHO/wo1DNAhTDN1EsadkmBmJmsTX0MinrgSN3WwcmEXOu DXtmudFqNKLLwwHEeDzwZjGkfLp7k/K6kYCVwmMhjErbEl4qPNLHat+NCTNlx086jhgE L4gA== 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=O14rdwBIfGRpuBDr9I2ETfU73nIhdtOBuqe+I2h5Fx0=; b=D149rrGpID8f1LTOz3WRdzKmw+B/lVILjVakx668Ujus9qRqDHo/IvaE1ENkPjqnon C47tjIRyZDGp4eW2pr/Z9mic3qmtDB1V9M8qqTDA8hfY1TQ8dgaMAxfIUDYihJr1SYZ9 gpnIzMyd3ysyI4IrvWDBI/UDek045aWYZAepzoTHmiOxZoG3lPoVc70/C6lMPu4PuE30 41W6gxeBvwV3uGnGrBkores2FYJ5VXxRB9qp2vC+BWE3U+NZNxyiz4wFBtcAZfC7l++y uoBCxPRViJ1oMz3y+TnXi1TknyOMMUqm10ge4Knazr3UfjgbwrjTH7m9+kmvLEisaWeZ RZ2Q== X-Gm-Message-State: AOAM532QQTAI2BMR2Q4YpVirkkpOMYmqyPqOZ2t5eyJ/zxCGr7cM5Tzz 7cmY9z+b9qpmNPxc+SPJ6BId8g== X-Google-Smtp-Source: ABdhPJzighiTBQBmB3/r0ZArkqDnYzocaI3U46wPGZ0wZWrE8NN4hw85nLHmSgHnH3sy17ximOOxeQ== X-Received: by 2002:a1c:4e0c:: with SMTP id g12mr4770362wmh.25.1590591311115; Wed, 27 May 2020 07:55:11 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id y4sm3103534wro.91.2020.05.27.07.55.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 07:55:04 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1507F1FF9A; Wed, 27 May 2020 15:54:57 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 11/12] linux-user: properly "unrealize" vCPU object Date: Wed, 27 May 2020 15:54:54 +0100 Message-Id: <20200527145455.2550-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200527145455.2550-1-alex.bennee@linaro.org> References: <20200527145455.2550-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::341; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x341.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 , Markus Armbruster , Riku Voipio , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Reviewed-by: Philippe Mathieu-Daudé Cc: Nikolay Igotti Cc: Paolo Bonzini Cc: Daniel P. Berrange Cc: Eduardo Habkost Cc: Markus Armbruster Message-Id: <20200520140541.30256-14-alex.bennee@linaro.org> 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 27 14:54:55 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: 1298973 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Y4aApPJX; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49XDfs6lwKz9sSn for ; Thu, 28 May 2020 01:05:57 +1000 (AEST) Received: from localhost ([::1]:52128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdxcw-0008W0-He for incoming@patchwork.ozlabs.org; Wed, 27 May 2020 11:05:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdxSc-00021U-W0 for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:15 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:51171) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdxSb-0008G4-KM for qemu-devel@nongnu.org; Wed, 27 May 2020 10:55:14 -0400 Received: by mail-wm1-x32a.google.com with SMTP id v19so3351786wmj.0 for ; Wed, 27 May 2020 07:55:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Hyh91ojyztqE2sZmXe5ULEmyNIFPWUmO5p3g1DDRWRY=; b=Y4aApPJXQcXVbJh6nUI63OeAs6XKVLi3Kiv4CXNqDbxgoxzp235vX/ZSRCSgkKh4Kg AGSaU3AvdznhIDAnnKg0VB7CjLpFTePwxXLRqNJK0QFNT2utBEoLpqp2o88TqnqsClx5 O/6Q97yt21LonmIdgN7UFp824zRn79wu6bFAYp+8KpNtN9NBCi/QS0ZiW1I8gbkZIwVz pAXwYjTBSdhVuwNBOcT+LvJacf9qjDy2xOQ8/7Z/wL4X4NUFg9HFl8zXmfiniXg3DKvW CT6jOCYBKYka5YpFSN+dyFahiQqNy84VibWzA0AYCvIVwk7wUTpD1TuW38e9ZzuBXaQv F1ZQ== 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=Hyh91ojyztqE2sZmXe5ULEmyNIFPWUmO5p3g1DDRWRY=; b=WhhG8e3UT8eH6Au8zQO3T+5oQy5gLba8FpnBabzMm6+DzBFdeM+gUrv0ZtJ2ju+oXP XxLY9BSoxV4zybr2MrNRRMcWNfneTDsHTfV8maX8A+P20KvZk1O3BsKNshVtGswoP/zX 5sKbR+YIwxoZ16LOMtSGz7PVaSbkcDyRy/9UFEaiY3YrXtRcdl0TiUC8YTTqYCO9GKp5 in/8C2oy2Ni3WNfx5S4kBGKQ5Ap0wGjTOBCYoRTfYLHDyIfdEhQgz5ecX8Yj2mYO7JIk nJbMUhPdeOemELBbRqfvPD4ngC/0kUcdaQSE5/So07NtvTfHRo+rNKDLO/1/b0hbNidq HVuw== X-Gm-Message-State: AOAM531MVy1Pqx6pR5+HmPYfM1xT6A+pXpwc2ozY5/CKHayZ2WntjgUv fvDETxbl0kIIuKjar+oRHy87qA== X-Google-Smtp-Source: ABdhPJybrduI4iysO2J9g1/L2HoQluTusk0GwwQWn/XAaS4oHzskJgtiiGoQ3/pB9TOUeVOIWsUBsQ== X-Received: by 2002:a1c:a3c1:: with SMTP id m184mr5003912wme.91.1590591312078; Wed, 27 May 2020 07:55:12 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r5sm3194036wrq.0.2020.05.27.07.55.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 07:55:04 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2B7C51FF9B; Wed, 27 May 2020 15:54:57 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 12/12] tests/tcg: add new threadcount test Date: Wed, 27 May 2020 15:54:55 +0100 Message-Id: <20200527145455.2550-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200527145455.2550-1-alex.bennee@linaro.org> References: <20200527145455.2550-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_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?= , qemu-devel@nongnu.org, Nikolay Igotti Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Message-Id: <20200520140541.30256-15-alex.bennee@linaro.org> 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.