summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2012-11-15 20:24:58 +0000
committerDaniel Dunbar <daniel@zuster.org>2012-11-15 20:24:58 +0000
commitd9cb0ba66086c0ec826bb5e06b1850e49ca0f000 (patch)
tree1a232209c634752ff8ba9b811c9a217f55d4f063
parent61d59f29595345ce23b93bc6977657be5959214c (diff)
downloadbcm5719-llvm-d9cb0ba66086c0ec826bb5e06b1850e49ca0f000.tar.gz
bcm5719-llvm-d9cb0ba66086c0ec826bb5e06b1850e49ca0f000.zip
tests: Check that we can output to /dev/fd filesystem.
- An LLVM unique_file() bug could cause us to infinite loop on the later test case. llvm-svn: 168082
-rw-r--r--clang/test/Misc/dev-fd-fs.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/clang/test/Misc/dev-fd-fs.c b/clang/test/Misc/dev-fd-fs.c
index 2eff138f421..e35486ebe29 100644
--- a/clang/test/Misc/dev-fd-fs.c
+++ b/clang/test/Misc/dev-fd-fs.c
@@ -7,6 +7,24 @@
//
// RUN: cat %s | %clang -x c /dev/fd/0 -E > %t
// RUN: FileCheck --check-prefix DEV-FD-INPUT < %t %s
-
+//
// DEV-FD-INPUT: int x;
+
+
+// Check writing to /dev/fd named pipes. We use cat here as before to ensure we
+// get a named pipe.
+//
+// RUN: %clang -x c %s -E -o /dev/fd/1 | cat > %t
+// RUN: FileCheck --check-prefix DEV-FD-FIFO-OUTPUT < %t %s
+//
+// DEV-FD-FIFO-OUTPUT: int x;
+
+
+// Check writing to /dev/fd regular files.
+//
+// RUN: %clang -x c %s -E -o /dev/fd/1 > %t
+// RUN: FileCheck --check-prefix DEV-FD-REG-OUTPUT < %t %s
+//
+// DEV-FD-REG-OUTPUT: int x;
+
int x;
OpenPOWER on IntegriCloud