tests: extend test coverage of setgid syscall

* tests/setgid.c: New file.
* tests/setgid.test: New test.
* tests/.gitignore: Add setgid.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add setgid.test.
diff --git a/tests/.gitignore b/tests/.gitignore
index 3c37023..b7b9df7 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -142,6 +142,7 @@
 sendfile
 sendfile64
 set_ptracer_any
+setgid
 sethostname
 setuid
 setuid32