summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-06-22 11:51:29 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-06-22 11:52:43 +0100
commitee4baf0c8d1a9d6990791dc1e468db3619d93cf0 (patch)
treeddd00bdbbd0a94a8e7ed0b3f905b0aece66ddfc6 /tests
parent310eaeb60579110c5a8e2f31d87ec659ab66b3b8 (diff)
igt/gem_reloc_overflow: Fix limits for buffercount overflow
It's hard to overflow a 64-bit value from a 32-bit uabi... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_reloc_overflow.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/gem_reloc_overflow.c b/tests/gem_reloc_overflow.c
index f9364b23..3419e94f 100644
--- a/tests/gem_reloc_overflow.c
+++ b/tests/gem_reloc_overflow.c
@@ -339,6 +339,8 @@ static void reloc_tests(const char *suffix)
static void buffer_count_tests(void)
{
igt_subtest("buffercount-overflow") {
+ igt_skip_on(SIZE_MAX / sizeof(*obj) >= UINT_MAX);
+
for (int i = 0; i < num; i++) {
obj[i].relocation_count = 0;
obj[i].relocs_ptr = 0;