[llvm-commits] [llvm] r111440 - /llvm/trunk/test/Other/close-stderr.ll
Dan Gohman
gohman at apple.com
Wed Aug 18 15:35:57 PDT 2010
Author: djg
Date: Wed Aug 18 17:35:56 2010
New Revision: 111440
URL: http://llvm.org/viewvc/llvm-project?rev=111440&view=rev
Log:
Add a testcase to verify that commands don't crash when they hit
errors on stderr.
Added:
llvm/trunk/test/Other/close-stderr.ll
Added: llvm/trunk/test/Other/close-stderr.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/close-stderr.ll?rev=111440&view=auto
==============================================================================
--- llvm/trunk/test/Other/close-stderr.ll (added)
+++ llvm/trunk/test/Other/close-stderr.ll Wed Aug 18 17:35:56 2010
@@ -0,0 +1,9 @@
+; RUN: sh -c "\
+; RUN: opt --reject-this-option 2>&-; echo $?; \
+; RUN: opt -o /dev/null /dev/null 2>&-; echo $?; \
+; RUN: " | FileCheck %s
+; CHECK: {{^1$}}
+; CHECK: {{^0$}}
+
+; Test that the error handling when writing to stderr fails exits the
+; program cleanly rather than aborting.
More information about the llvm-commits
mailing list