summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-05-11 17:06:28 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-05-12 11:37:21 +0200
commitd7050f9f79fee8fb7c790f355c984d9e5141e1c5 (patch)
treeea1ff5b7b729b0fc22f29ee5af8df8860ae6c7e8 /tests
parent701d8fdb363443453c4b613e9180f75ad36a7321 (diff)
lib/igt_aux: Polish docs for igt_interruptible
- Give __ prefix to internal funcstion and structs, only igt_interruptible is used by tests. - Move docs to igt_interruptible and adjust. - Explain more clearly how the timeout is getting doubled each iteration until no more interruptions happen. Also rename the argument to give it a more meaningful name in the docs. - Link from other functions to this one for cross-referencing. - Rename to igt_do_interruptible to make it clearer it's a loop, inspired by do {} while () loops. v2: Rename instead to igt_while_interruptible and fix typos (Chris). And add gtk-doc for igt_ioctl, too. Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_concurrent_all.c4
-rw-r--r--tests/gem_ctx_switch.c2
-rw-r--r--tests/gem_exec_flush.c8
-rw-r--r--tests/gem_exec_whisper.c2
-rw-r--r--tests/gem_ringfill.c2
-rw-r--r--tests/gem_softpin.c6
-rw-r--r--tests/prime_mmap_coherency.c2
7 files changed, 13 insertions, 13 deletions
diff --git a/tests/gem_concurrent_all.c b/tests/gem_concurrent_all.c
index c0af60d4..019628ed 100644
--- a/tests/gem_concurrent_all.c
+++ b/tests/gem_concurrent_all.c
@@ -1294,7 +1294,7 @@ static void run_interruptible(struct buffers *buffers,
do_hang do_hang_func)
{
pass = 0;
- igt_interruptible(true)
+ igt_while_interruptible(true)
do_test_func(buffers, do_copy_func, do_hang_func);
igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0);
}
@@ -1340,7 +1340,7 @@ static void __run_forked(struct buffers *buffers,
buffers_reset(buffers, true);
buffers_create(buffers);
- igt_interruptible(interrupt) {
+ igt_while_interruptible(interrupt) {
for (pass = 0; pass < loops; pass++)
do_test_func(buffers,
do_copy_func,
diff --git a/tests/gem_ctx_switch.c b/tests/gem_ctx_switch.c
index 004ba227..7b273368 100644
--- a/tests/gem_ctx_switch.c
+++ b/tests/gem_ctx_switch.c
@@ -116,7 +116,7 @@ static void single(int fd, uint32_t handle,
clock_gettime(CLOCK_MONOTONIC, &start);
do {
- igt_interruptible(flags & INTERRUPTIBLE) {
+ igt_while_interruptible(flags & INTERRUPTIBLE) {
for (int loop = 0; loop < 1024; loop++) {
execbuf.rsvd1 = contexts[loop % 64];
reloc.presumed_offset = 0;
diff --git a/tests/gem_exec_flush.c b/tests/gem_exec_flush.c
index 705ef849..93265ae5 100644
--- a/tests/gem_exec_flush.c
+++ b/tests/gem_exec_flush.c
@@ -216,7 +216,7 @@ overwrite:
if (flags & SET_DOMAIN) {
unsigned domain = flags & WC ? I915_GEM_DOMAIN_GTT : I915_GEM_DOMAIN_CPU;
- igt_interruptible(flags & INTERRUPTIBLE)
+ igt_while_interruptible(flags & INTERRUPTIBLE)
gem_set_domain(fd, obj[0].handle,
domain, (flags & WRITE) ? domain : 0);
@@ -230,7 +230,7 @@ overwrite:
} else if (flags & KERNEL) {
uint32_t val;
- igt_interruptible(flags & INTERRUPTIBLE)
+ igt_while_interruptible(flags & INTERRUPTIBLE)
gem_read(fd, obj[0].handle,
i*sizeof(uint32_t),
&val, sizeof(val));
@@ -242,13 +242,13 @@ overwrite:
if (flags & WRITE) {
val = 0xdeadbeef;
- igt_interruptible(flags & INTERRUPTIBLE)
+ igt_while_interruptible(flags & INTERRUPTIBLE)
gem_write(fd, obj[0].handle,
i*sizeof(uint32_t),
&val, sizeof(val));
}
} else {
- igt_interruptible(flags & INTERRUPTIBLE)
+ igt_while_interruptible(flags & INTERRUPTIBLE)
gem_sync(fd, obj[0].handle);
if (!(flags & (BEFORE | COHERENT)) &&
diff --git a/tests/gem_exec_whisper.c b/tests/gem_exec_whisper.c
index 8db475e2..e0739470 100644
--- a/tests/gem_exec_whisper.c
+++ b/tests/gem_exec_whisper.c
@@ -225,7 +225,7 @@ static void whisper(int fd, unsigned engine, unsigned flags)
gem_write(fd, batches[n].handle, 0, batch, sizeof(batch));
}
- igt_interruptible(flags & INTERRUPTIBLE) {
+ igt_while_interruptible(flags & INTERRUPTIBLE) {
for (pass = 0; pass < 1024; pass++) {
uint64_t offset;
diff --git a/tests/gem_ringfill.c b/tests/gem_ringfill.c
index 52192d9b..e503913d 100644
--- a/tests/gem_ringfill.c
+++ b/tests/gem_ringfill.c
@@ -75,7 +75,7 @@ static void fill_ring(int fd,
* doing this, we aren't likely to with this test.
*/
igt_debug("Executing execbuf %d times\n", 128*1024/(8*4));
- igt_interruptible(flags & INTERRUPTIBLE) {
+ igt_while_interruptible(flags & INTERRUPTIBLE) {
for (int i = 0; i < 128*1024 / (8 * 4); i++)
gem_execbuf(fd, execbuf);
}
diff --git a/tests/gem_softpin.c b/tests/gem_softpin.c
index 1a9ef02b..a6d4274c 100644
--- a/tests/gem_softpin.c
+++ b/tests/gem_softpin.c
@@ -492,7 +492,7 @@ igt_main
igt_subtest("noreloc")
test_noreloc(fd, NOSLEEP);
igt_subtest("noreloc-interruptible")
- igt_interruptible(true) test_noreloc(fd, NOSLEEP);
+ igt_while_interruptible(true) test_noreloc(fd, NOSLEEP);
igt_subtest("noreloc-S3")
test_noreloc(fd, SUSPEND);
igt_subtest("noreloc-S4")
@@ -500,9 +500,9 @@ igt_main
for (int signal = 0; signal <= 1; signal++) {
igt_subtest_f("evict-active%s", signal ? "-interruptible" : "")
- igt_interruptible(signal) test_evict_active(fd);
+ igt_while_interruptible(signal) test_evict_active(fd);
igt_subtest_f("evict-snoop%s", signal ? "-interruptible" : "")
- igt_interruptible(signal) test_evict_snoop(fd);
+ igt_while_interruptible(signal) test_evict_snoop(fd);
}
igt_subtest("evict-hang")
test_evict_hang(fd);
diff --git a/tests/prime_mmap_coherency.c b/tests/prime_mmap_coherency.c
index 5cacdc5d..fb67ef1f 100644
--- a/tests/prime_mmap_coherency.c
+++ b/tests/prime_mmap_coherency.c
@@ -277,7 +277,7 @@ static void test_ioctl_errors(void)
}
igt_fork(child, num_children)
- igt_interruptible(true) blit_and_cmp();
+ igt_while_interruptible(true) blit_and_cmp();
igt_waitchildren();
}
}