Reset errno to 0 after success
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 25 Apr 2014 06:40:34 +0000 (07:40 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 25 Apr 2014 06:45:56 +0000 (07:45 +0100)
commitb918a3ba15b510edfeb37a375ffacd5bdb5e1410
tree8212d92bc231cf3ed11f4abf6c318f6836362be7
parent5d7649690c80b531a4949e275926315a749455e3
Reset errno to 0 after success

errno is only valid after a syscall wrapper (e.g. ioctl()) reports an
error. However, we report the last errno value as a part of the
igt_assert() output and so we display spurious values such as:

Test requirement not met in function gem_require_ring, file ioctl_wrappers.c:802:
Last errno: 11, Resource temporarily unavailable
Test requirement: (!((((intel_get_drm_devid(fd)) == 0x0102 || ...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
lib/drmtest.h
lib/intel_chipset.c
lib/ioctl_wrappers.c