From 10e3d33e8e6c2f5889c793f5762ed7370924ffe3 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 2 Mar 2015 20:44:09 +0000 Subject: [PATCH] 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231009 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Frontend/dependency-generation-crash.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/Frontend/dependency-generation-crash.c b/test/Frontend/dependency-generation-crash.c index 63a6a7732e..ad6791a6e0 100644 --- a/test/Frontend/dependency-generation-crash.c +++ b/test/Frontend/dependency-generation-crash.c @@ -1,7 +1,4 @@ -// RUN: touch %t -// RUN: chmod 0 %t -// RUN: not %clang_cc1 -E -dependency-file bla -MT %t -MP -o %t -x c /dev/null 2>&1 | FileCheck %s -// RUN: rm -f %t +// 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 // CHECK: error: unable to open output file -- 2.40.0