From patchwork Fri May 25 13:38:17 2018 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: 920539 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="C5xafttB"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40snk72JDQz9s0q for ; Fri, 25 May 2018 23:52:15 +1000 (AEST) Received: from localhost ([::1]:44115 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMD8f-0007PS-0T for incoming@patchwork.ozlabs.org; Fri, 25 May 2018 09:52:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMD1a-00023k-Tw for qemu-devel@nongnu.org; Fri, 25 May 2018 09:44:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMD1Y-0008S1-Ia for qemu-devel@nongnu.org; Fri, 25 May 2018 09:44:54 -0400 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:35660) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fMD1Y-0008Ri-8f for qemu-devel@nongnu.org; Fri, 25 May 2018 09:44:52 -0400 Received: by mail-wm0-x232.google.com with SMTP id o78-v6so14830485wmg.0 for ; Fri, 25 May 2018 06:44:52 -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=skGRUA2XLmNtsowTQPOQY7gIyZp4Mjnan53YDVBoxic=; b=C5xafttBoQoeIo37E1cj9QDaeQ/uncZzcwZHqK8+bqvHprVmbsLqoXuZCkwHfpRaSz qRGLcEHFORCfEMIAl7gaYiV1b1A7L2MW7JbZeGGicv9c7sMcd+hApUQQ/1OT09snARWs rS9Q98kVjLlrepKSiXDO+ii7yrxxH7qOVJoIA= 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=skGRUA2XLmNtsowTQPOQY7gIyZp4Mjnan53YDVBoxic=; b=ZI1e7RV7XiuEPnvlIU2xn6Un3lxIYvyYhffLJcxO8NCRwslBIGkmDAYjNF3xCbcL59 lOUG6f2LR/yqGZVLAuzSQJ70AwXhJ3ySieDRMQvPCb8kpZHoRPmDq8KBqYHwXP/dujXq HzqsJ6iMj5B3miCJVz9LQpw76gGj8+qyqHxb6Qe2+O/QywciQ3oA/bh1goVW6ek/oNHB SKTfbfYI6kHT2ulEVYLbp8Z+S2mULIdq/dAEvT4Q2VOUlBfDUrDzE+cORYsWf1jzNT/v qTUHGYvFBqd9BruS85CqkuGg2Q/K+T9CYYx9GGb6IVRaUHq4yl6cs9Eh8tRFuoG6eLML mccQ== X-Gm-Message-State: ALKqPweOVXmaQxz7W8jfRas2S04eE3VsMavfYSOQuihjPnRQkh0qJte2 p2JgqAzymhZZm3toJHreaqPxEA== X-Google-Smtp-Source: ADUXVKIxj03U3T/zmHFuKurPWcEhTJ34eeoRZ2+3KFSHFQPZZA3KhXgLVbM77ZRDr7SEJKQ0Z2X/Hw== X-Received: by 2002:a1c:4843:: with SMTP id v64-v6mr1798395wma.159.1527255891077; Fri, 25 May 2018 06:44:51 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y68-v6sm45498389wrb.91.2018.05.25.06.44.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 May 2018 06:44:49 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 76D8D3E08BF; Fri, 25 May 2018 14:38:52 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Fri, 25 May 2018 14:38:17 +0100 Message-Id: <20180525133851.27161-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180525133851.27161-1-alex.bennee@linaro.org> References: <20180525133851.27161-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:400c:c09::232 Subject: [Qemu-devel] [PATCH v5 15/49] tests/tcg/multiarch: move most output to stdout 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The default test run outputs to stdout so it can be re-directed. Errors are still reported to stderr. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- v4 - remove space in fprintf () to keep checkpatch happy --- tests/tcg/multiarch/test-mmap.c | 40 ++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/tcg/multiarch/test-mmap.c b/tests/tcg/multiarch/test-mmap.c index cdefadfa4c..5c0afe6e49 100644 --- a/tests/tcg/multiarch/test-mmap.c +++ b/tests/tcg/multiarch/test-mmap.c @@ -36,7 +36,7 @@ do \ { \ if (!(x)) { \ - fprintf (stderr, "FAILED at %s:%d\n", __FILE__, __LINE__); \ + fprintf(stderr, "FAILED at %s:%d\n", __FILE__, __LINE__); \ exit (EXIT_FAILURE); \ } \ } while (0) @@ -57,7 +57,7 @@ void check_aligned_anonymous_unfixed_mmaps(void) uintptr_t p; int i; - fprintf (stderr, "%s", __func__); + fprintf(stdout, "%s", __func__); for (i = 0; i < 0x1fff; i++) { size_t len; @@ -106,7 +106,7 @@ void check_aligned_anonymous_unfixed_mmaps(void) munmap (p4, len); munmap (p5, len); } - fprintf (stderr, " passed\n"); + fprintf(stdout, " passed\n"); } void check_large_anonymous_unfixed_mmap(void) @@ -115,7 +115,7 @@ void check_large_anonymous_unfixed_mmap(void) uintptr_t p; size_t len; - fprintf (stderr, "%s", __func__); + fprintf(stdout, "%s", __func__); len = 0x02000000; p1 = mmap(NULL, len, PROT_READ, @@ -130,7 +130,7 @@ void check_large_anonymous_unfixed_mmap(void) /* Make sure we can read from the entire area. */ memcpy (dummybuf, p1, pagesize); munmap (p1, len); - fprintf (stderr, " passed\n"); + fprintf(stdout, " passed\n"); } void check_aligned_anonymous_unfixed_colliding_mmaps(void) @@ -141,7 +141,7 @@ void check_aligned_anonymous_unfixed_colliding_mmaps(void) uintptr_t p; int i; - fprintf (stderr, "%s", __func__); + fprintf(stdout, "%s", __func__); for (i = 0; i < 0x2fff; i++) { int nlen; @@ -180,7 +180,7 @@ void check_aligned_anonymous_unfixed_colliding_mmaps(void) munmap (p2, pagesize); munmap (p3, nlen); } - fprintf (stderr, " passed\n"); + fprintf(stdout, " passed\n"); } void check_aligned_anonymous_fixed_mmaps(void) @@ -194,7 +194,7 @@ void check_aligned_anonymous_fixed_mmaps(void) addr = mmap(NULL, pagesize * 40, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - fprintf (stderr, "%s addr=%p", __func__, addr); + fprintf(stdout, "%s addr=%p", __func__, addr); fail_unless (addr != MAP_FAILED); for (i = 0; i < 40; i++) @@ -212,7 +212,7 @@ void check_aligned_anonymous_fixed_mmaps(void) munmap (p1, pagesize); addr += pagesize; } - fprintf (stderr, " passed\n"); + fprintf(stdout, " passed\n"); } void check_aligned_anonymous_fixed_mmaps_collide_with_host(void) @@ -225,8 +225,8 @@ void check_aligned_anonymous_fixed_mmaps_collide_with_host(void) /* Find a suitable address to start with. Right were the x86 hosts stack is. */ addr = ((void *)0x80000000); - fprintf (stderr, "%s addr=%p", __func__, addr); - fprintf (stderr, "FIXME: QEMU fails to track pages used by the host."); + fprintf(stdout, "%s addr=%p", __func__, addr); + fprintf(stdout, "FIXME: QEMU fails to track pages used by the host."); for (i = 0; i < 20; i++) { @@ -243,7 +243,7 @@ void check_aligned_anonymous_fixed_mmaps_collide_with_host(void) munmap (p1, pagesize); addr += pagesize; } - fprintf (stderr, " passed\n"); + fprintf(stdout, " passed\n"); } void check_file_unfixed_mmaps(void) @@ -252,7 +252,7 @@ void check_file_unfixed_mmaps(void) uintptr_t p; int i; - fprintf (stderr, "%s", __func__); + fprintf(stdout, "%s", __func__); for (i = 0; i < 0x10; i++) { size_t len; @@ -294,7 +294,7 @@ void check_file_unfixed_mmaps(void) munmap (p2, len); munmap (p3, len); } - fprintf (stderr, " passed\n"); + fprintf(stdout, " passed\n"); } void check_file_unfixed_eof_mmaps(void) @@ -304,7 +304,7 @@ void check_file_unfixed_eof_mmaps(void) uintptr_t p; int i; - fprintf (stderr, "%s", __func__); + fprintf(stdout, "%s", __func__); for (i = 0; i < 0x10; i++) { p1 = mmap(NULL, pagesize, PROT_READ, @@ -327,7 +327,7 @@ void check_file_unfixed_eof_mmaps(void) fail_unless (cp[pagesize - 4] == 0); munmap (p1, pagesize); } - fprintf (stderr, " passed\n"); + fprintf(stdout, " passed\n"); } void check_file_fixed_eof_mmaps(void) @@ -343,7 +343,7 @@ void check_file_fixed_eof_mmaps(void) MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - fprintf (stderr, "%s addr=%p", __func__, (void *)addr); + fprintf(stdout, "%s addr=%p", __func__, (void *)addr); fail_unless (addr != MAP_FAILED); for (i = 0; i < 0x10; i++) @@ -371,7 +371,7 @@ void check_file_fixed_eof_mmaps(void) munmap (p1, pagesize); addr += pagesize; } - fprintf (stderr, " passed\n"); + fprintf(stdout, " passed\n"); } void check_file_fixed_mmaps(void) @@ -384,7 +384,7 @@ void check_file_fixed_mmaps(void) addr = mmap(NULL, pagesize * 40 * 4, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - fprintf (stderr, "%s addr=%p", __func__, (void *)addr); + fprintf(stdout, "%s addr=%p", __func__, (void *)addr); fail_unless (addr != MAP_FAILED); for (i = 0; i < 40; i++) @@ -426,7 +426,7 @@ void check_file_fixed_mmaps(void) munmap (p4, pagesize); addr += pagesize * 4; } - fprintf (stderr, " passed\n"); + fprintf(stdout, " passed\n"); } void checked_write(int fd, const void *buf, size_t count)