< prev index next >
test/jdk/tools/launcher/RunpathTest.java
Print this page
rev 59383 : [mq]: final
*** 1,7 ****
/*
! * Copyright (c) 2012, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2012, 2020, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 39,49 ****
elfreaderCmd = findElfReader();
}
final String findElfReader() {
String[] paths = {"/usr/sbin", "/usr/bin"};
! final String cmd = isSolaris ? "elfdump" : "readelf";
for (String x : paths) {
File p = new File(x);
File e = new File(p, cmd);
if (e.canExecute()) {
return e.getAbsolutePath();
--- 39,49 ----
elfreaderCmd = findElfReader();
}
final String findElfReader() {
String[] paths = {"/usr/sbin", "/usr/bin"};
! final String cmd = "readelf";
for (String x : paths) {
File p = new File(x);
File e = new File(p, cmd);
if (e.canExecute()) {
return e.getAbsolutePath();
*** 67,77 ****
String expectedRpath = ".*R(UN)?PATH.*\\$ORIGIN/../lib.*";
elfCheck(javaCmd, expectedRpath);
}
public static void main(String... args) throws Exception {
! if (isSolaris || isLinux) {
RunpathTest rp = new RunpathTest();
if (rp.elfreaderCmd == null) {
System.err.println("Warning: test passes vacuously");
return;
}
--- 67,77 ----
String expectedRpath = ".*R(UN)?PATH.*\\$ORIGIN/../lib.*";
elfCheck(javaCmd, expectedRpath);
}
public static void main(String... args) throws Exception {
! if (isLinux) {
RunpathTest rp = new RunpathTest();
if (rp.elfreaderCmd == null) {
System.err.println("Warning: test passes vacuously");
return;
}
< prev index next >