On Fri, Mar 18, 2016 at 03:08:56PM -0300, Tiago Vignatti wrote:
This patch adds ioctl-errors subtest to be used for exercising prime sync ioctl errors.
The subtest constantly interrupts via signals a function doing concurrent blit to stress out the right usage of prime_sync_*, making sure these ioctl errors are handled accordingly. Important to note that in case of failure (e.g. in a case where the ioctl wouldn't try again in a return error) this test does not reliably catch the problem with 100% of accuracy.
v2: fix prime sync direction when reading mmap'ed file. v3: change the upper bound using time rather than loops
Cc: Chris Wilson chris@chris-wilson.co.uk Signed-off-by: Tiago Vignatti tiago.vignatti@intel.com
+static void test_ioctl_errors(void) +{
- int ncpus = sysconf(_SC_NPROCESSORS_ONLN);
- igt_fork_signal_helper();
- for (int num_children = 1; num_children <= 8 *ncpus; num_children <<= 1) {
Hmm, that's a lot of buffers....
I'm going to stick a couple of intel_require_memmory and intel_check_memory() here.
Wait that's no moon. Oops, give me back my swap!
igt_fork(child, num_children) {
struct timespec start = {};
while (igt_nsec_elapsed(&start) <= num_children)
igt_nsec_elapsed().... Barely any time at all!
Presumed you wanted seconds, fixed the memleak and pushed. Thanks, -Chris