diff options
author | Ben Widawsky <benjamin.widawsky@intel.com> | 2013-12-04 10:52:21 -0800 |
---|---|---|
committer | Ben Widawsky <benjamin.widawsky@intel.com> | 2013-12-05 20:31:05 -0800 |
commit | bbf8f873363118fad85a5015c51c395e763bc079 (patch) | |
tree | ba3af77c2fb2649cd92ed1192dff4314534ebd34 | |
parent | d588eae6b2fe6f84bf1851950d406e4d072f5dbb (diff) |
The code opens a bunch of file descriptors, which internally will now do
a bunch of allocations. This is guaranteed to OOM, which makes the test
not useful. We could either skip, or adjust the size.
The number (8MB) should be sufficient through gen8 with 4GB GGTT.
NOTE: If we move away from allocating the page tables on init, we could
remove this limitation.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
-rw-r--r-- | tests/gem_close_race.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/gem_close_race.c b/tests/gem_close_race.c index 6064c026..9699873e 100644 --- a/tests/gem_close_race.c +++ b/tests/gem_close_race.c @@ -136,11 +136,12 @@ static void run(int child) gem_read(fd, handle, 0, &handle, sizeof(handle)); } -#define NUM_FD 32000 +static int NUM_FD = 0; +#define MAX_NUM_FD 32000 struct thread { pthread_mutex_t mutex; - int fds[NUM_FD]; + int fds[MAX_NUM_FD]; int done; }; @@ -218,7 +219,12 @@ igt_main int fd = open(device, O_RDWR); igt_assert(fd != -1); devid = intel_get_drm_devid(fd); + if (gem_uses_full_ppgtt(fd)) { + NUM_FD = intel_get_total_ram_mb() / (8<<20); + } else + NUM_FD = MAX_NUM_FD; close(fd); + } igt_subtest("process-exit") { |