[Intel-gfx] [PATCH i-g-t 1/2] tests: Clean up igt_skip_on_simulation() uses

Petri Latvala petri.latvala at intel.com
Mon Oct 16 11:02:31 UTC 2017


On Fri, Oct 13, 2017 at 02:59:55PM +0300, Arkadiusz Hiler wrote:
> General update to reflect current state of things.
> 
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>

Series is

Acked-by: Petri Latvala <petri.latvala at intel.com>


> ---
>  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));
> -- 
> 2.13.6
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list