On Mon, 22 Aug 2022 15:15:07 GMT, Weijun Wang <wei...@openjdk.org> wrote:
> The new `setErr` is good. > > You still haven't printed out the stack trace when the test fails. I know > this has not effect on whether the test fails or not. The benefit of it is > for diagnosis once the test fails. Has I seen a failure, the 1st thing I > would do is to look into the stack trace and see why that message is not > there. So, why not add it now? > Hmm I saw some exception trace is printed out here for failure case: [root@hp-z210-01 jdk]# jtreg/bin/jtreg -jdk:/root/jdk/build.master/linux-x86_64-server-release/images/jdk/ test/jdk/javax/security/auth/login/LoginContext/OptionalJaas/UnixNTPlatform.java Test results: failed: 1 Report written to /root/jdk/JTreport/html/report.html Results written to /root/jdk/JTwork Error: Some tests failed or other problems occurred. [root@hp-z210-01 jdk]# cat JTwork/javax/security/auth/login/LoginContext/OptionalJaas/UnixNTPlatform.jtr #Test Results (version 2) #Mon Aug 22 10:47:19 EDT 2022 #-----testdescription----- $file=/root/jdk/test/jdk/javax/security/auth/login/LoginContext/OptionalJaas/UnixNTPlatform.java $root=/root/jdk/test/jdk keywords=bug8215916 othervm run=USER_SPECIFIED main/othervm -Djava.security.debug=logincontext UnixNTPlatform\n source=UnixNTPlatform.java title=This test case attempts to verify whether call stack trace is printed when JAAS optional login fails when debug is true. #-----environment----- #-----testresult----- description=file:/root/jdk/test/jdk/javax/security/auth/login/LoginContext/OptionalJaas/UnixNTPlatform.java elapsed=828 0:00:00.828 end=Mon Aug 22 10:47:19 EDT 2022 environment=regtest execStatus=Failed. Execution failed: `main' threw exception: java.lang.RuntimeException harnessLoaderMode=Classpath Loader harnessVariety=Full Bundle hostname=hp-z210-01.ml3.eng.bos.redhat.com javatestOS=Linux 5.18.13-200.fc36.x86_64 (amd64) javatestVersion=6.0-ea+b14-2022-02-03 jtregVersion=jtreg 6.2 dev 0 script=com.sun.javatest.regtest.exec.RegressionScript sections=script_messages build compile main start=Mon Aug 22 10:47:18 EDT 2022 test=javax/security/auth/login/LoginContext/OptionalJaas/UnixNTPlatform.java testJDK=/root/jdk/build.master/linux-x86_64-server-release/images/jdk totalTime=831 user.name=root work=/root/jdk/JTwork/javax/security/auth/login/LoginContext/OptionalJaas #section:script_messages ----------messages:(4/263)---------- JDK under test: /root/jdk/build.master/linux-x86_64-server-release/images/jdk openjdk version "20-internal" 2023-03-21 OpenJDK Runtime Environment (build 20-internal-adhoc.root.jdk) OpenJDK 64-Bit Server VM (build 20-internal-adhoc.root.jdk, mixed mode, sharing) #section:build ----------messages:(5/141)---------- command: build UnixNTPlatform reason: Named class compiled on demand Test directory: compile: UnixNTPlatform elapsed time (seconds): 0.671 result: Passed. Build successful #section:compile ----------messages:(4/202)---------- command: compile /root/jdk/test/jdk/javax/security/auth/login/LoginContext/OptionalJaas/UnixNTPlatform.java reason: .class file out of date or does not exist Mode: othervm elapsed time (seconds): 0.669 ----------configuration:(5/312)---------- javac compilation environment source path: /root/jdk/test/jdk/javax/security/auth/login/LoginContext/OptionalJaas class path: /root/jdk/test/jdk/javax/security/auth/login/LoginContext/OptionalJaas ------------- PR: https://git.openjdk.org/jdk/pull/9159