]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add (presently) failing test case for bz#212291.
authorRhys Kidd <rhyskidd@gmail.com>
Sat, 16 May 2015 14:18:36 +0000 (14:18 +0000)
committerRhys Kidd <rhyskidd@gmail.com>
Sat, 16 May 2015 14:18:36 +0000 (14:18 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15241

memcheck/tests/darwin/Makefile.am
memcheck/tests/darwin/mkfifo.c [new file with mode: 0644]
memcheck/tests/darwin/mkfifo.stderr.exp [new file with mode: 0644]
memcheck/tests/darwin/mkfifo.vgtest [new file with mode: 0644]

index f5deb34a5101779732d8937a1da7ccec5c4ae6df..6643d43e6d056c3585b1f1dedfb8e2663be73e32 100644 (file)
@@ -11,6 +11,7 @@ EXTRA_DIST = \
        env.stderr.exp env.vgtest \
        pth-supp.stderr.exp pth-supp.vgtest \
        pth-undocumented.stderr.exp pth-undocumented.stdout.exp pth-undocumented.vgtest \
+       mkfifo.stderr.exp mkfifo.vgtest \
        scalar.stderr.exp scalar.vgtest \
        scalar_fork.stderr.exp scalar_fork.vgtest \
        scalar_nocancel.stderr.exp scalar_nocancel.vgtest \
@@ -22,6 +23,7 @@ check_PROGRAMS = \
        env \
        pth-supp \
        pth-undocumented \
+       mkfifo \
        scalar \
        scalar_fork \
        scalar_nocancel \
diff --git a/memcheck/tests/darwin/mkfifo.c b/memcheck/tests/darwin/mkfifo.c
new file mode 100644 (file)
index 0000000..e92e425
--- /dev/null
@@ -0,0 +1,31 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <sys/syscall.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+#ifndef SYS_mkfifo
+# define SYS_mkfifo 132
+#endif
+
+static char f_name[]="mkfifo_data_file";
+
+int mkfifo(const char *path)
+{
+   return syscall(SYS_mkfifo, path);
+}
+
+int main(void)
+{
+   int fd;
+
+   fd = mkfifo(f_name);
+
+   if (fd == -1)
+      perror("mkfifo"), exit(1);
+
+   unlink(f_name);
+
+   return 0;
+}
diff --git a/memcheck/tests/darwin/mkfifo.stderr.exp b/memcheck/tests/darwin/mkfifo.stderr.exp
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/memcheck/tests/darwin/mkfifo.vgtest b/memcheck/tests/darwin/mkfifo.vgtest
new file mode 100644 (file)
index 0000000..1e6d4f8
--- /dev/null
@@ -0,0 +1,2 @@
+prog: mkfifo
+vgopts: -q