From patchwork Wed Jul 17 13:43:18 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: 169131 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp990998ilk; Wed, 17 Jul 2019 06:45:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwOh430JoieyZid0u5Dq79C7fU9No4bMzW13W3xEoR6DybkgC3Y2gxeoiWllgb8LJGRJIj X-Received: by 2002:a17:906:684e:: with SMTP id a14mr31476862ejs.156.1563371111689; Wed, 17 Jul 2019 06:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563371111; cv=none; d=google.com; s=arc-20160816; b=YeG+FSEQq7Hg8UXksmHjpEpSfMvaeZpFWFZwgjCmrmP1Unr3G2Y6GGljgp2/nBgzyC TizEQSRyhCgWO4arHn1PdJfBpWNiY21fxiM4JnHpFs9SMZdUd/s/47U1JCwBwSS4lfLH 8DFBWtctrWqlH0XPbVziHIt3FiRfJlA4u198LZQ/Bcq290H+BXbfSzBmWyJ7mkijiGOU qo0HrNYUCFuJEckKyXu73qX7ZknEtsVHRFN/XtyjaJgcVx8eoCALkOxsA0wHM2UrswU2 YaOXuOCN/t24KKNHmR+K/Y+9AP5tHV2UqnuVRtVY5+2vIR7c9eYnkAFfFDqQOAQdUNdD U/0g== 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:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=aCN/y1vsGbgbK8fKqVDDN8KS7NPTkiPqg0ffapBOPKw=; b=edvqbErqA1c0plAKu8HB3nmBFmr+E6OhdM9dqets4lmERKRJ5OYlRsPDK7OgaiW+6l wK1l97841T2O2kGmQrdFb+BohSo6ua+4mmYELHbnSFYOyFKJ3pOCr4UnJhRBDrvf5vwh /3B3oiHJwsj69La3D8mSfDQB7quiDuoevV25oEWPNKK0c2PD6/8AWxxQEVU/MEnh8X+y UZ1atgQ31LMGH5O/NgK8pytiP2BqJdwtSiXQr6bt9Pw381o4eoJRzE40v1Mj0+t7nEgp wNNrIZGvVq2lbme7lDbiGwzzXHjc61pJ3dnYwZfprSeME83bpelt7qNxWPdoBsq56+uV KBDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MJwu6qJg; 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 y16si15090385edb.404.2019.07.17.06.45.11 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jul 2019 06:45:11 -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=MJwu6qJg; 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 ([::1]:57298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnkF3-0002JT-7y for patch@linaro.org; Wed, 17 Jul 2019 09:45:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55345) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnkDf-00055R-H1 for qemu-devel@nongnu.org; Wed, 17 Jul 2019 09:43:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hnkDe-0004Vu-Bz for qemu-devel@nongnu.org; Wed, 17 Jul 2019 09:43:43 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:54336) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hnkDe-0004VC-3v for qemu-devel@nongnu.org; Wed, 17 Jul 2019 09:43:42 -0400 Received: by mail-wm1-x342.google.com with SMTP id p74so22209326wme.4 for ; Wed, 17 Jul 2019 06:43:42 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=aCN/y1vsGbgbK8fKqVDDN8KS7NPTkiPqg0ffapBOPKw=; b=MJwu6qJgJqg4/4reyh4JQu/jD/L9r9VoL8l96xNyFsbf5CKefgC+WRHRwbRGb/9S/l biwDlVy1AdUORKeVBTY/4jTyBXB0KHMtRXHbdjlDFtIGbximWiShdenkLh4EIYLwxcXx SyOAQ9Zp80W6NW40rYpH7dxvG/XY0h7vk6Hkweh3RAZWYj5ExEPX98WrO+Tru/SZsws/ K3Am7U+mbt9SYmvonyxyk1PxrdEZ2zVdmo2d+dOwzhJSmtOAcMr3XWWlnRnLpAUGxUDa lkUm4gC3N+sxfk39b9v1UGqWDmRY2XhMprWp7nYYk7Hamv7tuu1YmotPlKIhdod4jrI1 yoeA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=aCN/y1vsGbgbK8fKqVDDN8KS7NPTkiPqg0ffapBOPKw=; b=qmeMX7RDTFYx2QTm7kFCrxHZ+LE4sE+gR80BAHTfIPYshFvkZybgB2Wcs/vN7ZH0MW 4XKTXXHMUEtAUpFu0UOB+H1vCHR/FD6Tu4Q6ibIyl0OnW+hd0r6qLUljLrA2qrDIL9Sd eA8631VtQwn5foA41oc/v8ecSY8A0w9TxHhe3x9Q9blK9Zs0DnFijMTqC3p3G/UyLrdU +r1D9iqUptuVV2/W7hGPgerZY69tGJEwLqdJYPvHZOs+mzQT2+NdNz2AXST1Xsv1Cruo edb2j+LUmEEbBbCLtdVpzpI9rAyThaBfP2bMU6wqiEzs8k4Mxg4TnDiw4cFhfQegS/+5 QmeQ== X-Gm-Message-State: APjAAAVrhiuPs5QvoqPnHdngCxRe/HpeWorRwVEKoZE2cW3dGWALw3mM DU5rIu4zTv0SyNw/MyCuWNjuRA== X-Received: by 2002:a7b:c1c1:: with SMTP id a1mr38759324wmj.31.1563371020915; Wed, 17 Jul 2019 06:43:40 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u18sm20148321wmd.19.2019.07.17.06.43.37 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 17 Jul 2019 06:43:37 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 642E81FF93; Wed, 17 Jul 2019 14:43:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 17 Jul 2019 14:43:18 +0100 Message-Id: <20190717134335.15351-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190717134335.15351-1-alex.bennee@linaro.org> References: <20190717134335.15351-1-alex.bennee@linaro.org> 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] [PATCH v2 06/23] tests/migration-test: don't spam the logs when we fail X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Juan Quintela , "Dr . David Alan Gilbert" , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Quite often the information about which test failed is hidden by the wall of repeated failures for each page. Stop outputting the error after 10 bad pages and just summarise the total damage at the end. Signed-off-by: Alex Bennée Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier --- v2 - bad - 10 --- tests/migration-test.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) -- 2.20.1 diff --git a/tests/migration-test.c b/tests/migration-test.c index a4feb9545d9..c1968740abe 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@ -308,7 +308,7 @@ static void check_guests_ram(QTestState *who) uint8_t first_byte; uint8_t last_byte; bool hit_edge = false; - bool bad = false; + int bad = 0; qtest_memread(who, start_address, &first_byte, 1); last_byte = first_byte; @@ -327,15 +327,20 @@ static void check_guests_ram(QTestState *who) hit_edge = true; last_byte = b; } else { - fprintf(stderr, "Memory content inconsistency at %x" - " first_byte = %x last_byte = %x current = %x" - " hit_edge = %x\n", - address, first_byte, last_byte, b, hit_edge); - bad = true; + bad++; + if (bad <= 10) { + fprintf(stderr, "Memory content inconsistency at %x" + " first_byte = %x last_byte = %x current = %x" + " hit_edge = %x\n", + address, first_byte, last_byte, b, hit_edge); + } } } } - g_assert_false(bad); + if (bad >= 10) { + fprintf(stderr, "and in another %d pages", bad - 10); + } + g_assert(bad == 0); } static void cleanup(const char *filename)