diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-27 19:58:57 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-27 19:41:52 +0100 |
commit | ebfd01908f787876040a679fc7895828b23d268d (patch) | |
tree | 99780191f624b1f2f7594003918b49ff1357abcd | |
parent | 60e3930987134ff855cb24dd1021eb5225b18857 (diff) |
tests/gem_lut_handle: Quit when we hit ENOSPC
I'd been working under the falsehood that we would always generate an
error for an invalid reloc->target_handle before reserving any object.
However, only the execlist is checked up front for validity before
reservation so ENOSPC is a genuine error condition raised by the test.
Fix it so that we stop reporting that limit as a test failure.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65391
-rw-r--r-- | tests/gem_lut_handle.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/gem_lut_handle.c b/tests/gem_lut_handle.c index 34f886bf..339e7632 100644 --- a/tests/gem_lut_handle.c +++ b/tests/gem_lut_handle.c @@ -126,7 +126,7 @@ static int many_exec(int fd, uint32_t batch, int num_exec, int num_reloc, unsign uint32_t target; if (flags & BROKEN) { - target = -(rand() % 4096); + target = -(rand() % 4096) - 1; } else { target = rand() % (num_exec + 1); if ((flags & USE_LUT) == 0) @@ -198,6 +198,10 @@ int main(int argc, char **argv) fail(exec(fd, handle, USE_LUT | BROKEN)); for (i = 2; i <= 65536; i *= 2) { + if (many_exec(fd, handle, i+1, i+1, NORMAL) == -1 && + errno == ENOSPC) + break; + pass(many_exec(fd, handle, i-1, i-1, NORMAL)); pass(many_exec(fd, handle, i-1, i, NORMAL)); pass(many_exec(fd, handle, i-1, i+1, NORMAL)); |