mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-26 17:26:14 +00:00
errno is reset after each syscall
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78055 Bugilla: https://bugs.freedesktop.org/show_bug.cgi?id=78053 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
fa86e33ccc
commit
c1404e05b7
@ -141,11 +141,10 @@ static void multi_write_domain(int fd)
|
||||
ret = drmIoctl(fd,
|
||||
DRM_IOCTL_I915_GEM_EXECBUFFER2,
|
||||
&execbuf);
|
||||
igt_assert(ret != 0 && errno == EINVAL);
|
||||
|
||||
gem_close(fd, handle);
|
||||
gem_close(fd, handle_target);
|
||||
|
||||
igt_assert(ret != 0 && errno == EINVAL);
|
||||
}
|
||||
|
||||
int fd;
|
||||
|
@ -154,6 +154,8 @@ static int many_exec(int fd, uint32_t batch, int num_exec, int num_reloc, unsign
|
||||
ret = drmIoctl(fd,
|
||||
DRM_IOCTL_I915_GEM_EXECBUFFER2,
|
||||
&execbuf);
|
||||
if (ret < 0)
|
||||
ret = -errno;
|
||||
|
||||
for (n = 0; n < num_exec; n++)
|
||||
gem_close(fd, gem_exec[n].handle);
|
||||
@ -164,7 +166,7 @@ static int many_exec(int fd, uint32_t batch, int num_exec, int num_reloc, unsign
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define _fail(x) ((x) == -1 && errno == ENOENT)
|
||||
#define _fail(x) ((x) == -ENOENT)
|
||||
#define ASSERT(x) do { \
|
||||
if (!(x)) { \
|
||||
fprintf(stderr, "%s:%d failed, errno=%d\n", \
|
||||
@ -195,8 +197,7 @@ igt_simple_main
|
||||
fail(exec(fd, handle, USE_LUT | BROKEN));
|
||||
|
||||
for (i = 2; i <= SLOW_QUICK(65536, 8); i *= 2) {
|
||||
if (many_exec(fd, handle, i+1, i+1, NORMAL) == -1 &&
|
||||
errno == ENOSPC)
|
||||
if (many_exec(fd, handle, i+1, i+1, NORMAL) == -ENOSPC)
|
||||
break;
|
||||
|
||||
pass(many_exec(fd, handle, i-1, i-1, NORMAL));
|
||||
|
Loading…
x
Reference in New Issue
Block a user