diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2014-12-04 13:42:12 +0000 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2014-12-04 16:48:06 +0000 |
commit | 88ff1cec3a830fc467b91efb7e1dcdb4d82a0e17 (patch) | |
tree | 4ae5e683560adcc8ceabf4e4fdb01adcc309a0d8 | |
parent | b3cce757b5e8c0d6b40e2c401e5391162d58e8c6 (diff) |
gem_bad_reloc: Don't flip-flop between SKIP and PASS
Here is a cheap way for this test to give consistent results. This
doesn't change the usefulness of this test, hopefully.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85270
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
-rw-r--r-- | tests/gem_bad_reloc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/gem_bad_reloc.c b/tests/gem_bad_reloc.c index cf1f2faf..36d8c09a 100644 --- a/tests/gem_bad_reloc.c +++ b/tests/gem_bad_reloc.c @@ -90,7 +90,15 @@ static int negative_reloc(int fd, unsigned flags) gem_close(fd, gem_exec[1].handle); igt_info("Found offset %ld for 4k batch\n", (long)gem_exec[0].offset); - igt_require(gem_exec[0].offset < BIAS); + /* + * Ideally we'd like to be able to control where the kernel is going to + * place the buffer. We don't SKIP here because it causes the test + * to "randomly" flip-flop between the SKIP and PASS states. + */ + if (gem_exec[0].offset < BIAS) { + igt_info("Offset is below BIAS, not testing anything\n"); + return 0; + } memset(gem_reloc, 0, sizeof(gem_reloc)); for (i = 0; i < sizeof(gem_reloc)/sizeof(gem_reloc[0]); i++) { |