Skip to content

Commit e0fc8ca

Browse files
committedMar 2, 2015
Improve robustness of dependency-generation-crash.c test.
The test wants to provoke a failure when opening the output file. Using chmod 0 on the output file does not work reliably on all filesystems or when running the test as root. Change the test to use a nonexistant directory instead. Differential Revision: http://reviews.llvm.org/D7620 llvm-svn: 231009
1 parent 4c616d4 commit e0fc8ca

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed
 

‎clang/test/Frontend/dependency-generation-crash.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// RUN: touch %t
2-
// RUN: chmod 0 %t
3-
// RUN: not %clang_cc1 -E -dependency-file bla -MT %t -MP -o %t -x c /dev/null 2>&1 | FileCheck %s
4-
// RUN: rm -f %t
1+
// RUN: not %clang_cc1 -E -dependency-file bla -MT %t/doesnotexist/bla.o -MP -o $t/doesnotexist/bla.o -x c /dev/null 2>&1 | FileCheck %s
52

63
// CHECK: error: unable to open output file
74

0 commit comments

Comments
 (0)
Please sign in to comment.