diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-01-07 11:19:26 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-01-19 14:03:15 +0000 |
commit | 42291f25100cd01653b3fb3a2a1fbe6975e9c1bf (patch) | |
tree | 614482a391de4afb27c02780f24ee58c93300d2e /lib/igt_aux.h | |
parent | 51e965f299284b3c9b96ac5e384ddeb22bd8d1fd (diff) |
gem_concurrent_blit: Don't call igt_require() outside of a subtest/fixture
gem_concurrent_blit tries to ensure that it doesn't try and run a test
that would grind the system to a halt, i.e. unexpectedly cause swap
thrashing. It currently calls intel_require_memory(), but outside of
the subtest (as the tests use fork, it cannot do requirement testing
within the test children) - but intel_require_memory() calls
igt_require() and triggers and abort. Wrapping that initial require
within an igt_fixture() stops the abort(), but also prevents any further
testing.
This patch restructures the requirement checking to ordinary conditions,
which though allowing the test to run, also prevents listing of subtests
on machines which cannot handle them.
Diffstat (limited to 'lib/igt_aux.h')
-rw-r--r-- | lib/igt_aux.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/igt_aux.h b/lib/igt_aux.h index 95028665..82bd5962 100644 --- a/lib/igt_aux.h +++ b/lib/igt_aux.h @@ -86,6 +86,8 @@ uint64_t intel_get_avail_ram_mb(void); uint64_t intel_get_total_ram_mb(void); uint64_t intel_get_total_swap_mb(void); +int __intel_check_memory(uint32_t count, uint64_t size, unsigned mode, + uint64_t *out_required, uint64_t *out_total); void intel_require_memory(uint32_t count, uint64_t size, unsigned mode); #define CHECK_RAM 0x1 #define CHECK_SWAP 0x2 |