r367147 - Partially revert rC365414; `ln -n` is not portable

Hubert Tong via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 26 13:09:37 PDT 2019


Author: hubert.reinterpretcast
Date: Fri Jul 26 13:09:37 2019
New Revision: 367147

URL: http://llvm.org/viewvc/llvm-project?rev=367147&view=rev
Log:
Partially revert rC365414; `ln -n` is not portable

This restores the use of `rm` instead of the non-portable `ln -n`. Such
use being the status quo for the 12-month period between rC334972 and
rC365414.

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

Modified: cfe/trunk/test/Driver/no-canonical-prefixes.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/no-canonical-prefixes.c?rev=367147&r1=367146&r2=367147&view=diff
==============================================================================
--- cfe/trunk/test/Driver/no-canonical-prefixes.c (original)
+++ cfe/trunk/test/Driver/no-canonical-prefixes.c Fri Jul 26 13:09:37 2019
@@ -4,10 +4,11 @@
 // RUN: cd %t.real
 // RUN: ln -sf %clang test-clang
 // RUN: cd ..
-// 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
+// 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 -f %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
 // RUN: ./test-clang -v -S %s -no-canonical-prefixes 2>&1 | FileCheck --check-prefix=NON-CANONICAL %s




More information about the cfe-commits mailing list