From patchwork Fri Oct 13 11:59:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arkadiusz Hiler X-Patchwork-Id: 10004337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E08BA60216 for ; Fri, 13 Oct 2017 12:00:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D25C628538 for ; Fri, 13 Oct 2017 12:00:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C6D6A29034; Fri, 13 Oct 2017 12:00:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E4BE028538 for ; Fri, 13 Oct 2017 12:00:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 36CF86EAF1; Fri, 13 Oct 2017 12:00:03 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 86CD16E227 for ; Fri, 13 Oct 2017 12:00:01 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP; 13 Oct 2017 05:00:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,370,1503385200"; d="scan'208";a="146091526" Received: from ahiler-desk1.fi.intel.com ([10.237.68.151]) by orsmga002.jf.intel.com with ESMTP; 13 Oct 2017 04:59:59 -0700 From: Arkadiusz Hiler To: intel-gfx@lists.freedesktop.org Date: Fri, 13 Oct 2017 14:59:55 +0300 Message-Id: <20171013115956.24123-1-arkadiusz.hiler@intel.com> X-Mailer: git-send-email 2.13.6 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH i-g-t 1/2] tests: Clean up igt_skip_on_simulation() uses 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-Virus-Scanned: ClamAV using ClamSMTP General update to reflect current state of things. Signed-off-by: Arkadiusz Hiler Acked-by: Radoslaw Szwichtenberg --- tests/core_prop_blob.c | 2 -- tests/gem_busy.c | 4 ++-- tests/gem_close_race.c | 2 -- tests/gem_cpu_reloc.c | 1 - tests/gem_ctx_exec.c | 4 ++-- tests/gem_ctx_switch.c | 3 +++ tests/gem_exec_fence.c | 4 ++-- tests/gem_exec_flush.c | 2 -- tests/gem_exec_suspend.c | 2 ++ tests/gem_pread.c | 1 - tests/gem_pwrite.c | 2 -- tests/gem_ringfill.c | 2 ++ tests/kms_cursor_legacy.c | 2 -- tests/kms_flip.c | 1 - tests/kms_pipe_crc_basic.c | 4 ++-- tests/prime_busy.c | 7 +++++-- tests/prime_vgem.c | 2 -- 17 files changed, 20 insertions(+), 25 deletions(-) diff --git a/tests/core_prop_blob.c b/tests/core_prop_blob.c index 6423a5a2..a7e787be 100644 --- a/tests/core_prop_blob.c +++ b/tests/core_prop_blob.c @@ -323,8 +323,6 @@ igt_main { int fd; - igt_skip_on_simulation(); - igt_fixture { fd = drm_open_driver(DRIVER_ANY); igt_require(fd >= 0); diff --git a/tests/gem_busy.c b/tests/gem_busy.c index 58aa5ee5..2b88270b 100644 --- a/tests/gem_busy.c +++ b/tests/gem_busy.c @@ -505,8 +505,6 @@ igt_main const struct intel_execution_engine *e; int fd = -1; - igt_skip_on_simulation(); - igt_fixture { fd = drm_open_driver_master(DRIVER_INTEL); igt_require_gem(fd); @@ -601,6 +599,7 @@ igt_main igt_subtest_f("%shang-%s", e->exec_id == 0 ? "basic-" : "", e->name) { + igt_skip_on_simulation(); igt_require(gem_has_ring(fd, e->exec_id | e->flags)); gem_quiescent_gpu(fd); basic(fd, e->exec_id | e->flags, HANG); @@ -619,6 +618,7 @@ igt_main continue; igt_subtest_f("extended-hang-%s", e->name) { + igt_skip_on_simulation(); gem_require_ring(fd, e->exec_id | e->flags); igt_require(gem_can_store_dword(fd, e->exec_id | e->flags)); diff --git a/tests/gem_close_race.c b/tests/gem_close_race.c index 3e1eb9ee..d9a45387 100644 --- a/tests/gem_close_race.c +++ b/tests/gem_close_race.c @@ -209,8 +209,6 @@ static void threads(int timeout) igt_main { - igt_skip_on_simulation(); - igt_fixture { int fd; diff --git a/tests/gem_cpu_reloc.c b/tests/gem_cpu_reloc.c index e039f9a2..882c312d 100644 --- a/tests/gem_cpu_reloc.c +++ b/tests/gem_cpu_reloc.c @@ -254,7 +254,6 @@ igt_main run_test (fd, 10); } - igt_skip_on_simulation(); igt_subtest("full") { aper_size = gem_mappable_aperture_size(); diff --git a/tests/gem_ctx_exec.c b/tests/gem_ctx_exec.c index ad39d5ed..15937cf3 100644 --- a/tests/gem_ctx_exec.c +++ b/tests/gem_ctx_exec.c @@ -154,8 +154,6 @@ int fd; igt_main { - igt_skip_on_simulation(); - igt_fixture { fd = drm_open_driver_render(DRIVER_INTEL); igt_require_gem(fd); @@ -189,6 +187,8 @@ igt_main igt_subtest("reset-pin-leak") { int i; + igt_skip_on_simulation(); + /* * Use an explicit context to isolate the test from * any major code changes related to the per-file diff --git a/tests/gem_ctx_switch.c b/tests/gem_ctx_switch.c index b6ea71cf..fdd67202 100644 --- a/tests/gem_ctx_switch.c +++ b/tests/gem_ctx_switch.c @@ -165,6 +165,9 @@ igt_main for (e = intel_execution_engines; e->name; e++) { igt_subtest_f("%s%s", e->exec_id == 0 ? "basic-" : "", e->name) single(fd, light, e, 0, 1, 5); + + igt_skip_on_simulation(); + igt_subtest_f("%s%s-heavy", e->exec_id == 0 ? "basic-" : "", e->name) single(fd, heavy, e, 0, 1, 5); igt_subtest_f("%s-interruptible", e->name) diff --git a/tests/gem_exec_fence.c b/tests/gem_exec_fence.c index 477386b4..baeb3c9c 100644 --- a/tests/gem_exec_fence.c +++ b/tests/gem_exec_fence.c @@ -1461,8 +1461,6 @@ igt_main unsigned int caps = 0; int i915 = -1; - igt_skip_on_simulation(); - igt_fixture { i915 = drm_open_driver_master(DRIVER_INTEL); igt_require_gem(i915); @@ -1516,6 +1514,8 @@ igt_main igt_subtest_group { igt_hang_t hang; + igt_skip_on_simulation(); + igt_fixture { hang = igt_allow_hang(i915, 0, 0); } diff --git a/tests/gem_exec_flush.c b/tests/gem_exec_flush.c index 803d45b6..c93eee4b 100644 --- a/tests/gem_exec_flush.c +++ b/tests/gem_exec_flush.c @@ -576,8 +576,6 @@ igt_main unsigned cpu = x86_64_features(); int fd = -1; - igt_skip_on_simulation(); - igt_fixture { igt_require(igt_setup_clflush()); fd = drm_open_driver(DRIVER_INTEL); diff --git a/tests/gem_exec_suspend.c b/tests/gem_exec_suspend.c index bcb0e089..bbdc6e55 100644 --- a/tests/gem_exec_suspend.c +++ b/tests/gem_exec_suspend.c @@ -255,6 +255,8 @@ igt_main igt_hang_t hang; int fd; + igt_skip_on_simulation(); + igt_fixture { fd = drm_open_driver_master(DRIVER_INTEL); igt_require_gem(fd); diff --git a/tests/gem_pread.c b/tests/gem_pread.c index f4cf472c..00379580 100644 --- a/tests/gem_pread.c +++ b/tests/gem_pread.c @@ -100,7 +100,6 @@ int main(int argc, char **argv) }, *c; igt_subtest_init(argc, argv); - igt_skip_on_simulation(); if (argc > 1 && atoi(argv[1])) object_size = atoi(argv[1]); diff --git a/tests/gem_pwrite.c b/tests/gem_pwrite.c index b61b4466..696bd316 100644 --- a/tests/gem_pwrite.c +++ b/tests/gem_pwrite.c @@ -226,8 +226,6 @@ int main(int argc, char **argv) { -1 }, }, *c; - igt_skip_on_simulation(); - igt_subtest_init(argc, argv); if (argc > 1 && atoi(argv[1])) diff --git a/tests/gem_ringfill.c b/tests/gem_ringfill.c index 01cbd0a9..84cd49c1 100644 --- a/tests/gem_ringfill.c +++ b/tests/gem_ringfill.c @@ -378,6 +378,8 @@ igt_main e->name, m->suffix) { igt_skip_on(m->flags & NEWFD && master); + if (m->flags & (HANG|SUSPEND|HIBERNATE)) + igt_skip_on_simulation(); run_test(fd, e->exec_id | e->flags, m->flags, m->timeout); } diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c index fc752683..5720dbef 100644 --- a/tests/kms_cursor_legacy.c +++ b/tests/kms_cursor_legacy.c @@ -1352,8 +1352,6 @@ igt_main igt_display_t display = { .drm_fd = -1 }; int i; - igt_skip_on_simulation(); - igt_fixture { display.drm_fd = drm_open_driver_master(DRIVER_ANY); kmstest_set_vt_graphics_mode(); diff --git a/tests/kms_flip.c b/tests/kms_flip.c index acec95f0..acf4d99d 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -1618,7 +1618,6 @@ int main(int argc, char **argv) int i; igt_subtest_init(argc, argv); - igt_skip_on_simulation(); igt_fixture { drm_fd = drm_open_driver_master(DRIVER_ANY); diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c index 35adddba..eaa5e316 100644 --- a/tests/kms_pipe_crc_basic.c +++ b/tests/kms_pipe_crc_basic.c @@ -180,8 +180,6 @@ data_t data = {0, }; igt_main { - igt_skip_on_simulation(); - igt_fixture { data.drm_fd = drm_open_driver_master(DRIVER_ANY); @@ -207,6 +205,8 @@ igt_main igt_subtest("bad-nb-words-3") test_bad_command(&data, "pipe A none option"); + igt_skip_on_simulation(); + for (int i = 0; i < 3; i++) { igt_subtest_f("read-crc-pipe-%c", 'A'+i) test_read_crc(&data, i, 0); diff --git a/tests/prime_busy.c b/tests/prime_busy.c index a516ab86..a82acbdb 100644 --- a/tests/prime_busy.c +++ b/tests/prime_busy.c @@ -186,9 +186,14 @@ static void test_engine_mode(int fd, igt_require(gem_can_store_dword(fd, e->exec_id | e->flags)); if ((flags & HANG) == 0) + { igt_fork_hang_detector(fd); + } else + { + igt_skip_on_simulation(); hang = igt_allow_hang(fd, 0, 0); + } } igt_subtest_f("%s%s-%s", @@ -215,8 +220,6 @@ igt_main const struct intel_execution_engine *e; int fd = -1; - igt_skip_on_simulation(); - igt_fixture { fd = drm_open_driver_master(DRIVER_INTEL); igt_require_gem(fd); diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c index 0ffaee90..a5f75d88 100644 --- a/tests/prime_vgem.c +++ b/tests/prime_vgem.c @@ -760,8 +760,6 @@ igt_main int i915 = -1; int vgem = -1; - igt_skip_on_simulation(); - igt_fixture { vgem = drm_open_driver(DRIVER_VGEM); igt_require(has_prime_export(vgem));