mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-20 14:26:17 +00:00
tests/gem_wait_rendering_timeout: test the timeout case
When I've first tried this it somehow failed, but I can't reproduce this any more. I guess I've hunted a ghost.
This commit is contained in:
parent
b711bfe54f
commit
04dfa492d1
@ -163,8 +163,6 @@ int main(int argc, char **argv)
|
|||||||
intel_batchbuffer_flush(batch);
|
intel_batchbuffer_flush(batch);
|
||||||
|
|
||||||
ret = gem_bo_wait_timeout(fd, dst2->handle, &timeout);
|
ret = gem_bo_wait_timeout(fd, dst2->handle, &timeout);
|
||||||
if (do_signals)
|
|
||||||
drmtest_stop_signal_helper();
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
fprintf(stderr, "Timed wait failed %s\n", strerror(errno));
|
fprintf(stderr, "Timed wait failed %s\n", strerror(errno));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
@ -178,6 +176,20 @@ int main(int argc, char **argv)
|
|||||||
printf("Finished with %lu time remaining\n", timeout);
|
printf("Finished with %lu time remaining\n", timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Now check that we correctly time out, twice the auto-tune load should
|
||||||
|
* be good enough. */
|
||||||
|
timeout = ENOUGH_WORK_IN_SECONDS * NSEC_PER_SEC;
|
||||||
|
for (i = 0; i < iter*2; i++)
|
||||||
|
blt_color_fill(batch, dst2, BUF_PAGES);
|
||||||
|
|
||||||
|
intel_batchbuffer_flush(batch);
|
||||||
|
|
||||||
|
ret = gem_bo_wait_timeout(fd, dst2->handle, &timeout);
|
||||||
|
assert(ret == -ETIME);
|
||||||
|
assert(timeout == 0);
|
||||||
|
|
||||||
|
if (do_signals)
|
||||||
|
drmtest_stop_signal_helper();
|
||||||
drm_intel_bo_unreference(dst2);
|
drm_intel_bo_unreference(dst2);
|
||||||
drm_intel_bo_unreference(dst);
|
drm_intel_bo_unreference(dst);
|
||||||
intel_batchbuffer_free(batch);
|
intel_batchbuffer_free(batch);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user