tests: add dup.test, dup2.test, and dup3.test

* tests/dup.c: New file.
* tests/dup.test: New test.
* tests/dup2.c: New file.
* tests/dup2.test: New test.
* tests/dup3.c: New file.
* tests/dup3.test: New test.
* tests/.gitignore: Add dup, dup2, and dup3.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add dup.test, dup2.test, and dup3.test.
diff --git a/tests/.gitignore b/tests/.gitignore
index 148f933..e08aa97 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -19,6 +19,9 @@
 clock_nanosleep
 clock_xettime
 copy_file_range
+dup
+dup2
+dup3
 epoll_create1
 eventfd
 execve