[llvm-dev] Test failure due to file path
Don Hinton via llvm-dev
llvm-dev at lists.llvm.org
Fri Mar 29 20:50:25 PDT 2019
You can try this patch:
$ git diff
diff --git a/llvm/test/tools/llvm-objcopy/ELF/regex.test
b/llvm/test/tools/llvm-objcopy/ELF/regex.test
index 6fa590b5dc5..04438143a6a 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/regex.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/regex.test
@@ -47,14 +47,14 @@ Symbols:
Value: 0x1010
Size: 8
-#REGEX1-NOT: foobaz
-#REGEX1-NOT: bar
-#REGEX1-NOT: rebar
+#REGEX1-NOT: {{Name: *foobaz}}
+#REGEX1-NOT: {{Name: *bar}}
+#REGEX1-NOT: {{Name: *rebar}}
-#REGEX2-NOT: foobaz
-#REGEX2: bar
-#REGEX2-NOT: rebar
+#REGEX2-NOT: {{Name: *foobaz}}
+#REGEX2: {{Name: *bar}}
+#REGEX2-NOT: {{Name: *rebar}}
-#REGEX3: foobaz
-#REGEX3: bar
-#REGEX3: rebar
+#REGEX3: {{Name: *foobaz}}
+#REGEX3: {{Name: *bar}}
+#REGEX3: {{Name: *rebar}}
On Fri, Mar 29, 2019 at 12:55 PM via llvm-dev <llvm-dev at lists.llvm.org>
wrote:
> For ignore-undefined-symbols.s, the simplest fix ought to be to have the
> llvm-mc RUN line take the source from <stdin>:
>
>
>
> # RUN: llvm-mc –filetype=obj –triple=x86_64-pc-linux %s –o %t.o –g
>
> becomes
>
> # RUN: llvm-mc –filetype=obj –triple=x86_64-pc-linux* <* %s –o %t.o –g
>
>
>
> But in this case, llvm-symbolizer still prints the file as $CWD/<stdin>
> which seems like its own separate bug.
>
> --paulr
>
>
>
> *From:* llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] *On Behalf Of *Jordan
> Rupprecht via llvm-dev
> *Sent:* Friday, March 29, 2019 1:13 PM
> *To:* Csaba Raduly
> *Cc:* llvm-dev
> *Subject:* Re: [llvm-dev] Test failure due to file path
>
>
>
> True, it could probably skip the filename printed at the beginning of
> readobj with something like this:
>
> #REGEX1: Symbols [#REGEX1-NOT: foobaz
>
> #REGEX1-NOT: bar
>
> #REGEX1-NOT: rebar
>
>
>
> Mind contributing a patch? :)
>
>
>
> On Fri, Mar 29, 2019 at 9:53 AM Csaba Raduly via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
> Hi all,
>
> The following tests fail because my username (csabaraduly) contains "bar" :
>
> ********************
> FAIL: LLVM :: tools/llvm-objcopy/ELF/regex.test (47099 of 50832)
> ******************** TEST 'LLVM :: tools/llvm-objcopy/ELF/regex.test'
> FAILED ********************
> Script:
> --
> : 'RUN: at line 1';
> /home/csabaraduly/wk/LLVM-git/__build_release_99/bin/yaml2obj
> /home/csabaraduly/wk/LLVM-git/llvm/test/tools/llvm-objcopy/ELF/regex.test
> >
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-objcopy/ELF/Output/regex.test.tmp
> : 'RUN: at line 4';
> /home/csabaraduly/wk/LLVM-git/__build_release_99/bin/llvm-objcopy
> --discard-all --regex -K 'ba'
>
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-objcopy/ELF/Output/regex.test.tmp
>
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-objcopy/ELF/Output/regex.test.tmp2
> : 'RUN: at line 5';
> /home/csabaraduly/wk/LLVM-git/__build_release_99/bin/llvm-readobj
> --symbols
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-objcopy/ELF/Output/regex.test.tmp2
> | /home/csabaraduly/wk/LLVM-git/__build_release_99/bin/FileCheck
> /home/csabaraduly/wk/LLVM-git/llvm/test/tools/llvm-objcopy/ELF/regex.test
> --check-prefix=REGEX1
> : 'RUN: at line 8';
> /home/csabaraduly/wk/LLVM-git/__build_release_99/bin/llvm-objcopy
> --discard-all --regex -K 'ba.*'
>
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-objcopy/ELF/Output/regex.test.tmp
>
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-objcopy/ELF/Output/regex.test.tmp3
> : 'RUN: at line 9';
> /home/csabaraduly/wk/LLVM-git/__build_release_99/bin/llvm-readobj
> --symbols
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-objcopy/ELF/Output/regex.test.tmp3
> | /home/csabaraduly/wk/LLVM-git/__build_release_99/bin/FileCheck
> /home/csabaraduly/wk/LLVM-git/llvm/test/tools/llvm-objcopy/ELF/regex.test
> --check-prefix=REGEX2
> : 'RUN: at line 12';
> /home/csabaraduly/wk/LLVM-git/__build_release_99/bin/llvm-objcopy
> --discard-all --regex -K '.*ba.*'
>
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-objcopy/ELF/Output/regex.test.tmp
>
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-objcopy/ELF/Output/regex.test.tmp4
> : 'RUN: at line 13';
> /home/csabaraduly/wk/LLVM-git/__build_release_99/bin/llvm-readobj
> --symbols
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-objcopy/ELF/Output/regex.test.tmp4
> | /home/csabaraduly/wk/LLVM-git/__build_release_99/bin/FileCheck
> /home/csabaraduly/wk/LLVM-git/llvm/test/tools/llvm-objcopy/ELF/regex.test
> --check-prefix=REGEX3
> : 'RUN: at line 16';
> /home/csabaraduly/wk/LLVM-git/__build_release_99/bin/llvm-objcopy
> --discard-all --regex -K '^([a-z]+)*ba.*$'
>
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-objcopy/ELF/Output/regex.test.tmp
>
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-objcopy/ELF/Output/regex.test.tmp5
> : 'RUN: at line 17'; cmp
>
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-objcopy/ELF/Output/regex.test.tmp4
>
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-objcopy/ELF/Output/regex.test.tmp5
> --
> Exit Code: 1
>
> Command Output (stderr):
> --
>
> /home/csabaraduly/wk/LLVM-git/llvm/test/tools/llvm-objcopy/ELF/regex.test:51:14:
> error: REGEX1-NOT: excluded string found in input
> #REGEX1-NOT: bar
> ^
> <stdin>:2:16: note: found here
> File:
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-objcopy/ELF/Output/regex.test.tmp2
> ^~~
>
>
>
>
> ********************
> FAIL: LLVM :: tools/llvm-symbolizer/ignore-undefined-symbols.s (47626 of
> 50832)
> ******************** TEST 'LLVM ::
> tools/llvm-symbolizer/ignore-undefined-symbols.s' FAILED
> ********************
> Script:
> --
> : 'RUN: at line 2';
> /home/csabaraduly/wk/LLVM-git/__build_release_99/bin/llvm-mc
> --filetype=obj --triple=x86_64-pc-linux
>
> /home/csabaraduly/wk/LLVM-git/llvm/test/tools/llvm-symbolizer/ignore-undefined-symbols.s
> -o
> /home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-symbolizer/Output/ignore-undefined-symbols.s.tmp.o
> -g
> : 'RUN: at line 3';
> /home/csabaraduly/wk/LLVM-git/__build_release_99/bin/llvm-symbolizer
>
> --obj=/home/csabaraduly/wk/LLVM-git/__build_release_99/test/tools/llvm-symbolizer/Output/ignore-undefined-symbols.s.tmp.o
> 0 | /home/csabaraduly/wk/LLVM-git/__build_release_99/bin/FileCheck
>
> /home/csabaraduly/wk/LLVM-git/llvm/test/tools/llvm-symbolizer/ignore-undefined-symbols.s
> --implicit-check-not=bar
> --
> Exit Code: 1
>
> Command Output (stderr):
> --
> command line:1:22: error: CHECK-NOT: excluded string found in input
> -implicit-check-not='bar'
> ^
> <stdin>:2:10: note: found here
>
> /home/csabaraduly/wk/LLVM-git/llvm/test/tools/llvm-symbolizer/ignore-undefined-symbols.s:12:0
> ^~~
>
> Maybe "bar" should be replaced with something less likely to appear
> accidentally in a file path, e.g. rumpelstiltskin :)
>
> Csaba
> --
> You can get very substantial performance improvements
> by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
> So if you're looking for a completely portable, 100% standards-conformat
> way
> to get the wrong information: this is what you want. - Scott Meyers
> (C++TDaWYK)
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190329/4717178b/attachment.html>
More information about the llvm-dev
mailing list