From patchwork Tue Jul 23 10:35:55 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: 169495 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp8703345ilk; Tue, 23 Jul 2019 03:37:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwawg5oBAOW2lOvniqod0Yxj8t93DQswyetMXBHFFKlNakPqN+3s6ynHcBKopthfgflH8Zj X-Received: by 2002:a37:a013:: with SMTP id j19mr51755569qke.401.1563878227088; Tue, 23 Jul 2019 03:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563878227; cv=none; d=google.com; s=arc-20160816; b=iSPqrrabyG6mUcvbOdUdwI4G8AUh7K+F8KZgscfVLegA+oUol8Z9xtOKK7mFUIcSVq WIf0JhgoTXsfH+yRUAuHfHzYH/uJaWFyrQSWVdMU3DMoK/BdzPkexgmDLSoteQdQnjWL K/iFfzUiC+Rwszp01/kVjBz681xQkNgyRGyKQl5C6whTkPQAoRrW9dzDkAQG6oRgq3Ia HtPb7XlyilYt8nQXLLgkxL2e3E8SDoC9a6sbFjPougvx+/JDE5JZonNFmjQ9ZHYYsKiL 7WOFjOxiDRs3BBsdWcQGakXS0nNx+JvzhlaxaSp5nXYlIIjULYPjS0M40wPrJ+EtoI7v j8/A== 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=wpS9ypdTER3emr4GCEit5LCtD2h8CLnhaQIkW9n2/iM=; b=EjBvJINQvK95cOdIaG6ufDi2pxha61RlY8X3DpiMUrKCCGpozlxZsWV0AJks0pU11+ aGPikA77zEuYutW01TWN7EHBAd2+YKf34xWEhlBupWxHWncXKMEGV4ytfy5mHgdrCiHk /FmxtJ94Hzdhd4Dwq7o+GiJ9kY7pSF0I5Ocyjf5UNkx0aeCZaZVJoxtHPq/xvmZVaY5U q3N985167yQBubPB0w4/g1EBlVNmofa1iSNUGETExpz6mRMXbb2sF3v58qPQfucivb/4 nMlxz2lPQGrWVuWAkJOgZIbAtmrvHLAdIpKFrOiAYWYdolnEu5BLGPcuWUg+6mlymEKE 7Xyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="IZyu/5LH"; 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 k43si8589826qtf.219.2019.07.23.03.37.07 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Jul 2019 03:37:07 -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="IZyu/5LH"; 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]:40984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpsAM-0008G1-4U for patch@linaro.org; Tue, 23 Jul 2019 06:37:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37786) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hps9b-0005ju-Pz for qemu-devel@nongnu.org; Tue, 23 Jul 2019 06:36:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hps9a-0007NQ-Pm for qemu-devel@nongnu.org; Tue, 23 Jul 2019 06:36:19 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:55404) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hps9a-0007Mb-FZ for qemu-devel@nongnu.org; Tue, 23 Jul 2019 06:36:18 -0400 Received: by mail-wm1-x32f.google.com with SMTP id a15so37978516wmj.5 for ; Tue, 23 Jul 2019 03:36:18 -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=wpS9ypdTER3emr4GCEit5LCtD2h8CLnhaQIkW9n2/iM=; b=IZyu/5LHqg3UAbgcm0cRQOd1YJtA8M6QU032N0m6lbKIP3jmrzPAEG3eRgMqMOo+M3 TOjPy4sreJEstrWbJ4ftCU845TLFm8W+b/iGr96Pw3XfSTCKW/5DlWL1/JgKGRnnKLPy Ueh1YZu5rDHxwA1se3fbievXcZkgmyLtKAL0E6nraH7m6oIYBtsq4WoGk5xHhyo/QnD7 0c7lByeaq4d4fQxr87YzIlPgklexOgJPTADzIYJgdbqXXXJmMPVSrjkwGZB3jdTnw0Rj c9IL+9UUjKLw8fBgBDtuX2w3Z301TxfQpuLYXWJdU56vgPZP97k9rYCCnGg9EMS+uXx4 d9Zw== 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=wpS9ypdTER3emr4GCEit5LCtD2h8CLnhaQIkW9n2/iM=; b=TQkUVmbjkIvC5O/oceQ7RZhHhG1VyT+bl/sVXxunxWHpJw15T3rpF4Oo4Hes3Uyl0x 4s04MxWVQ+xBy+AwxWHEN4mmSziB/Nt2nrRjUxcpMaboXR5swnnP+erEtKSEBU8OKiFu w9GIEz7DcydOLDIiRTCf/QGQgGDiTRSM8o5leVxbnhIQd2aku89uWJQRgL48yNeb0gsp m0YNacz9zesg6ttplP8vOyvZRUCfMkkRg+gDIjAqVivj8tyQHwboKkWOr2cHVKtHdU+E AFIZKZGxlZlVbSsj5z0/+Q08xhqGLMYFi54igHVtHsHAdoAR3KMW/7h6gPh64Vimbnra 0v5w== X-Gm-Message-State: APjAAAWy8fQSv0FiSBJ1CX31oL9K5aPAXxNT5GJBzUzndFcsplaz68xf mC1TLU6ukSI0xts8OzjjLA1JdQ== X-Received: by 2002:a1c:1f4e:: with SMTP id f75mr66838930wmf.137.1563878177334; Tue, 23 Jul 2019 03:36:17 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 32sm35835652wrh.76.2019.07.23.03.36.13 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 03:36:14 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DCA981FF93; Tue, 23 Jul 2019 11:36:12 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Tue, 23 Jul 2019 11:35:55 +0100 Message-Id: <20190723103612.5600-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190723103612.5600-1-alex.bennee@linaro.org> References: <20190723103612.5600-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::32f Subject: [Qemu-devel] [PULL 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 , qemu-devel@nongnu.org, "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 -- 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)