From nobody Tue Sep 9 03:38:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1749732681; cv=none; d=zohomail.com; s=zohoarc; b=haDXfMe9xwbMkjxkgRdKCzqFlQ5o/aWSofrSbWEiVkbelpo92SOTF7DydBMD7Nsd7uSgT+xYoX9MDwQ3jFD9ictJHXBfjt6sboC7askCkVeUVlPSCkykKeLNp2bfYAj3s5qQ7GEIwBQvJqKLG/aojKeqG9gmRnZTF4DyL8pgRMc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749732681; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=E2EhfMduOxQgVPc9xmsnPeW1jzanjOVMipNaYr0D0Xg=; b=DLCzTpcqMUL3hhAG0arMRbyNw4HqyUqw7/oeqZcVnyPSaSDOZDXDUlhVvkdf/z+SSzmPz+Rwy5jqhAfwzFjGQ5YPHPKqSUZtdMHnJQly3mr+x2hQz4NJGUwYqJpISdKJrJ0uqksda1fklyGTP3pdCwsAfvK4jq9J1Z9XcXj/8ag= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1749732681823211.39221791937086; Thu, 12 Jun 2025 05:51:21 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id AEE06140B; Thu, 12 Jun 2025 08:51:20 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id D6B3EE72; Thu, 12 Jun 2025 08:49:16 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 25652D90; Thu, 12 Jun 2025 08:49:10 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 989D5127C for ; Thu, 12 Jun 2025 08:49:00 -0400 (EDT) Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-61-6lwcKB6EM-m8oX8xeL3Zew-1; Thu, 12 Jun 2025 08:48:58 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0E3F019560B6 for ; Thu, 12 Jun 2025 12:48:58 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5827F195609D for ; Thu, 12 Jun 2025 12:48:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1749732540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=j3Z6Uro/kN5fBWxbIb5sHaIa6l/hW1Hy5NP1No1CJmw=; b=AnaNrvoFsciAQjlfP9/aG22nZV78gbj+tPqOoNw1eA0blTk37sH25ksdfa8uUX2dM4ezu+ 0kM1rE1LW+9G2y3XUS0t4PoNLVELg/QT5lPn6M+zoArjTXo8a+OGy70t2PMsR0InKdCzig c8aYOo2pt/LVKvn35+XLUySnC6TC7tI= X-MC-Unique: 6lwcKB6EM-m8oX8xeL3Zew-1 X-Mimecast-MFC-AGG-ID: 6lwcKB6EM-m8oX8xeL3Zew_1749732538 To: devel@lists.libvirt.org Subject: [PATCH 06/15] virt-aa-helper-test: Print errors to stderr Date: Thu, 12 Jun 2025 14:48:38 +0200 Message-ID: <0d38f235607c989aaebe4a07e555247ebb3a4825.1749732372.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: dGEzyCO6opg0buRjqTW6LCdBZZeSHmTlAKhanR6jomg_1749732538 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 2WUAZRQVACFMAFQXLCXSRT2E7CZSB3KM X-Message-ID-Hash: 2WUAZRQVACFMAFQXLCXSRT2E7CZSB3KM X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1749732683738116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik When a test case fails, there are two echo-s executed: the first one either prints the error message into /dev/null (default) or onto stdout (when the test script is executed with -d). Then, the second one prints the error message onto stdout. While this technically works, there's nothing ever printed onto stderr which is usually what's captured. Worse, if some command within the script fails, it prints something onto stderr but then looking at meson logs it's needlessly hard to match stderr and stdout lines. Just print error messages onto stderr. Signed-off-by: Michal Privoznik --- tests/virt-aa-helper-test | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/virt-aa-helper-test b/tests/virt-aa-helper-test index 4c8d31c9d7..8259c2679f 100755 --- a/tests/virt-aa-helper-test +++ b/tests/virt-aa-helper-test @@ -116,7 +116,7 @@ testme() { input=3D"$4" if [ ! -e "$input" ]; then echo "FAIL: could not find $input" >$output - echo "FAIL: could not find $input" + echo "FAIL: could not find $input" >&2 echo " '$extra_args $args': " errors=3D$(($errors + 1)) fi @@ -141,6 +141,7 @@ testme() { if [ -n "$checkrule" ]; then if ! grep "$checkrule" "$tmpout" >/dev/null; then echo "FAIL: missing rule '$checkrule'" >"$output" + echo "FAIL: missing rule '$checkrule'" >&2 rule_missing=3D1 fi fi --=20 2.49.0