Commit ea332b64 authored by Chris Wilson's avatar Chris Wilson 😣

lib: Test against available swap

Even if we ignore the double-accounting bug in Linux, we need to be sure
that the remaining swapspace is adequate for running our test as the
system may be under load before we even start.
Signed-off-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
parent 37773d91
......@@ -132,7 +132,7 @@ intel_get_total_swap_mb(void)
ret = sysinfo(&sysinf);
assert(ret == 0);
retval = sysinf.totalswap;
retval = sysinf.freeswap;
retval *= sysinf.mem_unit;
#elif defined(HAVE_SWAPCTL) /* Solaris */
long pagesize = sysconf(_SC_PAGESIZE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment