From patchwork Fri Jul 12 11:18:47 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: 168934 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp741009ilk; Fri, 12 Jul 2019 04:20:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSfD9LVR1VopVGjVg/Y1i6PHR0u5c1xXW7lMas7zvJOftAsNDWId6BF7GQ3E50bQktMEdg X-Received: by 2002:a50:c28a:: with SMTP id o10mr8484867edf.182.1562930415791; Fri, 12 Jul 2019 04:20:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562930415; cv=none; d=google.com; s=arc-20160816; b=OxNJ8WzdCkVRa3I6UKBlxEv9YCVq36HqXxpftOX0okMC/dclgY5h/cs74aGgFFohlH 2paK8JigF7qPyhXIO7bvq70A34cOgw15PKhRjF9Y9cqks7sGGhxJeUhIFq/tfJ6pZJCx V8i4rDvaNrJuJyLsZTcjXmf3Aa0IAgNQ3MYcEvGtUMbADtP8h+nlr5d2/0TR/apYoL0O rRJrY9yhHDGx3+3ZKs6vWSUBjPSSGhAXw5Ppmkui2ereXF9t53B/Gungk+JLli2yvd68 2VtZeMnCh40ei0EbLE83tKtktvLgNh+0FCerz/pUUEME5LuTH7YJj7bziAoxVcwcQ/lI LHyw== 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=7sHk9UapFZ1v5dGQBuJrDhUFgezgy3UNJSh8wcf07Q8=; b=b9NGFwj26S++7WnAbh5OBq/kYYt0hDexPT4C9jvzpwtgceqJw8tdbdV75mpTDdhZF8 Z+G6TkTHGvCc4JAd92b/oNCwi0iIkh3joJkT9SPbPDFuEPWkKEdc2GKPerpsjqLUc8n0 72AuwXG5oOHj2JY3vQqC4/hvh7TjOKjGbdSYMb1m0dJyKHKljk5IPa/USEhzRKlyHm/k EXJn9o9Mm324hG3V/OH89nKYd1/QYheD4CZDmNrQlqEh2VqU5cjF3fa7fa+8/HGU1zuh jE9EXIAbzbyz5fGSSaoaCP73avoEeN790CHRyXTWmnQU9Ta1imrCpY6OxL3cQwzdq+lh n7nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DVwtNKvF; 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 v9si5334250edm.56.2019.07.12.04.20.15 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jul 2019 04:20:15 -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=DVwtNKvF; 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]:48327 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hltb4-0005xC-GG for patch@linaro.org; Fri, 12 Jul 2019 07:20:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47155) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hltZo-0000HP-HT for qemu-devel@nongnu.org; Fri, 12 Jul 2019 07:18:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hltZn-0000M4-HH for qemu-devel@nongnu.org; Fri, 12 Jul 2019 07:18:56 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:33461) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hltZn-0000Kv-8Y for qemu-devel@nongnu.org; Fri, 12 Jul 2019 07:18:55 -0400 Received: by mail-wr1-x444.google.com with SMTP id n9so9622684wru.0 for ; Fri, 12 Jul 2019 04:18:55 -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=7sHk9UapFZ1v5dGQBuJrDhUFgezgy3UNJSh8wcf07Q8=; b=DVwtNKvFzebPrRo/g5NVymdU8uA9cu3+l+FFIYkwvGwH3O13X5nRrhgUWIFOb8dZ99 fDfD8c2XqO4LUU6+uFY47EX7Gmau9q3R0eYPb7ylAOuR4p/GJslGXrnGTGQ0qfUz5ScE FRBikuTdS3frEgr0BNQhBov5vg4QO4cH3YnfkQjCVbI2zKk/b0PBZcrosiZjP8Gh8Lhq Gp0BOOolA1fyTIrY1CbChelf6nIqlgPgz7kzWEV0LfOAWCHnkvHFHmVhR3cdxvvX+lIK mePIhHw54UuvTH1kp+III2wjUtS8uwFqu/YixPZ1W1X7uIAVVPc4xoJdTy1Pz5ZyHO1t yy7w== 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=7sHk9UapFZ1v5dGQBuJrDhUFgezgy3UNJSh8wcf07Q8=; b=QCP/DzMm+MmJx0ipLZHn+9fUMggz1DCYlqOPqgLq1zJqdLBL0WulMZ0qZvWeyjnLj3 FkDGitOqU/dqwpmk45WZQZgb2P2+xSmgvflpYsWfPayDW3e3Yq+2ABYScWT29tpV8dCa baZPlmFktFzR+3mC/3TMAlcHybvqfAFfjnGZ/S/Ihv4nSF4bWlsKwgdo3HjVXZCcU5SI I+zcLTdWYWCflNJ+p1ZUkpns2zTcjPDeCnVK+9T8oDNXt0TKqj0cDoBvvxhJtsyd+QFd JsOiOsQWxNgxv/862ucOE8hh27YLPm7bxf4w91n7iJsYGPwfAH+pm35t1PvACM+XXsXD HGDQ== X-Gm-Message-State: APjAAAXnzWeofC80bsh/OPknBaN5RKZxD09qrwbLePXFljWQO/Xep0Rd KV1n57UlEcsqNxZ6eAKH6PJU0Q== X-Received: by 2002:adf:ec49:: with SMTP id w9mr10616595wrn.303.1562930333930; Fri, 12 Jul 2019 04:18:53 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id q1sm7089808wmq.25.2019.07.12.04.18.51 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 12 Jul 2019 04:18:51 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9F66B1FF92; Fri, 12 Jul 2019 12:18:50 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 12 Jul 2019 12:18:47 +0100 Message-Id: <20190712111849.9006-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190712111849.9006-1-alex.bennee@linaro.org> References: <20190712111849.9006-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::444 Subject: [Qemu-devel] [PATCH v1 5/7] 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" , qemu-arm@nongnu.org, 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 --- tests/migration-test.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) -- 2.20.1 Reviewed-by: Thomas Huth Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Laurent Vivier diff --git a/tests/migration-test.c b/tests/migration-test.c index b6434628e1c..ce041f80c2a 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); + } + g_assert(bad == 0); } static void cleanup(const char *filename)