From patchwork Thu Feb 13 13:27:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 3645401 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 96CFABF13A for ; Thu, 13 Feb 2014 13:49:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AFFE5201CE for ; Thu, 13 Feb 2014 13:49:29 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C79502018E for ; Thu, 13 Feb 2014 13:49:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 68962FAD2B; Thu, 13 Feb 2014 05:49:26 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 1BF81FAD2B for ; Thu, 13 Feb 2014 05:49:20 -0800 (PST) Received: by mail-ee0-f44.google.com with SMTP id c13so5028573eek.17 for ; Thu, 13 Feb 2014 05:49:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=304TYnbTM7LC8iSvCoRFJ3dkB1ObRfwWJNLGU9IZDrY=; b=jcJXSAPizm+ZXcURyvLSStCphZvJaFypDAb57BOgFPafbJUXCdvUA0dOFA5Lv0EB3k oEf3qkWXAYqKJJKSNAT9m8GUrPFqAp4B5kP+WL7fTR5IGM1Ec8Vqe8T7b2IrxVEptqRz ArNPkNXFfG3RZyWBOMpZ+YRHD+VYoksowwgMA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=304TYnbTM7LC8iSvCoRFJ3dkB1ObRfwWJNLGU9IZDrY=; b=UwrFn3YZmxquEbrnv9pvs4CYZjdlYDWnaO4P0BpiiHgxSx4Nv0A1LvH3vqvcuGKM2r HmavE1PZM4lB+NWDj2DeFfzHAFcwuUMGSCkFMX8jGqyRpMGGOvyK7UX+luG6j1cuvqR9 umgmRYmG5x196w0Q9VWsjFSuq0FM4HqJ48Hy5QJF0oCqh1/V/KFgVvzlViM2Xj6Ugf3E qOWP/vFV3hgiTp0Yh4qEtAR+jU+K+6bETa4rJQr47n6CFM0Y0Xgj10IsJBoxygW1cbqp JqLwRQdDjTOh5Q2rQSH7Onw6YBBwf/cFc8tnbfRa32T2NYFs9LOkB8ilcZJcp4wpiMiq yGoQ== X-Gm-Message-State: ALoCoQkFJpMTJAfPtkwrh4s+90wVxWOc+10BEm+gW8RQpAuvccwcY0Y/kLAOX9QDZj+awOBRIQaR X-Received: by 10.14.198.132 with SMTP id v4mr1944256een.43.1392299360226; Thu, 13 Feb 2014 05:49:20 -0800 (PST) Received: from wespe.ffwll.local (84-73-67-144.dclient.hispeed.ch. [84.73.67.144]) by mx.google.com with ESMTPSA id q44sm7207113eez.1.2014.02.13.05.49.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Feb 2014 05:49:19 -0800 (PST) From: Daniel Vetter To: Intel Graphics Development Date: Thu, 13 Feb 2014 14:27:56 +0100 Message-Id: <1392298077-23293-2-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1392298077-23293-1-git-send-email-daniel.vetter@ffwll.ch> References: <1392298077-23293-1-git-send-email-daniel.vetter@ffwll.ch> Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 2/3] tests/gem_seqno_wrap: use igt logging X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, 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 Cc: Mika Kuoppala Signed-off-by: Daniel Vetter --- tests/gem_seqno_wrap.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/tests/gem_seqno_wrap.c b/tests/gem_seqno_wrap.c index e37365f1d45c..0d90df6b7db0 100644 --- a/tests/gem_seqno_wrap.c +++ b/tests/gem_seqno_wrap.c @@ -58,7 +58,6 @@ struct option_struct { int rounds; int background; char cmd[1024]; - int verbose; int timeout; int dontwrap; int prewrap_space; @@ -318,12 +317,6 @@ static int run_cmd(char *s) igt_assert(snprintf(full_path, PATH_MAX, "%s/%s", path, wexp.we_wordv[0]) > 0); - /* if (!options.verbose) { - close(STDOUT_FILENO); - close(STDERR_FILENO); - } - */ - r = execv(full_path, wexp.we_wordv); if (r == -1) perror("execv failed"); @@ -404,8 +397,7 @@ static int __read_seqno(uint32_t *seqno) *seqno = tmp; - if (options.verbose) - printf("next_seqno: 0x%x\n", *seqno); + igt_debug("next_seqno: 0x%x\n", *seqno); return 0; } @@ -449,8 +441,7 @@ static int write_seqno(uint32_t seqno) last_seqno = seqno; - if (options.verbose) - printf("next_seqno set to: 0x%x\n", seqno); + igt_debug("next_seqno set to: 0x%x\n", seqno); r = __read_seqno(&rb); if (r < 0) @@ -564,7 +555,6 @@ static void parse_options(int argc, char **argv) {"background", no_argument, 0, 'b'}, {"timeout", required_argument, 0, 't'}, {"dontwrap", no_argument, 0, 'd'}, - {"verbose", no_argument, 0, 'v'}, {"prewrap", required_argument, 0, 'p'}, {"norandom", no_argument, 0, 'r'}, {"buffers", required_argument, 0, 'i'}, @@ -575,7 +565,6 @@ static void parse_options(int argc, char **argv) options.background = 0; options.dontwrap = 0; options.timeout = 20; - options.verbose = 0; options.random = 1; options.prewrap_space = 21; options.buffers = 10; @@ -611,9 +600,6 @@ static void parse_options(int argc, char **argv) printf("setting timeout to %d seconds\n", options.timeout); break; - case 'v': - options.verbose = 1; - break; case 'r': options.random = 0; break; @@ -660,16 +646,12 @@ int main(int argc, char **argv) wcount++; - if (options.verbose) { - printf("%s done: %d\n", - options.dontwrap ? "tests" : "wraps", wcount); - fflush(stdout); - } + igt_debug("%s done: %d\n", + options.dontwrap ? "tests" : "wraps", wcount); } if (options.rounds == wcount) { - if (options.verbose) - printf("done %d wraps successfully\n", wcount); + igt_debug("done %d wraps successfully\n", wcount); return 0; }