/* *Describethecasesthatwetest.Eachcasesetstheenvironment *variableLD_LIBRARY_PATHtoadifferentvalue.Thevalueassociated *withacaseisthenumberofpathelementsthatweexpectthelauncher *toaddtothatvariable.
*/ privatestaticenum TestCase {
NO_DIR(0), // Directory does not exist
NO_LIBJVM(0), // Directory exists, but no libjvm.so
LIBJVM(3); // Directory exists, with a libjvm.so privatefinalint value;
TestCase(int i) { this.value = i;
}
}
/* *testfor7029048
*/ staticboolean runTest() throws IOException {
String desc = null; boolean pass = true; for (TestCase v : TestCase.values()) { switch (v) { case LIBJVM: // copy the files into the directory structures
copyFile(srcLibjvmSo, dstServerLibjvm); // does not matter if it is client or a server
copyFile(srcLibjvmSo, dstClientLibjvm);
desc = "LD_LIBRARY_PATH should be set"; break; case NO_LIBJVM: if (!dstClientDir.exists()) {
Files.createDirectories(dstClientDir.toPath());
} else {
Files.deleteIfExists(dstClientLibjvm.toPath());
}
if (!dstServerDir.exists()) {
Files.createDirectories(dstServerDir.toPath());
} else {
Files.deleteIfExists(dstServerLibjvm.toPath());
}
desc = "LD_LIBRARY_PATH should not be set (no libjvm.so)"; if (IS_EXPANDED_LD_LIBRARY_PATH) {
printSkipMessage(desc); continue;
} break; case NO_DIR: if (dstLibDir.exists()) {
recursiveDelete(dstLibDir);
}
desc = "LD_LIBRARY_PATH should not be set (no directory)"; if (IS_EXPANDED_LD_LIBRARY_PATH) {
printSkipMessage(desc); continue;
} break; default: thrownew RuntimeException("unknown case");
}
// Add one to account for our setting int nLLPComponents = v.value + 1;
privatestaticvoid printSkipMessage(String description) {
System.out.printf("Skipping test case '%s' because the Aix and musl launchers" + " add the paths in any case.%n", description);
}
publicstaticvoid main(String... args) throws Exception { if (!TestHelper.haveServerVM) {
System.out.println("Note: test relies on server vm, not found, exiting"); return;
} // create our test jar first
ExecutionEnvironment.createTestJar();
if (!runTest()) { thrownew Exception("Test7029048 fails");
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.