From patchwork Fri May 3 14:39:04 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: 163325 Delivered-To: patch@linaro.org Received: by 2002:a92:7e86:0:0:0:0:0 with SMTP id q6csp687601ill; Fri, 3 May 2019 07:40:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzaLfa6UPX6/rk5Kj5qyjQjN/tR2VpJrneRG1nhBrgqjA5aBkdTDHRuEB19N9uUHJtSu9a0 X-Received: by 2002:a5d:5545:: with SMTP id g5mr7441112wrw.146.1556894431131; Fri, 03 May 2019 07:40:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556894431; cv=none; d=google.com; s=arc-20160816; b=Xnh8vhB+mCtEQ4F7vHCBnrya0q7amd1mAX7eSnwoPO8ZdCUkEFhQwa+ffbtjW+Gntt nqS0V+g2/w/mgInQjgddwFZ1qq5LvVs8z9zWPHvsMxC03TPUm0DuIoZyYolGthPF969I zkQwShO0vCMUBrLpmcc9BtrCDQwLexdo6Q55xbTD/gBVfzcP4R1EZShsXALxMbAzR7g7 d11WQTpUkCOrXUQD+9w3ke2Ewn2i1P/822l+pamidWwKN8yI523zoOGQiNLbrrXVPti0 JSXAN2teB5D8L0Whi6wiNyqNSsEPN2dnlsOR+dOJ1agns/14zITrexlCKC9L2fdh7StY x9RA== 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:message-id:date:to:from :dkim-signature; bh=PGqJkjCBNOGw04Ltrq56HoeA7c2401B0UKpQKkw6gjE=; b=TTqEefXTC8TvA1Ml2FWYUOUHUBjTfpf4sJTJsQjITJhK3c+Hc7e1oHddGK8owReGKW tGlk34Q/ix14+/hAq2rvr5xhtAcw8jeBDBbwWPaEjF/FR7Zkwij2hPB+FOg9h4qGhWAY M0y3CkXcTMGda/yMeKo/lc9sTb4iciQE90bugE3c2NSROTXrqzqouOVsEVXaIZh+4jmd 3fYHHnUgENU3W8xU46I60AuBcT8E+3wOfjO5n/4C8WtpCT4mCGn9J/ubHWyH3Ohnrz/D 3tDX3u3Y72PsuxRwWBcMeWwtU9kF/bTOsKT3M/cGvP2mzA7/sPGSm0YKrSMqm0AnbLtq 9ciQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hsgOOJ3v; 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 u15si1666857wrn.134.2019.05.03.07.40.30 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 03 May 2019 07:40:31 -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=hsgOOJ3v; 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 ([127.0.0.1]:41594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMZMU-0004OE-34 for patch@linaro.org; Fri, 03 May 2019 10:40:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMZLE-0003cM-D0 for qemu-devel@nongnu.org; Fri, 03 May 2019 10:39:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMZLD-00075B-4g for qemu-devel@nongnu.org; Fri, 03 May 2019 10:39:12 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:35504) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMZLC-00071s-QY for qemu-devel@nongnu.org; Fri, 03 May 2019 10:39:11 -0400 Received: by mail-wm1-x342.google.com with SMTP id y197so7034540wmd.0 for ; Fri, 03 May 2019 07:39:10 -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:mime-version :content-transfer-encoding; bh=PGqJkjCBNOGw04Ltrq56HoeA7c2401B0UKpQKkw6gjE=; b=hsgOOJ3vvPnvHaLUuG468wtWRgtKXpiUpaI6TRwrvNw3n1fDjjv8PiOHFAiSM142bj 0NunyoSlUYFSEeSLw4at1c3TYfbiU3d8NDhCNLwt/1CZq4CZDOUPQrvwUGShXlWKOPnK uyDcpnw6CdsXkDAEGSLDJZBBfiNTWEu4niFg0AdChJMpbIT4MoRgeXiPeyPwdnKQT9gb A9wfagCzNIaNJ4BvVhK8RyF5H2tZnyDtCkwVpHVcOIzt+0IHqNdUdAvu7Q88Qa7LezeU mWzKgLb58dhejpboWrm3VK+M27L4Zk14lD/VgMCT5mB4OvP7BQmnDvW264hJ5uZFZFWm qZdA== 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:mime-version :content-transfer-encoding; bh=PGqJkjCBNOGw04Ltrq56HoeA7c2401B0UKpQKkw6gjE=; b=kyIpB8O1FS4d+o3Hby+vKG73hZmdoHOxsaZ4cu08ysIgOnBJATlWOj8ZBQNO/dzhvF 3+SLlXTFseRKl9dufXxPeZloNUmB1F5xVehVXJ18K4GCC1b/0nQgeMB2XnKP9gzy0DAp j4RVHOD6jLUEmFXtMgznD8tCDUKSYb1iDE+ERQ5th95R3/oQGABL6KpFOgY1fBHVlKLp 7oxXcVUNie7IMZ7Tik9cKm5Vfg9ZuVJGuaCxwtTAboPhwFougamKCjJr9R9Dz3PSTZ6f Vweb+HuF2+evMPCLZxDLDjaOC9wBQ6EPONlJzVCFK99PqDyME6zstRqOKdxsrIjMiY7C +HDA== X-Gm-Message-State: APjAAAVUO+UjNjsalWj5is6CXH3DlXmch7sajLU1cSE1ZA2lz1MmRa3h aJse8PudAZEVfo0sQMKYihQSkw== X-Received: by 2002:a1c:7e87:: with SMTP id z129mr1784480wmc.145.1556894349224; Fri, 03 May 2019 07:39:09 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o16sm2869845wro.63.2019.05.03.07.39.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2019 07:39:08 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0AFF01FF87; Fri, 3 May 2019 15:39:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: thuth@redhat.com Date: Fri, 3 May 2019 15:39:04 +0100 Message-Id: <20190503143904.31211-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 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::342 Subject: [Qemu-devel] [RFC PATCH] tests/qemu-iotests: re-format output to for make check-block X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This attempts to clean-up the output to better match the output of the rest of the QEMU check system. This includes: - formatting as " TEST iotest: nnn" - calculating time diff at the end - only dumping config on failure Signed-off-by: Alex Bennée --- tests/qemu-iotests/check | 71 +++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 37 deletions(-) -- 2.20.1 Tested-by: Thomas Huth diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 922c5d1d3d..2ffc14113e 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -633,12 +633,6 @@ _wallclock() date "+%H %M %S" | awk '{ print $1*3600 + $2*60 + $3 }' } -_timestamp() -{ - now=$(date "+%T") - printf %s " [$now]" -} - _wrapup() { if $showme @@ -709,19 +703,6 @@ trap "_wrapup; exit \$status" 0 1 2 3 15 FULL_IMGFMT_DETAILS=$(_full_imgfmt_details) FULL_HOST_DETAILS=$(_full_platform_details) -cat < $TESTS_REMAINING_LOG @@ -729,7 +710,9 @@ seq="check" for seq in $list do err=false - printf %s "$seq" + reason="" + times="" + if [ -n "$TESTS_REMAINING_LOG" ] ; then sed -e "s/$seq//" -e 's/ / /' -e 's/^ *//' $TESTS_REMAINING_LOG > $TESTS_REMAINING_LOG.tmp mv $TESTS_REMAINING_LOG.tmp $TESTS_REMAINING_LOG @@ -738,7 +721,7 @@ do if $showme then - echo + echo " TEST iotest: $seq (not actually run)" continue elif [ -f expunged ] && $expunge && egrep "^$seq([ ]|\$)" expunged >/dev/null then @@ -753,17 +736,11 @@ do # really going to try and run this one # rm -f $seq.out.bad - lasttime=$(sed -n -e "/^$seq /s/.* //p" <$TIMESTAMP_FILE) - if [ "X$lasttime" != X ]; then - printf %s " ${lasttime}s ..." - else - printf " " # prettier output with timestamps. - fi rm -f core $seq.notrun rm -f $seq.casenotrun start=$(_wallclock) - $timestamp && printf %s " [$(date "+%T")]" + $timestamp && times="[$(date "+%T")]" if [ "$(head -n 1 "$source_iotests/$seq")" == "#!/usr/bin/env python" ]; then run_command="$PYTHON $seq" @@ -781,26 +758,26 @@ do $run_command >$tmp.out 2>&1) fi sts=$? - $timestamp && _timestamp + $timestamp && times="$times -> [$(date "+%T")]" stop=$(_wallclock) if [ -f core ] then - printf " [dumped core]" mv core $seq.core + reason="dumped core $seq.core" err=true fi if [ -f $seq.notrun ] then - $timestamp || printf " [not run] " - $timestamp && echo " [not run]" && printf %s " $seq -- " + $timestamp || reason="[not run]" + $timestamp && reason="[not run] $seq -- " cat $seq.notrun notrun="$notrun $seq" else if [ $sts -ne 0 ] then - printf %s " [failed, exit status $sts]" + reason=$(printf %s "[failed, exit status $sts]") err=true fi @@ -821,22 +798,27 @@ do if [ ! -f "$reference" ] then - echo " - no qualified output" + reason=" - no qualified output" err=true else if diff -w "$reference" $tmp.out >/dev/null 2>&1 then - echo "" if $err then : else - echo "$seq $(expr $stop - $start)" >>$tmp.time + lasttime=$(sed -n -e "/^$seq /s/.* //p" <$TIMESTAMP_FILE) + thistime=$(expr $stop - $start) + echo "$seq $thistime" >>$tmp.time + + if [ "X$lasttime" != X ]; then + times="$times ${thistime}s (last ${lasttime}s)" + fi fi else - echo " - output mismatch (see $seq.out.bad)" mv $tmp.out $seq.out.bad $diff -w "$reference" "$PWD"/$seq.out.bad + reason=" - output mismatch (see $seq.out.bad)" err=true fi fi @@ -852,9 +834,24 @@ do # if $err then + echo " TEST iotest: $seq FAILED $reason" + cat <