igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [igt-dev] [PATH i-g-t 1/2] intel: Be consistent with test results on simulation
@ 2018-09-12  9:33 Tvrtko Ursulin
  2018-09-12  9:33 ` [Intel-gfx] [PATH i-g-t 2/2] core: Show backtrace from igt_skip_on_simulation Tvrtko Ursulin
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Tvrtko Ursulin @ 2018-09-12  9:33 UTC (permalink / raw)
  To: igt-dev; +Cc: Intel-gfx, Tvrtko Ursulin

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>
---
 lib/intel_os.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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)
-- 
2.17.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-09-14 15:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-12  9:33 [igt-dev] [PATH i-g-t 1/2] intel: Be consistent with test results on simulation Tvrtko Ursulin
2018-09-12  9:33 ` [Intel-gfx] [PATH i-g-t 2/2] core: Show backtrace from igt_skip_on_simulation Tvrtko Ursulin
2018-09-14  9:12   ` [igt-dev] " Daniel Vetter
2018-09-14  9:19     ` Tvrtko Ursulin
2018-09-14  9:46       ` Daniel Vetter
2018-09-14  9:49         ` [igt-dev] [Intel-gfx] " Chris Wilson
2018-09-14 15:27           ` Daniel Vetter
2018-09-12 10:15 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [PATH,i-g-t,1/2] intel: Be consistent with test results on simulation Patchwork
2018-09-12 12:02 ` [igt-dev] [Intel-gfx] [PATH i-g-t 1/2] " Chris Wilson
2018-09-12 13:05 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [PATH,i-g-t,1/2] " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).