Commit 5fa15f79 authored by Damien Lespiau's avatar Damien Lespiau

tests: Black list tests we don't want to run on simulation

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

v2 add (Daniel Vetter)
gem_exec_bad_domains
gem_exec_faulting_reloc
gem_flink
gem_reg_read
gem_reloc_overflow
gem_tiling_max_stride
prime_*
Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
parent cf4efd15
...@@ -37,3 +37,10 @@ if [ -d /sys/class/drm ] ; then ...@@ -37,3 +37,10 @@ if [ -d /sys/class/drm ] ; then
fi fi
fi fi
# sysfs may not exist as the 'error' is a new interface in 3.11 # sysfs may not exist as the 'error' is a new interface in 3.11
function drmtest_skip_on_simulation()
{
[ -n "$INTEL_SIMULATION" ] && exit 77
}
drmtest_skip_on_simulation
...@@ -60,6 +60,8 @@ int main(int argc, char **argv) ...@@ -60,6 +60,8 @@ int main(int argc, char **argv)
int i; int i;
char *ptr; char *ptr;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
......
...@@ -61,6 +61,8 @@ int main(int argc, char **argv) ...@@ -61,6 +61,8 @@ int main(int argc, char **argv)
char *ptr; char *ptr;
drm_intel_bo *load_bo; drm_intel_bo *load_bo;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
......
...@@ -61,6 +61,8 @@ int main(int argc, char **argv) ...@@ -61,6 +61,8 @@ int main(int argc, char **argv)
int i; int i;
char *ptr; char *ptr;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
......
...@@ -62,6 +62,8 @@ int main(int argc, char **argv) ...@@ -62,6 +62,8 @@ int main(int argc, char **argv)
int i; int i;
char *ptr; char *ptr;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
......
...@@ -124,6 +124,8 @@ int main(int argc, char **argv) ...@@ -124,6 +124,8 @@ int main(int argc, char **argv)
{ {
int fd; int fd;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
create0(fd); create0(fd);
......
...@@ -113,6 +113,7 @@ int main(int argc, char **argv) ...@@ -113,6 +113,7 @@ int main(int argc, char **argv)
bool skipped_all = true; bool skipped_all = true;
drmtest_subtest_init(argc, argv); drmtest_subtest_init(argc, argv);
drmtest_skip_on_simulation();
srandom(0xdeadbeef); srandom(0xdeadbeef);
......
...@@ -96,6 +96,7 @@ main(int argc, char **argv) ...@@ -96,6 +96,7 @@ main(int argc, char **argv)
int i, loop, fd; int i, loop, fd;
drmtest_subtest_init(argc, argv); drmtest_subtest_init(argc, argv);
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
......
...@@ -96,6 +96,8 @@ int main(int argc, char **argv) ...@@ -96,6 +96,8 @@ int main(int argc, char **argv)
int count; int count;
drm_intel_bo *sample_batch_bo; drm_intel_bo *sample_batch_bo;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
......
...@@ -152,6 +152,7 @@ int main(int argc, char **argv) ...@@ -152,6 +152,7 @@ int main(int argc, char **argv)
uint32_t devid; uint32_t devid;
drmtest_subtest_init(argc, argv); drmtest_subtest_init(argc, argv);
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
devid = intel_get_drm_devid(fd); devid = intel_get_drm_devid(fd);
......
...@@ -80,6 +80,8 @@ int main(int argc, char *argv[]) ...@@ -80,6 +80,8 @@ int main(int argc, char *argv[])
uint32_t ctx_id; uint32_t ctx_id;
int ret, fd; int ret, fd;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
ctx_id = context_create(fd); ctx_id = context_create(fd);
......
...@@ -111,6 +111,9 @@ int main(int argc, char *argv[]) ...@@ -111,6 +111,9 @@ int main(int argc, char *argv[])
uint32_t batch[2] = {MI_BATCH_BUFFER_END}; uint32_t batch[2] = {MI_BATCH_BUFFER_END};
uint32_t ctx_id; uint32_t ctx_id;
int fd; int fd;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
ctx_id = context_create(fd); ctx_id = context_create(fd);
......
...@@ -42,6 +42,8 @@ int main(int argc, char *argv[]) ...@@ -42,6 +42,8 @@ int main(int argc, char *argv[])
int ret, fd; int ret, fd;
struct local_drm_i915_gem_context_create create; struct local_drm_i915_gem_context_create create;
drmtest_skip_on_simulation();
create.ctx_id = rand(); create.ctx_id = rand();
create.pad = rand(); create.pad = rand();
......
...@@ -122,6 +122,9 @@ int main(int argc, char *argv[]) ...@@ -122,6 +122,9 @@ int main(int argc, char *argv[])
uint32_t batch[2] = {0, MI_BATCH_BUFFER_END}; uint32_t batch[2] = {0, MI_BATCH_BUFFER_END};
uint32_t ctx_id; uint32_t ctx_id;
int fd; int fd;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
ctx_id = context_create(fd); ctx_id = context_create(fd);
......
...@@ -98,6 +98,8 @@ int main(int argc, char **argv) ...@@ -98,6 +98,8 @@ int main(int argc, char **argv)
int fd; int fd;
int devid; int devid;
drmtest_skip_on_simulation();
if (argc != 1) { if (argc != 1) {
fprintf(stderr, "usage: %s\n", argv[0]); fprintf(stderr, "usage: %s\n", argv[0]);
exit(-1); exit(-1);
......
...@@ -131,6 +131,7 @@ int main(int argc, char **argv) ...@@ -131,6 +131,7 @@ int main(int argc, char **argv)
int num_rings; int num_rings;
drmtest_subtest_init(argc, argv); drmtest_subtest_init(argc, argv);
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
devid = intel_get_drm_devid(fd); devid = intel_get_drm_devid(fd);
......
...@@ -108,6 +108,8 @@ int main(int argc, char **argv) ...@@ -108,6 +108,8 @@ int main(int argc, char **argv)
uint32_t reloc_ofs; uint32_t reloc_ofs;
unsigned batch_size; unsigned batch_size;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
for (batch_size = BATCH_SIZE/4; batch_size <= BATCH_SIZE; batch_size += 4096) { for (batch_size = BATCH_SIZE/4; batch_size <= BATCH_SIZE; batch_size += 4096) {
......
...@@ -250,6 +250,8 @@ int main(int argc, char **argv) ...@@ -250,6 +250,8 @@ int main(int argc, char **argv)
{ {
int i; int i;
drmtest_skip_on_simulation();
if (argc > 1) { if (argc > 1) {
for (i = 1; i < argc; i++) { for (i = 1; i < argc; i++) {
int object_size = atoi(argv[i]); int object_size = atoi(argv[i]);
......
...@@ -127,6 +127,8 @@ int main(int argc, char **argv) ...@@ -127,6 +127,8 @@ int main(int argc, char **argv)
{ .name = NULL }, { .name = NULL },
}, *p; }, *p;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
for (n = 0; n < MAX_NUM_EXEC; n++) { for (n = 0; n < MAX_NUM_EXEC; n++) {
......
...@@ -208,6 +208,7 @@ int ...@@ -208,6 +208,7 @@ int
main(int argc, char **argv) main(int argc, char **argv)
{ {
drmtest_subtest_init(argc, argv); drmtest_subtest_init(argc, argv);
drmtest_skip_on_simulation();
if (drmtest_run_subtest("bo-write-verify-none")) if (drmtest_run_subtest("bo-write-verify-none"))
assert (run_test(0, bo_write_verify, I915_TILING_NONE, 80) == 0); assert (run_test(0, bo_write_verify, I915_TILING_NONE, 80) == 0);
......
...@@ -159,9 +159,15 @@ static void run_test(int fd, int num_fences, int expected_errno) ...@@ -159,9 +159,15 @@ static void run_test(int fd, int num_fences, int expected_errno)
int int
main(int argc, char **argv) main(int argc, char **argv)
{ {
int fd = drm_open_any(); int fd;
int num_fences = get_num_fences(fd); int num_fences;
uint32_t devid = intel_get_drm_devid(fd); 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); assert(num_fences <= MAX_FENCES);
......
...@@ -99,6 +99,7 @@ main(int argc, char **argv) ...@@ -99,6 +99,7 @@ main(int argc, char **argv)
int fd, loop, i; int fd, loop, i;
drmtest_subtest_init(argc, argv); drmtest_subtest_init(argc, argv);
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
......
...@@ -77,6 +77,8 @@ main(int argc, char **argv) ...@@ -77,6 +77,8 @@ main(int argc, char **argv)
uint32_t *ptr; uint32_t *ptr;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
handle = gem_create(fd, OBJ_SIZE); handle = gem_create(fd, OBJ_SIZE);
......
...@@ -61,6 +61,8 @@ int main(int argc, char **argv) ...@@ -61,6 +61,8 @@ int main(int argc, char **argv)
int loop, i, tiling; int loop, i, tiling;
int fd; int fd;
drmtest_skip_on_simulation();
if (argc > 1) if (argc > 1)
size = atoi(argv[1]); size = atoi(argv[1]);
if (size == 0) { if (size == 0) {
......
...@@ -65,6 +65,8 @@ int main(int argc, char **argv) ...@@ -65,6 +65,8 @@ int main(int argc, char **argv)
unsigned long pitch, act_size; unsigned long pitch, act_size;
int fd, i, devid; int fd, i, devid;
drmtest_skip_on_simulation();
memset(blob, 'A', sizeof(blob)); memset(blob, 'A', sizeof(blob));
fd = drm_open_any(); fd = drm_open_any();
......
...@@ -87,6 +87,8 @@ int main(int argc, char **argv) ...@@ -87,6 +87,8 @@ int main(int argc, char **argv)
{ {
int fd; int fd;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
test_large_object(fd); test_large_object(fd);
......
...@@ -240,6 +240,8 @@ int main(int argc, char **argv) ...@@ -240,6 +240,8 @@ int main(int argc, char **argv)
{ {
int fd, count = 0; int fd, count = 0;
drmtest_skip_on_simulation();
drmtest_subtest_init(argc, argv); drmtest_subtest_init(argc, argv);
fd = drm_open_any(); fd = drm_open_any();
......
...@@ -183,6 +183,8 @@ int main(int argc, char **argv) ...@@ -183,6 +183,8 @@ int main(int argc, char **argv)
uint32_t handle; uint32_t handle;
int fd, i; int fd, i;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
handle = gem_create(fd, 4096); handle = gem_create(fd, 4096);
......
...@@ -83,6 +83,8 @@ int main(int argc, char **argv) ...@@ -83,6 +83,8 @@ int main(int argc, char **argv)
{ {
int fd, i; int fd, i;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
/* we have 32bit of address space, so try to fit one MB more /* we have 32bit of address space, so try to fit one MB more
......
...@@ -258,6 +258,7 @@ int main(int argc, char **argv) ...@@ -258,6 +258,7 @@ int main(int argc, char **argv)
srandom(0xdeadbeef); srandom(0xdeadbeef);
drmtest_subtest_init(argc, argv); drmtest_subtest_init(argc, argv);
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
......
...@@ -203,6 +203,8 @@ int main(int argc, char **argv) ...@@ -203,6 +203,8 @@ int main(int argc, char **argv)
uint32_t *handle, *offset; uint32_t *handle, *offset;
int fd, i; int fd, i;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
if (!test_can_pin(fd)) if (!test_can_pin(fd))
......
...@@ -91,6 +91,8 @@ int main(int argc, char **argv) ...@@ -91,6 +91,8 @@ int main(int argc, char **argv)
uint32_t *src, dst; uint32_t *src, dst;
int fd, count; int fd, count;
drmtest_skip_on_simulation();
if (argc > 1) if (argc > 1)
object_size = atoi(argv[1]); object_size = atoi(argv[1]);
if (object_size == 0) if (object_size == 0)
......
...@@ -82,6 +82,8 @@ int main(int argc, char **argv) ...@@ -82,6 +82,8 @@ int main(int argc, char **argv)
int ret; int ret;
int handle; int handle;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
handle = gem_create(fd, OBJECT_SIZE); handle = gem_create(fd, OBJECT_SIZE);
......
...@@ -148,6 +148,8 @@ int main(int argc, char **argv) ...@@ -148,6 +148,8 @@ int main(int argc, char **argv)
int fd, i, ring; int fd, i, ring;
uint32_t test; uint32_t test;
drmtest_skip_on_simulation();
memset(blob, 'A', sizeof(blob)); memset(blob, 'A', sizeof(blob));
fd = drm_open_any(); fd = drm_open_any();
......
...@@ -71,6 +71,8 @@ int main(int argc, char **argv) ...@@ -71,6 +71,8 @@ int main(int argc, char **argv)
uint32_t start = 0; uint32_t start = 0;
int i, j, fd, count; int i, j, fd, count;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
render_copy = get_render_copyfunc(intel_get_drm_devid(fd)); render_copy = get_render_copyfunc(intel_get_drm_devid(fd));
......
...@@ -206,6 +206,7 @@ int main(int argc, char **argv) ...@@ -206,6 +206,7 @@ int main(int argc, char **argv)
int fd, fails = 0; int fd, fails = 0;
drmtest_subtest_init(argc, argv); drmtest_subtest_init(argc, argv);
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
......
...@@ -647,6 +647,8 @@ int main(int argc, char **argv) ...@@ -647,6 +647,8 @@ int main(int argc, char **argv)
int wcount = 0; int wcount = 0;
int r = -1; int r = -1;
drmtest_skip_on_simulation();
parse_options(argc, argv); parse_options(argc, argv);
card_index = drm_get_card(0); card_index = drm_get_card(0);
......
...@@ -234,6 +234,7 @@ int main(int argc, char **argv) ...@@ -234,6 +234,7 @@ int main(int argc, char **argv)
uint32_t tiling, tiling_after; uint32_t tiling, tiling_after;
drmtest_subtest_init(argc, argv); drmtest_subtest_init(argc, argv);
drmtest_skip_on_simulation();
for (i = 0; i < 1024*256; i++) for (i = 0; i < 1024*256; i++)
data[i] = i; data[i] = i;
......
...@@ -58,6 +58,8 @@ int main(int argc, char **argv) ...@@ -58,6 +58,8 @@ int main(int argc, char **argv)
bool tiling_changed; bool tiling_changed;
int tile_height; int tile_height;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
if (IS_GEN2(intel_get_drm_devid(fd))) if (IS_GEN2(intel_get_drm_devid(fd)))
......
...@@ -56,6 +56,8 @@ int main(int argc, char **argv) ...@@ -56,6 +56,8 @@ int main(int argc, char **argv)
int i; int i;
uint32_t handle; uint32_t handle;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
for (i = 0; i < OBJECT_SIZE/4; i++) for (i = 0; i < OBJECT_SIZE/4; i++)
......
...@@ -137,6 +137,8 @@ int main(int argc, char **argv) ...@@ -137,6 +137,8 @@ int main(int argc, char **argv)
int fd; int fd;
int devid; int devid;
drmtest_skip_on_simulation();
if (argc != 1) { if (argc != 1) {
fprintf(stderr, "usage: %s\n", argv[0]); fprintf(stderr, "usage: %s\n", argv[0]);
exit(-1); exit(-1);
......
...@@ -95,6 +95,8 @@ int main(int argc, char **argv) ...@@ -95,6 +95,8 @@ int main(int argc, char **argv)
unsigned long pitch = 0; unsigned long pitch = 0;
int r; int r;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
assert(fd >= 0); assert(fd >= 0);
......
...@@ -108,6 +108,8 @@ int main(int argc, char **argv) ...@@ -108,6 +108,8 @@ int main(int argc, char **argv)
uint32_t start = 0; uint32_t start = 0;
int fd, i, count; int fd, i, count;
drmtest_skip_on_simulation();
fd = drm_open_any(); fd = drm_open_any();
count = 3 * gem_aperture_size(fd) / (1024*1024) / 2; count = 3 * gem_aperture_size(fd) / (1024*1024) / 2;
if (count > intel_get_total_ram_mb() * 9 / 10) { if (count > intel_get_total_ram_mb() * 9 / 10) {
......