--- old/test/tools/launcher/ExecutionEnvironment.java Sun Sep 8 19:59:45 2013 +++ new/test/tools/launcher/ExecutionEnvironment.java Sun Sep 8 19:59:44 2013 @@ -48,7 +48,7 @@ * jre/lib/$arch/libjvm.so -> client/libjvm.so * 6. Since 32-bit Solaris is no longer supported we continue to ensure that * the appropriate paths are ignored or used, additionally we also test to - * ensure the 64-bit isadir exists and contains appopriate links. + * ensure the 64-bit isadir exists and contains appropriate links. * TODO: * a. perhaps we need to add a test to audit all environment variables are * in pristine condition after the launch, there may be a few that the @@ -66,6 +66,7 @@ import java.util.List; import java.util.Map; import static java.nio.file.LinkOption.*; +import java.util.regex.Pattern; public class ExecutionEnvironment extends TestHelper { @@ -284,7 +285,10 @@ verifySymLinks(JAVA_BIN); verifySymLinks(JAVA_JRE_BIN); } - private void verifySymLinks(String bindir) throws IOException { + // exclude non-consequential binaries or scripts co-packaged in install + private Pattern symlinkExcludes = Pattern.compile(".*jvisualvm.*"); + + private void verifySymLinks(String bindir) throws IOException { File binDir = new File(bindir); System.err.println("verifying links in: " + bindir); File isaDir = new File(binDir, getArch()).getAbsoluteFile(); @@ -293,13 +297,17 @@ } try (DirectoryStream ds = Files.newDirectoryStream(binDir.toPath())) { for (Path p : ds) { - if (Files.isDirectory(p, NOFOLLOW_LINKS)) + if (symlinkExcludes.matcher(p.toString()).matches() || + Files.isDirectory(p, NOFOLLOW_LINKS)) { continue; + } Path link = new File(isaDir, p.getFileName().toString()).toPath(); if (Files.isSymbolicLink(link)) { Path target = Files.readSymbolicLink(link); - if (target.startsWith("..") && p.endsWith(target.getFileName())) + if (target.startsWith("..") && p.endsWith(target.getFileName())) { + // System.out.println(target + " OK"); continue; + } System.err.println("target:" + target); System.err.println("file:" + p); }