All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH i-g-t] i915/gem_exec_reloc: Add SIGINT injection
Date: Wed, 29 Jan 2020 22:24:56 +0000	[thread overview]
Message-ID: <20200129222456.1503424-1-chris@chris-wilson.co.uk> (raw)

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(-)

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 {
-- 
2.25.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] i915/gem_exec_reloc: Add SIGINT injection
Date: Wed, 29 Jan 2020 22:24:56 +0000	[thread overview]
Message-ID: <20200129222456.1503424-1-chris@chris-wilson.co.uk> (raw)

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(-)

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 {
-- 
2.25.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2020-01-29 22:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-29 22:24 Chris Wilson [this message]
2020-01-29 22:24 ` [igt-dev] [PATCH i-g-t] i915/gem_exec_reloc: Add SIGINT injection Chris Wilson
2020-01-29 22:28 ` [Intel-gfx] " Antonio Argenziano
2020-01-29 22:28   ` [igt-dev] " Antonio Argenziano
2020-01-29 23:35 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2020-01-29 23:55   ` Antonio Argenziano
2020-01-29 23:57     ` Chris Wilson
2020-01-30  0:03       ` Antonio Argenziano
2020-01-30 10:32     ` Petri Latvala
2020-01-30 10:33 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2020-02-01  9:04 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-02-01 14:03 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200129222456.1503424-1-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.