From patchwork Thu Jun 25 15:52:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 6677211 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DF6539F1C1 for ; Thu, 25 Jun 2015 18:51:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 172F92073D for ; Thu, 25 Jun 2015 18:51:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1E0B02073C for ; Thu, 25 Jun 2015 18:51:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0FE0C6EC9A; Thu, 25 Jun 2015 11:51:32 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qk0-f170.google.com (mail-qk0-f170.google.com [209.85.220.170]) by gabe.freedesktop.org (Postfix) with ESMTP id E00736EC9A for ; Thu, 25 Jun 2015 11:51:30 -0700 (PDT) Received: by qkbp125 with SMTP id p125so43415080qkb.2 for ; Thu, 25 Jun 2015 11:51:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=fcxx5Zz+V47+rMccuKbUVmYUolt8a2nuHK8T/DlVDfs=; b=jbq4IN8u+18WMxzq4D3XI7ej0+iQB2k+RKXJ5AugRh2k8KQHp+KH97R8TdNmVInnoU RW4heskxOAPRGDb+WzoRA7eDHg67fAmnHBYoImScs90CXgzL2qqZxffO4XaeUOiJ/gLN 3rGm8VLZxpmAAkHTjI0ht/gED8ErAG7hdUg7pcJmxkRehaFFIEsbQWdNIQkfxAvHezud wrKyN1y/VtHDvkfrHstw6Lz/XDinKd/QZ3GpgFjeE6v0gYJRMxi/bplcU2zSDRa5hOd9 eXwzDJaBW2TphPcfzcN6gL1DtuNYWOQFaDch2FBkNR37b8CO0+rQtdp7mzOG+EDqiybL hu7Q== X-Received: by 10.140.41.9 with SMTP id y9mr60823092qgy.28.1435258290369; Thu, 25 Jun 2015 11:51:30 -0700 (PDT) Received: from localhost.localdomain (r130-pw-tresbarras.ibys.com.br. [189.76.1.243]) by mx.google.com with ESMTPSA id r81sm5469922qkr.2.2015.06.25.11.51.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Jun 2015 11:51:29 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Thu, 25 Jun 2015 12:52:22 -0300 Message-Id: <1435247542-21630-1-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.1.4 Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH igt] lib/igt_core: fflush stdout after printing subtest results X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Paulo Zanoni I often run "sudo ./test 2>&1 | tee output.txt", and when we're succeeding - never printing to stderr - the output gets buffered and is never flushed (because it doesn't point to a terminal), so I never know which test is running. With this fflush, I'm able to know when each test finishes. Signed-off-by: Paulo Zanoni Reviewed-by: Chris Wilson --- lib/igt_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/igt_core.c b/lib/igt_core.c index 051bc6a..48a0124 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -829,6 +829,7 @@ static void exit_subtest(const char *result) elapsed += (now.tv_nsec - subtest_time.tv_nsec) * 1e-9; printf("Subtest %s: %s (%.3fs)\n", in_subtest, result, elapsed); + fflush(stdout); in_subtest = NULL; siglongjmp(igt_subtest_jmpbuf, 1); }