Message ID | 20200129222456.1503424-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [i-g-t] i915/gem_exec_reloc: Add SIGINT injection | expand |
On 29/01/20 14:24, Chris Wilson wrote: > Do a pass over gem_exec_reloc where we inject lots of SIGINTs. > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Antonio Argenziano <antonio.argenziano@intel.com> LGTM. Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com> > --- > tests/i915/gem_exec_reloc.c | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/tests/i915/gem_exec_reloc.c b/tests/i915/gem_exec_reloc.c > index bc904a0ae..1aa03fba3 100644 > --- a/tests/i915/gem_exec_reloc.c > +++ b/tests/i915/gem_exec_reloc.c > @@ -379,7 +379,8 @@ static bool has_64b_reloc(int fd) > > #define NORELOC 1 > #define ACTIVE 2 > -#define HANG 4 > +#define INTERRUPTIBLE 4 > +#define HANG 8 > static void basic_reloc(int fd, unsigned before, unsigned after, unsigned flags) > { > #define OBJSZ 8192 > @@ -735,6 +736,7 @@ igt_main > { "", 0 , true}, > { "-noreloc", NORELOC, true }, > { "-active", ACTIVE, true }, > + { "-interruptible", ACTIVE | INTERRUPTIBLE }, > { "-hang", ACTIVE | HANG }, > { }, > }, *f; > @@ -762,14 +764,17 @@ igt_main > f->name) { > if ((m->before | m->after) & I915_GEM_DOMAIN_WC) > igt_require(gem_mmap__has_wc(fd)); > - basic_reloc(fd, m->before, m->after, f->flags); > + igt_while_interruptible(f->flags & INTERRUPTIBLE) > + basic_reloc(fd, m->before, m->after, f->flags); > } > } > > if (!(f->flags & NORELOC)) { > igt_subtest_f("%srange%s", > - f->basic ? "basic-" : "", f->name) > - basic_range(fd, f->flags); > + f->basic ? "basic-" : "", f->name) { > + igt_while_interruptible(f->flags & INTERRUPTIBLE) > + basic_range(fd, f->flags); > + } > } > > igt_fixture { >
diff --git a/tests/i915/gem_exec_reloc.c b/tests/i915/gem_exec_reloc.c index bc904a0ae..1aa03fba3 100644 --- a/tests/i915/gem_exec_reloc.c +++ b/tests/i915/gem_exec_reloc.c @@ -379,7 +379,8 @@ static bool has_64b_reloc(int fd) #define NORELOC 1 #define ACTIVE 2 -#define HANG 4 +#define INTERRUPTIBLE 4 +#define HANG 8 static void basic_reloc(int fd, unsigned before, unsigned after, unsigned flags) { #define OBJSZ 8192 @@ -735,6 +736,7 @@ igt_main { "", 0 , true}, { "-noreloc", NORELOC, true }, { "-active", ACTIVE, true }, + { "-interruptible", ACTIVE | INTERRUPTIBLE }, { "-hang", ACTIVE | HANG }, { }, }, *f; @@ -762,14 +764,17 @@ igt_main f->name) { if ((m->before | m->after) & I915_GEM_DOMAIN_WC) igt_require(gem_mmap__has_wc(fd)); - basic_reloc(fd, m->before, m->after, f->flags); + igt_while_interruptible(f->flags & INTERRUPTIBLE) + basic_reloc(fd, m->before, m->after, f->flags); } } if (!(f->flags & NORELOC)) { igt_subtest_f("%srange%s", - f->basic ? "basic-" : "", f->name) - basic_range(fd, f->flags); + f->basic ? "basic-" : "", f->name) { + igt_while_interruptible(f->flags & INTERRUPTIBLE) + basic_range(fd, f->flags); + } } igt_fixture {
Do a pass over gem_exec_reloc where we inject lots of SIGINTs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Antonio Argenziano <antonio.argenziano@intel.com> --- tests/i915/gem_exec_reloc.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)