Message ID | 20180912093306.23537-1-tvrtko.ursulin@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [PATH,i-g-t,1/2] intel: Be consistent with test results on simulation | expand |
Quoting Tvrtko Ursulin (2018-09-12 10:33:05) > From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > > 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 <tvrtko.ursulin@intel.com> > Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Makes sense. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> -Chris
diff --git a/lib/intel_os.c b/lib/intel_os.c index 29a27272e782..e1e31e23069b 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)