This revision was automatically updated to reflect the committed changes.
Closed by commit rL365414: Use `ln -n` to prevent forming a symlink cycle, 
instead of rm'ing the source (authored by nico, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D64301?vs=208302&id=208554#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64301/new/

https://reviews.llvm.org/D64301

Files:
  cfe/trunk/test/Driver/no-canonical-prefixes.c


Index: cfe/trunk/test/Driver/no-canonical-prefixes.c
===================================================================
--- cfe/trunk/test/Driver/no-canonical-prefixes.c
+++ cfe/trunk/test/Driver/no-canonical-prefixes.c
@@ -1,15 +1,13 @@
 // 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
+// If %.fake 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.
+// The `-n` flag prevents this.
+// RUN: ln -sfn %t.real %t.fake
 // RUN: cd %t.fake
 // RUN: ./test-clang -v -S %s 2>&1 | FileCheck --check-prefix=CANONICAL %s
 // RUN: ./test-clang -v -S %s -no-canonical-prefixes 2>&1 | FileCheck 
--check-prefix=NON-CANONICAL %s


Index: cfe/trunk/test/Driver/no-canonical-prefixes.c
===================================================================
--- cfe/trunk/test/Driver/no-canonical-prefixes.c
+++ cfe/trunk/test/Driver/no-canonical-prefixes.c
@@ -1,15 +1,13 @@
 // 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
+// If %.fake 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.
+// The `-n` flag prevents this.
+// RUN: ln -sfn %t.real %t.fake
 // RUN: cd %t.fake
 // RUN: ./test-clang -v -S %s 2>&1 | FileCheck --check-prefix=CANONICAL %s
 // RUN: ./test-clang -v -S %s -no-canonical-prefixes 2>&1 | FileCheck --check-prefix=NON-CANONICAL %s
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to