[igt-dev] [PATCH i-g-t v2 2/2] tests/i915/gem_mmap: fix bad-object tests error value
Arkadiusz Hiler
arkadiusz.hiler at intel.com
Thu Jun 6 06:12:40 UTC 2019
On Fri, May 31, 2019 at 03:07:23PM +0300, Simon Ser wrote:
> These tests checked for EINVAL, but the correct error value is ENOENT, as
> pointed out by Chris Wilson:
>
> commit bf79cb914dbfe848add8bb76cbb8ff89110d29ff
> Author: Chris Wilson <chris at chris-wilson.co.uk>
> Date: Wed Aug 4 14:19:46 2010 +0100
>
> drm: Use ENOENT consistently for the error return for an unmatched handle.
>
> This is consistent with trying to access a filename that not exist
> within a directory which is a good analogy here. The main reason for the
> change is that it is easy to confuse the error code of EBADF as an
> performing an ioctl on an invalid file descriptor (rather than an
> unknown object).
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
>
> This commit fixes the two bad tests (the gem_mmap_gtt test already checks for
> ENOENT).
>
> Signed-off-by: Simon Ser <simon.ser at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
for both patches
More information about the igt-dev
mailing list