summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/no-canonical-prefixes.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Driver/no-canonical-prefixes.c')
-rw-r--r--clang/test/Driver/no-canonical-prefixes.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Driver/no-canonical-prefixes.c b/clang/test/Driver/no-canonical-prefixes.c
index 7bc76be22d7..8b9e04410ed 100644
--- a/clang/test/Driver/no-canonical-prefixes.c
+++ b/clang/test/Driver/no-canonical-prefixes.c
@@ -1,9 +1,14 @@
// Due to ln -sf:
// REQUIRES: shell
+// RUN: rm -rf %t.real
// RUN: mkdir -p %t.real
// RUN: cd %t.real
// RUN: ln -sf %clang test-clang
// RUN: cd ..
+// Important to remove %t.fake: If it already is a symlink to %t.real when
+// `ln -sf %t.real %t.fake` runs, then that would symlink %t.real to itself,
+// forming a cycle.
+// RUN: rm -rf %t.fake
// RUN: ln -sf %t.real %t.fake
// RUN: cd %t.fake
// RUN: ./test-clang -v -S %s 2>&1 | FileCheck --check-prefix=CANONICAL %s
OpenPOWER on IntegriCloud