From patchwork Tue Aug 5 20:51:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kelley, Sean V" X-Patchwork-Id: 4682281 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 75EFF9F375 for ; Tue, 5 Aug 2014 20:51:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 993CF201CD for ; Tue, 5 Aug 2014 20:51:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 23094201BC for ; Tue, 5 Aug 2014 20:51:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3DA076E1A1; Tue, 5 Aug 2014 13:51:34 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 11D686E1A1 for ; Tue, 5 Aug 2014 13:51:33 -0700 (PDT) Received: by mail-pa0-f50.google.com with SMTP id et14so2046127pad.23 for ; Tue, 05 Aug 2014 13:51:32 -0700 (PDT) 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; bh=nmynnQHTeHWfhGUgU8Mw0DT5gbgbBbjoII39l22i8zU=; b=LRgSAX7oXS+yU6X0YiQalF3quMAFL2wz6v8+DyL8BakjNCxSDzfjiPwkRCyfsnHbi3 l7EGEvJXdiMG3wlrX2gMZdPl+272yG1eof6bocVvQkjy2Ni36OutjRqmzhkTWz0Y6ONn qNmmOuJGXsq8hL3TuFEn12Wf1t7AVD+c664vwAH1apJlVXpzSKfoIaJEx2+r1SuMwh33 V64I9OcekVuFEWwdPdBkbO4RXmTy+a7ng02gjAy8vBlZxMmD4831Cc6Ky1zxkjPDyH7T MOQWED6U9blyj2ZR5VSt6YhZseYFRNw+r7N8bUWb/YSz64EfTyZsf76itOw/ukvD1oLO JXdQ== X-Gm-Message-State: ALoCoQlquFNl74AGkoXJILG9uGo+o5mL84/ULZAaRSsW9E8Xqie/ZRCYL+siANBx9xcU8Yq8nrc+ X-Received: by 10.66.178.231 with SMTP id db7mr5905170pac.63.1407271879554; Tue, 05 Aug 2014 13:51:19 -0700 (PDT) Received: from tallgrass.jf.intel.com ([134.134.139.76]) by mx.google.com with ESMTPSA id gs2sm2970204pbc.20.2014.08.05.13.51.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Aug 2014 13:51:18 -0700 (PDT) From: Sean V Kelley To: intel-gfx@lists.freedesktop.org Date: Tue, 5 Aug 2014 13:51:24 -0700 Message-Id: <1407271884-6414-1-git-send-email-sean.v.kelley@intel.com> X-Mailer: git-send-email 2.0.1 Cc: Thomas Wood Subject: [Intel-gfx] [PATCH v2 i-g-t] 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Signed-off-by: Thomas Wood --- 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);