diff options
author | Daniel Dunbar <daniel@zuster.org> | 2012-11-15 20:24:58 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2012-11-15 20:24:58 +0000 |
commit | 5564e6c45401c37adb9444b6bf0ef8ce70b1fce8 (patch) | |
tree | 53f72abc5e7b5d8a0b607b8bf35c4ba3bfc81367 /test/Misc | |
parent | 84e1513beb8450f31d9589dcdfc33b0890405ab6 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168082 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Misc')
-rw-r--r-- | test/Misc/dev-fd-fs.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/test/Misc/dev-fd-fs.c b/test/Misc/dev-fd-fs.c index 2eff138f42..e35486ebe2 100644 --- a/test/Misc/dev-fd-fs.c +++ b/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; |