< prev index next >

test/com/sun/jdi/BadAgentPath.java

Print this page
rev 16783 : 8176176: fix @modules in jdk_svc tests
Reviewed-by: duke


  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import jdk.testlibrary.OutputAnalyzer;
  25 import jdk.testlibrary.ProcessTools;
  26 import jdk.testlibrary.Utils;
  27 
  28 /* @test
  29  * @bug 8147456
  30  * @summary Check that providing a non-existing -agentpath gives a proper error.
  31  * @author Sharath Ballal
  32  *
  33  * @library /lib/testlibrary
  34  * @modules java.management

  35  * @build jdk.testlibrary.*
  36  * @build BadAgentPath
  37  * @run driver BadAgentPath
  38  */
  39 
  40 public class BadAgentPath {
  41 
  42     public static void main(String[] args) throws Throwable {
  43         OutputAnalyzer output = ProcessTools.executeTestJvm("-agentpath:/badAgent/agent", "-version");
  44         output.shouldContain("Could not find agent library /badAgent/agent");
  45     }
  46 }


  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import jdk.testlibrary.OutputAnalyzer;
  25 import jdk.testlibrary.ProcessTools;
  26 import jdk.testlibrary.Utils;
  27 
  28 /* @test
  29  * @bug 8147456
  30  * @summary Check that providing a non-existing -agentpath gives a proper error.
  31  * @author Sharath Ballal
  32  *
  33  * @library /lib/testlibrary
  34  * @modules java.management
  35  *
  36  * @build jdk.testlibrary.*
  37  * @build BadAgentPath
  38  * @run driver BadAgentPath
  39  */
  40 
  41 public class BadAgentPath {
  42 
  43     public static void main(String[] args) throws Throwable {
  44         OutputAnalyzer output = ProcessTools.executeTestJvm("-agentpath:/badAgent/agent", "-version");
  45         output.shouldContain("Could not find agent library /badAgent/agent");
  46     }
  47 }
< prev index next >