mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-20 22:36:24 +00:00
lib: Avoid assertion if sig_ioctl is unsed from a child accidentally
The timer is tied to the creator thread, i.e. it is not inheritable across fork() or clone()/pthread_create(). Using it thus causes an assertion failure in the test after the one that aborts (and so on until we perform an interruptible test correctly) - one mistake snowballs. We can stop the snowball by doing an initial check and diverting back to drmIoctl(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
cb12d05e79
commit
bd292436ed
@ -115,6 +115,12 @@ sig_ioctl(int fd, unsigned long request, void *arg)
|
|||||||
SIG_ASSERT(__igt_sigiter.tid == gettid());
|
SIG_ASSERT(__igt_sigiter.tid == gettid());
|
||||||
|
|
||||||
memset(&its, 0, sizeof(its));
|
memset(&its, 0, sizeof(its));
|
||||||
|
if (timer_settime(__igt_sigiter.timer, 0, &its, NULL)) {
|
||||||
|
/* oops, we didn't undo the interrupter (i.e. !unwound abort) */
|
||||||
|
igt_ioctl = drmIoctl;
|
||||||
|
return drmIoctl(fd, request, arg);
|
||||||
|
}
|
||||||
|
|
||||||
its.it_value = __igt_sigiter.offset;
|
its.it_value = __igt_sigiter.offset;
|
||||||
do {
|
do {
|
||||||
long serial;
|
long serial;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user