From patchwork Fri Jun 20 10:28:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tim.gore@intel.com X-Patchwork-Id: 4388081 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 0C80DBEEAA for ; Fri, 20 Jun 2014 10:28:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 394F3203B5 for ; Fri, 20 Jun 2014 10:28:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 35C75203AF for ; Fri, 20 Jun 2014 10:28:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C02A66E08D; Fri, 20 Jun 2014 03:28:21 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 42B1E6E08D for ; Fri, 20 Jun 2014 03:28:20 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 20 Jun 2014 03:28:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,513,1400050800"; d="scan'208";a="531484190" Received: from tgore-linux.iwi.intel.com ([172.28.253.145]) by orsmga001.jf.intel.com with ESMTP; 20 Jun 2014 03:28:15 -0700 From: tim.gore@intel.com To: intel-gfx@lists.freedesktop.org Date: Fri, 20 Jun 2014 11:28:12 +0100 Message-Id: <1403260092-3947-1-git-send-email-tim.gore@intel.com> X-Mailer: git-send-email 1.9.2 Cc: daniel.vetter@ffwll.ch Subject: [Intel-gfx] [PATCH] intel-gpu-tools: add igt_core init func calls to some tests X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, 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: Tim Gore igt-core.h/c provides some macros and initialisation functions to support the tests but some of the single tests do not use these. Modifying these tests to use the igt_simple_main macro and igt_simple_init function is the first step towards a consistent command line across all tests. Signed-off-by: Tim Gore --- tests/gem_bad_address.c | 4 +--- tests/gem_bad_batch.c | 4 +--- tests/gem_bad_blit.c | 4 +--- tests/gem_hang.c | 2 ++ tests/gem_non_secure_batch.c | 4 +--- tests/gem_stress.c | 2 ++ 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/tests/gem_bad_address.c b/tests/gem_bad_address.c index f8fda90..e7a9587 100644 --- a/tests/gem_bad_address.c +++ b/tests/gem_bad_address.c @@ -60,7 +60,7 @@ bad_store(void) intel_batchbuffer_flush(batch); } -int main(int argc, char **argv) +igt_simple_main { int fd; @@ -76,6 +76,4 @@ int main(int argc, char **argv) drm_intel_bufmgr_destroy(bufmgr); close(fd); - - return 0; } diff --git a/tests/gem_bad_batch.c b/tests/gem_bad_batch.c index 33b3241..7f92a93 100644 --- a/tests/gem_bad_batch.c +++ b/tests/gem_bad_batch.c @@ -56,7 +56,7 @@ bad_batch(void) intel_batchbuffer_flush(batch); } -int main(int argc, char **argv) +igt_simple_main { int fd; @@ -72,6 +72,4 @@ int main(int argc, char **argv) drm_intel_bufmgr_destroy(bufmgr); close(fd); - - return 0; } diff --git a/tests/gem_bad_blit.c b/tests/gem_bad_blit.c index 9c03117..71a9f78 100644 --- a/tests/gem_bad_blit.c +++ b/tests/gem_bad_blit.c @@ -95,7 +95,7 @@ bad_blit(drm_intel_bo *src_bo, uint32_t devid) intel_batchbuffer_flush(batch); } -int main(int argc, char **argv) +igt_simple_main { drm_intel_bo *src; int fd; @@ -114,6 +114,4 @@ int main(int argc, char **argv) drm_intel_bufmgr_destroy(bufmgr); close(fd); - - return 0; } diff --git a/tests/gem_hang.c b/tests/gem_hang.c index 8ebf606..6248244 100644 --- a/tests/gem_hang.c +++ b/tests/gem_hang.c @@ -72,6 +72,8 @@ int main(int argc, char **argv) { int fd; + igt_simple_init(); + igt_assert_f(argc == 2, "usage: %s \n", argv[0]); diff --git a/tests/gem_non_secure_batch.c b/tests/gem_non_secure_batch.c index 9acfda4..01101e9 100644 --- a/tests/gem_non_secure_batch.c +++ b/tests/gem_non_secure_batch.c @@ -77,7 +77,7 @@ mi_lri_loop(void) } } -int main(int argc, char **argv) +igt_simple_main { int fd; int devid; @@ -108,6 +108,4 @@ int main(int argc, char **argv) drm_intel_bufmgr_destroy(bufmgr); close(fd); - - return 0; } diff --git a/tests/gem_stress.c b/tests/gem_stress.c index d46c643..2ccb6fc 100644 --- a/tests/gem_stress.c +++ b/tests/gem_stress.c @@ -865,6 +865,8 @@ int main(int argc, char **argv) int i, j; unsigned *current_permutation, *tmp_permutation; + igt_simple_init(); + drm_fd = drm_open_any(); devid = intel_get_drm_devid(drm_fd);