Changes to llvm tests to fix Bug 17327

Thomas O'Dell thomas_odell at trsolutions.biz
Tue Sep 24 23:16:38 PDT 2013


 

Hi Stephen, 

The problem with the test is that QNX's grep (POSIX-compliant) doesn't
find the required symbol if the file lacks a newline. 

The extra step uses echo to ensure there is at least 1 newline in the
file. The test then passes. 

As Nick pointed out, there was a typo in the change I uploaded. The
corrected diff is: 

Index: test/Transforms/GCOVProfiling/linkagename.ll
===================================================================
--- test/Transforms/GCOVProfiling/linkagename.ll (revision 191282)
+++ test/Transforms/GCOVProfiling/linkagename.ll (working copy)
@@ -1,7 +1,8 @@
 ; RUN: echo '!9 = metadata !{metadata !"%T/linkagename.ll", metadata
!0}' > %t1
 ; RUN: cat %s %t1 > %t2
 ; RUN: opt -insert-gcov-profiling -disable-output < %t2
-; RUN: grep _Z3foov %T/linkagename.gcno
+; RUN: echo `cat %T/linkagename.gcno` >%t3
+; RUN: grep _Z3foov %t3
 ; RUN: rm %T/linkagename.gcno

 ; REQUIRES: shell 

I'm uploading the corrected diff. 

Thanks for your quick turnaround! 

Thomas O'Dell 

TR Solutions Pte Ltd 

www.trsolutions.biz 

On 2013-09-25 13:26, Stephen Checkoway wrote: 

> On Sep 24, 2013, at 10:09 PM, Thomas O'Dell <thomas_odell at trsolutions.biz> wrote:
> 
>> This is my first commit to llvm. I'm in the process of porting LLVM to X86 QNX Neutrino. I found the attached tests failed because of non-standard expectations from Unix utilities. So attached are the changes (created svn diff) that allow the tests to run.
> 
> Most of these are trivial >& /dev/null to >/dev/null 2>&1 that seem obviously correct.
> 
> --- test/Transforms/GCOVProfiling/linkagename.ll (revision 191282)
> +++ test/Transforms/GCOVProfiling/linkagename.ll (working copy)
> @@ -1,7 +1,8 @@
> ; RUN: echo '!9 = metadata !{metadata !"%T/linkagename.ll", metadata !0}' > %t1
> ; RUN: cat %s %t1 > %t2
> ; RUN: opt -insert-gcov-profiling -disable-output < %t2
> -; RUN: grep _Z3foov %T/linkagename.gcno
> +; RUN: echo `cat %T/linkagename.gno` >%t3
> +; RUN: grep _Z3foov %t3
> ; RUN: rm %T/linkagename.gcno
> 
> I don't really understand this one though. What's the nonstandard behavior here? In both cases, it seems to be grepping a file for _Z3foov. You've just added a new file?

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130925/f083b862/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr17327.diff.txt
Type: text/x-diff
Size: 8642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130925/f083b862/attachment.diff>


More information about the llvm-commits mailing list