test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java
changeset 49128 97288886180c
parent 47216 71c04702a3d5
child 51117 c96c7d08ae49
--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java	Sun Mar 04 18:46:07 2018 -0800
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java	Mon Mar 05 08:27:42 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,7 @@
  *        jdk.test.lib.Platform
  *        jdk.test.lib.process.*
  *        StateTest StateTestService EchoTest EchoService CloseTest Launcher Util
- * @run testng/othervm InheritedChannelTest
+ * @run testng/othervm/native InheritedChannelTest
  * @key intermittent
  */
 
@@ -68,9 +68,7 @@
     private static final String OS_ARCH = ARCH.equals("i386") ? "i586" : ARCH;
 
     private static final Path LD_LIBRARY_PATH
-            = Paths.get(TEST_SRC, "lib", OS_NAME + "-" + OS_ARCH);
-
-    private static final Path LAUNCHERLIB = LD_LIBRARY_PATH.resolve("libLauncher.so");
+            = Paths.get(System.getProperty("java.library.path"));
 
     @DataProvider
     public Object[][] testCases() {
@@ -99,11 +97,6 @@
 
     @Test(dataProvider = "testCases")
     public void test(String desc, List<String> opts) throws Throwable {
-        if (!Files.exists(LAUNCHERLIB)) {
-            System.out.println("Cannot find " + LAUNCHERLIB
-                    + " - library not available for this system");
-            return;
-        }
         System.out.println("LD_LIBRARY_PATH=" + LD_LIBRARY_PATH);
 
         List<String> args = new ArrayList<>();