From nobody Wed May 15 20:25:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1689858965; cv=none; d=zohomail.com; s=zohoarc; b=BlgdOd2S0imnJv9shry/vnkrl+5rmwXCtm4gRQ4qpNhKoaLbo0AALeDS006RkYNIf5xsXy7XW24gBEAHMw8RbnFv4W81n5EHbL6tS/7mqJxHFpp9fiUdwDmk8FDelYs/0bsxEFwOe7EBQiMS18lAN6k1tLCJ0zRvyPiHCz+RU/Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689858965; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=DJagqy899cqfJ8F6MPMb/Z/P3ROJgtL4fWrjBNYenT0=; b=JFXeI8LSg3wmL5v1JSqLBJWFWn13cgFg+Sds0DahzgZ6ltbEQ3q4tsmNDuiZQWIFB8A3pKw0mijiXn38hjbBh08h5x1aPeG5rNMXv/wbqSP9OzuWU0GMey2hX3CO1fW8cqKHAFSLti/Y20fwStKW08YxO1GXa3FEC+J+cRtDx0Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1689858965250474.9454035410055; Thu, 20 Jul 2023 06:16:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qMTVE-0003eh-QG; Thu, 20 Jul 2023 09:15:32 -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 1qMTVC-0003ds-SB for qemu-devel@nongnu.org; Thu, 20 Jul 2023 09:15:30 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qMTV7-0008NP-CA for qemu-devel@nongnu.org; Thu, 20 Jul 2023 09:15:30 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-31716932093so618258f8f.3 for ; Thu, 20 Jul 2023 06:15:24 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id p15-20020a7bcc8f000000b003fbfef555d2sm3882080wma.23.2023.07.20.06.15.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jul 2023 06:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689858923; x=1690463723; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DJagqy899cqfJ8F6MPMb/Z/P3ROJgtL4fWrjBNYenT0=; b=a8cbXO4JNyXWaA6+i/OpFHEBUtHpvzlVJNqJmeEiu4XpkMvRSM4aT1HqMcT2zSygca mO63bYeM+yiymNC2T9qj4FEMjDvm+ThfNeClxgzqWNtMshBJlZqa4XS22NXUgi7u+1XT 2ZWgoQjABuSWsgnXWKKbDPIRJ2DDA1Ffi+Z7+wZRRA9iHVvh9dQwo8TX5MNDz5Y5YXti PTGrT+b9yFwHEa4cXHU2+no8OoTgiAeA6W46is6p7nHMx2Wwizp4Sl5vgXM4ilVcd6PO /mxx7UAUFjNWALgRFcBwNfnCWO0SFM13cm7ujiE/x4diVK2wh5tMw2JZHauE4wluppzi 0Oqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689858923; x=1690463723; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DJagqy899cqfJ8F6MPMb/Z/P3ROJgtL4fWrjBNYenT0=; b=GlBh6YAmRNRyPpuPjkVIbN2C96utknDtIu22JgMCWIJIRzhvnIYwaOsTbcbHaMB/iD SsMw2OVFYjSteLAuctQz8ehoD4Zh7cXCSZkII4hkaoZ1UW0ZGwD1jOyikZy8K5tToXQG 2ffAPmrYjQPZDmsd3WkP9qWMu7OyOVsvThw8LEJWVqsu3HNEDOqdrtRKBhxk5p93KiBo A/24yz3VonzRYYD3ui6mw+GU++YEO0/C/S7s5Q4H0rJBRuXezTHlsQe37gOVURALQBGz H0A63mWM5esQxpRy+Pyir3oVqG90oM1DAV1iZOEb36fdX2UP547vuxzF+dX4lYavY2Iu pz7Q== X-Gm-Message-State: ABy/qLbAy+aeVemddqxWdaYS+slg+JAR8G3lUW593S5EI2rmTdtg2bch zw1yMBHe9CWq5jkCgTJPeU7LjoJD9LqJ5I+Z/Ko= X-Google-Smtp-Source: APBJJlHSZ16kKL1IhA4MFAHBnM9G+yvPoMlwmrW2kZxeUd5I6NqXpp4AALWFxCu/ngIu3jZ92S1rVw== X-Received: by 2002:a5d:44cd:0:b0:316:f25c:d0b3 with SMTP id z13-20020a5d44cd000000b00316f25cd0b3mr2037215wrr.22.1689858923465; Thu, 20 Jul 2023 06:15:23 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PATCH] tests/decode: Suppress "error: " string for expected-failure tests Date: Thu, 20 Jul 2023 14:15:21 +0100 Message-Id: <20230720131521.1325905-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1689858966790100001 The "expected failure" tests for decodetree result in the error messages from decodetree ending up in logs and in V=3D1 output: >>> MALLOC_PERTURB_=3D226 /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/= x86/pyvenv/bin/python3 /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/scripts/d= ecodetree.py --output-null --test-for-error /mnt/nvmedisk/linaro/qemu-from-= laptop/qemu/build/x86/../../tests/decode/err_argset1.decode =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95 =E2=9C=80 =E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95 /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86/../../tests/decode/err= _argset1.decode:5: error: duplicate argument "a" =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80= =95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95= =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2= =80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95 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=C3=A9 Reviewed-by: Richard Henderson --- My initial thought was "just get meson to suppress stderr for these tests", but AFAICT meson has no way to do that, and we already have a command line option to decodetree to request specific behaviour for the tests that expect failure, so this seemed simplest. 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 =20 + # 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 =3D 'error: ' if not testforerror else 'detected: ' prefix =3D '' if file: prefix +=3D f'{file}:' @@ -141,7 +145,7 @@ def error_with_file(file, lineno, *args): prefix +=3D f'{lineno}:' if prefix: prefix +=3D ' ' - print(prefix, end=3D'error: ', file=3Dsys.stderr) + print(prefix, end=3Dend, file=3Dsys.stderr) print(*args, file=3Dsys.stderr) =20 if output_file and output_fd: --=20 2.34.1