On Fri, 5 Apr 2024 08:58:34 GMT, Suchismith Roy <s...@openjdk.org> wrote:
>> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request incrementally with two additional > commits since the last revision: > > - spaces > - nits and move file to aix directory Wouldn't hotspot anyways give a failure which will lead to an exception if .a is not present ? On Fri, Apr 5, 2024, 21:48 Mandy Chung ***@***.***> wrote: > ***@***.**** commented on this pull request. > ------------------------------ > > In > test/jdk/java/lang/RuntimeTests/loadLibrary/aix/LoadAIXLibraryFromArchiveObject.java > <https://github.com/openjdk/jdk/pull/17945#discussion_r1553959163>: > > > + * accompanied this code). > + * > + * You should have received a copy of the GNU General Public License version > + * 2 along with this work; if not, write to the Free Software Foundation, > + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > + * > + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > + * or visit www.oracle.com if you need additional information or have any > + * questions. > + */ > + > +/** > + * @test > + * @bug 8319516 > + * @requires os.family == "aix" > + * @run main/othervm -Djava.library.path=/usr/lib LoadLibraryTestAIX > > ⬇️ Suggested change > > - * @run main/othervm -Djava.library.path=/usr/lib LoadLibraryTestAIX > + * @run main/othervm -Djava.library.path=/usr/lib > LoadAIXLibraryFromArchiveObject > > ------------------------------ > > In > test/jdk/java/lang/RuntimeTests/loadLibrary/aix/LoadAIXLibraryFromArchiveObject.java > <https://github.com/openjdk/jdk/pull/17945#discussion_r1553962707>: > > > + * > + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > + * or visit www.oracle.com if you need additional information or have any > + * questions. > + */ > + > +/** > + * @test > + * @bug 8319516 > + * @requires os.family == "aix" > + * @run main/othervm -Djava.library.path=/usr/lib LoadLibraryTestAIX > + */ > + > +public class LoadAIXLibraryFromArchiveObject { > + public static void main(String[] args) throws Exception { > + String libraryName = "perfstat"; > > I suggest to check if /usr/lib/libperstat.a is present and > /usr/lib/libperfstat.so is not present; otherwise, the test should throw > RuntimeException. > ------------------------------ > > In test/jdk/java/lang/RuntimeTests/loadLibrary/LoadLibraryTestAIX.java > <https://github.com/openjdk/jdk/pull/17945#discussion_r1553961921>: > > > + } catch (Exception e) { > + throw new RuntimeException("LoadLibraryTestAIX : could not load > libperfstat.a"+e); > + } > > In this case, the test can verify if /usr/lib/libperstat.a is present and > /usr/lib/libperfstat.so is not present; otherwise, the test should throw > RuntimeException. This also serves a good documentation purpose showing > what this test expects. > > — > Reply to this email directly, view it on GitHub > <https://github.com/openjdk/jdk/pull/17945#pullrequestreview-1983652464>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AESW3BGWJOY5EQDRKPNMKEDY33FGFAVCNFSM6AAAAABDS326YOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSOBTGY2TENBWGQ> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> > ------------- PR Comment: https://git.openjdk.org/jdk/pull/17945#issuecomment-2040275014