* Provide a simulation friendly test environment v2
@ 2013-04-29 18:15 Damien Lespiau
2013-04-29 18:15 ` [PATCH 01/10] README: Reword a few sentences Damien Lespiau
` (9 more replies)
0 siblings, 10 replies; 14+ messages in thread
From: Damien Lespiau @ 2013-04-29 18:15 UTC (permalink / raw)
To: intel-gfx
Second installment of this series.
Patches 1-6 are trivial general cleanups I came across while doing this,
patches 7-10 are the real thing.
The changes from the last version are:
• Move from a white list of tests to run to a black list of tests to skip
• Name the environment variable that controls the simulation behaviour to
INTEL_SIMULATION to have a chance to share the name with the piglit tests.
--
Damien
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 01/10] README: Reword a few sentences
2013-04-29 18:15 Provide a simulation friendly test environment v2 Damien Lespiau
@ 2013-04-29 18:15 ` Damien Lespiau
2013-04-29 18:15 ` [PATCH 02/10] build: Make grep silent when running make test Damien Lespiau
` (8 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Damien Lespiau @ 2013-04-29 18:15 UTC (permalink / raw)
To: intel-gfx
To be a bit more correct (they were understandable though).
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
README | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/README b/README
index be29177..c484a93 100644
--- a/README
+++ b/README
@@ -27,17 +27,17 @@ tests/
Run this tests with "make test" as root from this directory. Note that
no other drm clients (X server) may run.
- "make test" only runs a default of test usefull for regression testing.
- Other tests not run are:
+ "make test" only runs a default set of tests and is useful for
+ regression testing. Other tests not run are:
- tests that might hang the gpu, see HANG in Makefile.am
- gem_stress, a stress test suite. Look at the source for all the
various options.
- testdisplay is only run in the default mode. testdisplay has tons of
- options to test different kms functionality, again read the source of
+ options to test different kms functionality, again read the source for
the details.
The more comfortable way to run tests is with piglit. First grab piglit
- from
+ from:
git://anongit.freedesktop.org/piglit
--
1.8.1.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 02/10] build: Make grep silent when running make test
2013-04-29 18:15 Provide a simulation friendly test environment v2 Damien Lespiau
2013-04-29 18:15 ` [PATCH 01/10] README: Reword a few sentences Damien Lespiau
@ 2013-04-29 18:15 ` Damien Lespiau
2013-04-29 18:15 ` [PATCH 03/10] lib: Remove the execution bit of intel_chipset.h Damien Lespiau
` (7 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Damien Lespiau @ 2013-04-29 18:15 UTC (permalink / raw)
To: intel-gfx
-q will prevent grep from writing to stdout and print "root" when make
test is running as root.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
tests/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9bc5302..834fb7c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -143,7 +143,7 @@ TESTS = \
$(NULL)
test:
- @whoami | grep root || ( echo ERROR: not running as root; exit 1 )
+ @whoami | grep -q root || ( echo ERROR: not running as root; exit 1 )
@./check_drm_clients
@make TESTS="${kernel_tests}" check
--
1.8.1.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 03/10] lib: Remove the execution bit of intel_chipset.h
2013-04-29 18:15 Provide a simulation friendly test environment v2 Damien Lespiau
2013-04-29 18:15 ` [PATCH 01/10] README: Reword a few sentences Damien Lespiau
2013-04-29 18:15 ` [PATCH 02/10] build: Make grep silent when running make test Damien Lespiau
@ 2013-04-29 18:15 ` Damien Lespiau
2013-04-29 18:15 ` [PATCH 04/10] Update .gitignore files with the new tests and tools Damien Lespiau
` (6 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Damien Lespiau @ 2013-04-29 18:15 UTC (permalink / raw)
To: intel-gfx
---
lib/intel_chipset.h | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100755 => 100644 lib/intel_chipset.h
diff --git a/lib/intel_chipset.h b/lib/intel_chipset.h
old mode 100755
new mode 100644
--
1.8.1.4
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 04/10] Update .gitignore files with the new tests and tools
2013-04-29 18:15 Provide a simulation friendly test environment v2 Damien Lespiau
` (2 preceding siblings ...)
2013-04-29 18:15 ` [PATCH 03/10] lib: Remove the execution bit of intel_chipset.h Damien Lespiau
@ 2013-04-29 18:15 ` Damien Lespiau
2013-04-29 18:15 ` [PATCH 05/10] lib: Add the declaration of intel_register_access_needs_fakewake() Damien Lespiau
` (5 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Damien Lespiau @ 2013-04-29 18:15 UTC (permalink / raw)
To: intel-gfx
Also sort them.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
tests/.gitignore | 24 ++++++++++++++----------
tools/.gitignore | 5 +++++
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/tests/.gitignore b/tests/.gitignore
index fd30412..b406d0c 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -1,4 +1,3 @@
-kms_flip
drm_vma_limiter
drm_vma_limiter_cached
drm_vma_limiter_cpu
@@ -9,10 +8,10 @@ gem_bad_blit
gem_bad_length
gem_basic
gem_cacheing
-gem_cs_prefetch
-gem_cs_tlb
gem_cpu_concurrent_blit
gem_cpu_reloc
+gem_cs_prefetch
+gem_cs_tlb
gem_ctx_bad_destroy
gem_ctx_bad_exec
gem_ctx_basic
@@ -21,20 +20,22 @@ gem_ctx_exec
gem_double_irq_loop
gem_dummy_reloc_loop
gem_exec_bad_domains
-gem_exec_blt
gem_exec_big
+gem_exec_blt
gem_exec_faulting_reloc
+gem_exec_lut_handle
gem_exec_nop
-gem_fenced_exec_thrash
gem_fence_thrash
+gem_fenced_exec_thrash
gem_flink
-gem_gtt_speed
gem_gtt_concurrent_blit
gem_gtt_cpu_tlb
+gem_gtt_speed
gem_hang
gem_hangcheck_forcewake
gem_largeobject
gem_linear_blits
+gem_lut_handle
gem_mmap
gem_mmap_gtt
gem_mmap_offset_exhaustion
@@ -45,21 +46,22 @@ gem_pipe_control_store_loop
gem_pread_after_blit
gem_pwrite
gem_readwrite
+gem_reg_read
gem_reloc_overflow
gem_reloc_vs_gpu
-gem_reg_read
gem_render_linear_blits
gem_render_tiled_blits
-gem_ringfill
gem_ring_sync_loop
+gem_ringfill
+gem_seqno_wrap
gem_set_tiling_vs_blt
gem_set_tiling_vs_gtt
gem_set_tiling_vs_pwrite
-gem_seqno_wrap
gem_storedw_batches_loop
gem_storedw_loop_blt
gem_storedw_loop_bsd
gem_storedw_loop_render
+gem_storedw_loop_vebox
gem_stress
gem_threaded_access_tiled
gem_tiled_blits
@@ -68,6 +70,7 @@ gem_tiled_partial_pwrite_pread
gem_tiled_pread
gem_tiled_pread_pwrite
gem_tiled_swapping
+gem_tiling_max_stride
gem_unfence_active_buffers
gem_unref_active_buffers
gem_vmap_blits
@@ -80,12 +83,13 @@ gen3_render_tiledy_blits
getclient
getstats
getversion
+kms_flip
prime_nv_api
prime_nv_pcopy
prime_nv_test
prime_self_import
prime_udl
-testdisplay
sysfs_rc6_residency
sysfs_rps
+testdisplay
# Please keep sorted alphabetically
diff --git a/tools/.gitignore b/tools/.gitignore
index 454d10e..23ac628 100644
--- a/tools/.gitignore
+++ b/tools/.gitignore
@@ -16,7 +16,12 @@ intel_gtt
intel_infoframes
intel_l3_parity
intel_lid
+intel_nc_read
+intel_nc_write
intel_panel_fitter
+intel_perf_counters
+intel_punit_read
+intel_punit_write
intel_reg_checker
intel_reg_dumper
intel_reg_read
--
1.8.1.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 05/10] lib: Add the declaration of intel_register_access_needs_fakewake()
2013-04-29 18:15 Provide a simulation friendly test environment v2 Damien Lespiau
` (3 preceding siblings ...)
2013-04-29 18:15 ` [PATCH 04/10] Update .gitignore files with the new tests and tools Damien Lespiau
@ 2013-04-29 18:15 ` Damien Lespiau
2013-04-29 18:15 ` [PATCH 06/10] reg_dumper: Shut a warning down Damien Lespiau
` (4 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Damien Lespiau @ 2013-04-29 18:15 UTC (permalink / raw)
To: intel-gfx
Otherwise gcc complains that the function hasn't been declared.
---
lib/intel_gpu_tools.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/intel_gpu_tools.h b/lib/intel_gpu_tools.h
index 77aac5d..faa948c 100644
--- a/lib/intel_gpu_tools.h
+++ b/lib/intel_gpu_tools.h
@@ -45,6 +45,8 @@ int intel_register_access_init(struct pci_device *pci_dev, int safe);
void intel_register_access_fini(void);
uint32_t intel_register_read(uint32_t reg);
void intel_register_write(uint32_t reg, uint32_t val);
+int intel_register_access_needs_fakewake(void);
+
/* Following functions are relevant only for SoCs like Valleyview */
uint32_t intel_dpio_reg_read(uint32_t reg);
void intel_dpio_reg_write(uint32_t reg, uint32_t val);
--
1.8.1.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 06/10] reg_dumper: Shut a warning down
2013-04-29 18:15 Provide a simulation friendly test environment v2 Damien Lespiau
` (4 preceding siblings ...)
2013-04-29 18:15 ` [PATCH 05/10] lib: Add the declaration of intel_register_access_needs_fakewake() Damien Lespiau
@ 2013-04-29 18:15 ` Damien Lespiau
2013-05-08 12:41 ` Damien Lespiau
2013-04-29 18:15 ` [PATCH 07/10] lib: Rename IGT_QUICK to INTEL_SIMULATION Damien Lespiau
` (3 subsequent siblings)
9 siblings, 1 reply; 14+ messages in thread
From: Damien Lespiau @ 2013-04-29 18:15 UTC (permalink / raw)
To: intel-gfx
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
tools/intel_reg_dumper.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
index 66d05bd..113fd50 100644
--- a/tools/intel_reg_dumper.c
+++ b/tools/intel_reg_dumper.c
@@ -1721,6 +1721,7 @@ DEBUGSTRING(hsw_debug_pipe_ddi_func_ctl)
mode = "FDI";
break;
case 5:
+ default:
mode = "mode reserved";
break;
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 07/10] lib: Rename IGT_QUICK to INTEL_SIMULATION
2013-04-29 18:15 Provide a simulation friendly test environment v2 Damien Lespiau
` (5 preceding siblings ...)
2013-04-29 18:15 ` [PATCH 06/10] reg_dumper: Shut a warning down Damien Lespiau
@ 2013-04-29 18:15 ` Damien Lespiau
2013-04-29 18:15 ` [PATCH 08/10] lib: Introduce drmtest_skip_on_simulation() Damien Lespiau
` (2 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Damien Lespiau @ 2013-04-29 18:15 UTC (permalink / raw)
To: intel-gfx
It's more accurate this way as the quick mode is really useful for in
the simulation environment.
v2: Use the INTEL_ prefix to have a chance to share the same environment
variable as piglit OpenGL tests
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
lib/drmtest.c | 10 +++++-----
lib/drmtest.h | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 2ddaff0..6e5b636 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -602,14 +602,14 @@ static bool env_set(const char *env_var)
return atoi(val) != 0;
}
-bool drmtest_run_quick(void)
+bool drmtest_run_in_simulation(void)
{
- static int run_quick = -1;
+ static int simulation = -1;
- if (run_quick == -1)
- run_quick = env_set("IGT_QUICK");
+ if (simulation == -1)
+ simulation = env_set("INTEL_SIMULATION");
- return run_quick;
+ return simulation;
}
/* other helpers */
diff --git a/lib/drmtest.h b/lib/drmtest.h
index f15c074..71d68c4 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -89,8 +89,8 @@ void drmtest_subtest_init(int argc, char **argv);
bool drmtest_run_subtest(const char *subtest_name);
bool drmtest_only_list_subtests(void);
-bool drmtest_run_quick(void);
-#define SLOW_QUICK(slow,quick) (drmtest_run_quick() ? (quick) : (slow))
+bool drmtest_run_in_simulation(void);
+#define SLOW_QUICK(slow,quick) (drmtest_run_in_simulation() ? (quick) : (slow))
/* helpers based upon the libdrm buffer manager */
void drmtest_init_aperture_trashers(drm_intel_bufmgr *bufmgr);
--
1.8.1.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 08/10] lib: Introduce drmtest_skip_on_simulation()
2013-04-29 18:15 Provide a simulation friendly test environment v2 Damien Lespiau
` (6 preceding siblings ...)
2013-04-29 18:15 ` [PATCH 07/10] lib: Rename IGT_QUICK to INTEL_SIMULATION Damien Lespiau
@ 2013-04-29 18:15 ` Damien Lespiau
2013-04-29 23:00 ` Jesse Barnes
2013-04-29 18:15 ` [PATCH 09/10] tests: Black list tests we don't want to run on simulation Damien Lespiau
2013-04-29 18:15 ` [PATCH 10/10] tests: Instrument tests run in simulation to run quickly Damien Lespiau
9 siblings, 1 reply; 14+ messages in thread
From: Damien Lespiau @ 2013-04-29 18:15 UTC (permalink / raw)
To: intel-gfx
This will allow us to explicitely blacklist tests we don't want to run
on simulation.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
lib/drmtest.c | 12 ++++++++++++
lib/drmtest.h | 1 +
2 files changed, 13 insertions(+)
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 6e5b636..cafc8bc 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -38,6 +38,7 @@
#include <math.h>
#include <getopt.h>
#include <stdlib.h>
+#include <unistd.h>
#include "drmtest.h"
#include "i915_drm.h"
@@ -612,6 +613,17 @@ bool drmtest_run_in_simulation(void)
return simulation;
}
+/* Skip the test when running on simulation (and that's relevant only when
+ * we're not in the mode where we list the subtests) */
+void drmtest_skip_on_simulation(void)
+{
+ if (drmtest_only_list_subtests())
+ return;
+
+ if (drmtest_run_in_simulation())
+ exit(77);
+}
+
/* other helpers */
void drmtest_exchange_int(void *array, unsigned i, unsigned j)
{
diff --git a/lib/drmtest.h b/lib/drmtest.h
index 71d68c4..96dddda 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -91,6 +91,7 @@ bool drmtest_only_list_subtests(void);
bool drmtest_run_in_simulation(void);
#define SLOW_QUICK(slow,quick) (drmtest_run_in_simulation() ? (quick) : (slow))
+void drmtest_skip_on_simulation(void);
/* helpers based upon the libdrm buffer manager */
void drmtest_init_aperture_trashers(drm_intel_bufmgr *bufmgr);
--
1.8.1.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 09/10] tests: Black list tests we don't want to run on simulation
2013-04-29 18:15 Provide a simulation friendly test environment v2 Damien Lespiau
` (7 preceding siblings ...)
2013-04-29 18:15 ` [PATCH 08/10] lib: Introduce drmtest_skip_on_simulation() Damien Lespiau
@ 2013-04-29 18:15 ` Damien Lespiau
2013-04-29 21:04 ` Daniel Vetter
2013-04-29 18:15 ` [PATCH 10/10] tests: Instrument tests run in simulation to run quickly Damien Lespiau
9 siblings, 1 reply; 14+ messages in thread
From: Damien Lespiau @ 2013-04-29 18:15 UTC (permalink / raw)
To: intel-gfx
Let's start by a small set of tests, to eventually consider running
more.
The current list should then be:
gem_mmap
gem_pread_after_blit
gem_ring_sync_loop
gem_ctx_basic
gem_pipe_control_store_loop
gem_storedw_loop_render
gem_storedw_loop_blt
gem_storedw_loop_bsd
gem_render_linear_blits
gem_tiled_blits
gem_cpu_reloc
gem_exec_nop
gem_mmap_gtt
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
tests/drm_lib.sh | 5 +++++
tests/drm_vma_limiter.c | 2 ++
tests/drm_vma_limiter_cached.c | 2 ++
tests/drm_vma_limiter_cpu.c | 2 ++
tests/drm_vma_limiter_gtt.c | 2 ++
tests/gem_bad_length.c | 2 ++
tests/gem_cacheing.c | 1 +
tests/gem_cpu_concurrent_blit.c | 1 +
tests/gem_cs_prefetch.c | 2 ++
tests/gem_cs_tlb.c | 1 +
tests/gem_ctx_bad_destroy.c | 2 ++
tests/gem_ctx_bad_exec.c | 3 +++
tests/gem_ctx_create.c | 2 ++
tests/gem_ctx_exec.c | 3 +++
tests/gem_double_irq_loop.c | 2 ++
tests/gem_dummy_reloc_loop.c | 1 +
tests/gem_exec_bad_domains.c | 1 +
tests/gem_exec_big.c | 2 ++
tests/gem_exec_blt.c | 2 ++
tests/gem_exec_faulting_reloc.c | 2 ++
tests/gem_exec_lut_handle.c | 2 ++
tests/gem_fence_thrash.c | 1 +
tests/gem_fenced_exec_thrash.c | 12 +++++++++---
tests/gem_flink.c | 1 +
tests/gem_gtt_concurrent_blit.c | 1 +
tests/gem_gtt_cpu_tlb.c | 2 ++
tests/gem_gtt_speed.c | 2 ++
tests/gem_hangcheck_forcewake.c | 2 ++
tests/gem_largeobject.c | 2 ++
tests/gem_linear_blits.c | 2 ++
tests/gem_lut_handle.c | 2 ++
tests/gem_mmap_offset_exhaustion.c | 2 ++
tests/gem_partial_pwrite_pread.c | 1 +
tests/gem_pin.c | 2 ++
tests/gem_pwrite.c | 2 ++
tests/gem_readwrite.c | 2 ++
tests/gem_reg_read.c | 2 ++
tests/gem_reloc_overflow.c | 2 ++
tests/gem_reloc_vs_gpu.c | 2 ++
tests/gem_render_tiled_blits.c | 2 ++
tests/gem_ringfill.c | 1 +
tests/gem_seqno_wrap.c | 2 ++
tests/gem_set_tiling_vs_blt.c | 1 +
tests/gem_set_tiling_vs_gtt.c | 2 ++
tests/gem_set_tiling_vs_pwrite.c | 2 ++
tests/gem_storedw_batches_loop.c | 2 ++
tests/gem_threaded_access_tiled.c | 2 ++
tests/gem_tiled_fence_blits.c | 2 ++
tests/gem_tiled_partial_pwrite_pread.c | 1 +
tests/gem_tiled_pread.c | 2 ++
tests/gem_tiled_pread_pwrite.c | 1 +
tests/gem_tiled_swapping.c | 2 ++
tests/gem_tiling_max_stride.c | 2 ++
tests/gem_unfence_active_buffers.c | 2 ++
tests/gem_unref_active_buffers.c | 2 ++
tests/gem_vmap_blits.c | 2 ++
tests/gem_wait_render_timeout.c | 2 ++
tests/kms_flip.c | 1 +
tests/prime_nv_api.c | 3 +++
tests/prime_nv_pcopy.c | 1 +
tests/prime_nv_test.c | 1 +
tests/prime_self_import.c | 1 +
tests/prime_udl.c | 3 +++
tests/sysfs_edid_timing | 2 ++
tests/sysfs_rc6_residency.c | 2 ++
tests/sysfs_rps.c | 2 ++
tests/testdisplay.c | 2 ++
67 files changed, 131 insertions(+), 3 deletions(-)
diff --git a/tests/drm_lib.sh b/tests/drm_lib.sh
index a76fd47..ee31f00 100755
--- a/tests/drm_lib.sh
+++ b/tests/drm_lib.sh
@@ -29,4 +29,9 @@ if [ `cat $i915_path/clients | wc -l` -gt "2" ] ; then
die "ERROR: other drm clients running"
fi
+function drmtest_skip_on_simulation()
+{
+ [ -n "$INTEL_SIMULATION" ] && exit 77
+}
+drmtest_skip_on_simulation
diff --git a/tests/drm_vma_limiter.c b/tests/drm_vma_limiter.c
index 1971e2d..e5025ef 100644
--- a/tests/drm_vma_limiter.c
+++ b/tests/drm_vma_limiter.c
@@ -60,6 +60,8 @@ int main(int argc, char **argv)
int i;
char *ptr;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
diff --git a/tests/drm_vma_limiter_cached.c b/tests/drm_vma_limiter_cached.c
index 3797618..1144796 100644
--- a/tests/drm_vma_limiter_cached.c
+++ b/tests/drm_vma_limiter_cached.c
@@ -61,6 +61,8 @@ int main(int argc, char **argv)
char *ptr;
drm_intel_bo *load_bo;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
diff --git a/tests/drm_vma_limiter_cpu.c b/tests/drm_vma_limiter_cpu.c
index 24ce188..6f65cdb 100644
--- a/tests/drm_vma_limiter_cpu.c
+++ b/tests/drm_vma_limiter_cpu.c
@@ -61,6 +61,8 @@ int main(int argc, char **argv)
int i;
char *ptr;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
diff --git a/tests/drm_vma_limiter_gtt.c b/tests/drm_vma_limiter_gtt.c
index 540ea91..7e43fca 100644
--- a/tests/drm_vma_limiter_gtt.c
+++ b/tests/drm_vma_limiter_gtt.c
@@ -62,6 +62,8 @@ int main(int argc, char **argv)
int i;
char *ptr;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
diff --git a/tests/gem_bad_length.c b/tests/gem_bad_length.c
index 0f2268f..bb8b6b8 100644
--- a/tests/gem_bad_length.c
+++ b/tests/gem_bad_length.c
@@ -124,6 +124,8 @@ int main(int argc, char **argv)
{
int fd;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
create0(fd);
diff --git a/tests/gem_cacheing.c b/tests/gem_cacheing.c
index 93983a2..8a169f1 100644
--- a/tests/gem_cacheing.c
+++ b/tests/gem_cacheing.c
@@ -113,6 +113,7 @@ int main(int argc, char **argv)
bool skipped_all = true;
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
srandom(0xdeadbeef);
diff --git a/tests/gem_cpu_concurrent_blit.c b/tests/gem_cpu_concurrent_blit.c
index 21cbdb0..f850492 100644
--- a/tests/gem_cpu_concurrent_blit.c
+++ b/tests/gem_cpu_concurrent_blit.c
@@ -99,6 +99,7 @@ main(int argc, char **argv)
int i;
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
fd = drm_open_any();
diff --git a/tests/gem_cs_prefetch.c b/tests/gem_cs_prefetch.c
index 9ef35eb..3b05863 100644
--- a/tests/gem_cs_prefetch.c
+++ b/tests/gem_cs_prefetch.c
@@ -96,6 +96,8 @@ int main(int argc, char **argv)
int count;
drm_intel_bo *sample_batch_bo;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
diff --git a/tests/gem_cs_tlb.c b/tests/gem_cs_tlb.c
index 9f8f762..05e78c2 100644
--- a/tests/gem_cs_tlb.c
+++ b/tests/gem_cs_tlb.c
@@ -152,6 +152,7 @@ int main(int argc, char **argv)
uint32_t devid;
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
fd = drm_open_any();
devid = intel_get_drm_devid(fd);
diff --git a/tests/gem_ctx_bad_destroy.c b/tests/gem_ctx_bad_destroy.c
index 02d24eb..855cd04 100644
--- a/tests/gem_ctx_bad_destroy.c
+++ b/tests/gem_ctx_bad_destroy.c
@@ -80,6 +80,8 @@ int main(int argc, char *argv[])
uint32_t ctx_id;
int ret, fd;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
ctx_id = context_create(fd);
diff --git a/tests/gem_ctx_bad_exec.c b/tests/gem_ctx_bad_exec.c
index 8a57fd4..f6463ac 100644
--- a/tests/gem_ctx_bad_exec.c
+++ b/tests/gem_ctx_bad_exec.c
@@ -111,6 +111,9 @@ int main(int argc, char *argv[])
uint32_t batch[2] = {MI_BATCH_BUFFER_END};
uint32_t ctx_id;
int fd;
+
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
ctx_id = context_create(fd);
diff --git a/tests/gem_ctx_create.c b/tests/gem_ctx_create.c
index 84ef214..9601976 100644
--- a/tests/gem_ctx_create.c
+++ b/tests/gem_ctx_create.c
@@ -42,6 +42,8 @@ int main(int argc, char *argv[])
int ret, fd;
struct local_drm_i915_gem_context_create create;
+ drmtest_skip_on_simulation();
+
create.ctx_id = rand();
create.pad = rand();
diff --git a/tests/gem_ctx_exec.c b/tests/gem_ctx_exec.c
index b0362cc..8468110 100644
--- a/tests/gem_ctx_exec.c
+++ b/tests/gem_ctx_exec.c
@@ -122,6 +122,9 @@ int main(int argc, char *argv[])
uint32_t batch[2] = {0, MI_BATCH_BUFFER_END};
uint32_t ctx_id;
int fd;
+
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
ctx_id = context_create(fd);
diff --git a/tests/gem_double_irq_loop.c b/tests/gem_double_irq_loop.c
index f2f8b1a..5e25954 100644
--- a/tests/gem_double_irq_loop.c
+++ b/tests/gem_double_irq_loop.c
@@ -98,6 +98,8 @@ int main(int argc, char **argv)
int fd;
int devid;
+ drmtest_skip_on_simulation();
+
if (argc != 1) {
fprintf(stderr, "usage: %s\n", argv[0]);
exit(-1);
diff --git a/tests/gem_dummy_reloc_loop.c b/tests/gem_dummy_reloc_loop.c
index b67c7d3..abf8e88 100644
--- a/tests/gem_dummy_reloc_loop.c
+++ b/tests/gem_dummy_reloc_loop.c
@@ -128,6 +128,7 @@ int main(int argc, char **argv)
int devid;
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
fd = drm_open_any();
devid = intel_get_drm_devid(fd);
diff --git a/tests/gem_exec_bad_domains.c b/tests/gem_exec_bad_domains.c
index d174349..b2b0d43 100644
--- a/tests/gem_exec_bad_domains.c
+++ b/tests/gem_exec_bad_domains.c
@@ -157,6 +157,7 @@ int main(int argc, char **argv)
drm_intel_bo *tmp;
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
fd = drm_open_any();
diff --git a/tests/gem_exec_big.c b/tests/gem_exec_big.c
index 3005762..9dddfac 100644
--- a/tests/gem_exec_big.c
+++ b/tests/gem_exec_big.c
@@ -108,6 +108,8 @@ int main(int argc, char **argv)
uint32_t reloc_ofs;
unsigned batch_size;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
for (batch_size = BATCH_SIZE/4; batch_size <= BATCH_SIZE; batch_size += 4096) {
diff --git a/tests/gem_exec_blt.c b/tests/gem_exec_blt.c
index eb5ae66..e28c2e6 100644
--- a/tests/gem_exec_blt.c
+++ b/tests/gem_exec_blt.c
@@ -250,6 +250,8 @@ int main(int argc, char **argv)
{
int i;
+ drmtest_skip_on_simulation();
+
if (argc > 1) {
for (i = 1; i < argc; i++) {
int object_size = atoi(argv[i]);
diff --git a/tests/gem_exec_faulting_reloc.c b/tests/gem_exec_faulting_reloc.c
index 863a1b0..c880077 100644
--- a/tests/gem_exec_faulting_reloc.c
+++ b/tests/gem_exec_faulting_reloc.c
@@ -220,6 +220,8 @@ static void run(int object_size)
int main(int argc, char **argv)
{
+ drmtest_skip_on_simulation();
+
run(OBJECT_SIZE);
return 0;
diff --git a/tests/gem_exec_lut_handle.c b/tests/gem_exec_lut_handle.c
index 4f544ad..54ed3dd 100644
--- a/tests/gem_exec_lut_handle.c
+++ b/tests/gem_exec_lut_handle.c
@@ -127,6 +127,8 @@ int main(int argc, char **argv)
{ .name = NULL },
}, *p;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
for (n = 0; n < MAX_NUM_EXEC; n++) {
diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c
index e1cfc4e..a28c127 100644
--- a/tests/gem_fence_thrash.c
+++ b/tests/gem_fence_thrash.c
@@ -208,6 +208,7 @@ int
main(int argc, char **argv)
{
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
if (drmtest_run_subtest("bo-write-verify-none"))
assert (run_test(0, bo_write_verify, I915_TILING_NONE, 80) == 0);
diff --git a/tests/gem_fenced_exec_thrash.c b/tests/gem_fenced_exec_thrash.c
index c8a2c58..ebc2121 100644
--- a/tests/gem_fenced_exec_thrash.c
+++ b/tests/gem_fenced_exec_thrash.c
@@ -159,9 +159,15 @@ static void run_test(int fd, int num_fences, int expected_errno)
int
main(int argc, char **argv)
{
- int fd = drm_open_any();
- int num_fences = get_num_fences(fd);
- uint32_t devid = intel_get_drm_devid(fd);
+ int fd;
+ int num_fences;
+ uint32_t devid;
+
+ drmtest_skip_on_simulation();
+
+ fd = drm_open_any();
+ num_fences = get_num_fences(fd);
+ devid = intel_get_drm_devid(fd);
assert(num_fences <= MAX_FENCES);
diff --git a/tests/gem_flink.c b/tests/gem_flink.c
index bfa85c9..e3f9cc7 100644
--- a/tests/gem_flink.c
+++ b/tests/gem_flink.c
@@ -155,6 +155,7 @@ int main(int argc, char **argv)
int fd;
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
fd = drm_open_any();
diff --git a/tests/gem_gtt_concurrent_blit.c b/tests/gem_gtt_concurrent_blit.c
index 8bd80f1..7b99558 100644
--- a/tests/gem_gtt_concurrent_blit.c
+++ b/tests/gem_gtt_concurrent_blit.c
@@ -102,6 +102,7 @@ main(int argc, char **argv)
int i;
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
fd = drm_open_any();
diff --git a/tests/gem_gtt_cpu_tlb.c b/tests/gem_gtt_cpu_tlb.c
index 6853370..d324aee 100644
--- a/tests/gem_gtt_cpu_tlb.c
+++ b/tests/gem_gtt_cpu_tlb.c
@@ -77,6 +77,8 @@ main(int argc, char **argv)
uint32_t *ptr;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
handle = gem_create(fd, OBJ_SIZE);
diff --git a/tests/gem_gtt_speed.c b/tests/gem_gtt_speed.c
index f0fb901..8b318d3 100644
--- a/tests/gem_gtt_speed.c
+++ b/tests/gem_gtt_speed.c
@@ -61,6 +61,8 @@ int main(int argc, char **argv)
int loop, i, tiling;
int fd;
+ drmtest_skip_on_simulation();
+
if (argc > 1)
size = atoi(argv[1]);
if (size == 0) {
diff --git a/tests/gem_hangcheck_forcewake.c b/tests/gem_hangcheck_forcewake.c
index 96a30fe..4e6358b 100644
--- a/tests/gem_hangcheck_forcewake.c
+++ b/tests/gem_hangcheck_forcewake.c
@@ -65,6 +65,8 @@ int main(int argc, char **argv)
unsigned long pitch, act_size;
int fd, i, devid;
+ drmtest_skip_on_simulation();
+
memset(blob, 'A', sizeof(blob));
fd = drm_open_any();
diff --git a/tests/gem_largeobject.c b/tests/gem_largeobject.c
index 163bf10..a14cc04 100644
--- a/tests/gem_largeobject.c
+++ b/tests/gem_largeobject.c
@@ -87,6 +87,8 @@ int main(int argc, char **argv)
{
int fd;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
test_large_object(fd);
diff --git a/tests/gem_linear_blits.c b/tests/gem_linear_blits.c
index ec2dc56..f7e0fef 100644
--- a/tests/gem_linear_blits.c
+++ b/tests/gem_linear_blits.c
@@ -182,6 +182,8 @@ int main(int argc, char **argv)
uint32_t start = 0;
int i, fd, count;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
count = 0;
diff --git a/tests/gem_lut_handle.c b/tests/gem_lut_handle.c
index a051003..616aa4a 100644
--- a/tests/gem_lut_handle.c
+++ b/tests/gem_lut_handle.c
@@ -179,6 +179,8 @@ int main(int argc, char **argv)
uint32_t handle;
int fd, i;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
handle = gem_create(fd, 4096);
diff --git a/tests/gem_mmap_offset_exhaustion.c b/tests/gem_mmap_offset_exhaustion.c
index 51ae599..3c026bb 100644
--- a/tests/gem_mmap_offset_exhaustion.c
+++ b/tests/gem_mmap_offset_exhaustion.c
@@ -83,6 +83,8 @@ int main(int argc, char **argv)
{
int fd, i;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
/* we have 32bit of address space, so try to fit one MB more
diff --git a/tests/gem_partial_pwrite_pread.c b/tests/gem_partial_pwrite_pread.c
index f6fbdbf..2ca0ece 100644
--- a/tests/gem_partial_pwrite_pread.c
+++ b/tests/gem_partial_pwrite_pread.c
@@ -258,6 +258,7 @@ int main(int argc, char **argv)
srandom(0xdeadbeef);
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
fd = drm_open_any();
diff --git a/tests/gem_pin.c b/tests/gem_pin.c
index edf5e60..cbb1fe7 100644
--- a/tests/gem_pin.c
+++ b/tests/gem_pin.c
@@ -203,6 +203,8 @@ int main(int argc, char **argv)
uint32_t *handle, *offset;
int fd, i;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
if (!test_can_pin(fd))
diff --git a/tests/gem_pwrite.c b/tests/gem_pwrite.c
index 051ed3b..45a7e63 100644
--- a/tests/gem_pwrite.c
+++ b/tests/gem_pwrite.c
@@ -91,6 +91,8 @@ int main(int argc, char **argv)
uint32_t *src, dst;
int fd, count;
+ drmtest_skip_on_simulation();
+
if (argc > 1)
object_size = atoi(argv[1]);
if (object_size == 0)
diff --git a/tests/gem_readwrite.c b/tests/gem_readwrite.c
index d3d69e3..a4a4d9c 100644
--- a/tests/gem_readwrite.c
+++ b/tests/gem_readwrite.c
@@ -82,6 +82,8 @@ int main(int argc, char **argv)
int ret;
int handle;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
handle = gem_create(fd, OBJECT_SIZE);
diff --git a/tests/gem_reg_read.c b/tests/gem_reg_read.c
index 692dd98..8f244cc 100644
--- a/tests/gem_reg_read.c
+++ b/tests/gem_reg_read.c
@@ -71,6 +71,8 @@ int main(int argc, char *argv[])
int ret, fd;
uint64_t val;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
reg_read.offset = 0x2358;
diff --git a/tests/gem_reloc_overflow.c b/tests/gem_reloc_overflow.c
index 140b684..26357ab 100644
--- a/tests/gem_reloc_overflow.c
+++ b/tests/gem_reloc_overflow.c
@@ -62,6 +62,8 @@ int main(int argc, char *argv[])
struct drm_i915_gem_exec_object2 *execobjs;
struct drm_i915_gem_execbuffer2 execbuf = { 0 };
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
/* Create giant reloc buffer area. */
diff --git a/tests/gem_reloc_vs_gpu.c b/tests/gem_reloc_vs_gpu.c
index 47681d5..0c943aa 100644
--- a/tests/gem_reloc_vs_gpu.c
+++ b/tests/gem_reloc_vs_gpu.c
@@ -148,6 +148,8 @@ int main(int argc, char **argv)
int fd, i, ring;
uint32_t test;
+ drmtest_skip_on_simulation();
+
memset(blob, 'A', sizeof(blob));
fd = drm_open_any();
diff --git a/tests/gem_render_tiled_blits.c b/tests/gem_render_tiled_blits.c
index 626e652..ed21c24 100644
--- a/tests/gem_render_tiled_blits.c
+++ b/tests/gem_render_tiled_blits.c
@@ -71,6 +71,8 @@ int main(int argc, char **argv)
uint32_t start = 0;
int i, j, fd, count;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
render_copy = get_render_copyfunc(intel_get_drm_devid(fd));
diff --git a/tests/gem_ringfill.c b/tests/gem_ringfill.c
index 948630b..db842fe 100644
--- a/tests/gem_ringfill.c
+++ b/tests/gem_ringfill.c
@@ -206,6 +206,7 @@ int main(int argc, char **argv)
int fd, fails = 0;
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
fd = drm_open_any();
diff --git a/tests/gem_seqno_wrap.c b/tests/gem_seqno_wrap.c
index 776dedc..f354a52 100644
--- a/tests/gem_seqno_wrap.c
+++ b/tests/gem_seqno_wrap.c
@@ -647,6 +647,8 @@ int main(int argc, char **argv)
int wcount = 0;
int r = -1;
+ drmtest_skip_on_simulation();
+
parse_options(argc, argv);
card_index = drm_get_card(0);
diff --git a/tests/gem_set_tiling_vs_blt.c b/tests/gem_set_tiling_vs_blt.c
index 69dc7e6..398a227 100644
--- a/tests/gem_set_tiling_vs_blt.c
+++ b/tests/gem_set_tiling_vs_blt.c
@@ -234,6 +234,7 @@ int main(int argc, char **argv)
uint32_t tiling, tiling_after;
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
for (i = 0; i < 1024*256; i++)
data[i] = i;
diff --git a/tests/gem_set_tiling_vs_gtt.c b/tests/gem_set_tiling_vs_gtt.c
index 1241b54..4065ff4 100644
--- a/tests/gem_set_tiling_vs_gtt.c
+++ b/tests/gem_set_tiling_vs_gtt.c
@@ -58,6 +58,8 @@ int main(int argc, char **argv)
bool tiling_changed;
int tile_height;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
if (IS_GEN2(intel_get_drm_devid(fd)))
diff --git a/tests/gem_set_tiling_vs_pwrite.c b/tests/gem_set_tiling_vs_pwrite.c
index 35ec5cd..77f4462 100644
--- a/tests/gem_set_tiling_vs_pwrite.c
+++ b/tests/gem_set_tiling_vs_pwrite.c
@@ -56,6 +56,8 @@ int main(int argc, char **argv)
int i;
uint32_t handle;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
for (i = 0; i < OBJECT_SIZE/4; i++)
diff --git a/tests/gem_storedw_batches_loop.c b/tests/gem_storedw_batches_loop.c
index 86c3469..79eebb2 100644
--- a/tests/gem_storedw_batches_loop.c
+++ b/tests/gem_storedw_batches_loop.c
@@ -137,6 +137,8 @@ int main(int argc, char **argv)
int fd;
int devid;
+ drmtest_skip_on_simulation();
+
if (argc != 1) {
fprintf(stderr, "usage: %s\n", argv[0]);
exit(-1);
diff --git a/tests/gem_threaded_access_tiled.c b/tests/gem_threaded_access_tiled.c
index 362cf3a..48a6f62 100644
--- a/tests/gem_threaded_access_tiled.c
+++ b/tests/gem_threaded_access_tiled.c
@@ -95,6 +95,8 @@ int main(int argc, char **argv)
unsigned long pitch = 0;
int r;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
assert(fd >= 0);
diff --git a/tests/gem_tiled_fence_blits.c b/tests/gem_tiled_fence_blits.c
index dc65479..2b02943 100644
--- a/tests/gem_tiled_fence_blits.c
+++ b/tests/gem_tiled_fence_blits.c
@@ -108,6 +108,8 @@ int main(int argc, char **argv)
uint32_t start = 0;
int fd, i, count;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
count = 3 * gem_aperture_size(fd) / (1024*1024) / 2;
if (count > intel_get_total_ram_mb() * 9 / 10) {
diff --git a/tests/gem_tiled_partial_pwrite_pread.c b/tests/gem_tiled_partial_pwrite_pread.c
index f6df562..48fd506 100644
--- a/tests/gem_tiled_partial_pwrite_pread.c
+++ b/tests/gem_tiled_partial_pwrite_pread.c
@@ -277,6 +277,7 @@ int main(int argc, char **argv)
uint32_t tiling_mode = I915_TILING_X;
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
srandom(0xdeadbeef);
diff --git a/tests/gem_tiled_pread.c b/tests/gem_tiled_pread.c
index 189affc..779f66f 100644
--- a/tests/gem_tiled_pread.c
+++ b/tests/gem_tiled_pread.c
@@ -134,6 +134,8 @@ main(int argc, char **argv)
uint32_t handle;
uint32_t devid;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
handle = create_bo(fd);
diff --git a/tests/gem_tiled_pread_pwrite.c b/tests/gem_tiled_pread_pwrite.c
index ed6b711..0eb7098 100644
--- a/tests/gem_tiled_pread_pwrite.c
+++ b/tests/gem_tiled_pread_pwrite.c
@@ -123,6 +123,7 @@ main(int argc, char **argv)
uint32_t handle, handle_target;
int count;
+ drmtest_skip_on_simulation();
fd = drm_open_any();
count = intel_get_total_ram_mb() * 9 / 10;
diff --git a/tests/gem_tiled_swapping.c b/tests/gem_tiled_swapping.c
index 14f5f40..702cb74 100644
--- a/tests/gem_tiled_swapping.c
+++ b/tests/gem_tiled_swapping.c
@@ -101,6 +101,8 @@ main(int argc, char **argv)
int count;
current_tiling_mode = I915_TILING_X;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
/* need slightly more than total ram */
count = intel_get_total_ram_mb() * 11 / 10;
diff --git a/tests/gem_tiling_max_stride.c b/tests/gem_tiling_max_stride.c
index 21daab0..0429d39 100644
--- a/tests/gem_tiling_max_stride.c
+++ b/tests/gem_tiling_max_stride.c
@@ -81,6 +81,8 @@ int main(int argc, char *argv[])
int tile_width = 512;
int tile_height = 8;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
devid = intel_get_drm_devid(fd);
diff --git a/tests/gem_unfence_active_buffers.c b/tests/gem_unfence_active_buffers.c
index bffc62e..3f6a053 100644
--- a/tests/gem_unfence_active_buffers.c
+++ b/tests/gem_unfence_active_buffers.c
@@ -70,6 +70,8 @@ int main(int argc, char **argv)
drm_intel_bo *busy_bo, *test_bo;
uint32_t tiling = I915_TILING_X;
+ drmtest_skip_on_simulation();
+
for (i = 0; i < 1024*256; i++)
data[i] = i;
diff --git a/tests/gem_unref_active_buffers.c b/tests/gem_unref_active_buffers.c
index aa29c1d..8a13a20 100644
--- a/tests/gem_unref_active_buffers.c
+++ b/tests/gem_unref_active_buffers.c
@@ -56,6 +56,8 @@ int main(int argc, char **argv)
{
int fd, i;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
diff --git a/tests/gem_vmap_blits.c b/tests/gem_vmap_blits.c
index b886821..5e1c170 100644
--- a/tests/gem_vmap_blits.c
+++ b/tests/gem_vmap_blits.c
@@ -262,6 +262,8 @@ int main(int argc, char **argv)
uint32_t start = 0;
int i, fd, count;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
if (!has_vmap(fd)) {
diff --git a/tests/gem_wait_render_timeout.c b/tests/gem_wait_render_timeout.c
index 14482e3..ed30e5c 100644
--- a/tests/gem_wait_render_timeout.c
+++ b/tests/gem_wait_render_timeout.c
@@ -122,6 +122,8 @@ int main(int argc, char **argv)
bool done = false;
int i, iter = 1;
+ drmtest_skip_on_simulation();
+
fd = drm_open_any();
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 39f0043..db4a65a 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1202,6 +1202,7 @@ int main(int argc, char **argv)
int i;
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
drm_fd = drm_open_any();
diff --git a/tests/prime_nv_api.c b/tests/prime_nv_api.c
index e1b7117..f6e1697 100644
--- a/tests/prime_nv_api.c
+++ b/tests/prime_nv_api.c
@@ -18,6 +18,7 @@
#include "nouveau.h"
#include "intel_gpu_tools.h"
#include "intel_batchbuffer.h"
+#include "drmtest.h"
#define BO_SIZE (256*1024)
@@ -316,6 +317,8 @@ int main(int argc, char **argv)
{
int ret;
+ drmtest_skip_on_simulation();
+
ret = find_and_open_devices();
if (ret < 0)
return ret;
diff --git a/tests/prime_nv_pcopy.c b/tests/prime_nv_pcopy.c
index 88b14e5..1995de0 100644
--- a/tests/prime_nv_pcopy.c
+++ b/tests/prime_nv_pcopy.c
@@ -1268,6 +1268,7 @@ int main(int argc, char **argv)
int ret, failed = 0, run = 0;
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
ret = find_and_open_devices();
if (ret < 0)
diff --git a/tests/prime_nv_test.c b/tests/prime_nv_test.c
index 9edd9e0..f864441 100644
--- a/tests/prime_nv_test.c
+++ b/tests/prime_nv_test.c
@@ -511,6 +511,7 @@ int main(int argc, char **argv)
return ret;
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
if (nouveau_fd == -1 || intel_fd == -1) {
fprintf(stderr,"failed to find intel and nouveau GPU\n");
diff --git a/tests/prime_self_import.c b/tests/prime_self_import.c
index abdc220..79afe70 100644
--- a/tests/prime_self_import.c
+++ b/tests/prime_self_import.c
@@ -197,6 +197,7 @@ int main(int argc, char **argv)
int i;
drmtest_subtest_init(argc, argv);
+ drmtest_skip_on_simulation();
for (i = 0; i < ARRAY_SIZE(tests); i++) {
if (drmtest_run_subtest(tests[i].name))
diff --git a/tests/prime_udl.c b/tests/prime_udl.c
index 4e0d9be..97f7898 100644
--- a/tests/prime_udl.c
+++ b/tests/prime_udl.c
@@ -29,6 +29,7 @@
#include "intel_bufmgr.h"
#include "intel_gpu_tools.h"
#include "intel_batchbuffer.h"
+#include "drmtest.h"
int intel_fd = -1, udl_fd = -1;
drm_intel_bufmgr *bufmgr;
@@ -150,6 +151,8 @@ int main(int argc, char **argv)
{
int ret;
+ drmtest_skip_on_simulation();
+
ret = find_and_open_devices();
if (ret < 0)
return ret;
diff --git a/tests/sysfs_edid_timing b/tests/sysfs_edid_timing
index 3a8c6c0..2a43cca 100755
--- a/tests/sysfs_edid_timing
+++ b/tests/sysfs_edid_timing
@@ -5,6 +5,8 @@
# we sometimes take a *really* long time. So let's just check for some reasonable timing here
#
+[ -n "$INTEL_SIMULATION" ] && exit 77
+
TIME1=$(date +%s%N)
cat $(find /sys/devices/|grep drm | grep /status) > /dev/null
TIME2=$(date +%s%N)
diff --git a/tests/sysfs_rc6_residency.c b/tests/sysfs_rc6_residency.c
index cd62e77..f4d8477 100644
--- a/tests/sysfs_rc6_residency.c
+++ b/tests/sysfs_rc6_residency.c
@@ -63,6 +63,8 @@ int main(int argc, char *argv[])
FILE *file;
int diff;
+ drmtest_skip_on_simulation();
+
/* Use drm_open_any to verify device existence */
fd = drm_open_any();
close(fd);
diff --git a/tests/sysfs_rps.c b/tests/sysfs_rps.c
index 8ba541c..480592a 100644
--- a/tests/sysfs_rps.c
+++ b/tests/sysfs_rps.c
@@ -133,6 +133,8 @@ int main(int argc, char *argv[])
struct junk *junk = stuff;
int fd, ret;
+ drmtest_skip_on_simulation();
+
if (argc > 1)
verbose++;
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index 251141f..c653792 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -675,6 +675,8 @@ int main(int argc, char **argv)
GMainLoop *mainloop;
float force_clock;
+ drmtest_skip_on_simulation();
+
enter_exec_path( argv );
opterr = 0;
--
1.8.1.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 10/10] tests: Instrument tests run in simulation to run quickly
2013-04-29 18:15 Provide a simulation friendly test environment v2 Damien Lespiau
` (8 preceding siblings ...)
2013-04-29 18:15 ` [PATCH 09/10] tests: Black list tests we don't want to run on simulation Damien Lespiau
@ 2013-04-29 18:15 ` Damien Lespiau
9 siblings, 0 replies; 14+ messages in thread
From: Damien Lespiau @ 2013-04-29 18:15 UTC (permalink / raw)
To: intel-gfx
We tweak the tests marked as runnable in simulation to run more quickly,
more often then not at the expense of stress testing (which is of an
arguable interest for the initial bring up in simulation). Hopefully the
values chosen still test something, which is not always straightforward.
It does run quickly, the number on an IVB machines are:
$ time sudo IGT_SIMULATION=0 ./piglit-run.py tests/igt.tests foo
[...]
real 2m0.141s
user 0m16.365s
sys 1m33.382s
Vs.
$ time sudo IGT_SIMULATION=1 ./piglit-run.py tests/igt.tests foo
[...]
real 0m0.448s
user 0m0.226s
sys 0m0.183s
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
tests/gem_cpu_reloc.c | 3 +++
tests/gem_ctx_basic.c | 5 +++++
tests/gem_exec_nop.c | 2 +-
tests/gem_mmap_gtt.c | 5 ++++-
tests/gem_pipe_control_store_loop.c | 2 +-
tests/gem_render_linear_blits.c | 6 ++++++
tests/gem_ring_sync_loop.c | 2 +-
tests/gem_storedw_batches_loop.c | 8 +++++---
tests/gem_storedw_loop_blt.c | 8 +++++---
tests/gem_storedw_loop_bsd.c | 8 +++++---
tests/gem_storedw_loop_render.c | 8 +++++---
tests/gem_tiled_blits.c | 6 ++++++
12 files changed, 47 insertions(+), 16 deletions(-)
diff --git a/tests/gem_cpu_reloc.c b/tests/gem_cpu_reloc.c
index baf8301..ad70e40 100644
--- a/tests/gem_cpu_reloc.c
+++ b/tests/gem_cpu_reloc.c
@@ -153,6 +153,9 @@ int main(int argc, char **argv)
}
count = aper_size / 4096 * 2;
+ if (drmtest_run_in_simulation())
+ count = 10;
+
handles = malloc (count * sizeof(uint32_t));
assert(handles);
diff --git a/tests/gem_ctx_basic.c b/tests/gem_ctx_basic.c
index 3757d84..729c79c 100644
--- a/tests/gem_ctx_basic.c
+++ b/tests/gem_ctx_basic.c
@@ -143,6 +143,11 @@ int main(int argc, char *argv[])
fd = drm_open_any();
devid = intel_get_drm_devid(fd);
+ if (drmtest_run_in_simulation()) {
+ num_contexts = 2;
+ iter = 4;
+ }
+
parse(argc, argv);
threads = calloc(num_contexts, sizeof(*threads));
diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c
index 5888432..35cb23d 100644
--- a/tests/gem_exec_nop.c
+++ b/tests/gem_exec_nop.c
@@ -96,7 +96,7 @@ static void loop(int fd, uint32_t handle, unsigned ring_id, const char *ring_nam
skipped_all = false;
- for (count = 1; count <= 1<<17; count <<= 1) {
+ for (count = 1; count <= SLOW_QUICK(1<<17, 1<<4); count <<= 1) {
struct timeval start, end;
gettimeofday(&start, NULL);
diff --git a/tests/gem_mmap_gtt.c b/tests/gem_mmap_gtt.c
index d759340..e53a942 100644
--- a/tests/gem_mmap_gtt.c
+++ b/tests/gem_mmap_gtt.c
@@ -40,7 +40,7 @@
#include "i915_drm.h"
#include "drmtest.h"
-#define OBJECT_SIZE (16*1024*1024)
+static int OBJECT_SIZE = 16*1024*1024;
static void set_domain(int fd, uint32_t handle)
{
@@ -148,6 +148,9 @@ int main(int argc, char **argv)
{
int fd;
+ if (drmtest_run_in_simulation())
+ OBJECT_SIZE = 1 * 1024 * 1024;
+
drmtest_subtest_init(argc, argv);
fd = drm_open_any();
diff --git a/tests/gem_pipe_control_store_loop.c b/tests/gem_pipe_control_store_loop.c
index e03cddd..af6a758 100644
--- a/tests/gem_pipe_control_store_loop.c
+++ b/tests/gem_pipe_control_store_loop.c
@@ -70,7 +70,7 @@ store_pipe_control_loop(void)
uint32_t *buf;
drm_intel_bo *target_bo;
- for (i = 0; i < 0x10000; i++) {
+ for (i = 0; i < SLOW_QUICK(0x10000, 4); i++) {
/* we want to check tlb consistency of the pipe_control target,
* so get a new buffer every time around */
target_bo = drm_intel_bo_alloc(bufmgr, "target bo", 4096, 4096);
diff --git a/tests/gem_render_linear_blits.c b/tests/gem_render_linear_blits.c
index a7e0189..c94f451 100644
--- a/tests/gem_render_linear_blits.c
+++ b/tests/gem_render_linear_blits.c
@@ -81,8 +81,11 @@ int main(int argc, char **argv)
batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
count = 0;
+ if (drmtest_run_in_simulation())
+ count = 2;
if (argc > 1)
count = atoi(argv[1]);
+
if (count == 0)
count = 3 * gem_aperture_size(fd) / SIZE / 2;
else if (count < 2) {
@@ -127,6 +130,9 @@ int main(int argc, char **argv)
for (i = 0; i < count; i++)
check_bo(fd, bo[i]->handle, start_val[i]);
+ if (drmtest_run_in_simulation())
+ return 0;
+
printf("Cyclic blits, backward...\n");
for (i = 0; i < count * 4; i++) {
struct scratch_buf src, dst;
diff --git a/tests/gem_ring_sync_loop.c b/tests/gem_ring_sync_loop.c
index 501e97c..43357e1 100644
--- a/tests/gem_ring_sync_loop.c
+++ b/tests/gem_ring_sync_loop.c
@@ -99,7 +99,7 @@ store_dword_loop(int fd)
srandom(0xdeadbeef);
- for (i = 0; i < 0x100000; i++) {
+ for (i = 0; i < SLOW_QUICK(0x100000, 10); i++) {
int ring = random() % num_rings + 1;
if (ring == I915_EXEC_RENDER) {
diff --git a/tests/gem_storedw_batches_loop.c b/tests/gem_storedw_batches_loop.c
index 79eebb2..3b25524 100644
--- a/tests/gem_storedw_batches_loop.c
+++ b/tests/gem_storedw_batches_loop.c
@@ -60,7 +60,7 @@ store_dword_loop(int divider)
if (!has_ppgtt)
cmd |= MI_MEM_VIRTUAL;
- for (i = 0; i < SLOW_QUICK(0x80000, 0x10); i++) {
+ for (i = 0; i < SLOW_QUICK(0x80000, 4); i++) {
cmd_bo = drm_intel_bo_alloc(bufmgr, "cmd bo", 4096, 4096);
if (!cmd_bo) {
fprintf(stderr, "failed to alloc cmd bo\n");
@@ -172,8 +172,10 @@ int main(int argc, char **argv)
store_dword_loop(1);
store_dword_loop(2);
- store_dword_loop(3);
- store_dword_loop(5);
+ if (!drmtest_run_in_simulation()) {
+ store_dword_loop(3);
+ store_dword_loop(5);
+ }
drm_intel_bo_unreference(target_bo);
drm_intel_bufmgr_destroy(bufmgr);
diff --git a/tests/gem_storedw_loop_blt.c b/tests/gem_storedw_loop_blt.c
index cacae3a..dfb613b 100644
--- a/tests/gem_storedw_loop_blt.c
+++ b/tests/gem_storedw_loop_blt.c
@@ -63,7 +63,7 @@ store_dword_loop(int divider)
if (!has_ppgtt)
cmd |= MI_MEM_VIRTUAL;
- for (i = 0; i < SLOW_QUICK(0x100000, 0x10); i++) {
+ for (i = 0; i < SLOW_QUICK(0x100000, 4); i++) {
BEGIN_BATCH(4);
OUT_BATCH(cmd);
OUT_BATCH(0); /* reserved */
@@ -150,8 +150,10 @@ int main(int argc, char **argv)
store_dword_loop(1);
store_dword_loop(2);
- store_dword_loop(3);
- store_dword_loop(5);
+ if (!drmtest_run_in_simulation()) {
+ store_dword_loop(3);
+ store_dword_loop(5);
+ }
drm_intel_bo_unreference(target_buffer);
intel_batchbuffer_free(batch);
diff --git a/tests/gem_storedw_loop_bsd.c b/tests/gem_storedw_loop_bsd.c
index 232c3a6..6aefb9a 100644
--- a/tests/gem_storedw_loop_bsd.c
+++ b/tests/gem_storedw_loop_bsd.c
@@ -63,7 +63,7 @@ store_dword_loop(int divider)
if (!has_ppgtt)
cmd |= MI_MEM_VIRTUAL;
- for (i = 0; i < SLOW_QUICK(0x100000, 0x10); i++) {
+ for (i = 0; i < SLOW_QUICK(0x100000, 4); i++) {
BEGIN_BATCH(4);
OUT_BATCH(cmd);
OUT_BATCH(0); /* reserved */
@@ -156,8 +156,10 @@ int main(int argc, char **argv)
store_dword_loop(1);
store_dword_loop(2);
- store_dword_loop(3);
- store_dword_loop(5);
+ if (!drmtest_run_in_simulation()) {
+ store_dword_loop(3);
+ store_dword_loop(5);
+ }
drm_intel_bo_unreference(target_buffer);
intel_batchbuffer_free(batch);
diff --git a/tests/gem_storedw_loop_render.c b/tests/gem_storedw_loop_render.c
index fe09834..e41ecc7 100644
--- a/tests/gem_storedw_loop_render.c
+++ b/tests/gem_storedw_loop_render.c
@@ -63,7 +63,7 @@ store_dword_loop(int divider)
if (!has_ppgtt)
cmd |= MI_MEM_VIRTUAL;
- for (i = 0; i < SLOW_QUICK(0x100000, 0x10); i++) {
+ for (i = 0; i < SLOW_QUICK(0x100000, 4); i++) {
BEGIN_BATCH(4);
OUT_BATCH(cmd);
OUT_BATCH(0); /* reserved */
@@ -144,8 +144,10 @@ int main(int argc, char **argv)
store_dword_loop(1);
store_dword_loop(2);
- store_dword_loop(3);
- store_dword_loop(5);
+ if (!drmtest_run_in_simulation()) {
+ store_dword_loop(3);
+ store_dword_loop(5);
+ }
drm_intel_bo_unreference(target_buffer);
intel_batchbuffer_free(batch);
diff --git a/tests/gem_tiled_blits.c b/tests/gem_tiled_blits.c
index bb43976..86ff745 100644
--- a/tests/gem_tiled_blits.c
+++ b/tests/gem_tiled_blits.c
@@ -127,8 +127,11 @@ int main(int argc, char **argv)
fd = drm_open_any();
count = 0;
+ if (drmtest_run_in_simulation())
+ count = 2;
if (argc > 1)
count = atoi(argv[1]);
+
if (count == 0) {
count = 3 * gem_aperture_size(fd) / (1024*1024) / 2;
count += (count & 1) == 0;
@@ -175,6 +178,9 @@ int main(int argc, char **argv)
for (i = 0; i < count; i++)
check_bo(bo[i], bo_start_val[i]);
+ if (drmtest_run_in_simulation())
+ return 0;
+
printf("Cyclic blits, backward...\n");
for (i = 0; i < count * 4; i++) {
int src = (i+1) % count;
--
1.8.1.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 09/10] tests: Black list tests we don't want to run on simulation
2013-04-29 18:15 ` [PATCH 09/10] tests: Black list tests we don't want to run on simulation Damien Lespiau
@ 2013-04-29 21:04 ` Daniel Vetter
0 siblings, 0 replies; 14+ messages in thread
From: Daniel Vetter @ 2013-04-29 21:04 UTC (permalink / raw)
To: Damien Lespiau; +Cc: intel-gfx
On Mon, Apr 29, 2013 at 07:15:36PM +0100, Damien Lespiau wrote:
> Let's start by a small set of tests, to eventually consider running
> more.
>
> The current list should then be:
>
> gem_mmap
> gem_pread_after_blit
> gem_ring_sync_loop
> gem_ctx_basic
> gem_pipe_control_store_loop
> gem_storedw_loop_render
> gem_storedw_loop_blt
> gem_storedw_loop_bsd
> gem_render_linear_blits
> gem_tiled_blits
> gem_cpu_reloc
>
> gem_exec_nop
> gem_mmap_gtt
>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Series is acked, a few comments below for more tests to include. Feel free
to ignore (for the first round at least).
Cheers, Daniel
[Comments reference the test right above them.]
> ---
> tests/drm_lib.sh | 5 +++++
> tests/drm_vma_limiter.c | 2 ++
> tests/drm_vma_limiter_cached.c | 2 ++
> tests/drm_vma_limiter_cpu.c | 2 ++
> tests/drm_vma_limiter_gtt.c | 2 ++
> tests/gem_bad_length.c | 2 ++
> tests/gem_cacheing.c | 1 +
> tests/gem_cpu_concurrent_blit.c | 1 +
> tests/gem_cs_prefetch.c | 2 ++
> tests/gem_cs_tlb.c | 1 +
> tests/gem_ctx_bad_destroy.c | 2 ++
> tests/gem_ctx_bad_exec.c | 3 +++
> tests/gem_ctx_create.c | 2 ++
> tests/gem_ctx_exec.c | 3 +++
> tests/gem_double_irq_loop.c | 2 ++
> tests/gem_dummy_reloc_loop.c | 1 +
> tests/gem_exec_bad_domains.c | 1 +
Low overhead, should imo be run in simulation.
> tests/gem_exec_big.c | 2 ++
> tests/gem_exec_blt.c | 2 ++
> tests/gem_exec_faulting_reloc.c | 2 ++
Same.
> tests/gem_exec_lut_handle.c | 2 ++
> tests/gem_fence_thrash.c | 1 +
> tests/gem_fenced_exec_thrash.c | 12 +++++++++---
> tests/gem_flink.c | 1 +
Same.
> tests/gem_gtt_concurrent_blit.c | 1 +
> tests/gem_gtt_cpu_tlb.c | 2 ++
> tests/gem_gtt_speed.c | 2 ++
> tests/gem_hangcheck_forcewake.c | 2 ++
> tests/gem_largeobject.c | 2 ++
> tests/gem_linear_blits.c | 2 ++
> tests/gem_lut_handle.c | 2 ++
Tons of tiny batches to exercise api corner-cases. Imo worthwile with
reduced loop rounds.
> tests/gem_mmap_offset_exhaustion.c | 2 ++
> tests/gem_partial_pwrite_pread.c | 1 +
> tests/gem_pin.c | 2 ++
> tests/gem_pwrite.c | 2 ++
> tests/gem_readwrite.c | 2 ++
> tests/gem_reg_read.c | 2 ++
Tiny api test, should be included imo.
> tests/gem_reloc_overflow.c | 2 ++
Same.
> tests/gem_reloc_vs_gpu.c | 2 ++
> tests/gem_render_tiled_blits.c | 2 ++
> tests/gem_ringfill.c | 1 +
> tests/gem_seqno_wrap.c | 2 ++
Maybe with reduced default rounds. It's a bit expensive, but imo pretty
important ...
> tests/gem_set_tiling_vs_blt.c | 1 +
> tests/gem_set_tiling_vs_gtt.c | 2 ++
> tests/gem_set_tiling_vs_pwrite.c | 2 ++
> tests/gem_storedw_batches_loop.c | 2 ++
> tests/gem_threaded_access_tiled.c | 2 ++
> tests/gem_tiled_fence_blits.c | 2 ++
> tests/gem_tiled_partial_pwrite_pread.c | 1 +
> tests/gem_tiled_pread.c | 2 ++
> tests/gem_tiled_pread_pwrite.c | 1 +
> tests/gem_tiled_swapping.c | 2 ++
I think we should include some of the tiled tests. tiled_pread +
tiled_pread_pwrite should give us coverage for tiling screw-ups without
hunting endlessly for cache coherency issues or trying to force the full
working set through swap. tiled_pread_pwrite definitely needs fewer rounds
(the high number is to hunt for L-shaped memory architectures, which
luckily is a thing of the past now).
> tests/gem_tiling_max_stride.c | 2 ++
Interface test, should be included imo.
> tests/gem_unfence_active_buffers.c | 2 ++
> tests/gem_unref_active_buffers.c | 2 ++
> tests/gem_vmap_blits.c | 2 ++
> tests/gem_wait_render_timeout.c | 2 ++
> tests/kms_flip.c | 1 +
Maybe a reduced flip test, i.e. just basic flips, 10 rounds or so? Most of
this just tests races against bazillion different things, so not too
interesting.
> tests/prime_nv_api.c | 3 +++
> tests/prime_nv_pcopy.c | 1 +
> tests/prime_nv_test.c | 1 +
> tests/prime_self_import.c | 1 +
Again interface tests, imo good to include.
> tests/prime_udl.c | 3 +++
> tests/sysfs_edid_timing | 2 ++
> tests/sysfs_rc6_residency.c | 2 ++
> tests/sysfs_rps.c | 2 ++
Same. Or do we presume that turbo isn't working anyway?
> tests/testdisplay.c | 2 ++
> 67 files changed, 131 insertions(+), 3 deletions(-)
>
> diff --git a/tests/drm_lib.sh b/tests/drm_lib.sh
> index a76fd47..ee31f00 100755
> --- a/tests/drm_lib.sh
> +++ b/tests/drm_lib.sh
> @@ -29,4 +29,9 @@ if [ `cat $i915_path/clients | wc -l` -gt "2" ] ; then
> die "ERROR: other drm clients running"
> fi
>
> +function drmtest_skip_on_simulation()
> +{
> + [ -n "$INTEL_SIMULATION" ] && exit 77
> +}
>
> +drmtest_skip_on_simulation
> diff --git a/tests/drm_vma_limiter.c b/tests/drm_vma_limiter.c
> index 1971e2d..e5025ef 100644
> --- a/tests/drm_vma_limiter.c
> +++ b/tests/drm_vma_limiter.c
> @@ -60,6 +60,8 @@ int main(int argc, char **argv)
> int i;
> char *ptr;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
> diff --git a/tests/drm_vma_limiter_cached.c b/tests/drm_vma_limiter_cached.c
> index 3797618..1144796 100644
> --- a/tests/drm_vma_limiter_cached.c
> +++ b/tests/drm_vma_limiter_cached.c
> @@ -61,6 +61,8 @@ int main(int argc, char **argv)
> char *ptr;
> drm_intel_bo *load_bo;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
> diff --git a/tests/drm_vma_limiter_cpu.c b/tests/drm_vma_limiter_cpu.c
> index 24ce188..6f65cdb 100644
> --- a/tests/drm_vma_limiter_cpu.c
> +++ b/tests/drm_vma_limiter_cpu.c
> @@ -61,6 +61,8 @@ int main(int argc, char **argv)
> int i;
> char *ptr;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
> diff --git a/tests/drm_vma_limiter_gtt.c b/tests/drm_vma_limiter_gtt.c
> index 540ea91..7e43fca 100644
> --- a/tests/drm_vma_limiter_gtt.c
> +++ b/tests/drm_vma_limiter_gtt.c
> @@ -62,6 +62,8 @@ int main(int argc, char **argv)
> int i;
> char *ptr;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
> diff --git a/tests/gem_bad_length.c b/tests/gem_bad_length.c
> index 0f2268f..bb8b6b8 100644
> --- a/tests/gem_bad_length.c
> +++ b/tests/gem_bad_length.c
> @@ -124,6 +124,8 @@ int main(int argc, char **argv)
> {
> int fd;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> create0(fd);
> diff --git a/tests/gem_cacheing.c b/tests/gem_cacheing.c
> index 93983a2..8a169f1 100644
> --- a/tests/gem_cacheing.c
> +++ b/tests/gem_cacheing.c
> @@ -113,6 +113,7 @@ int main(int argc, char **argv)
> bool skipped_all = true;
>
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> srandom(0xdeadbeef);
>
> diff --git a/tests/gem_cpu_concurrent_blit.c b/tests/gem_cpu_concurrent_blit.c
> index 21cbdb0..f850492 100644
> --- a/tests/gem_cpu_concurrent_blit.c
> +++ b/tests/gem_cpu_concurrent_blit.c
> @@ -99,6 +99,7 @@ main(int argc, char **argv)
> int i;
>
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> fd = drm_open_any();
>
> diff --git a/tests/gem_cs_prefetch.c b/tests/gem_cs_prefetch.c
> index 9ef35eb..3b05863 100644
> --- a/tests/gem_cs_prefetch.c
> +++ b/tests/gem_cs_prefetch.c
> @@ -96,6 +96,8 @@ int main(int argc, char **argv)
> int count;
> drm_intel_bo *sample_batch_bo;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
> diff --git a/tests/gem_cs_tlb.c b/tests/gem_cs_tlb.c
> index 9f8f762..05e78c2 100644
> --- a/tests/gem_cs_tlb.c
> +++ b/tests/gem_cs_tlb.c
> @@ -152,6 +152,7 @@ int main(int argc, char **argv)
> uint32_t devid;
>
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> fd = drm_open_any();
> devid = intel_get_drm_devid(fd);
> diff --git a/tests/gem_ctx_bad_destroy.c b/tests/gem_ctx_bad_destroy.c
> index 02d24eb..855cd04 100644
> --- a/tests/gem_ctx_bad_destroy.c
> +++ b/tests/gem_ctx_bad_destroy.c
> @@ -80,6 +80,8 @@ int main(int argc, char *argv[])
> uint32_t ctx_id;
> int ret, fd;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> ctx_id = context_create(fd);
> diff --git a/tests/gem_ctx_bad_exec.c b/tests/gem_ctx_bad_exec.c
> index 8a57fd4..f6463ac 100644
> --- a/tests/gem_ctx_bad_exec.c
> +++ b/tests/gem_ctx_bad_exec.c
> @@ -111,6 +111,9 @@ int main(int argc, char *argv[])
> uint32_t batch[2] = {MI_BATCH_BUFFER_END};
> uint32_t ctx_id;
> int fd;
> +
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> ctx_id = context_create(fd);
> diff --git a/tests/gem_ctx_create.c b/tests/gem_ctx_create.c
> index 84ef214..9601976 100644
> --- a/tests/gem_ctx_create.c
> +++ b/tests/gem_ctx_create.c
> @@ -42,6 +42,8 @@ int main(int argc, char *argv[])
> int ret, fd;
> struct local_drm_i915_gem_context_create create;
>
> + drmtest_skip_on_simulation();
> +
> create.ctx_id = rand();
> create.pad = rand();
>
> diff --git a/tests/gem_ctx_exec.c b/tests/gem_ctx_exec.c
> index b0362cc..8468110 100644
> --- a/tests/gem_ctx_exec.c
> +++ b/tests/gem_ctx_exec.c
> @@ -122,6 +122,9 @@ int main(int argc, char *argv[])
> uint32_t batch[2] = {0, MI_BATCH_BUFFER_END};
> uint32_t ctx_id;
> int fd;
> +
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> ctx_id = context_create(fd);
> diff --git a/tests/gem_double_irq_loop.c b/tests/gem_double_irq_loop.c
> index f2f8b1a..5e25954 100644
> --- a/tests/gem_double_irq_loop.c
> +++ b/tests/gem_double_irq_loop.c
> @@ -98,6 +98,8 @@ int main(int argc, char **argv)
> int fd;
> int devid;
>
> + drmtest_skip_on_simulation();
> +
> if (argc != 1) {
> fprintf(stderr, "usage: %s\n", argv[0]);
> exit(-1);
> diff --git a/tests/gem_dummy_reloc_loop.c b/tests/gem_dummy_reloc_loop.c
> index b67c7d3..abf8e88 100644
> --- a/tests/gem_dummy_reloc_loop.c
> +++ b/tests/gem_dummy_reloc_loop.c
> @@ -128,6 +128,7 @@ int main(int argc, char **argv)
> int devid;
>
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> fd = drm_open_any();
> devid = intel_get_drm_devid(fd);
> diff --git a/tests/gem_exec_bad_domains.c b/tests/gem_exec_bad_domains.c
> index d174349..b2b0d43 100644
> --- a/tests/gem_exec_bad_domains.c
> +++ b/tests/gem_exec_bad_domains.c
> @@ -157,6 +157,7 @@ int main(int argc, char **argv)
> drm_intel_bo *tmp;
>
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> fd = drm_open_any();
>
> diff --git a/tests/gem_exec_big.c b/tests/gem_exec_big.c
> index 3005762..9dddfac 100644
> --- a/tests/gem_exec_big.c
> +++ b/tests/gem_exec_big.c
> @@ -108,6 +108,8 @@ int main(int argc, char **argv)
> uint32_t reloc_ofs;
> unsigned batch_size;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> for (batch_size = BATCH_SIZE/4; batch_size <= BATCH_SIZE; batch_size += 4096) {
> diff --git a/tests/gem_exec_blt.c b/tests/gem_exec_blt.c
> index eb5ae66..e28c2e6 100644
> --- a/tests/gem_exec_blt.c
> +++ b/tests/gem_exec_blt.c
> @@ -250,6 +250,8 @@ int main(int argc, char **argv)
> {
> int i;
>
> + drmtest_skip_on_simulation();
> +
> if (argc > 1) {
> for (i = 1; i < argc; i++) {
> int object_size = atoi(argv[i]);
> diff --git a/tests/gem_exec_faulting_reloc.c b/tests/gem_exec_faulting_reloc.c
> index 863a1b0..c880077 100644
> --- a/tests/gem_exec_faulting_reloc.c
> +++ b/tests/gem_exec_faulting_reloc.c
> @@ -220,6 +220,8 @@ static void run(int object_size)
>
> int main(int argc, char **argv)
> {
> + drmtest_skip_on_simulation();
> +
> run(OBJECT_SIZE);
>
> return 0;
> diff --git a/tests/gem_exec_lut_handle.c b/tests/gem_exec_lut_handle.c
> index 4f544ad..54ed3dd 100644
> --- a/tests/gem_exec_lut_handle.c
> +++ b/tests/gem_exec_lut_handle.c
> @@ -127,6 +127,8 @@ int main(int argc, char **argv)
> { .name = NULL },
> }, *p;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> for (n = 0; n < MAX_NUM_EXEC; n++) {
> diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c
> index e1cfc4e..a28c127 100644
> --- a/tests/gem_fence_thrash.c
> +++ b/tests/gem_fence_thrash.c
> @@ -208,6 +208,7 @@ int
> main(int argc, char **argv)
> {
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> if (drmtest_run_subtest("bo-write-verify-none"))
> assert (run_test(0, bo_write_verify, I915_TILING_NONE, 80) == 0);
> diff --git a/tests/gem_fenced_exec_thrash.c b/tests/gem_fenced_exec_thrash.c
> index c8a2c58..ebc2121 100644
> --- a/tests/gem_fenced_exec_thrash.c
> +++ b/tests/gem_fenced_exec_thrash.c
> @@ -159,9 +159,15 @@ static void run_test(int fd, int num_fences, int expected_errno)
> int
> main(int argc, char **argv)
> {
> - int fd = drm_open_any();
> - int num_fences = get_num_fences(fd);
> - uint32_t devid = intel_get_drm_devid(fd);
> + int fd;
> + int num_fences;
> + uint32_t devid;
> +
> + drmtest_skip_on_simulation();
> +
> + fd = drm_open_any();
> + num_fences = get_num_fences(fd);
> + devid = intel_get_drm_devid(fd);
>
> assert(num_fences <= MAX_FENCES);
>
> diff --git a/tests/gem_flink.c b/tests/gem_flink.c
> index bfa85c9..e3f9cc7 100644
> --- a/tests/gem_flink.c
> +++ b/tests/gem_flink.c
> @@ -155,6 +155,7 @@ int main(int argc, char **argv)
> int fd;
>
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> fd = drm_open_any();
>
> diff --git a/tests/gem_gtt_concurrent_blit.c b/tests/gem_gtt_concurrent_blit.c
> index 8bd80f1..7b99558 100644
> --- a/tests/gem_gtt_concurrent_blit.c
> +++ b/tests/gem_gtt_concurrent_blit.c
> @@ -102,6 +102,7 @@ main(int argc, char **argv)
> int i;
>
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> fd = drm_open_any();
>
> diff --git a/tests/gem_gtt_cpu_tlb.c b/tests/gem_gtt_cpu_tlb.c
> index 6853370..d324aee 100644
> --- a/tests/gem_gtt_cpu_tlb.c
> +++ b/tests/gem_gtt_cpu_tlb.c
> @@ -77,6 +77,8 @@ main(int argc, char **argv)
>
> uint32_t *ptr;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> handle = gem_create(fd, OBJ_SIZE);
> diff --git a/tests/gem_gtt_speed.c b/tests/gem_gtt_speed.c
> index f0fb901..8b318d3 100644
> --- a/tests/gem_gtt_speed.c
> +++ b/tests/gem_gtt_speed.c
> @@ -61,6 +61,8 @@ int main(int argc, char **argv)
> int loop, i, tiling;
> int fd;
>
> + drmtest_skip_on_simulation();
> +
> if (argc > 1)
> size = atoi(argv[1]);
> if (size == 0) {
> diff --git a/tests/gem_hangcheck_forcewake.c b/tests/gem_hangcheck_forcewake.c
> index 96a30fe..4e6358b 100644
> --- a/tests/gem_hangcheck_forcewake.c
> +++ b/tests/gem_hangcheck_forcewake.c
> @@ -65,6 +65,8 @@ int main(int argc, char **argv)
> unsigned long pitch, act_size;
> int fd, i, devid;
>
> + drmtest_skip_on_simulation();
> +
> memset(blob, 'A', sizeof(blob));
>
> fd = drm_open_any();
> diff --git a/tests/gem_largeobject.c b/tests/gem_largeobject.c
> index 163bf10..a14cc04 100644
> --- a/tests/gem_largeobject.c
> +++ b/tests/gem_largeobject.c
> @@ -87,6 +87,8 @@ int main(int argc, char **argv)
> {
> int fd;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> test_large_object(fd);
> diff --git a/tests/gem_linear_blits.c b/tests/gem_linear_blits.c
> index ec2dc56..f7e0fef 100644
> --- a/tests/gem_linear_blits.c
> +++ b/tests/gem_linear_blits.c
> @@ -182,6 +182,8 @@ int main(int argc, char **argv)
> uint32_t start = 0;
> int i, fd, count;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> count = 0;
> diff --git a/tests/gem_lut_handle.c b/tests/gem_lut_handle.c
> index a051003..616aa4a 100644
> --- a/tests/gem_lut_handle.c
> +++ b/tests/gem_lut_handle.c
> @@ -179,6 +179,8 @@ int main(int argc, char **argv)
> uint32_t handle;
> int fd, i;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> handle = gem_create(fd, 4096);
> diff --git a/tests/gem_mmap_offset_exhaustion.c b/tests/gem_mmap_offset_exhaustion.c
> index 51ae599..3c026bb 100644
> --- a/tests/gem_mmap_offset_exhaustion.c
> +++ b/tests/gem_mmap_offset_exhaustion.c
> @@ -83,6 +83,8 @@ int main(int argc, char **argv)
> {
> int fd, i;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> /* we have 32bit of address space, so try to fit one MB more
> diff --git a/tests/gem_partial_pwrite_pread.c b/tests/gem_partial_pwrite_pread.c
> index f6fbdbf..2ca0ece 100644
> --- a/tests/gem_partial_pwrite_pread.c
> +++ b/tests/gem_partial_pwrite_pread.c
> @@ -258,6 +258,7 @@ int main(int argc, char **argv)
> srandom(0xdeadbeef);
>
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> fd = drm_open_any();
>
> diff --git a/tests/gem_pin.c b/tests/gem_pin.c
> index edf5e60..cbb1fe7 100644
> --- a/tests/gem_pin.c
> +++ b/tests/gem_pin.c
> @@ -203,6 +203,8 @@ int main(int argc, char **argv)
> uint32_t *handle, *offset;
> int fd, i;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> if (!test_can_pin(fd))
> diff --git a/tests/gem_pwrite.c b/tests/gem_pwrite.c
> index 051ed3b..45a7e63 100644
> --- a/tests/gem_pwrite.c
> +++ b/tests/gem_pwrite.c
> @@ -91,6 +91,8 @@ int main(int argc, char **argv)
> uint32_t *src, dst;
> int fd, count;
>
> + drmtest_skip_on_simulation();
> +
> if (argc > 1)
> object_size = atoi(argv[1]);
> if (object_size == 0)
> diff --git a/tests/gem_readwrite.c b/tests/gem_readwrite.c
> index d3d69e3..a4a4d9c 100644
> --- a/tests/gem_readwrite.c
> +++ b/tests/gem_readwrite.c
> @@ -82,6 +82,8 @@ int main(int argc, char **argv)
> int ret;
> int handle;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> handle = gem_create(fd, OBJECT_SIZE);
> diff --git a/tests/gem_reg_read.c b/tests/gem_reg_read.c
> index 692dd98..8f244cc 100644
> --- a/tests/gem_reg_read.c
> +++ b/tests/gem_reg_read.c
> @@ -71,6 +71,8 @@ int main(int argc, char *argv[])
> int ret, fd;
> uint64_t val;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> reg_read.offset = 0x2358;
> diff --git a/tests/gem_reloc_overflow.c b/tests/gem_reloc_overflow.c
> index 140b684..26357ab 100644
> --- a/tests/gem_reloc_overflow.c
> +++ b/tests/gem_reloc_overflow.c
> @@ -62,6 +62,8 @@ int main(int argc, char *argv[])
> struct drm_i915_gem_exec_object2 *execobjs;
> struct drm_i915_gem_execbuffer2 execbuf = { 0 };
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> /* Create giant reloc buffer area. */
> diff --git a/tests/gem_reloc_vs_gpu.c b/tests/gem_reloc_vs_gpu.c
> index 47681d5..0c943aa 100644
> --- a/tests/gem_reloc_vs_gpu.c
> +++ b/tests/gem_reloc_vs_gpu.c
> @@ -148,6 +148,8 @@ int main(int argc, char **argv)
> int fd, i, ring;
> uint32_t test;
>
> + drmtest_skip_on_simulation();
> +
> memset(blob, 'A', sizeof(blob));
>
> fd = drm_open_any();
> diff --git a/tests/gem_render_tiled_blits.c b/tests/gem_render_tiled_blits.c
> index 626e652..ed21c24 100644
> --- a/tests/gem_render_tiled_blits.c
> +++ b/tests/gem_render_tiled_blits.c
> @@ -71,6 +71,8 @@ int main(int argc, char **argv)
> uint32_t start = 0;
> int i, j, fd, count;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> render_copy = get_render_copyfunc(intel_get_drm_devid(fd));
> diff --git a/tests/gem_ringfill.c b/tests/gem_ringfill.c
> index 948630b..db842fe 100644
> --- a/tests/gem_ringfill.c
> +++ b/tests/gem_ringfill.c
> @@ -206,6 +206,7 @@ int main(int argc, char **argv)
> int fd, fails = 0;
>
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> fd = drm_open_any();
>
> diff --git a/tests/gem_seqno_wrap.c b/tests/gem_seqno_wrap.c
> index 776dedc..f354a52 100644
> --- a/tests/gem_seqno_wrap.c
> +++ b/tests/gem_seqno_wrap.c
> @@ -647,6 +647,8 @@ int main(int argc, char **argv)
> int wcount = 0;
> int r = -1;
>
> + drmtest_skip_on_simulation();
> +
> parse_options(argc, argv);
>
> card_index = drm_get_card(0);
> diff --git a/tests/gem_set_tiling_vs_blt.c b/tests/gem_set_tiling_vs_blt.c
> index 69dc7e6..398a227 100644
> --- a/tests/gem_set_tiling_vs_blt.c
> +++ b/tests/gem_set_tiling_vs_blt.c
> @@ -234,6 +234,7 @@ int main(int argc, char **argv)
> uint32_t tiling, tiling_after;
>
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> for (i = 0; i < 1024*256; i++)
> data[i] = i;
> diff --git a/tests/gem_set_tiling_vs_gtt.c b/tests/gem_set_tiling_vs_gtt.c
> index 1241b54..4065ff4 100644
> --- a/tests/gem_set_tiling_vs_gtt.c
> +++ b/tests/gem_set_tiling_vs_gtt.c
> @@ -58,6 +58,8 @@ int main(int argc, char **argv)
> bool tiling_changed;
> int tile_height;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> if (IS_GEN2(intel_get_drm_devid(fd)))
> diff --git a/tests/gem_set_tiling_vs_pwrite.c b/tests/gem_set_tiling_vs_pwrite.c
> index 35ec5cd..77f4462 100644
> --- a/tests/gem_set_tiling_vs_pwrite.c
> +++ b/tests/gem_set_tiling_vs_pwrite.c
> @@ -56,6 +56,8 @@ int main(int argc, char **argv)
> int i;
> uint32_t handle;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> for (i = 0; i < OBJECT_SIZE/4; i++)
> diff --git a/tests/gem_storedw_batches_loop.c b/tests/gem_storedw_batches_loop.c
> index 86c3469..79eebb2 100644
> --- a/tests/gem_storedw_batches_loop.c
> +++ b/tests/gem_storedw_batches_loop.c
> @@ -137,6 +137,8 @@ int main(int argc, char **argv)
> int fd;
> int devid;
>
> + drmtest_skip_on_simulation();
> +
> if (argc != 1) {
> fprintf(stderr, "usage: %s\n", argv[0]);
> exit(-1);
> diff --git a/tests/gem_threaded_access_tiled.c b/tests/gem_threaded_access_tiled.c
> index 362cf3a..48a6f62 100644
> --- a/tests/gem_threaded_access_tiled.c
> +++ b/tests/gem_threaded_access_tiled.c
> @@ -95,6 +95,8 @@ int main(int argc, char **argv)
> unsigned long pitch = 0;
> int r;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
> assert(fd >= 0);
>
> diff --git a/tests/gem_tiled_fence_blits.c b/tests/gem_tiled_fence_blits.c
> index dc65479..2b02943 100644
> --- a/tests/gem_tiled_fence_blits.c
> +++ b/tests/gem_tiled_fence_blits.c
> @@ -108,6 +108,8 @@ int main(int argc, char **argv)
> uint32_t start = 0;
> int fd, i, count;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
> count = 3 * gem_aperture_size(fd) / (1024*1024) / 2;
> if (count > intel_get_total_ram_mb() * 9 / 10) {
> diff --git a/tests/gem_tiled_partial_pwrite_pread.c b/tests/gem_tiled_partial_pwrite_pread.c
> index f6df562..48fd506 100644
> --- a/tests/gem_tiled_partial_pwrite_pread.c
> +++ b/tests/gem_tiled_partial_pwrite_pread.c
> @@ -277,6 +277,7 @@ int main(int argc, char **argv)
> uint32_t tiling_mode = I915_TILING_X;
>
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> srandom(0xdeadbeef);
>
> diff --git a/tests/gem_tiled_pread.c b/tests/gem_tiled_pread.c
> index 189affc..779f66f 100644
> --- a/tests/gem_tiled_pread.c
> +++ b/tests/gem_tiled_pread.c
> @@ -134,6 +134,8 @@ main(int argc, char **argv)
> uint32_t handle;
> uint32_t devid;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> handle = create_bo(fd);
> diff --git a/tests/gem_tiled_pread_pwrite.c b/tests/gem_tiled_pread_pwrite.c
> index ed6b711..0eb7098 100644
> --- a/tests/gem_tiled_pread_pwrite.c
> +++ b/tests/gem_tiled_pread_pwrite.c
> @@ -123,6 +123,7 @@ main(int argc, char **argv)
> uint32_t handle, handle_target;
> int count;
>
> + drmtest_skip_on_simulation();
>
> fd = drm_open_any();
> count = intel_get_total_ram_mb() * 9 / 10;
> diff --git a/tests/gem_tiled_swapping.c b/tests/gem_tiled_swapping.c
> index 14f5f40..702cb74 100644
> --- a/tests/gem_tiled_swapping.c
> +++ b/tests/gem_tiled_swapping.c
> @@ -101,6 +101,8 @@ main(int argc, char **argv)
> int count;
> current_tiling_mode = I915_TILING_X;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
> /* need slightly more than total ram */
> count = intel_get_total_ram_mb() * 11 / 10;
> diff --git a/tests/gem_tiling_max_stride.c b/tests/gem_tiling_max_stride.c
> index 21daab0..0429d39 100644
> --- a/tests/gem_tiling_max_stride.c
> +++ b/tests/gem_tiling_max_stride.c
> @@ -81,6 +81,8 @@ int main(int argc, char *argv[])
> int tile_width = 512;
> int tile_height = 8;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> devid = intel_get_drm_devid(fd);
> diff --git a/tests/gem_unfence_active_buffers.c b/tests/gem_unfence_active_buffers.c
> index bffc62e..3f6a053 100644
> --- a/tests/gem_unfence_active_buffers.c
> +++ b/tests/gem_unfence_active_buffers.c
> @@ -70,6 +70,8 @@ int main(int argc, char **argv)
> drm_intel_bo *busy_bo, *test_bo;
> uint32_t tiling = I915_TILING_X;
>
> + drmtest_skip_on_simulation();
> +
> for (i = 0; i < 1024*256; i++)
> data[i] = i;
>
> diff --git a/tests/gem_unref_active_buffers.c b/tests/gem_unref_active_buffers.c
> index aa29c1d..8a13a20 100644
> --- a/tests/gem_unref_active_buffers.c
> +++ b/tests/gem_unref_active_buffers.c
> @@ -56,6 +56,8 @@ int main(int argc, char **argv)
> {
> int fd, i;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
> diff --git a/tests/gem_vmap_blits.c b/tests/gem_vmap_blits.c
> index b886821..5e1c170 100644
> --- a/tests/gem_vmap_blits.c
> +++ b/tests/gem_vmap_blits.c
> @@ -262,6 +262,8 @@ int main(int argc, char **argv)
> uint32_t start = 0;
> int i, fd, count;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> if (!has_vmap(fd)) {
> diff --git a/tests/gem_wait_render_timeout.c b/tests/gem_wait_render_timeout.c
> index 14482e3..ed30e5c 100644
> --- a/tests/gem_wait_render_timeout.c
> +++ b/tests/gem_wait_render_timeout.c
> @@ -122,6 +122,8 @@ int main(int argc, char **argv)
> bool done = false;
> int i, iter = 1;
>
> + drmtest_skip_on_simulation();
> +
> fd = drm_open_any();
>
> bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
> diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> index 39f0043..db4a65a 100644
> --- a/tests/kms_flip.c
> +++ b/tests/kms_flip.c
> @@ -1202,6 +1202,7 @@ int main(int argc, char **argv)
> int i;
>
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> drm_fd = drm_open_any();
>
> diff --git a/tests/prime_nv_api.c b/tests/prime_nv_api.c
> index e1b7117..f6e1697 100644
> --- a/tests/prime_nv_api.c
> +++ b/tests/prime_nv_api.c
> @@ -18,6 +18,7 @@
> #include "nouveau.h"
> #include "intel_gpu_tools.h"
> #include "intel_batchbuffer.h"
> +#include "drmtest.h"
>
> #define BO_SIZE (256*1024)
>
> @@ -316,6 +317,8 @@ int main(int argc, char **argv)
> {
> int ret;
>
> + drmtest_skip_on_simulation();
> +
> ret = find_and_open_devices();
> if (ret < 0)
> return ret;
> diff --git a/tests/prime_nv_pcopy.c b/tests/prime_nv_pcopy.c
> index 88b14e5..1995de0 100644
> --- a/tests/prime_nv_pcopy.c
> +++ b/tests/prime_nv_pcopy.c
> @@ -1268,6 +1268,7 @@ int main(int argc, char **argv)
> int ret, failed = 0, run = 0;
>
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> ret = find_and_open_devices();
> if (ret < 0)
> diff --git a/tests/prime_nv_test.c b/tests/prime_nv_test.c
> index 9edd9e0..f864441 100644
> --- a/tests/prime_nv_test.c
> +++ b/tests/prime_nv_test.c
> @@ -511,6 +511,7 @@ int main(int argc, char **argv)
> return ret;
>
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> if (nouveau_fd == -1 || intel_fd == -1) {
> fprintf(stderr,"failed to find intel and nouveau GPU\n");
> diff --git a/tests/prime_self_import.c b/tests/prime_self_import.c
> index abdc220..79afe70 100644
> --- a/tests/prime_self_import.c
> +++ b/tests/prime_self_import.c
> @@ -197,6 +197,7 @@ int main(int argc, char **argv)
> int i;
>
> drmtest_subtest_init(argc, argv);
> + drmtest_skip_on_simulation();
>
> for (i = 0; i < ARRAY_SIZE(tests); i++) {
> if (drmtest_run_subtest(tests[i].name))
> diff --git a/tests/prime_udl.c b/tests/prime_udl.c
> index 4e0d9be..97f7898 100644
> --- a/tests/prime_udl.c
> +++ b/tests/prime_udl.c
> @@ -29,6 +29,7 @@
> #include "intel_bufmgr.h"
> #include "intel_gpu_tools.h"
> #include "intel_batchbuffer.h"
> +#include "drmtest.h"
>
> int intel_fd = -1, udl_fd = -1;
> drm_intel_bufmgr *bufmgr;
> @@ -150,6 +151,8 @@ int main(int argc, char **argv)
> {
> int ret;
>
> + drmtest_skip_on_simulation();
> +
> ret = find_and_open_devices();
> if (ret < 0)
> return ret;
> diff --git a/tests/sysfs_edid_timing b/tests/sysfs_edid_timing
> index 3a8c6c0..2a43cca 100755
> --- a/tests/sysfs_edid_timing
> +++ b/tests/sysfs_edid_timing
> @@ -5,6 +5,8 @@
> # we sometimes take a *really* long time. So let's just check for some reasonable timing here
> #
>
> +[ -n "$INTEL_SIMULATION" ] && exit 77
> +
> TIME1=$(date +%s%N)
> cat $(find /sys/devices/|grep drm | grep /status) > /dev/null
> TIME2=$(date +%s%N)
> diff --git a/tests/sysfs_rc6_residency.c b/tests/sysfs_rc6_residency.c
> index cd62e77..f4d8477 100644
> --- a/tests/sysfs_rc6_residency.c
> +++ b/tests/sysfs_rc6_residency.c
> @@ -63,6 +63,8 @@ int main(int argc, char *argv[])
> FILE *file;
> int diff;
>
> + drmtest_skip_on_simulation();
> +
> /* Use drm_open_any to verify device existence */
> fd = drm_open_any();
> close(fd);
> diff --git a/tests/sysfs_rps.c b/tests/sysfs_rps.c
> index 8ba541c..480592a 100644
> --- a/tests/sysfs_rps.c
> +++ b/tests/sysfs_rps.c
> @@ -133,6 +133,8 @@ int main(int argc, char *argv[])
> struct junk *junk = stuff;
> int fd, ret;
>
> + drmtest_skip_on_simulation();
> +
> if (argc > 1)
> verbose++;
>
> diff --git a/tests/testdisplay.c b/tests/testdisplay.c
> index 251141f..c653792 100644
> --- a/tests/testdisplay.c
> +++ b/tests/testdisplay.c
> @@ -675,6 +675,8 @@ int main(int argc, char **argv)
> GMainLoop *mainloop;
> float force_clock;
>
> + drmtest_skip_on_simulation();
> +
> enter_exec_path( argv );
>
> opterr = 0;
> --
> 1.8.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 08/10] lib: Introduce drmtest_skip_on_simulation()
2013-04-29 18:15 ` [PATCH 08/10] lib: Introduce drmtest_skip_on_simulation() Damien Lespiau
@ 2013-04-29 23:00 ` Jesse Barnes
0 siblings, 0 replies; 14+ messages in thread
From: Jesse Barnes @ 2013-04-29 23:00 UTC (permalink / raw)
To: Damien Lespiau; +Cc: intel-gfx
On Mon, 29 Apr 2013 19:15:35 +0100
Damien Lespiau <damien.lespiau@intel.com> wrote:
> This will allow us to explicitely blacklist tests we don't want to run
> on simulation.
>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
> lib/drmtest.c | 12 ++++++++++++
> lib/drmtest.h | 1 +
> 2 files changed, 13 insertions(+)
>
> diff --git a/lib/drmtest.c b/lib/drmtest.c
> index 6e5b636..cafc8bc 100644
> --- a/lib/drmtest.c
> +++ b/lib/drmtest.c
> @@ -38,6 +38,7 @@
> #include <math.h>
> #include <getopt.h>
> #include <stdlib.h>
> +#include <unistd.h>
>
> #include "drmtest.h"
> #include "i915_drm.h"
> @@ -612,6 +613,17 @@ bool drmtest_run_in_simulation(void)
> return simulation;
> }
>
> +/* Skip the test when running on simulation (and that's relevant only when
> + * we're not in the mode where we list the subtests) */
> +void drmtest_skip_on_simulation(void)
> +{
> + if (drmtest_only_list_subtests())
> + return;
> +
> + if (drmtest_run_in_simulation())
> + exit(77);
> +}
> +
> /* other helpers */
> void drmtest_exchange_int(void *array, unsigned i, unsigned j)
> {
> diff --git a/lib/drmtest.h b/lib/drmtest.h
> index 71d68c4..96dddda 100644
> --- a/lib/drmtest.h
> +++ b/lib/drmtest.h
> @@ -91,6 +91,7 @@ bool drmtest_only_list_subtests(void);
>
> bool drmtest_run_in_simulation(void);
> #define SLOW_QUICK(slow,quick) (drmtest_run_in_simulation() ? (quick) : (slow))
> +void drmtest_skip_on_simulation(void);
>
> /* helpers based upon the libdrm buffer manager */
> void drmtest_init_aperture_trashers(drm_intel_bufmgr *bufmgr);
So if we're shooting for a real test suite in the end, this seems like
the wrong way to go. Rather we should be pulling boilerplate *out* of
each test (like open_any, sanity checks for ppgtt or whatever) and
making each test tiny.
Then we could have lists of tests in a separate file, complete with
parameters, that would define specific areas of interest or things to
run.
I'm hoping that wouldn't get in the way of running individual tests
easily, but I don't think it would if we did it right...
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 06/10] reg_dumper: Shut a warning down
2013-04-29 18:15 ` [PATCH 06/10] reg_dumper: Shut a warning down Damien Lespiau
@ 2013-05-08 12:41 ` Damien Lespiau
0 siblings, 0 replies; 14+ messages in thread
From: Damien Lespiau @ 2013-05-08 12:41 UTC (permalink / raw)
To: intel-gfx
Merged until this point as they are really trivial patch and the out of
date .gitignore is annoying me.
--
Damien
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2013-05-08 12:41 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-29 18:15 Provide a simulation friendly test environment v2 Damien Lespiau
2013-04-29 18:15 ` [PATCH 01/10] README: Reword a few sentences Damien Lespiau
2013-04-29 18:15 ` [PATCH 02/10] build: Make grep silent when running make test Damien Lespiau
2013-04-29 18:15 ` [PATCH 03/10] lib: Remove the execution bit of intel_chipset.h Damien Lespiau
2013-04-29 18:15 ` [PATCH 04/10] Update .gitignore files with the new tests and tools Damien Lespiau
2013-04-29 18:15 ` [PATCH 05/10] lib: Add the declaration of intel_register_access_needs_fakewake() Damien Lespiau
2013-04-29 18:15 ` [PATCH 06/10] reg_dumper: Shut a warning down Damien Lespiau
2013-05-08 12:41 ` Damien Lespiau
2013-04-29 18:15 ` [PATCH 07/10] lib: Rename IGT_QUICK to INTEL_SIMULATION Damien Lespiau
2013-04-29 18:15 ` [PATCH 08/10] lib: Introduce drmtest_skip_on_simulation() Damien Lespiau
2013-04-29 23:00 ` Jesse Barnes
2013-04-29 18:15 ` [PATCH 09/10] tests: Black list tests we don't want to run on simulation Damien Lespiau
2013-04-29 21:04 ` Daniel Vetter
2013-04-29 18:15 ` [PATCH 10/10] tests: Instrument tests run in simulation to run quickly Damien Lespiau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox