From nobody Thu May 16 09:00:34 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1556894423; cv=none; d=zoho.com; s=zohoarc; b=HfcgDMCefB0/JT4u3niT3pPAGSw1v4267S3Av/kJvN5ZwVs12v89nKbSobElHgdrsv8/VryYp5zkDMzw4jNLYGJvI/fQoy/Hok7/lQ7aKlSdSLT6CLG3tKaFW34LE/76NpvwbgR7/SdRZ/EnEq8KKhL9JHs8JaEXDyZISBqXSYA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556894423; 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:ARC-Authentication-Results; bh=PGqJkjCBNOGw04Ltrq56HoeA7c2401B0UKpQKkw6gjE=; b=kOKd1wO+q63izzqc7mcfyP+pjh8+ggEQ5kv+6x36a+6/qHZYq9GrjK33Gy9GIG7+D3kIzxnsLIcwAhAW61Lod6HxBW7R/GUbrFL7Zj8Cf8BjB6SOf1E1KPJkOrXQgu3qtATDzrVAdA67QCLr3c4Vi1Mt+t0cUuskv83Zk/YAoyE= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1556894423815554.3185799729902; Fri, 3 May 2019 07:40:23 -0700 (PDT) Received: from localhost ([127.0.0.1]:41569 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMZM8-00040U-45 for importer@patchew.org; Fri, 03 May 2019 10:40:08 -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) 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) 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-Google-Smtp-Source: APXvYqy3oBarCkQmE2FC44G3x4WpfH5CZQPPeOH3MDyJJtV0BpukuEkCyLYGxYpXRAuXT56RwvAFtQ== X-Received: by 2002:a1c:7e87:: with SMTP id z129mr1784480wmc.145.1556894349224; Fri, 03 May 2019 07:39:09 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=20Benn=C3=A9e?= , qemu-devel@nongnu.org, "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9e Tested-by: Thomas Huth --- tests/qemu-iotests/check | 71 +++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 37 deletions(-) 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 }' } =20 -_timestamp() -{ - now=3D$(date "+%T") - printf %s " [$now]" -} - _wrapup() { if $showme @@ -709,19 +703,6 @@ trap "_wrapup; exit \$status" 0 1 2 3 15 FULL_IMGFMT_DETAILS=3D$(_full_imgfmt_details) FULL_HOST_DETAILS=3D$(_full_platform_details) =20 -cat < $TESTS_REMAINING_LOG @@ -729,7 +710,9 @@ seq=3D"check" for seq in $list do err=3Dfalse - printf %s "$seq" + reason=3D"" + times=3D"" + 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 =20 if $showme then - echo + echo " TEST iotest: $seq (not actually run)" continue elif [ -f expunged ] && $expunge && egrep "^$seq([ ]|\$)" expu= nged >/dev/null then @@ -753,17 +736,11 @@ do # really going to try and run this one # rm -f $seq.out.bad - lasttime=3D$(sed -n -e "/^$seq /s/.* //p" <$TIMESTAMP_FILE) - if [ "X$lasttime" !=3D X ]; then - printf %s " ${lasttime}s ..." - else - printf " " # prettier output with timestamps. - fi rm -f core $seq.notrun rm -f $seq.casenotrun =20 start=3D$(_wallclock) - $timestamp && printf %s " [$(date "+%T")]" + $timestamp && times=3D"[$(date "+%T")]" =20 if [ "$(head -n 1 "$source_iotests/$seq")" =3D=3D "#!/usr/bin/env = python" ]; then run_command=3D"$PYTHON $seq" @@ -781,26 +758,26 @@ do $run_command >$tmp.out 2>&1) fi sts=3D$? - $timestamp && _timestamp + $timestamp && times=3D"$times -> [$(date "+%T")]" stop=3D$(_wallclock) =20 if [ -f core ] then - printf " [dumped core]" mv core $seq.core + reason=3D"dumped core $seq.core" err=3Dtrue fi =20 if [ -f $seq.notrun ] then - $timestamp || printf " [not run] " - $timestamp && echo " [not run]" && printf %s " $seq -- " + $timestamp || reason=3D"[not run]" + $timestamp && reason=3D"[not run] $seq -- " cat $seq.notrun notrun=3D"$notrun $seq" else if [ $sts -ne 0 ] then - printf %s " [failed, exit status $sts]" + reason=3D$(printf %s "[failed, exit status $sts]") err=3Dtrue fi =20 @@ -821,22 +798,27 @@ do =20 if [ ! -f "$reference" ] then - echo " - no qualified output" + reason=3D" - no qualified output" err=3Dtrue 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=3D$(sed -n -e "/^$seq /s/.* //p" <$TIMEST= AMP_FILE) + thistime=3D$(expr $stop - $start) + echo "$seq $thistime" >>$tmp.time + + if [ "X$lasttime" !=3D X ]; then + times=3D"$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=3D" - output mismatch (see $seq.out.bad)" err=3Dtrue fi fi @@ -852,9 +834,24 @@ do # if $err then + echo " TEST iotest: $seq FAILED $reason" + cat <