anv: gem-stubs: return a valid fd got anv_gem_userptr()

Fixes invalid close(-1) in the unit tests.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
40 jobs for !2120 with review/anv-gem-stub-fix in 23 minutes and 51 seconds (queued for 24 seconds)
detached
Status Name Job ID Coverage
  Containers
passed debian-10 #661633

00:00:22

passed debian-9 #661634

00:00:22

passed test-container:arm64 #661635
aarch64

00:00:21

 
  Build
passed meson-arm64 #661638

00:05:28

passed meson-armhf #661637

00:02:54

passed meson-clang #661640

00:05:51

passed meson-clover #661643

00:06:56

passed meson-clover-old-llvm #661644

00:06:23

passed meson-i386 #661646

00:04:05

passed meson-main #661636

00:11:59

passed meson-swr-glvnd #661639

00:05:50

passed meson-vulkan #661645

00:03:43

passed scons #661647

00:10:47

passed scons-old-llvm #661648

00:13:55

passed scons-swr #661641

00:09:01

passed scons-win64 #661642

00:06:42

 
  Test
passed arm64_a306_gles2 1/4 #661669
db410c

00:04:15

passed arm64_a306_gles2 2/4 #661670
db410c

00:06:02

passed arm64_a306_gles2 3/4 #661671
db410c

00:04:16

passed arm64_a306_gles2 4/4 #661672
db410c

00:04:25

passed arm64_a630_gles2 #661658
mesa-cheza

00:04:31

passed arm64_a630_gles31 1/4 #661659
mesa-cheza

00:05:50

passed arm64_a630_gles31 2/4 #661660
mesa-cheza

00:07:49

passed arm64_a630_gles31 3/4 #661661
mesa-cheza

00:07:55

passed arm64_a630_gles31 4/4 #661662
mesa-cheza

00:07:54

passed arm64_a630_gles3 1/6 #661663
mesa-cheza

00:04:55

passed arm64_a630_gles3 2/6 #661664
mesa-cheza

00:04:36

passed arm64_a630_gles3 3/6 #661665
mesa-cheza

00:04:26

passed arm64_a630_gles3 4/6 #661666
mesa-cheza

00:04:44

passed arm64_a630_gles3 5/6 #661667
mesa-cheza

00:04:21

passed arm64_a630_gles3 6/6 #661668
mesa-cheza

00:04:17

passed test-llvmpipe-gles2 1/4 #661649

00:03:41

passed test-llvmpipe-gles2 2/4 #661650

00:04:03

passed test-llvmpipe-gles2 3/4 #661651

00:03:51

passed test-llvmpipe-gles2 4/4 #661652

00:03:51

passed test-softpipe-gles2 1/4 #661653

00:01:34

passed test-softpipe-gles2 2/4 #661654

00:01:39

passed test-softpipe-gles2 3/4 #661655

00:01:29

passed test-softpipe-gles2 4/4 #661656

00:01:41

passed test-softpipe-gles3-limited #661657

00:04:05