Factor in kernel object overhead when checking available memory for tests

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson
2014-05-28 09:01:56 +01:00
parent e4ba3b75e6
commit 321273ff76
5 changed files with 49 additions and 17 deletions
+1 -2
View File
@@ -171,8 +171,7 @@ igt_simple_main
(long)intel_get_avail_ram_mb(),
(long)intel_get_total_ram_mb(),
(long)intel_get_total_swap_mb());
igt_require(count < intel_get_avail_ram_mb() + intel_get_total_swap_mb());
igt_require(intel_check_memory(count, 1024*1024, CHECK_RAM | CHECK_SWAP));
for (n = 0; n < count; n++) {
bo_handles[n] = create_bo_and_fill(fd);