From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A8A8DC5AD49 for ; Mon, 26 May 2025 17:23:13 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.997650.1378466 (Exim 4.92) (envelope-from ) id 1uJbXJ-00033A-35; Mon, 26 May 2025 17:22:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 997650.1378466; Mon, 26 May 2025 17:22:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uJbXI-000333-W0; Mon, 26 May 2025 17:22:52 +0000 Received: by outflank-mailman (input) for mailman id 997650; Mon, 26 May 2025 17:22:51 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uJbXH-00032x-PG for xen-devel@lists.xenproject.org; Mon, 26 May 2025 17:22:51 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.96) (envelope-from ) id 1uJbXH-003SI8-18; Mon, 26 May 2025 17:22:51 +0000 Received: from [2a01:e0a:1da:8420:b77:bd5:6e45:7633] (helo=l14) by xenbits.xenproject.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uJbXH-00FpCS-1P; Mon, 26 May 2025 17:22:51 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date; bh=gkSN7NhEVv4Jf4w5l8i4Gd9TSE2wB9xRZRWHG6SDaaM=; b=0I865X994fZjsYaPjYZ9WbXnhZ Dx/wDv4FgGrr0e3mppZ1xjYPk3meftKdXNzWIR0QI+CFlgucwXMfx7oOSEj6aux4V4lzQ5p5H+BE1 QKQgaP52U3AJazejxDF14/grac3Pd2W1yzNLh2wyoluHyUpu5qn6HdSv91BtU30cxZY4=; Date: Mon, 26 May 2025 19:22:49 +0200 From: Anthony PERARD To: Andrew Cooper Cc: Xen-devel , Stefano Stabellini , Marek =?iso-8859-1?Q?Marczykowski-G=F3recki?= Subject: Re: [PATCH 3/3] CI: Drop custom handling of tools/tests Message-ID: References: <20250520205239.203253-1-andrew.cooper3@citrix.com> <20250520205239.203253-4-andrew.cooper3@citrix.com> <1e690ecb-5060-4dfe-a515-acbbf214bc99@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1e690ecb-5060-4dfe-a515-acbbf214bc99@citrix.com> On Mon, May 26, 2025 at 05:45:29PM +0100, Andrew Cooper wrote: > On 20/05/2025 9:52 pm, Andrew Cooper wrote: > > diff --git a/automation/scripts/run-tools-tests b/automation/scripts/run-tools-tests > > index 770e97c3e943..8d7aa8fa5140 100755 > > --- a/automation/scripts/run-tools-tests > > +++ b/automation/scripts/run-tools-tests > > @@ -12,30 +12,25 @@ printf '\n' > "$xml_out" > > printf '\n' >> "$xml_out" > > printf ' \n' >> "$xml_out" > > failed= > > -for dir in "$1"/*; do > > - [ -d "$dir" ] || continue > > - echo "Running test in $dir" > > - printf ' \n' "$dir" >> "$xml_out" > > - ret= > > - for f in "$dir"/*; do > > - [ -f "$f" ] || continue > > - [ -x "$f" ] || continue > > - "$f" 2>&1 | tee /tmp/out > > - ret=$? > > - if [ "$ret" -ne 0 ]; then > > - echo "FAILED: $ret" > > - failed+=" $dir" > > - printf ' \n' "$f" "$ret" >> "$xml_out" > > - # TODO: could use xml escaping... but current tests seems to > > - # produce sane output > > - cat /tmp/out >> "$xml_out" > > - printf ' \n' >> "$xml_out" > > - else > > - echo "PASSED" > > - fi > > - done > > - if [ -z "$ret" ]; then > > - printf ' \n' "$dir" >> "$xml_out" > > +for f in "$1"/*; do > > + if [ -x "$f" ]; then > > + echo "SKIP: $f not executable" > > + continue > > This should be ! -x > > I had that hunk in the wrong patch when posting this series. With that fixed: Reviewed-by: Anthony PERARD But I think there's an issue with the script... > > + "$f" 2>&1 | tee /tmp/out > > + ret=$? > > + if [ "$ret" -ne 0 ]; then Is this checking the correct exit value? It seems that without `set -o pipefail`, we only have the exit value of `tee` which should never fail. But I think we should grab the value of ${PIPESTATUS[0]} to actually read the exit value of $f. Thanks, -- Anthony PERARD