This is an archive of the discontinued LLVM Phabricator instance.

[test] [llvm-config] Assume unix style lib names on mingw targets
ClosedPublic

Authored by mstorsjo on May 5 2023, 2:45 PM.

Diff Detail

Event Timeline

mstorsjo created this revision.May 5 2023, 2:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2023, 2:45 PM
mstorsjo requested review of this revision.May 5 2023, 2:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2023, 2:45 PM
alvinhochun accepted this revision.May 6 2023, 12:01 AM

Looks like a straightforward test fix.

This revision is now accepted and ready to land.May 6 2023, 12:01 AM
mati865 accepted this revision.May 6 2023, 12:53 AM

LGTM

dyung added a subscriber: dyung.May 9 2023, 4:37 PM

Hi @mstorsjo, the change you made is causing the test llvm/test/tools/llvm-config/system-libs.test to fail on the PS5 Windows bot. Can you fix the test or revert if you need time to investigate?

https://lab.llvm.org/buildbot/#/builders/216/builds/20982

******************** TEST 'LLVM :: tools/llvm-config/system-libs.test' FAILED ********************
Script:
--
: 'RUN: at line 1';   z:\b\llvm-clang-x86_64-sie-win\build\bin\llvm-config.exe --link-static --system-libs Support 2>&1 | z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe Z:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\tools\llvm-config\system-libs.test
--
Exit Code: 1
Command Output (stdout):
--
$ ":" "RUN: at line 1"
$ "z:\b\llvm-clang-x86_64-sie-win\build\bin\llvm-config.exe" "--link-static" "--system-libs" "Support"
$ "z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe" "Z:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\tools\llvm-config\system-libs.test"
# command stderr:
Z:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\tools\llvm-config\system-libs.test:4:8: error: CHECK: expected string not found in input
CHECK: -l
       ^
<stdin>:1:1: note: scanning from here
psapi.lib shell32.lib ole32.lib uuid.lib advapi32.lib
^
<stdin>:1:6: note: possible intended match here
psapi.lib shell32.lib ole32.lib uuid.lib advapi32.lib
     ^
Input file: <stdin>
Check file: Z:\b\llvm-clang-x86_64-sie-win\llvm-project\llvm\test\tools\llvm-config\system-libs.test
-dump-input=help explains the following input dump.
Input was:
<<<<<<
           1: psapi.lib shell32.lib ole32.lib uuid.lib advapi32.lib 
check:4'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
check:4'1          ?                                                 possible intended match
>>>>>>
error: command failed with exit status: 1
--
********************

Hi @mstorsjo, the change you made is causing the test llvm/test/tools/llvm-config/system-libs.test to fail on the PS5 Windows bot. Can you fix the test or revert if you need time to investigate?

Sorry about that, and sorry for not being around to revert it in a timely manner.

What's the target set to in the runs of this buildbot? I guess target might be anything, for cases that are configured to cross compile by default, so we shouldn't rely on that in this test. I wonder if there's some similar feature we could check for the host instead of the target? Or perhaps we should just mark the windows part of the test UNSUPPORTED: target={{.*-windows-gnu}} and not complicate things more than necessary - that should be enough to achieve what we want here...

mstorsjo reopened this revision.May 9 2023, 11:56 PM
This revision is now accepted and ready to land.May 9 2023, 11:56 PM
dyung added a comment.May 9 2023, 11:59 PM

Hi @mstorsjo, the change you made is causing the test llvm/test/tools/llvm-config/system-libs.test to fail on the PS5 Windows bot. Can you fix the test or revert if you need time to investigate?

Sorry about that, and sorry for not being around to revert it in a timely manner.

What's the target set to in the runs of this buildbot?

On this buildbot, the default target triple is set to x86_64-sie-ps5.

I guess target might be anything, for cases that are configured to cross compile by default, so we shouldn't rely on that in this test. I wonder if there's some similar feature we could check for the host instead of the target? Or perhaps we should just mark the windows part of the test UNSUPPORTED: target={{.*-windows-gnu}} and not complicate things more than necessary - that should be enough to achieve what we want here...

Seems that you may need to add a lit.cfg.py and check config.host_triple in there to set a custom feature keyword.

mstorsjo updated this revision to Diff 521627.May 12 2023, 6:12 AM

Check specifically for the host triple instead of the target triple.

@dyung Can you take this patch for a test in your build configuration, to see if these tests work as expected now?

This revision was landed with ongoing or failed builds.May 16 2023, 12:43 AM
This revision was automatically updated to reflect the committed changes.

@dyung Can you take this patch for a test in your build configuration, to see if these tests work as expected now?

I relanded this patch now, and it seems to run fine in this buildbot this time: https://lab.llvm.org/buildbot/#/builders/216

dyung added a comment.May 16 2023, 1:35 AM

@dyung Can you take this patch for a test in your build configuration, to see if these tests work as expected now?

I relanded this patch now, and it seems to run fine in this buildbot this time: https://lab.llvm.org/buildbot/#/builders/216

I saw that, thanks for the fix! I apologize for not being able to get to this, much of our internal buildbot infrastructure was down for various reasons this past weekend which I was trying to get fixed.