From patchwork Fri Jun 8 12:32:30 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: 138047 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp906887lji; Fri, 8 Jun 2018 06:58:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLD0FQ4YUkx/vm5f4gbkHqe03Ck4wroR5nhZMa0KqR/qnr8J38h5DBKnDzgaz8DGVpsgdxq X-Received: by 2002:ac8:4a0:: with SMTP id s32-v6mr6044902qtg.2.1528466339527; Fri, 08 Jun 2018 06:58:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528466339; cv=none; d=google.com; s=arc-20160816; b=XVwTbEIJW2M7fNEivlYhjMQdErkCBVv7CL7twIEhHlmDsJc0cqoYzM2J/dgQhGyJ0o aXYHyDUa9QlxNMNx/7DbAD2Ofcs6YZkMmx4SXjaPWCbI0r9sdPxMTnU3ygT9ymti1n1q 8AO5/CHK4P/v+W067Me1chTrt4PX/UxK/ZvEWnNh4hAYG4/TizvEymOwGffpaeDinBTb STfeYwWAuUGm4taZNLGe5zElrs3fyb/jVRckCV5/SjuIrbJuvtmrm0jlnilNsEoAspSX 4EqF1Afkl1LGEAIwhHjk6vUh0m3TG8kWYJEqsI9band+JSH7oQ/YbON5P01Hk2A3V2ah Om6Q== 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:arc-authentication-results; bh=E3XwDhr/6+3BERuq15PeJ2KnZFRqsPtHL/qmMufEQxg=; b=JuAmJJ7fsnvW0cwxm1yernAIeM7AUtMKiCsyldieODNHK9J7QtfyEJLwmNa7dAWiNq i+ueQomq1t73DVObgYMoUmCIenv7H6Oa4FC3oXVfuyKlExG1c3Hpi8iDizHcd/rJTves m549DdKgmu4P0+JLCdJ8Z9M0hX0IVmoVwvnij6rMKSIbgiQ3UgkKLjxJ70n0+UxjQ1sd WV+F1JHxKDIl8DK+94VrBZQ3CnsaipzhDBeqhxCczoMFc1vc6LYoeCi9wUnD0Hknoyrd +xwFEGJNzIUqfe3gaZ3M0nB0vWkkuwSOg888XQMsir88Lw4iFkKtOweB7uORcIoju/Nc 3SAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EWbQss8T; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p42-v6si8684918qtj.309.2018.06.08.06.58.59 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 08 Jun 2018 06:58:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EWbQss8T; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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]:35837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRHut-0004dT-0z for patch@linaro.org; Fri, 08 Jun 2018 09:58:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRGpP-0005v1-3E for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:49:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRGpN-0006f8-Tc for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:49:15 -0400 Received: from mail-wr0-x22d.google.com ([2a00:1450:400c:c0c::22d]:35671) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRGpN-0006do-JB for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:49:13 -0400 Received: by mail-wr0-x22d.google.com with SMTP id l10-v6so13295681wrn.2 for ; Fri, 08 Jun 2018 05:49:13 -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=E3XwDhr/6+3BERuq15PeJ2KnZFRqsPtHL/qmMufEQxg=; b=EWbQss8TUNwz6mdUdRCOkQZvVVk47J5vVGBCSTsI2EVszhbP3NVCDJhCAjEKAiJBmf 319S3VT3S4b57aJq1N3e53XWSDsBr9CwzAJHKvz9he0//xKWk7/nJoZVFQk9ykyd3Dxb uLrqkBivoONN0ijTKQK4Mr+CcX0TYNg8SXTM8= 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=E3XwDhr/6+3BERuq15PeJ2KnZFRqsPtHL/qmMufEQxg=; b=gziaTvJAhSwQo6eYHRYeXWveuMxVCfQlfGgOovrv1QrGLnme7HaSHR96NljlMppT3l GdqbxnHWnGZfJPgkVXiQn4Ua2PIdpn1sPJe0YEj2+f9FMmEYBgM/7U43ObYLCHsXGKXK wSiHhsMPxv0A2ZFbn4QHpxPVtGnzp3HTjX6m+I4P3k3kTRZrVP4ArSKlbLgzylf2hXSn cBvPkQbK9mERiSYpUayOCAsIwHKaWxXpiucu+F0DzIDWCd42QR4S5ZF5TcyDZ2lrBjMy Q7V5/VHtOpKinK3oxANUIQ44B+hKiGKJ1hz7edb9x0LzQ4RzBzZIcvY/ff/iveFhA/XZ DXtQ== X-Gm-Message-State: APt69E2okoau2GCSKurVw0avV6R0DKORYCuKyjU+ke+icF7n2y0yB3Jw 4DiIXxc2HTbYr7ZTBjE+auvJpA== X-Received: by 2002:adf:f246:: with SMTP id b6-v6mr4892558wrp.235.1528462152427; Fri, 08 Jun 2018 05:49:12 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id t124-v6sm1061741wmt.29.2018.06.08.05.49.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jun 2018 05:49:09 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 135023E04F0; Fri, 8 Jun 2018 13:33:08 +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, pbonzini@redhat.com, stefanha@redhat.com, stefanb@linux.vnet.ibm.com, marcandre.lureau@redhat.com Date: Fri, 8 Jun 2018 13:32:30 +0100 Message-Id: <20180608123307.24773-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180608123307.24773-1-alex.bennee@linaro.org> References: <20180608123307.24773-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:c0c::22d Subject: [Qemu-devel] [PATCH v6 12/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+patch=linaro.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(-) -- 2.17.1 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)