From patchwork Tue Jul 25 10:25:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 706137 Delivered-To: patch@linaro.org Received: by 2002:a5d:464f:0:b0:317:2194:b2bc with SMTP id j15csp98850wrs; Tue, 25 Jul 2023 03:26:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlFnoXHbmOQjcX7s8SpPJNewGdHCHFF6KjQAUhzbr5TW/V+r9v73ITxBBzOO+kYDWuXFutcJ X-Received: by 2002:a05:622a:1703:b0:403:c667:e691 with SMTP id h3-20020a05622a170300b00403c667e691mr3087540qtk.22.1690280807780; Tue, 25 Jul 2023 03:26:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690280807; cv=none; d=google.com; s=arc-20160816; b=Y0LtotfAgMDOrDMl2hthHJOkBf4cyPUgScvG7QwrDaNGOW0XszR64wv+ScpRonsSIn Tqr4/oOqRcLUR5K/W3Kj2V12bcJboZg6grS6hIdZREPFfc2+5EIWE6bzF6oMm4vqpFWU ytAwZEEqNd5bvlUTmGHwWcyxJUVYbGbqGxnYkDcNsvKCC4kyFmSNjZk+5yl3vU2cr5k6 WURaUiX3s5pAqX/25t/BUq+yO6sXsuBxj3vIwqVVEbDJiETRqzkCbIBKB3I3V9UvD1LG 5V4k1EKpiT274LvYixH4/tRISP67QrBhL5KRGUKPh2KINmttjV3cSSGvFViEg32piKAD /cCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=9C6PfLlU2O818ZwPOAqAi3d27sGlX9QQgbc+eDlrhGY=; fh=bFDrUYhlTVi/QyetgXx/byg2+yO/22Hp9SjwoefyKLk=; b=f8BPnSShfTsUP2QOH3HhrFMgQLVWciilMdpk3R+G6YKbbUD1XO57AXKFX/L64v2mVL WqNwtVMUP2sXoKB9iRwPSHak3g/ZPA8BT3ZzRoDB/MRnHSCglktznDLaPRMpyn1xZUrD QOmghHnWjSDCQqJFaK/5Py5PI05YP1KuKQWoTH8BU3j15nGb87eG6E40Q4bvE2Ra2T9s +i0GCZcr9LS1w5d89wN8WBp51qux6syaQHLKAtLbzJuzWJZdO9BUYL9+HoWh9phYHnU/ xjf84aEnEZcKU/cb1MdA2pQrHZTV5Nf8SvaZ0B1l5X+jKPFkqaGaZi6SlXsSs6/GV5y5 a0xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DtiJDRKz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n6-20020ac85b46000000b0040696bcc9f5si2670232qtw.281.2023.07.25.03.26.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Jul 2023 03:26:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DtiJDRKz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOFFE-0001Xp-Be; Tue, 25 Jul 2023 06:26:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOFE8-0000Ix-CC for qemu-devel@nongnu.org; Tue, 25 Jul 2023 06:25:13 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOFE5-0007WG-Q2 for qemu-devel@nongnu.org; Tue, 25 Jul 2023 06:25:12 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3fbc63c2e84so53543925e9.3 for ; Tue, 25 Jul 2023 03:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690280707; x=1690885507; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=9C6PfLlU2O818ZwPOAqAi3d27sGlX9QQgbc+eDlrhGY=; b=DtiJDRKzQ6LC69Z7UhI7WOfXygH36DCkqUZqSr6AB/A8gX96oYoxuxboOlegc3Npbh dVu98nazkFFEbvkvmAv3oIWTT3v92+tRWnJsvdM3PtHRzy0JftggZ7Byca49ORk4hJy6 rInsc809qsj05DODNJ83TBjrVImyJ+qQ024xgqdg0TW45JBjumofd0GC4FAJwE2HfC+Q q8+QCVY/Ve7PPwbbPvSnzHFUMS7bQhF/H+YlYUbv0CHR+LLkDQ+IW+T4IykP4tFuLrJR WEumbDzp8z/0spIjITYrdg5ZO6FMweF7cI1WYvtL5HT2Q5/f72eIhg6e9xIcNB+W6tJj Gr1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690280707; x=1690885507; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9C6PfLlU2O818ZwPOAqAi3d27sGlX9QQgbc+eDlrhGY=; b=Vl5IVPUrGbYT2NH8xku2yuTPBU4UlvnZ6fJYbaaHLoBMKhBswRVGH/DZiy7lNyRJyb 4W4G8g6+SXfCt+FsXUZiR/llCB8jv79tpJzoiGvTZlSTXhabO7ZI/ufob7LTmKm+VLuC tSoH2+RypdYnJkB1JRLtu7w/N0YjPoQmwfUF+dor0xEUuFxEHDx2MNCd6FAhqX2IajZe JAczkh8wJqUvJ/9IZqUxX2WNoF+JKQHq+O5O5GHhoogUO4qKKchMG2OzkKc5K+BnoSzQ 09RMfE2jtNfSMkTzM4KGlbTuGYQnBgpw6RIMIAnzOSF6i7VRxrvAsRca5JPKYq02wupt yrTA== X-Gm-Message-State: ABy/qLbUXCWb6svoBNpVkmvCJS7EatPH+ENJPk8YDL7++buMuoJk6tWf BODGKxQO58QAxf7w8F0JXJSbR8qOJrfOdGNK4AY= X-Received: by 2002:a05:600c:40c:b0:3fb:dd9c:72d2 with SMTP id q12-20020a05600c040c00b003fbdd9c72d2mr10012662wmb.31.1690280707298; Tue, 25 Jul 2023 03:25:07 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id u19-20020a05600c211300b003fbc30825fbsm12567185wml.39.2023.07.25.03.25.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 03:25:07 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 5/5] tests/decode: Suppress "error: " string for expected-failure tests Date: Tue, 25 Jul 2023 11:25:03 +0100 Message-Id: <20230725102503.2283907-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230725102503.2283907-1-peter.maydell@linaro.org> References: <20230725102503.2283907-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The "expected failure" tests for decodetree result in the error messages from decodetree ending up in logs and in V=1 output: >>> MALLOC_PERTURB_=226 /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86/pyvenv/bin/python3 /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/scripts/decodetree.py --output-null --test-for-error /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86/../../tests/decode/err_argset1.decode ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀ ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86/../../tests/decode/err_argset1.decode:5: error: duplicate argument "a" ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― 1/44 qemu:decodetree / err_argset1 OK 0.05s This then produces false positives when scanning the logfiles for strings like "error: ". For the expected-failure tests, make decodetree print "detected:" instead of "error:". Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20230720131521.1325905-1-peter.maydell@linaro.org --- scripts/decodetree.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/decodetree.py b/scripts/decodetree.py index a8a6cb69cda..e8b72da3a97 100644 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -134,6 +134,10 @@ def error_with_file(file, lineno, *args): global output_file global output_fd + # For the test suite expected-errors case, don't print the + # string "error: ", so they don't turn up as false positives + # if you grep the meson logs for strings like that. + end = 'error: ' if not testforerror else 'detected: ' prefix = '' if file: prefix += f'{file}:' @@ -141,7 +145,7 @@ def error_with_file(file, lineno, *args): prefix += f'{lineno}:' if prefix: prefix += ' ' - print(prefix, end='error: ', file=sys.stderr) + print(prefix, end=end, file=sys.stderr) print(*args, file=sys.stderr) if output_file and output_fd: