diff -r ff399127078a -r a764c49570c6 test/jdk/tools/launcher/Test7029048.java --- a/test/jdk/tools/launcher/Test7029048.java Thu Mar 07 15:27:42 2019 +0100 +++ b/test/jdk/tools/launcher/Test7029048.java Thu Mar 07 10:18:23 2019 -0800 @@ -23,7 +23,7 @@ /** * @test - * @bug 7029048 8217340 + * @bug 7029048 8217340 8217216 * @summary Ensure that the launcher defends against user settings of the * LD_LIBRARY_PATH environment variable on Unixes * @library /test/lib @@ -89,6 +89,29 @@ } static void analyze(TestResult tr, int nLLPComponents, String caseID) { + if (isSolaris) { + String envValue = getValue("LD_LIBRARY_PATH_64", tr.testOutput); + /* + * the envValue can never be null, since the test code should always + * print a "null" string. + */ + if (envValue == null) { + throw new RuntimeException("NPE, likely a program crash ??"); + } + boolean noLLP64 = envValue.equals("null"); + if (nLLPComponents == 0 && noLLP64) { + System.out.println("FAIL: test7029048, " + caseID); + System.out.println(" Missing LD_LIBRARY_PATH_64"); + errors++; + return; + } else if (nLLPComponents > 3 && !noLLP64) { + System.out.println("FAIL: test7029048, " + caseID); + System.out.println(" Unexpected LD_LIBRARY_PATH_64: " + envValue); + errors++; + return; + } + } + String envValue = getValue(LD_LIBRARY_PATH, tr.testOutput); /* * the envValue can never be null, since the test code should always @@ -202,8 +225,8 @@ env.clear(); env.put(LD_LIBRARY_PATH_64, dstServerDir.getAbsolutePath()); run(env, - v.value, // Do not add one, since we didn't set - // LD_LIBRARY_PATH here + // LD_LIBRARY_PATH_64 is copied into LD_LIBRARY_PATH for LIBJVM case + v.value == 0 ? 0 : v.value + 1, "Case 3: " + desc); } }