This is an archive of the discontinued LLVM Phabricator instance.

[ELF][test] Improve reproduce tests and enable for Windows
ClosedPublic

Authored by andrewng on Apr 8 2020, 12:40 PM.

Details

Summary

This patch changes the reproduce tests so that they no longer extract
the "long" paths of the generated reproduce tar archives. This
extraction prevented them from being run on Windows due to potential
issues relating to the Windows path length limit.

This patch also reduces the use of diff in these tests, as this was
raised as a performance concern in review D77659 and deemed unnecessary.

Diff Detail

Event Timeline

andrewng created this revision.Apr 8 2020, 12:40 PM
MaskRay accepted this revision.Apr 8 2020, 1:05 PM

Cute use of -O. It should work with FreeBSD/NetBSD as well.

This revision is now accepted and ready to land.Apr 8 2020, 1:05 PM
grimar accepted this revision.Apr 9 2020, 3:02 AM

I am happy to see more tests enabled, thanks!
And I confirm they pass for me under windows with this change.

LGTM with 2 nits.

lld/test/ELF/reproduce-thin-archive.s
15

I'd perhaps leave it as repro2.tar, but changed the repro.tar above to repro1.tar.
(It is probably a bit confusing to see repro1.tar when it is known to be not the first,
but the second reproduce file in a test?)

lld/test/ELF/reproduce.s
15

Lets align? (We often do this in LLVM tools test and it reads slightly better + RSP3 checks below are aligned)

# RSP1:      {{^}}--hash-style gnu{{$}}
# RSP1-NOT:  {{^}}repro1{{[/\\]}}
# RSP1-NEXT: {{[/\\]}}foo.o
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 9 2020, 8:08 AM
thakis added a subscriber: thakis.Apr 14 2020, 6:30 AM

This fails on our bots: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8883156523552124208/+/steps/package_clang/0/stdout

Looks like dots are escaped for some reason:

"""
<stdin>:4:1: note: scanning from here
repro/C/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/tools/lld/test/ELF/Output/reproduce-linkerscript.s.tmp.dir/build/bar.script
"""

Can you take a look, please?

This fails on our bots: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8883156523552124208/+/steps/package_clang/0/stdout

Looks like dots are escaped for some reason:

"""
<stdin>:4:1: note: scanning from here
repro/C/b/s/w/ir/cache/builder/src/third_party/llvm-build/Release+Asserts/tools/lld/test/ELF/Output/reproduce-linkerscript.s.tmp.dir/build/bar.script
"""

Can you take a look, please?

The Windows machine on http://45.33.8.238/ is good.

@thakis Hi Nico, can you check whether REQUIRES: x86, shell fixes the chromium buildbucket?

Can you take a look, please?

I've had a quick look and I can't see anything that is obviously wrong. A number of the reproduce tests use this same "pattern" for checking and they appear to be passing fine on your bot. Looking at the test output in your log, the only other thing it could be is that somehow the order of the contents in the "repro.tar" archive is different, although this should be well defined. AFAIK there haven't been any other bot failures for this test.

https://bugs.chromium.org/p/chromium/issues/detail?id=1073524#c21 and onward has the details. The summary is that this change here exposed some underlying problem somewhere. We'll figure out what to do.