Changes to llvm tests to fix Bug 17327

Stephen Checkoway s at pahtak.org
Wed Sep 25 07:34:58 PDT 2013


On Sep 25, 2013, at 2:16 AM, Thomas O'Dell <thomas_odell at trsolutions.biz> wrote:

> 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.

Very bizarre!

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

You could use echo >> %T/linkagename.gcno to add a newline rather than create a new file, but I suspect it doesn't matter much.

> 
> 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

LGTM, but I'm just a list lurker, someone else needs to approve.

-- 
Stephen Checkoway









More information about the llvm-commits mailing list