On Thu, 4 Apr 2024 10:43:35 GMT, Suchismith Roy <s...@openjdk.org> wrote:

>> Hotspot loads it like this: 
>> https://github.com/openjdk/jdk/blob/b9da14012da5f1f72d4f6e690c18a43e87523173/src/hotspot/os/aix/libperfstat_aix.cpp#L76
>> Are you sure it is supposed to be loaded without member specification?
>
>> Hotspot loads it like this:
>> 
>> https://github.com/openjdk/jdk/blob/b9da14012da5f1f72d4f6e690c18a43e87523173/src/hotspot/os/aix/libperfstat_aix.cpp#L76
>> 
>> 
>> Are you sure it is supposed to be loaded without member specification?
> 
> Yes i was able to do it without mentioning the shared object. libodm was 
> failing though.

> > > Hello @suchismith1993,
> > > > Usually there is not such pure .a files that comes packaged with the 
> > > > OS. They are provided by some applications. So i am not sure how i can 
> > > > make the tests consistent for such cases.
> > > > Do you have any suggestions here ?
> > > 
> > > 
> > > Within the JDK repo, some tests require test specific native libraries 
> > > (like in your case here). It appears that the JDK build infrastructure 
> > > has ability to compile native code (`foo.c` for example) into a native 
> > > library. However that build infrastructure doesn't appear to be flexible 
> > > enough to support the case where you would have to run AIX specific 
> > > commands to generate a `.a` file. So the approach of generating a test 
> > > specific `.a` file doesn't look promising right now (it could still be 
> > > possible, but I don't know how big a build change that would require).
> > > So taking a step back - I see that 
> > > https://bugs.openjdk.org/browse/JDK-8313616 introduced the ability to 
> > > dealing with `.a` files on AIX from within the hotspot area. In that 
> > > commit https://github.com/openjdk/jdk/pull/15204/files I see that there 
> > > are references to a couple of `.a` files - for example `libodm.a` and 
> > > `libperfstat.a`. Are those `.a` expected to be present on certain AIX 
> > > systems? Perhaps your new test could use either of those in the test? 
> > > There was also a mention of `libclang.a` on AIX, previously in this 
> > > discussion. Maybe that could be used in the test?
> > 
> > 
> > I found libperfstat as the only example that is purely an archive files as 
> > part of AIX, after trying out multiple archives under /usr/lib. I am facing 
> > an issue to run the test ,but unable to set the library path to /usr/lib. I 
> > see the existing test case has libawt as part of jdk itself . Can i set 
> > -Djava.library.path while running jtreg test case ?
> 
> -Djava.library.path=/home/hotspot/openjdk/jdk-suchi/jdk1/build/aix-ppc64-server-fastdebug/images/test/jdk/jtreg/native
>  I see from logs, this is the path being set to, Which is not the intended 
> path. Not sure how the other test is working.

Ok i think i was able to resolve this. Need some guidance on where should i 
place the test file. Have made a very basic test to just load libperfstat.a

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17945#issuecomment-2036882540

Reply via email to