close-stderr.ll 355 B

12345678910111213
  1. ; RUN: sh -c 'opt --reject-this-option 2>&-; echo $?; opt -o /dev/null /dev/null 2>&-; echo $?;' \
  2. ; RUN: | FileCheck %s
  3. ; CHECK: {{^1$}}
  4. ; On valgrind, we got 127 here.
  5. ; XFAIL: valgrind
  6. ; CHECK: {{^0$}}
  7. ; XFAIL: vg_leak
  8. ; REQUIRES: shell
  9. ; Test that the error handling when writing to stderr fails exits the
  10. ; program cleanly rather than aborting.