<div dir="ltr"><div style="font-size:12.8px">Hi David (and the list this time!),</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">If X is readonly, then after `cp X Y`, Y is also readonly. The `cat` version doesn't propagate permissions.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">The environment for lit tests isn't really spelled out, but relying on the input files being +w doesn't seem obviously reasonable.</div><div style="font-size:12.8px">Google's internal runner puts them on a readonly filesystem, and has hacks to deal with tests like this.</div><div style="font-size:12.8px">These hacks are causing me some pain, so I'm experimenting with removing them. (Can give more details internally).</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I don't have a great plan for keeping this from regressing - obviously only the stuff that llvm-lit enforces can govern what gets checked in upstream.</div><div style="font-size:12.8px">That said, there are other cases (like writing outside of %T) where google's runner is stricter, and fixing these upstream seems to be mostly working.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Cheers, Sam</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 8, 2018 at 5:05 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I'm sure it's something obvious I don't understand here, but maybe someone else doesn't either & could benefit from it:<br><br>What exactly does this change do? In what important way is "cp X Y" different from "cat X > Y"?</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 8, 2018 at 7:06 AM Sam McCall via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Author: sammccall<br>
Date: Mon Jan 8 07:05:01 2018<br>
New Revision: 321997<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=321997&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=321997&view=rev</a><br>
Log:<br>
Avoid assumption that lit tests are writable. NFC<br>
<br>
Modified:<br>
cfe/trunk/test/ARCMT/releases-<wbr>driver.m<br>
cfe/trunk/test/ARCMT/releases-<wbr>driver.m.result<br>
cfe/trunk/test/ARCMT/with-arc-<wbr>mode-modify.m<br>
cfe/trunk/test/ARCMT/with-arc-<wbr>mode-modify.m.result<br>
cfe/trunk/test/PCH/verify_pch.<wbr>m<br>
cfe/trunk/test/VFS/real-path-f<wbr>ound-first.m<br>
<br>
Modified: cfe/trunk/test/ARCMT/releases-<wbr>driver.m<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/releases-driver.m?rev=321997&r1=321996&r2=321997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/test/ARCMT/rel<wbr>eases-driver.m?rev=321997&r1=<wbr>321996&r2=321997&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/ARCMT/releases-<wbr>driver.m (original)<br>
+++ cfe/trunk/test/ARCMT/releases-<wbr>driver.m Mon Jan 8 07:05:01 2018<br>
@@ -1,5 +1,5 @@<br>
// RUN: %clang_cc1 -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result<br>
-// RUN: cp %s %t<br>
+// RUN: cat %s > %t<br>
// RUN: %clang_cc1 -arcmt-modify -triple x86_64-apple-macosx10.6 -x objective-c %t<br>
// RUN: diff %t %s.result<br>
// RUN: rm %t<br>
<br>
Modified: cfe/trunk/test/ARCMT/releases-<wbr>driver.m.result<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/releases-driver.m.result?rev=321997&r1=321996&r2=321997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/test/ARCMT/rel<wbr>eases-driver.m.result?rev=3219<wbr>97&r1=321996&r2=321997&view=<wbr>diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/ARCMT/releases-<wbr>driver.m.result (original)<br>
+++ cfe/trunk/test/ARCMT/releases-<wbr>driver.m.result Mon Jan 8 07:05:01 2018<br>
@@ -1,5 +1,5 @@<br>
// RUN: %clang_cc1 -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result<br>
-// RUN: cp %s %t<br>
+// RUN: cat %s > %t<br>
// RUN: %clang_cc1 -arcmt-modify -triple x86_64-apple-macosx10.6 -x objective-c %t<br>
// RUN: diff %t %s.result<br>
// RUN: rm %t<br>
<br>
Modified: cfe/trunk/test/ARCMT/with-arc-<wbr>mode-modify.m<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/with-arc-mode-modify.m?rev=321997&r1=321996&r2=321997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/test/ARCMT/wit<wbr>h-arc-mode-modify.m?rev=321997<wbr>&r1=321996&r2=321997&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/ARCMT/with-arc-<wbr>mode-modify.m (original)<br>
+++ cfe/trunk/test/ARCMT/with-arc-<wbr>mode-modify.m Mon Jan 8 07:05:01 2018<br>
@@ -1,5 +1,5 @@<br>
// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -x objective-c %s.result<br>
-// RUN: cp %s %t<br>
+// RUN: cat %s > %t<br>
// RUN: %clang_cc1 -arcmt-modify -fsyntax-only -fobjc-arc -x objective-c %t<br>
// RUN: diff %t %s.result<br>
// RUN: rm %t<br>
<br>
Modified: cfe/trunk/test/ARCMT/with-arc-<wbr>mode-modify.m.result<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/with-arc-mode-modify.m.result?rev=321997&r1=321996&r2=321997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/test/ARCMT/wit<wbr>h-arc-mode-modify.m.result?rev<wbr>=321997&r1=321996&r2=321997&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/ARCMT/with-arc-<wbr>mode-modify.m.result (original)<br>
+++ cfe/trunk/test/ARCMT/with-arc-<wbr>mode-modify.m.result Mon Jan 8 07:05:01 2018<br>
@@ -1,5 +1,5 @@<br>
// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -x objective-c %s.result<br>
-// RUN: cp %s %t<br>
+// RUN: cat %s > %t<br>
// RUN: %clang_cc1 -arcmt-modify -fsyntax-only -fobjc-arc -x objective-c %t<br>
// RUN: diff %t %s.result<br>
// RUN: rm %t<br>
<br>
Modified: cfe/trunk/test/PCH/verify_pch.<wbr>m<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/verify_pch.m?rev=321997&r1=321996&r2=321997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/test/PCH/verif<wbr>y_pch.m?rev=321997&r1=321996&<wbr>r2=321997&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/PCH/verify_pch.<wbr>m (original)<br>
+++ cfe/trunk/test/PCH/verify_pch.<wbr>m Mon Jan 8 07:05:01 2018<br>
@@ -2,7 +2,7 @@<br>
// RUN: rm -rf %t<br>
// RUN: mkdir -p %t/usr/include<br>
// RUN: echo '// empty' > %t/usr/include/sys_header.h<br>
-// RUN: cp %s %t.h<br>
+// RUN: cat %s > %t.h<br>
//<br>
// Precompile<br>
// RUN: %clang_cc1 -isystem %t/usr/include -x objective-c-header -emit-pch -o %t.pch %t.h<br>
<br>
Modified: cfe/trunk/test/VFS/real-path-f<wbr>ound-first.m<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/VFS/real-path-found-first.m?rev=321997&r1=321996&r2=321997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/test/VFS/real-<wbr>path-found-first.m?rev=321997&<wbr>r1=321996&r2=321997&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/VFS/real-path-f<wbr>ound-first.m (original)<br>
+++ cfe/trunk/test/VFS/real-path-f<wbr>ound-first.m Mon Jan 8 07:05:01 2018<br>
@@ -7,7 +7,7 @@<br>
// REQUIRES: shell<br>
// RUN: rm -rf %t %t-cache %t.pch<br>
// RUN: mkdir -p %t/SomeFramework.framework/Mod<wbr>ules<br>
-// RUN: cp %S/Inputs/<a href="http://some_frame_module.ma">some_frame_module.ma</a><wbr>p %t/SomeFramework.framework/Mod<wbr>ules/module.modulemap<br>
+// RUN: cat %S/Inputs/<a href="http://some_frame_module.ma">some_frame_module.ma</a><wbr>p > %t/SomeFramework.framework/Mod<wbr>ules/module.modulemap<br>
// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay.yaml > %t.yaml<br>
<br>
// Build<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div>
</blockquote></div><br></div></div>