summaryrefslogtreecommitdiff
path: root/lib/intel_os.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-11-17 14:46:50 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-11-17 15:12:52 +0100
commit16f99ee419f56bf7b56657c78ecaa22ccf0c2982 (patch)
treed890f3bf8895cae4ec48d4f9f160b4e3add08781 /lib/intel_os.c
parenta535cdedfbd280c5e07be1c2445e09973836509a (diff)
lib/os: Push simulation test down into intel_require_memory
This has the upside that we'll never forget to add it to thrashing tests. But we'll also never miss to move it when adding basic functionality tests to existing binaries. Chris already started this refining work in e.g. commit d77eda6614a1955717f224be023dedf74eb7735d Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Nov 14 07:45:40 2014 +0000 igt/gem_linear_blits: Require that we do the full test by moving igt_skip_on_simulation into subtests. Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'lib/intel_os.c')
-rw-r--r--lib/intel_os.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/intel_os.c b/lib/intel_os.c
index c1b88bcc..db7889b4 100644
--- a/lib/intel_os.c
+++ b/lib/intel_os.c
@@ -210,7 +210,10 @@ intel_get_total_swap_mb(void)
* there is not enough RAM + SWAP!
*
* If there is not enough RAM this function calls igt_skip with an appropriate
- * message. It only ever returns if the requirement is fullfilled.
+ * message. It only ever returns if the requirement is fullfilled. This function
+ * also causes the test to be skipped automatically on simulation under the
+ * assumption that any test that needs to check for memory requirements is a
+ * thrashing test unsuitable for slow simulated systems.
*/
void intel_require_memory(uint32_t count, uint32_t size, unsigned mode)
{
@@ -239,6 +242,8 @@ void intel_require_memory(uint32_t count, uint32_t size, unsigned mode)
(long long)required, (long long)total,
mode & (CHECK_RAM | CHECK_SWAP) ? "RAM" : "",
mode & CHECK_SWAP ? " + swap": "");
+
+ igt_skip_on_simulation();
}
void