Skip to content

Conversation

rorth
Copy link
Collaborator

@rorth rorth commented May 5, 2025

After PR #138514, only 3 testsuite failures remain on Solaris/amd64. One of them is

libomp :: ompt/loadtool/tool_available_search/tool_available_search.c

The issue is that the expected message is that emitted by Linux/glibc, while the Solaris message differs:

On Linux/x86_64, I get

Opening projects/openmp/runtime/test/ompt/loadtool/tool_available_search/Output/non_existing_file.so... Failed: projects/openmp/runtime/test/ompt/loadtool/tool_available_search/Output/non_existing_file.so: cannot open shared object file: No such file or directory

while Solaris/amd64 emits

Opening projects/openmp/runtime/test/ompt/loadtool/tool_available_search/Output/non_existing_file.so... Failed: ld.so.1: tool_available_search.c.tmp: projects/openmp/runtime/test/ompt/loadtool/tool_available_search/Output/non_existing_file.so: open failed: No such file or directory

Since the exact wording is obviously an implementation detail, this patch allows for both forms.

Tested on amd64-pc-solaris2.11 and x86_64-pc-linux-gnu.

After PR llvm#138514, only 3 testsuite failures remain on Solaris/amd64.  One
of them is

```
libomp :: ompt/loadtool/tool_available_search/tool_available_search.c
```

The issue is that the expected message is that emitted by Linux/glibc,
while the Solaris messages differ:

On Linux/x86_64, I get
```
Opening projects/openmp/runtime/test/ompt/loadtool/tool_available_search/Output/non_existing_file.so... Failed: projects/openmp/runtime/test/ompt/loadtool/tool_available_search/Output/non_existing_file.so: cannot open shared object file: No such file or directory
```
while Solaris/amd64 emits
```
Opening projects/openmp/runtime/test/ompt/loadtool/tool_available_search/Output/non_existing_file.so... Failed: ld.so.1: tool_available_search.c.tmp: projects/openmp/runtime/test/ompt/loadtool/tool_available_search/Output/non_existing_file.so: open failed: No such file or directory
```

Since the exact wording is obviously an implementation detail, this patch
allows for both forms.

Tested on `amd64-pc-solaris2.11` and `x86_64-pc-linux-gnu`.
@rorth rorth requested review from MaskRay and brad0 May 5, 2025 12:14
@llvmbot llvmbot added the openmp:libomp OpenMP host runtime label May 5, 2025
Copy link

github-actions bot commented May 5, 2025

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff HEAD~1 HEAD --extensions c -- openmp/runtime/test/ompt/loadtool/tool_available_search/tool_available_search.c
View the diff from clang-format here.
diff --git a/openmp/runtime/test/ompt/loadtool/tool_available_search/tool_available_search.c b/openmp/runtime/test/ompt/loadtool/tool_available_search/tool_available_search.c
index cf1fd339f..ba55664b1 100644
--- a/openmp/runtime/test/ompt/loadtool/tool_available_search/tool_available_search.c
+++ b/openmp/runtime/test/ompt/loadtool/tool_available_search/tool_available_search.c
@@ -26,16 +26,15 @@
 // CHECK-SAME: [[PARENTPATH]]/second_tool.so
 // CHECK-SAME: [[PARENTPATH]]/third_tool.so
 // CHECK-NEXT: Opening [[PARENTPATH]]/non_existing_file.so... Failed:
-// CHECK-SAME: [[PARENTPATH]]/non_existing_file.so: {{cannot open shared object file|open failed}}:
-// CHECK-SAME: No such file or directory
-// CHECK-NEXT: Opening [[PARENTPATH]]/first_tool.so... Success.
-// CHECK-NEXT: Searching for ompt_start_tool in
-// CHECK-SAME: [[PARENTPATH]]/first_tool.so... Failed:
-// CHECK-SAME: {{.*/first_tool.so: undefined symbol: ompt_start_tool|ld.so.1: .*: ompt_start_tool: can't find symbol}}
-// CHECK-NEXT: Opening [[PARENTPATH]]/second_tool.so... Success.
-// CHECK-NEXT: Searching for ompt_start_tool in
-// CHECK-SAME: [[PARENTPATH]]/second_tool.so... 0: Do not initialize tool
-// CHECK-NEXT: Found but not using the OMPT interface.
+// CHECK-SAME: [[PARENTPATH]]/non_existing_file.so: {{cannot open shared object
+// file|open failed}}: CHECK-SAME: No such file or directory CHECK-NEXT: Opening
+// [[PARENTPATH]]/first_tool.so... Success. CHECK-NEXT: Searching for
+// ompt_start_tool in CHECK-SAME: [[PARENTPATH]]/first_tool.so... Failed:
+// CHECK-SAME: {{.*/first_tool.so: undefined symbol: ompt_start_tool|ld.so.1:
+// .*: ompt_start_tool: can't find symbol}} CHECK-NEXT: Opening
+// [[PARENTPATH]]/second_tool.so... Success. CHECK-NEXT: Searching for
+// ompt_start_tool in CHECK-SAME: [[PARENTPATH]]/second_tool.so... 0: Do not
+// initialize tool CHECK-NEXT: Found but not using the OMPT interface.
 // CHECK-NEXT: Continuing search...
 // CHECK-NEXT: Opening [[PARENTPATH]]/third_tool.so... Success.
 // CHECK-NEXT: Searching for ompt_start_tool in

@rorth rorth requested review from mjklemm and TerryLWilmarth May 8, 2025 11:56
Copy link
Contributor

@mjklemm mjklemm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rorth rorth merged commit fe56c8f into llvm:main May 10, 2025
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openmp:libomp OpenMP host runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants