From patchwork Tue Oct 16 14:34:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Imre Deak X-Patchwork-Id: 1601081 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id F384040ABA for ; Tue, 16 Oct 2012 14:49:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2419B9F5F3 for ; Tue, 16 Oct 2012 07:49:15 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id C218F9EBD3 for ; Tue, 16 Oct 2012 07:35:36 -0700 (PDT) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 16 Oct 2012 07:35:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,593,1344236400"; d="scan'208";a="205092386" Received: from ideak-desk.fi.intel.com (HELO localhost) ([10.237.72.98]) by azsmga001.ch.intel.com with ESMTP; 16 Oct 2012 07:35:35 -0700 From: Imre Deak To: intel-gfx@lists.freedesktop.org Date: Tue, 16 Oct 2012 17:34:51 +0300 Message-Id: <1350398096-3649-18-git-send-email-imre.deak@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1350398096-3649-1-git-send-email-imre.deak@intel.com> References: <1350398096-3649-1-git-send-email-imre.deak@intel.com> Subject: [Intel-gfx] [PATCH 17/22] flip_test: unify the name of the current test in status messages 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+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Signed-off-by: Imre Deak --- tests/flip_test.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/flip_test.c b/tests/flip_test.c index 85fa0f2..a0c1e5d 100644 --- a/tests/flip_test.c +++ b/tests/flip_test.c @@ -84,6 +84,7 @@ struct event_state { }; struct test_output { + const char *test_name; uint32_t id; int crtc_idx; int mode_valid; @@ -545,8 +546,8 @@ static void flip_mode(struct test_output *o, int duration) if (!o->mode_valid) return; - fprintf(stdout, "Beginning page flipping on crtc %d, connector %d\n", - crtc, o->id); + fprintf(stdout, "Beginning %s on crtc %d, connector %d\n", + o->test_name, crtc, o->id); o->fb_width = o->mode.hdisplay; o->fb_height = o->mode.vdisplay; @@ -594,8 +595,8 @@ static void flip_mode(struct test_output *o, int duration) check_final_state(o, &o->flip_state, ellapsed); - fprintf(stdout, "\npage flipping on crtc %d, connector %d: PASSED\n", - crtc, o->id); + fprintf(stdout, "\n%s on crtc %d, connector %d: PASSED\n\n", + o->test_name, crtc, o->id); kmstest_remove_fb(drm_fd, o->fb_ids[1]); kmstest_remove_fb(drm_fd, o->fb_ids[0]); @@ -604,7 +605,7 @@ static void flip_mode(struct test_output *o, int duration) drmModeFreeConnector(o->connector); } -static int run_test(int duration, int flags) +static int run_test(int duration, int flags, const char *test_name) { struct test_output o; int c, i; @@ -620,6 +621,7 @@ static int run_test(int duration, int flags) for (c = 0; c < resources->count_connectors; c++) { for (i = 0; i < resources->count_crtcs; i++) { memset(&o, 0, sizeof(o)); + o.test_name = test_name; o.id = resources->connectors[c]; o.flags = flags; o.flip_state.name = "flip"; @@ -658,7 +660,7 @@ int main(int argc, char **argv) for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) { printf("running testcase: %s\n", tests[i].name); - run_test(tests[i].duration, tests[i].flags); + run_test(tests[i].duration, tests[i].flags, tests[i].name); } close(drm_fd);