From patchwork Wed Jul 10 10:25:54 2019 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: 168794 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp9774188ilk; Wed, 10 Jul 2019 03:31:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDY/DIXWsb6fDW7p5f8bSXXJ7qoCTZc00uUZzijcgvE8VVkYhCmXFUpsh/dOX4fSTPFIuE X-Received: by 2002:a05:6402:8d7:: with SMTP id d23mr30508341edz.17.1562754663165; Wed, 10 Jul 2019 03:31:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562754663; cv=none; d=google.com; s=arc-20160816; b=uMlVRhhk5vQE0EE6RQI+s9WmVW7i5uIuY4e0BFHzcYCL+k3mFiWuvZUUEtQ617ZhDQ jFrnLxQs5TcGmLGHn4DNZM7AYZ07MXXeF/ImCxFzIVxCIqx/7lCaEmXjQ0vC7+uoXqIj VMQeSHBHL38JK631aKO+2Fy1NlwQyoq38YHQMk3duQEYIj94fQWXUaoHPyxk3rbyoeoV fvsuKwhZz6nscP7J4/aFiEJbqJhhS1Sm99CCeNmF7TirKoigQx9tKa9V+tcsh3jbo88g IfemUi6RCPQpvhdINB03exb/NQROnGBiXn30rDMdDRRpBenWk8IsSVgoFy6vJWjlrIgs Hpqw== 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:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=ZMvoxsO3ETl4fqBEf7cACx/37SrGiYDPW48cWDQTBJA=; b=SHKH6JRUIRXAZLAbRZp0WeZ0u1d64sSz3d/JHCYZiMChwjnpKu7efHrq6JP0CEj0yp p/NcscOtohN+4jZuvfRCW7Kx94Qa9TX9d6CSlay5Nv6EmInD6peu6tQ9UK78Ydua7zvy BcgiCMmWo0hUzYOagDI91AJom78GU2eOu6hz0VWImpudaEyeayUIp1DNZsI0osPiMMpX BPZ2WD0ETJrfkoQyHto3p68bRg+b4UkVt4IkZmTmvARXHrHC647RqDTM5Esb1KRB3dzP EuKdSZuP28KodiJuKZUmjHoGm2Ri/KbaOVPRrqFn7yJ8WhPPfjTfE3XXKSnoxKkJQq3f 48Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gb3bRGeF; 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 c5si1152772ede.282.2019.07.10.03.31.02 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jul 2019 03:31: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=fail header.i=@linaro.org header.s=google header.b=gb3bRGeF; 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]:59806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hl9sM-0006cx-4B for patch@linaro.org; Wed, 10 Jul 2019 06:31:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41731) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hl9nk-0001J0-Oq for qemu-devel@nongnu.org; Wed, 10 Jul 2019 06:26:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hl9nj-0000mC-KV for qemu-devel@nongnu.org; Wed, 10 Jul 2019 06:26:16 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:34842) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hl9nj-0000Ns-9V for qemu-devel@nongnu.org; Wed, 10 Jul 2019 06:26:15 -0400 Received: by mail-wr1-x429.google.com with SMTP id y4so1872725wrm.2 for ; Wed, 10 Jul 2019 03:26:00 -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=ZMvoxsO3ETl4fqBEf7cACx/37SrGiYDPW48cWDQTBJA=; b=gb3bRGeFYyrALzSvDTUqmg07n90tD6vdem80Fxl8lWu46a8rosiiStkPIrZ44WlkwD G9xlTEoJEJoitBJ1oIkj/DUw9HVrZGOyymgwy82HOvFJiQevdJylcoJ686JTN9bESZ9N nJ05okDudDlTV1X0fAMXyxB45g0zPkblSr4sXvPRuJUhfAlw0+d1IpBrvy6YV6kGPwmM 1Qkg2fA6Qa1GMy7IzeOiSDPfEsGh0wxfeS9pyCBUFHBaTpeGJdGtJIpni+ypYZ/MyAzz ZvJ34gDNgBsFWgTsHsJEfzb54jgAfpA7I1/1n9INHmgikp1izb6HhHP1CKndt7KP6O0O Sb/A== 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=ZMvoxsO3ETl4fqBEf7cACx/37SrGiYDPW48cWDQTBJA=; b=n07jloUNT9giUK0z27kwUGgGkSOBfRvez6qyLieRfx+jnqN/4rwYUmgaqW5k2TZ32V Umbw68PrEU2qym0it9QhgKgV+F9L8azRfHJf0T6GP4vgRz7lKHoTjWwIXxAzZZ142pXP h6tfdmV+VANcgGi9u6KojEMb86nlhfC05tP8FwWW47h8+JwxvNT0GlOSL7Ipt2zZyijx FaZ0DW/qQG/paurkYiCpG9e1qhvjLtmKGwRLQtTpOInGspfIU3iqybahKmHQVhuen8PA duHu5NwLmKzoAct8dYmC0AnOOILs64GEoRdZD7QrCjvEQk7GAJuZ66DG7b1wzobnW7A8 kQaQ== X-Gm-Message-State: APjAAAUbAe5Dz83QVnrunD9+INISSDWUXPy3yQN6DLPkLmnyw4/iPca0 2SCfwtpcSR2kw3EObI1Jcqsi9g== X-Received: by 2002:a5d:63c8:: with SMTP id c8mr11560301wrw.21.1562754359420; Wed, 10 Jul 2019 03:25:59 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id w7sm1547939wmc.46.2019.07.10.03.25.58 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 10 Jul 2019 03:25:58 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CC0D81FF8C; Wed, 10 Jul 2019 11:25:57 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Wed, 10 Jul 2019 11:25:54 +0100 Message-Id: <20190710102557.3107-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190710102557.3107-1-alex.bennee@linaro.org> References: <20190710102557.3107-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::429 Subject: [Qemu-devel] [PULL 1/4] tests/tcg: fix up test-i386-fprem.ref generation 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 , Richard Henderson , qemu-devel@nongnu.org, Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We never shipped the reference data in the source tree because it's quite big (64M). As a result the only option is to generate it locally. Although we have a rule to generate the reference file we missed the dependency and location changes, probably because it's only run for SLOW test runs. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson -- 2.20.1 diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target index b4033ba3d1..d0eb7023e5 100644 --- a/tests/tcg/i386/Makefile.target +++ b/tests/tcg/i386/Makefile.target @@ -35,9 +35,9 @@ test-i386-fprem.ref: test-i386-fprem $(call quiet-command, ./$< > $@,"GENREF","generating $@") run-test-i386-fprem: TIMEOUT=60 -run-test-i386-fprem: test-i386-fprem +run-test-i386-fprem: test-i386-fprem test-i386-fprem.ref $(call run-test,test-i386-fprem, $(QEMU) $<,"$< on $(TARGET_NAME)") - $(call diff-out,test-i386-fprem, $(I386_SRC)/$<.ref) + $(call diff-out,test-i386-fprem, test-i386-fprem.ref) else run-test-i386-fprem: test-i386-fprem $(call skip-test, $<, "SLOW") From patchwork Wed Jul 10 10:25:55 2019 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: 168790 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp9769755ilk; Wed, 10 Jul 2019 03:26:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxR6p6r2t9YaWRh/8OUlkS6QNyaMQalyHQ9jrlB9OKUye93rBdckrozzv/A03KQBz13T6+w X-Received: by 2002:a17:906:7e4b:: with SMTP id z11mr26332259ejr.214.1562754405319; Wed, 10 Jul 2019 03:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562754405; cv=none; d=google.com; s=arc-20160816; b=bhq5PHp7LtPDu/03bbsRjIyqEgcw2EYdHI9vaU0qlEfE62c4Zgs4el4qNY0Ra5r83A /XRKvHb8k3SyifJfLoAqj6b/NMRn3VzF5kdqAes6g4PTWFis4ZErq9VE+AayLTZ6/hD1 zMQyMQzmrYxR2yt8ighRPLDleSqURD9nbEd5K/FYnaj8D9PfhZej9QC8J7zhmXOIkWyB rIm7zA1trih4S1mOprdSbm6I8iUcuGz4uYxFfOql5V2SRpH1AfHn9x+PQ0DB/ormO4Lz 72+4oeV5Nz9Y6zagtaTECTbp8Napnwhtcie4SS4gEO/ShSJv0P4V2ITsspIrRc211CKD pXEw== 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:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=p1ccHw8zWsSvS6fMryBQBe81FnVDKc6P4UtR9wq8jPM=; b=g/8P1uC1l6GLz/C/835y21nLLmBMo5phz1E/XfS78knyUaqesW+3n+oiBA6m9QyjOX m2whP5cWv78wc+ienWI7Cgq0FpdBqVDO8Cp+VVmaIYTth6gfax1TRWxP4/K9LO2ox0WE ziwfM0lWad4ljsDbu9zVoepCLpoRKz/cI2ZkV71Xa+yiEtdUfRkbaLRU33N5/L+dPpSv FPkrz7Edvh4cjytmklYFTH7J3lh8L9Zg/nhFa16bPfQCA+xwn/wafvA1s/hsCyKKdPp9 qH/uq9qFrI3rDr2wmi0JKJtav7fUWcnoTxhci9KtiMsoGUzBiMoaihWz/Y4JwnOELtaV OVhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JYAy0hbX; 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 t23si1019627eju.143.2019.07.10.03.26.45 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jul 2019 03:26:45 -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=JYAy0hbX; 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]:59756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hl9oB-0001MT-BT for patch@linaro.org; Wed, 10 Jul 2019 06:26:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41729) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hl9nk-0001In-Kx for qemu-devel@nongnu.org; Wed, 10 Jul 2019 06:26:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hl9nj-0000lt-C8 for qemu-devel@nongnu.org; Wed, 10 Jul 2019 06:26:16 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:40271) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hl9nj-0000P2-4Y for qemu-devel@nongnu.org; Wed, 10 Jul 2019 06:26:15 -0400 Received: by mail-wr1-x432.google.com with SMTP id r1so1842841wrl.7 for ; Wed, 10 Jul 2019 03:26: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=p1ccHw8zWsSvS6fMryBQBe81FnVDKc6P4UtR9wq8jPM=; b=JYAy0hbX7Gnj2kFTy/qWsUo/iKuQLAV1Rc6YOGNv0jwb5XIpucdWhNCsjw5jXflHJo SDYRtREOjSmgqkaDhqSD8nGKFAk77EltLnAGci2StIP7odRaw+ZqjcFJKxZWpldd3SMy Ws2OfezhtrzkbTquQ3CgE9zt6MYRIipO9SCvVOHrHNQiPKzF+LrTBx9DS/NjG7aFdyMo qGABK5pwA5aUxddynZdI0Mll5llxrI7Ze5gNbKJB5D6+PiJ9uvuv6hS1sntew4uXirsN ZmADe0X9VklTumzX0hBl65N5pkKt047szsFk982Y9M13ZI7HyVtJ2LzAtF/U/qLwnwAY ZEIg== 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=p1ccHw8zWsSvS6fMryBQBe81FnVDKc6P4UtR9wq8jPM=; b=AXBmiIk2X3iNqltuYB7+s2Va6BCu3qiSRehHUChR+h7rRpoXJmm/3KComB12ybuD+U OKggDNLdBWMIWh63wL8F32JMrv+yYi3PLCw3F6EorrQMTTB+pcDZKsLHUfaE0A5cp17s TtvLRfi+GeWjvRitTnwSnftqC3O0MtayHW7HwDZNittOlmoLdi0J/gPLJlyQuyor0Lx6 5D6pUVvREDStwL6kUuGiwyBl9YgU1Lp2O5S+X1eCuVIIb/PwGitLiMxotpOHfq0B3pKT rsRmxBpQNinqKTfukHk6D5fYJ51HlChp9jUUKNI4Fs2fks+DE5BVj5mYYZ4JE/RflOpe PduQ== X-Gm-Message-State: APjAAAWE5d0WnhTfdAQ9fLlwsY8/g6cmSaYVhw7R4dnd09D46O87zbAt WCt5FCy2rtFaLlMAeEBJxmQGnQ== X-Received: by 2002:adf:b64b:: with SMTP id i11mr11520724wre.205.1562754360160; Wed, 10 Jul 2019 03:26:00 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id z1sm1945444wrv.90.2019.07.10.03.25.58 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 10 Jul 2019 03:25:59 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E00381FF8F; Wed, 10 Jul 2019 11:25:57 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Wed, 10 Jul 2019 11:25:55 +0100 Message-Id: <20190710102557.3107-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190710102557.3107-1-alex.bennee@linaro.org> References: <20190710102557.3107-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::432 Subject: [Qemu-devel] [PULL 2/4] tests/tcg: fix diff-out pass to properly report failure 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, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" A side effect of piping the output to head is squash the exit status of the diff command. Fix this by only doing the pipe if the diff failed and then ensuring the status is non-zero. Signed-off-by: Alex Bennée -- 2.20.1 diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile index 6fa63cc8d5..9f56768624 100644 --- a/tests/tcg/Makefile +++ b/tests/tcg/Makefile @@ -45,7 +45,11 @@ run-test = $(call quiet-command, timeout $(TIMEOUT) $2,"TEST",$3) endif # $1 = test name, $2 = reference -diff-out = $(call quiet-command, diff -u $1.out $2 | head -n 10,"DIFF","$1.out with $2") +# to work around the pipe squashing the status we only pipe the result if +# we know it failed and then force failure at the end. +diff-out = $(call quiet-command, diff -q $1.out $2 || \ + (diff -u $1.out $2 | head -n 10 && false), \ + "DIFF","$1.out with $2") # $1 = test name, $2 = reason skip-test = @printf " SKIPPED %s on $(TARGET_NAME) because %s\n" $1 $2 From patchwork Wed Jul 10 10:25:56 2019 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: 168791 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp9771862ilk; Wed, 10 Jul 2019 03:28:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8IaqUJI1DvDbMZtp/tpG6yCKX+lEOuvz1lJzH8vdA8OHDqqNXXASbIKeP9ZY0HJLfmc49 X-Received: by 2002:aa7:c99a:: with SMTP id c26mr30147436edt.118.1562754535026; Wed, 10 Jul 2019 03:28:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562754535; cv=none; d=google.com; s=arc-20160816; b=DAYYMAHa2MpWAVdQ4+sn1V0mMtBDdQdKnmCysebGULwYIS231I8GElhHkW31ohUeAr MmJmJsfbiMCIUhKYN7adEKxa4brnpGUSTbhtChz4oHNtVe3Sz8kxh2n/xtEBK/3q9d8s gBAp89zEvXPgLgd63ilL0Z430rS3swAYOnkASXsk9ol7r+6wqJqwOsA1swawAlhcWrZB ZrddA2TX1oKc9Pduq3Rjn6/A+pG86vMdTBlg0skgejR+iABg1puhG+ZSBMSdnhhGkJPi 83G4Bqo+tte0RWdDqhNgUP2gpw2gZf4sOnoiUDvlTrQjjG0Eo5jwbxP5iT3rKeL9Wlek WD6g== 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:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=2uf2HRIdbf2h0OGgfW33mzQxfpKIty5w+0euDRtaBug=; b=SjCHhPLrBhyoDL0Q7QNGjLl4B8HulHdvGNg4SXbpv8t1U4oU2xOfXU98hQXXRDuyqM DVReCmFfuVwXSqi33MVySZFv4uRT+AaYtxPsFuCx+pes8ACyRUq81+7Iy1PfxhZyXbFC KdtDUaSd6Sz1j81F6mhyuNVUfrda6iC7tsrjg6ghiegasjcSfczswxYTXt9r/2RIe9Ju 6b+LAiM8tdn2f4zeAieE9wNnqreL3De6LlRYwbECEAivO5CDuh9HP0/cLm0l4pPSH+pw ZtfLGWL5UQQP3nMm1CNQS/2AB0x+dGVHyTpWJLUwPmakRsmxc2nPwEPT0iRbcc68XrB2 c0NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=zROoEq6W; 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 e28si1132023edb.265.2019.07.10.03.28.54 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jul 2019 03:28:55 -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=zROoEq6W; 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]:59774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hl9qI-000450-0s for patch@linaro.org; Wed, 10 Jul 2019 06:28:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41713) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hl9nk-0001IC-8a for qemu-devel@nongnu.org; Wed, 10 Jul 2019 06:26:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hl9ni-0000l5-W2 for qemu-devel@nongnu.org; Wed, 10 Jul 2019 06:26:16 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:56072) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hl9ng-0000Qj-TZ for qemu-devel@nongnu.org; Wed, 10 Jul 2019 06:26:13 -0400 Received: by mail-wm1-x330.google.com with SMTP id a15so1706197wmj.5 for ; Wed, 10 Jul 2019 03:26: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=2uf2HRIdbf2h0OGgfW33mzQxfpKIty5w+0euDRtaBug=; b=zROoEq6WNpkvChYeWl+NNuJ2VBffr7+CahyQPCmFDkdtJREmpD/A+3B3mEkO9odoHe ZcAkI/SGNTnnQABde4vhWpqiSIe3lGCAThDWT5rln6mIPckMN2JDRT84zgxoGP2/f9Im DFhxbf19RezX0WernUVbsVgW06BsvnLqcnTY2bm0IDj2EgZagMK0VE6ZatRt9TJxO78A LTaSAk1iZ5dj4RJGPDO1dPEu6anKwTJTuYySG+rXJo4wvWiLZ5JjycsidQiSnzLbRoMG yo6XYrPuKDdyrAsakJIUCNl21T6Wkxses/+BuUxSnnuDe1MF31ImeLxz1/TCZSr8uY8F jhCA== 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=2uf2HRIdbf2h0OGgfW33mzQxfpKIty5w+0euDRtaBug=; b=l9NqL38r5Gu1JOJrlszLBFWf/BuK2mzTFuNH/nWch37Ye5w2X9BkNJ9ldFylDjLS/2 FfS3I43aWQ7VDVKCh6KKKkiqd3LivYXS4tNWqZFmS8bdcZ//2Y2xJ8uzHgsIM2OIjSwI 1zD64S2z21fY6lgItcy/mmMpNdk/emdfeW/YaB5R7u9N0+gctJyXmTPXzaFniaXB/mke W0QgPfmK82ubzp6EWr5ibV4IlFNcoQpdKoE23Ude4nEC8gDj6YEUlgg64dW2rHIaX7JX whbS6rLHBzAvLtXOiaAylfTfxUBuhyZtY8f9Qcj/oD118+TpkICJ4xAvZEloy8GUo98O 2Ljg== X-Gm-Message-State: APjAAAWwYuBKfaHJntSJWJDzav41humVDK3TRtsfcUWabfW2zaSKUOE6 poXaEQnLHobBT8BIxAjg9uDieQ== X-Received: by 2002:a1c:4d01:: with SMTP id o1mr4863178wmh.55.1562754360745; Wed, 10 Jul 2019 03:26:00 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id t6sm1538550wmb.29.2019.07.10.03.25.58 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 10 Jul 2019 03:25:59 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 018041FF90; Wed, 10 Jul 2019 11:25:58 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Wed, 10 Jul 2019 11:25:56 +0100 Message-Id: <20190710102557.3107-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190710102557.3107-1-alex.bennee@linaro.org> References: <20190710102557.3107-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::330 Subject: [Qemu-devel] [PULL 3/4] gdbstub: add some notes to the header comment X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Add a link to the remote protocol spec and an SPDX tag. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé -- 2.20.1 diff --git a/gdbstub.c b/gdbstub.c index 687c02e598..8363683852 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1,6 +1,10 @@ /* * gdb server stub * + * This implements a subset of the remote protocol as described in: + * + * https://sourceware.org/gdb/onlinedocs/gdb/Remote-Protocol.html + * * Copyright (c) 2003-2005 Fabrice Bellard * * This library is free software; you can redistribute it and/or @@ -15,6 +19,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . + * + * SPDX-License-Identifier: LGPL-2.0+ */ #include "qemu/osdep.h" From patchwork Wed Jul 10 10:25:57 2019 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: 168792 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp9772040ilk; Wed, 10 Jul 2019 03:29:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzzP+TU54VrM957MWk+c9uYs4xrjWVcsCGZjGmWmE0PN9boRCTqojAWHpJLdZDYCJJPtpzc X-Received: by 2002:a17:906:370c:: with SMTP id d12mr25775700ejc.140.1562754546657; Wed, 10 Jul 2019 03:29:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562754546; cv=none; d=google.com; s=arc-20160816; b=yegZV24MazyoSrb8s1x0rpb/q8As+jz8cjBSnE72EcyUth2mZ2s6+LY2v8V8YnppdP Flk2OjLQ1/1yEwMlRGr/R18+dK7nLUNeH8XyuhoFiAzHFJCTE4uEoWHSjrXVDh6h8tlK VXN8Nc9hEpItAohESRxeloKzTN/Js59cPSMiT4bmeEW12ObFcI2ajpYVbRfZMKBGwMCZ 5o+s1Gijg+oa7hpmTmix8lWD4474EiymdwGbV9e1F4ocCxdAUfBPjSOBHrkF5fklhp4P EtzWcfwYc5Vg/i9gD/AjMSY3i2YNNohp/0GSqBLIKTjVm8B+5IPneVZ1ysEor2ASLGhx FCYA== 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:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=2xglArbFUfwd3/IFA91rmfZG+5etlym8PqDYDWRMM+M=; b=Xjf8HjeWADBchOmiiV1QSLJUcqiWY+XI8gWTbuvrHvP313LpHGosdoykxPOoPLeBRI jeMvVTeIgOVrp0dloUPbyFo8KO2o99OIdQf7SDYM0JrhwsqOmfCliZ14RfwoNNkGEzUn lNlmOhk2CT4MxysGbr3HL07G6RDIs/2HiOvzO5sCOz3nCH5wqZsSNAJOPPH0aXPY9912 yHxKiy8YNIiNvlTqJlawyDdh9oVaIgW/MxmhLvnYNoo+kHQgXjWnTZzwOOCDt0kpoEsP 4/jlYMDEG0ThMR7ungoXPLBu1WBvFTQr69MDbs7x6BxnoL0zkS1F5rHu+UOuCFttrqOr Heiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=lIXILrVI; 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 g2si1121261edn.283.2019.07.10.03.29.06 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jul 2019 03:29: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=lIXILrVI; 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]:59780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hl9qT-0004DY-Lp for patch@linaro.org; Wed, 10 Jul 2019 06:29:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41735) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hl9nk-0001J4-Qg for qemu-devel@nongnu.org; Wed, 10 Jul 2019 06:26:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hl9nj-0000m4-IM for qemu-devel@nongnu.org; Wed, 10 Jul 2019 06:26:16 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:45392) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hl9nj-0000QF-8A for qemu-devel@nongnu.org; Wed, 10 Jul 2019 06:26:15 -0400 Received: by mail-wr1-x444.google.com with SMTP id f9so1821865wre.12 for ; Wed, 10 Jul 2019 03:26: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=2xglArbFUfwd3/IFA91rmfZG+5etlym8PqDYDWRMM+M=; b=lIXILrVIrja/6LD0fWFP/pJct/hfmtiq9zHnk1fZ9I9H67NADezkqr7abp8xDvnH13 sIUTYWR9V//i7zttXEu3japECj7zzInkcg4IQS5AaWFYrPUP2RW9bZxtHz/CPBx31Egk ZddJmzQcBuwRaCcezDw8ygHQ7rRCQ99VTgAh7eJ35maFiGwFWCetxl4HYZ6+Oc/6Cgoi RpgA+oS2W7m/7SSkO/9Ze1Bwffk9SNyBHiPQwIVngXa53LhTpwZEab7dE971lEARn/ZH e6DJu1AMooy2x8RcwrV4exL/qhxf68wwlKYFEgLRUYQ3tg27RfFDrpqLyVPE9I2SFudR QuhQ== 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=2xglArbFUfwd3/IFA91rmfZG+5etlym8PqDYDWRMM+M=; b=rMAS7Z6RDkUKqWj8hh8OJTqX4akqhN+hsnpKsqtcJQZagFtULYeCOcecUfhMkQGiBL ekoMj1EGXda0d0UUKKwGUDJXjrAiiWJmZdQXJYtL9v2yCYtGd6b3KTo7T9jkBxtyQWEU hc7NmniSMplSgZXl6161iY+Dfs8+j5VIi4dUGY0UwVP1GwWGuHKWA4RdFyfIIMwEQgct SuwwCOV97tpzzgRjUHtx9JHFltH375MMyMJuxTE/7F/KkRddOhtJN9p8TOJzaKtuvnAp fBLwgPeZxBQmVGSHcTgu75DFrnRmvdOHas2/uWgVq8qXnr/GurPnybLsgB+jSx9FYM9a 9HUw== X-Gm-Message-State: APjAAAVytSTTxcdq2GgiPUihRxIbYOV+JZvPu4d7sp2mcjnAHxx2ua9y sHxyBAJ35Hz1+PI/V281hN3GQw== X-Received: by 2002:a5d:4b0a:: with SMTP id v10mr30565732wrq.308.1562754361296; Wed, 10 Jul 2019 03:26:01 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id s25sm1575252wmc.21.2019.07.10.03.25.58 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 10 Jul 2019 03:25:59 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1676A1FF91; Wed, 10 Jul 2019 11:25:58 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Wed, 10 Jul 2019 11:25:57 +0100 Message-Id: <20190710102557.3107-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190710102557.3107-1-alex.bennee@linaro.org> References: <20190710102557.3107-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PULL 4/4] gdbstub: revert to previous set_reg behaviour 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: Jon Doron , Richard Henderson , Mark Cave-Ayland , qemu-devel@nongnu.org, =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The refactoring of handle_set_reg missed the fact we previously had responded with an empty packet when we were not using XML based protocols. This broke the fallback behaviour for architectures that don't have registers defined in QEMU's gdb-xml directory. Revert to the previous behaviour and clean up the commentary for what is going on. Fixes: 62b3320bddd Signed-off-by: Alex Bennée Tested-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Cc: Jon Doron -- 2.20.1 diff --git a/gdbstub.c b/gdbstub.c index 8363683852..b470aec8ea 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1673,12 +1673,23 @@ static void handle_remove_bp(GdbCmdContext *gdb_ctx, void *user_ctx) put_packet(gdb_ctx->s, "E22"); } +/* + * handle_set/get_reg + * + * Older gdb are really dumb, and don't use 'G/g' if 'P/p' is available. + * This works, but can be very slow. Anything new enough to understand + * XML also knows how to use this properly. However to use this we + * need to define a local XML file as well as be talking to a + * reasonably modern gdb. Responding with an empty packet will cause + * the remote gdb to fallback to older methods. + */ + static void handle_set_reg(GdbCmdContext *gdb_ctx, void *user_ctx) { int reg_size; if (!gdb_has_xml) { - put_packet(gdb_ctx->s, "E00"); + put_packet(gdb_ctx->s, ""); return; } @@ -1698,11 +1709,6 @@ static void handle_get_reg(GdbCmdContext *gdb_ctx, void *user_ctx) { int reg_size; - /* - * Older gdb are really dumb, and don't use 'g' if 'p' is avaialable. - * This works, but can be very slow. Anything new enough to - * understand XML also knows how to use this properly. - */ if (!gdb_has_xml) { put_packet(gdb_ctx->s, ""); return;