From 468febc4c746f168e885e0d662ec3adb0cca60f6 Mon Sep 17 00:00:00 2001 From: Tvrtko Ursulin Date: Wed, 12 Sep 2018 10:33:05 +0100 Subject: intel: Be consistent with test results on simulation Tests which call intel_require_memory currently always skip on simulation, unless they fail first due insufficient memory. This can create different outcomes depending on the simulation environment so move the simulation skip to the start of the function for 100% consistency in results. Signed-off-by: Tvrtko Ursulin Cc: Radoslaw Szwichtenberg Reviewed-by: Chris Wilson --- lib/intel_os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/intel_os.c') diff --git a/lib/intel_os.c b/lib/intel_os.c index 29a27272..e1e31e23 100644 --- a/lib/intel_os.c +++ b/lib/intel_os.c @@ -375,6 +375,8 @@ void intel_require_memory(uint64_t count, uint64_t size, unsigned mode) uint64_t required, total; bool sufficient_memory; + igt_skip_on_simulation(); + sufficient_memory = __intel_check_memory(count, size, mode, &required, &total); if (!sufficient_memory) { @@ -406,8 +408,6 @@ void intel_require_memory(uint64_t count, uint64_t size, unsigned mode) mode & (CHECK_RAM | CHECK_SWAP) ? "RAM" : "", mode & CHECK_SWAP ? " + swap": "", (long long)vfs_file_max()); - - igt_skip_on_simulation(); } void intel_purge_vm_caches(int drm_fd) -- cgit v1.2.3