From bysanik at amazon.com Thu Aug 3 23:59:16 2017 From: bysanik at amazon.com (Bysani, Keerthana) Date: Thu, 3 Aug 2017 23:59:16 +0000 Subject: Core dumps generated but unable to find them in the specified location. Message-ID: Hi, So I ran my JTreg tests and whichever ones failed with a SEGV, generated this message: # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f7b9c30b8e1, pid=26526, tid=26542 # # JRE version: OpenJDK Runtime Environment (9.0) (slowdebug build 9-internal+0-adhoc.test.openjdk9-2017-07-27) # Java VM: OpenJDK 64-Bit Server VM (slowdebug 9-internal+0-adhoc.test.openjdk9-2017-07-27, mixed mode, rt gc, linux-amd64) # Problematic frame: # java.lang.invoke.MethodType.parameterCount()I+0 java.base at 9-internal # # Core dump will be written. Default location: /home/test/OpenJDKTrees/openjdk9-2017-07-27/build/jtreg/RTGCWork/scratch/core.%p # # An error report file with more information is saved as: # /home/test/OpenJDKTrees/openjdk9-2017-07-27/build/jtreg/RTGCWork/scratch/hs_err_pid26526.log Compiled method (c2) 2670 3 java.lang.Object:: (1 bytes) total in heap [0x00007f7b9c4c1190,0x00007f7b9c4c1458] = 712 relocation [0x00007f7b9c4c1318,0x00007f7b9c4c1328] = 16 main code [0x00007f7b9c4c1340,0x00007f7b9c4c13a0] = 96 stub code [0x00007f7b9c4c13a0,0x00007f7b9c4c13b8] = 24 metadata [0x00007f7b9c4c13b8,0x00007f7b9c4c13c0] = 8 scopes data [0x00007f7b9c4c13c0,0x00007f7b9c4c13d8] = 24 scopes pcs [0x00007f7b9c4c13d8,0x00007f7b9c4c1438] = 96 dependencies [0x00007f7b9c4c1438,0x00007f7b9c4c1440] = 8 handler table [0x00007f7b9c4c1440,0x00007f7b9c4c1458] = 24 Could not load hsdis-amd64.so; library not loadable; PrintAssembly is disabled # # If you would like to submit a bug report, please visit: # http://bugreport.java.com/bugreport/crash.jsp # Current thread is 26542 Dumping core ... STDERR: But when I go search in the default directory to examine the core file, there is nothing there. There are no core files being dumped there. Could someone guide me as to where they could possibly be stored? Default location :/home/test/OpenJDKTrees/openjdk9-2017-07-27/build/jtreg/RTGCWork/scratch/core.%p Or will the core and log files be dumped only after the test suite has completed executing? The above result is partial result of one of the tests in the test suite. Thanks and Regards, Keerthana From martinrb at google.com Fri Aug 18 01:22:20 2017 From: martinrb at google.com (Martin Buchholz) Date: Thu, 17 Aug 2017 18:22:20 -0700 Subject: """error: module testng reads package test from both test and testng""" Message-ID: When I run the jtreg test java/lang/ModuleTests/addXXX I fail with direct: error: module testng reads package test from both test and testng In the javac command line I see: --add-modules testng,jcommander but ... testng and jcommander aren't modules; they're just garden variety jar files. Running jtreg 4.2-b07. From mandy.chung at oracle.com Mon Aug 21 19:12:57 2017 From: mandy.chung at oracle.com (mandy chung) Date: Mon, 21 Aug 2017 12:12:57 -0700 Subject: """error: module testng reads package test from both test and testng""" In-Reply-To: References: Message-ID: The test itself is a module that depends on testng. So testng.jar is added as an automatic module. This test passes on my setup. I am puzzling how jcommander.jar is added to the module path. Can you send the .jtr file and list what's in JTwork/modules directory? Mandy On 8/17/17 6:22 PM, Martin Buchholz wrote: > When I run the jtreg test > java/lang/ModuleTests/addXXX > I fail with > > direct: > error: module testng reads package test from both test and testng > > In the javac command line I see: > --add-modules testng,jcommander > but ... testng and jcommander aren't modules; they're just garden variety > jar files. > > Running jtreg 4.2-b07. From martinrb at google.com Mon Aug 21 21:14:59 2017 From: martinrb at google.com (Martin Buchholz) Date: Mon, 21 Aug 2017 14:14:59 -0700 Subject: """error: module testng reads package test from both test and testng""" In-Reply-To: References: Message-ID: I just upgraded to 4.2-b08, although without any effect on this problem. jcommander.jar is from jtreg's lib directory code-tools/jtreg/make/Defs.gmk says: """ # TestNG requires jcommander, which may or may not be bundled with TESTNG_JAR. # If it is not, set JCOMMANDER_JAR to an appropriate version """ $ ls -l ./JTwork/modules total 1620 -rw-r--r-- 1 martin martin 63504 Aug 21 12:27 jcommander.jar -rw-r--r-- 1 martin martin 1589287 Aug 21 12:27 testng.jar $ /home/martin/jtreg-binaries/current/bin/jtreg -noreport -v:fail -compilejdk:/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk -testjdk:/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk java/lang/ModuleTests/addXXX -------------------------------------------------- TEST: java/lang/ModuleTests/addXXX/Driver.java TEST JDK: /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk ACTION: build -- Failed. Compilation failed: Compilation failed REASON: User specified action: run build test/* m1/* m2/* m3/* m4/* TIME: 0.943 seconds messages: command: build test/* m1/* m2/* m3/* m4/* reason: User specified action: run build test/* m1/* m2/* m3/* m4/* Test directory: compile: test/module-info, test/test.C, test/test.Service, test/test.Main, m1/module-info, m1/p1.C, m2/module-info, m2/p2.C, m2/p2.internal.C, m3/module-info, m3/p3.C, m4/module-info, m4/p4.C elapsed time (seconds): 0.943 ACTION: compile -- Failed. Compilation failed: Compilation failed REASON: .class file out of date or does not exist TIME: 0.938 seconds messages: command: compile /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/module-info.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/test/C.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/test/Service.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/test/Main.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m1/module-info.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m1/p1/C.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/module-info.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/p2/C.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/p2/internal/C.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m3/module-info.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m3/p3/C.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m4/module-info.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m4/p4/C.java reason: .class file out of date or does not exist Mode: othervm elapsed time (seconds): 0.938 configuration: javac compilation environment add modules: testng jcommander module path: /home/martin/ws/jdk10/jdk/test/JTwork/modules rerun: DISPLAY=localhost:10.0 \ HOME=/home/martin \ LANG=en_US.UTF-8 \ PATH=/bin:/usr/bin \ /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk/bin/javac \ -J-Dtest.src=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ -J-Dtest.src.path=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ -J-Dtest.classes=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d \ -J-Dtest.class.path=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d \ -J-Dtest.vm.opts= \ -J-Dtest.tool.vm.opts= \ -J-Dtest.compiler.opts= \ -J-Dtest.java.opts= \ -J-Dtest.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk \ -J-Dcompile.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk \ -J-Dtest.timeout.factor=1.0 \ @/home/martin/ws/jdk10/jdk/test/JTwork/java/lang/ModuleTests/addXXX/Driver.d/compile.0.jta STDOUT: STDERR: error: module testng reads package test from both test and testng 1 error TEST RESULT: Failed. Compilation failed: Compilation failed -------------------------------------------------- Test results: failed: 1 On Mon, Aug 21, 2017 at 12:12 PM, mandy chung wrote: > The test itself is a module that depends on testng. So testng.jar is > added as an automatic module. This test passes on my setup. > > I am puzzling how jcommander.jar is added to the module path. Can you send > the .jtr file and list what's in JTwork/modules directory? > > Mandy > > > On 8/17/17 6:22 PM, Martin Buchholz wrote: > >> When I run the jtreg test >> java/lang/ModuleTests/addXXX >> I fail with >> >> direct: >> error: module testng reads package test from both test and testng >> >> In the javac command line I see: >> --add-modules testng,jcommander >> but ... testng and jcommander aren't modules; they're just garden variety >> jar files. >> >> Running jtreg 4.2-b07. >> > > From mandy.chung at oracle.com Mon Aug 21 23:06:53 2017 From: mandy.chung at oracle.com (mandy chung) Date: Mon, 21 Aug 2017 16:06:53 -0700 Subject: """error: module testng reads package test from both test and testng""" In-Reply-To: References: Message-ID: I can reproduce it and javac outputs the following errors. javac compiles successfully if jcommander.jar is removed. Will look into it. error: the unnamed module reads package com.beust.jcommander from both jcommander and testng error: the unnamed module reads package com.beust.jcommander.validators from both jcommander and testng error: the unnamed module reads package com.beust.jcommander.internal from both jcommander and testng error: the unnamed module reads package com.beust.jcommander.defaultprovider from both jcommander and testng error: the unnamed module reads package com.beust.jcommander.converters from both jcommander and testng error: module jcommander reads package com.beust.jcommander from both testng and jcommander error: module jcommander reads package com.beust.jcommander.validators from both testng and jcommander error: module jcommander reads package com.beust.jcommander.internal from both testng and jcommander error: module jcommander reads package com.beust.jcommander.defaultprovider from both testng and jcommander error: module jcommander reads package com.beust.jcommander.converters from both testng and jcommander error: module testng reads package com.beust.jcommander from both jcommander and testng error: module testng reads package com.beust.jcommander.validators from both jcommander and testng error: module testng reads package com.beust.jcommander.internal from both jcommander and testng error: module testng reads package com.beust.jcommander.defaultprovider from both jcommander and testng error: module testng reads package com.beust.jcommander.converters from both jcommander and testng /scratch/mchung/ws/jdk10/jdk10-dev/jdk/test/java/lang/ModuleTests/addXXX/test/module-info.java:23: error: module test reads package com.beust.jcommander from both testng and jcommander module test { Mandy On 8/21/17 2:14 PM, Martin Buchholz wrote: > I just upgraded to 4.2-b08, although without any effect on this > problem. jcommander.jar is from jtreg's lib directory > > code-tools/jtreg/make/Defs.gmk says: > """ > # TestNG requires jcommander, which may or may not be bundled with > TESTNG_JAR. > # If it is not, set JCOMMANDER_JAR to an appropriate version > """ > > $ ls -l ./JTwork/modules > total 1620 > -rw-r--r-- 1 martin martin 63504 Aug 21 12:27 jcommander.jar > -rw-r--r-- 1 martin martin 1589287 Aug 21 12:27 testng.jar > > $ /home/martin/jtreg-binaries/current/bin/jtreg -noreport -v:fail > -compilejdk:/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk > -testjdk:/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk > java/lang/ModuleTests/addXXX > -------------------------------------------------- > TEST: java/lang/ModuleTests/addXXX/Driver.java > TEST JDK: > /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk > > ACTION: build -- Failed. Compilation failed: Compilation failed > REASON: User specified action: run build test/* m1/* m2/* m3/* m4/* > TIME: 0.943 seconds > messages: > command: build test/* m1/* m2/* m3/* m4/* > reason: User specified action: run build test/* m1/* m2/* m3/* m4/* > Test directory: > compile: test/module-info, test/test.C, test/test.Service, > test/test.Main, m1/module-info, m1/p1.C, m2/module-info, m2/p2.C, > m2/p2.internal.C, m3/module-info, m3/p3.C, m4/module-info, m4/p4.C > elapsed time (seconds): 0.943 > > ACTION: compile -- Failed. Compilation failed: Compilation failed > REASON: .class file out of date or does not exist > TIME: 0.938 seconds > messages: > command: compile > /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/module-info.java > /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/test/C.java > /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/test/Service.java > /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/test/Main.java > /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m1/module-info.java > /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m1/p1/C.java > /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/module-info.java > /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/p2/C.java > /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/p2/internal/C.java > /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m3/module-info.java > /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m3/p3/C.java > /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m4/module-info.java > /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m4/p4/C.java > reason: .class file out of date or does not exist > Mode: othervm > elapsed time (seconds): 0.938 > configuration: > javac compilation environment > add modules: testng jcommander > module path: /home/martin/ws/jdk10/jdk/test/JTwork/modules > > rerun: > DISPLAY=localhost:10.0 \ > HOME=/home/martin \ > LANG=en_US.UTF-8 \ > PATH=/bin:/usr/bin \ > /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk/bin/javac > \ > -J-Dtest.src=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ > -J-Dtest.src.path=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX > \ > -J-Dtest.classes=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d > \ > -J-Dtest.class.path=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d > \ > -J-Dtest.vm.opts= \ > -J-Dtest.tool.vm.opts= \ > -J-Dtest.compiler.opts= \ > -J-Dtest.java.opts= \ > -J-Dtest.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk > \ > -J-Dcompile.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk > \ > -J-Dtest.timeout.factor=1.0 \ > @/home/martin/ws/jdk10/jdk/test/JTwork/java/lang/ModuleTests/addXXX/Driver.d/compile.0.jta > STDOUT: > STDERR: > error: module testng reads package test from both test and testng > 1 error > > TEST RESULT: Failed. Compilation failed: Compilation failed > -------------------------------------------------- > Test results: failed: 1 > > On Mon, Aug 21, 2017 at 12:12 PM, mandy chung > wrote: > > The test itself is a module that depends on testng. So testng.jar > is added as an automatic module. This test passes on my setup. > > I am puzzling how jcommander.jar is added to the module path. Can > you send the .jtr file and list what's in JTwork/modules directory? > > Mandy > > > On 8/17/17 6:22 PM, Martin Buchholz wrote: > > When I run the jtreg test > java/lang/ModuleTests/addXXX > I fail with > > direct: > error: module testng reads package test from both test and testng > > In the javac command line I see: > --add-modules testng,jcommander > but ... testng and jcommander aren't modules; they're just > garden variety > jar files. > > Running jtreg 4.2-b07. > > > From mandy.chung at oracle.com Tue Aug 22 19:38:33 2017 From: mandy.chung at oracle.com (mandy chung) Date: Tue, 22 Aug 2017 12:38:33 -0700 Subject: """error: module testng reads package test from both test and testng""" In-Reply-To: References: Message-ID: Hi Martin, "error: module testng reads package test from both test and testng" indicates that a split package is detected.?? Does your testng.jar contain classes of package "test"??? I downloaded testng from maven which does not have the package "test". The testng.jar version I had bundled with jcommander classes and hence the error message reports com.beust.jcommander.* packages from jcommander and testng module.? It was an old version before testng was mavenized.?? If I run jtreg with the testng and jcommander downloaded from maven, the test passes. You can run java -p JTwork/modules --validate-modules to check if any split packages or other conflict. Jon, Jan, ? I think the javac error message could be improved to make it clear that the package is split in multiple module.?? In addition, the test only contains explicit modules.?? It's strange that the javac reports that "the unnamed module reads package xxx from ....".? I will create a JBS issue on improving the error message. Mandy On 8/21/17 4:06 PM, mandy chung wrote: > I can reproduce it and javac outputs the following errors.? javac > compiles successfully if jcommander.jar is removed.?? Will look into it. > > error: the unnamed module reads package com.beust.jcommander from both > jcommander and testng > error: the unnamed module reads package > com.beust.jcommander.validators from both jcommander and testng > error: the unnamed module reads package com.beust.jcommander.internal > from both jcommander and testng > error: the unnamed module reads package > com.beust.jcommander.defaultprovider from both jcommander and testng > error: the unnamed module reads package > com.beust.jcommander.converters from both jcommander and testng > error: module jcommander reads package com.beust.jcommander from both > testng and jcommander > error: module jcommander reads package com.beust.jcommander.validators > from both testng and jcommander > error: module jcommander reads package com.beust.jcommander.internal > from both testng and jcommander > error: module jcommander reads package > com.beust.jcommander.defaultprovider from both testng and jcommander > error: module jcommander reads package com.beust.jcommander.converters > from both testng and jcommander > error: module testng reads package com.beust.jcommander from both > jcommander and testng > error: module testng reads package com.beust.jcommander.validators > from both jcommander and testng > error: module testng reads package com.beust.jcommander.internal from > both jcommander and testng > error: module testng reads package > com.beust.jcommander.defaultprovider from both jcommander and testng > error: module testng reads package com.beust.jcommander.converters > from both jcommander and testng > /scratch/mchung/ws/jdk10/jdk10-dev/jdk/test/java/lang/ModuleTests/addXXX/test/module-info.java:23: > error: module test reads package com.beust.jcommander from both testng > and jcommander > module test { > > Mandy > > On 8/21/17 2:14 PM, Martin Buchholz wrote: >> I just upgraded to 4.2-b08, although without any effect on this >> problem.? jcommander.jar is from jtreg's lib directory >> >> code-tools/jtreg/make/Defs.gmk says: >> """ >> # TestNG requires jcommander, which may or may not be bundled with >> TESTNG_JAR. >> # If it is not, set JCOMMANDER_JAR to an appropriate version >> """ >> >> ?$ ls -l ./JTwork/modules >> total 1620 >> -rw-r--r-- 1 martin martin?? 63504 Aug 21 12:27 jcommander.jar >> -rw-r--r-- 1 martin martin 1589287 Aug 21 12:27 testng.jar >> >> ?$ /home/martin/jtreg-binaries/current/bin/jtreg -noreport -v:fail >> -compilejdk:/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk >> -testjdk:/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk >> java/lang/ModuleTests/addXXX >> -------------------------------------------------- >> TEST: java/lang/ModuleTests/addXXX/Driver.java >> TEST JDK: >> /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk >> >> ACTION: build -- Failed. Compilation failed: Compilation failed >> REASON: User specified action: run build test/* m1/* m2/* m3/* m4/* >> TIME:?? 0.943 seconds >> messages: >> command: build test/* m1/* m2/* m3/* m4/* >> reason: User specified action: run build test/* m1/* m2/* m3/* m4/* >> Test directory: >> ? compile: test/module-info, test/test.C, test/test.Service, >> test/test.Main, m1/module-info, m1/p1.C, m2/module-info, m2/p2.C, >> m2/p2.internal.C, m3/module-info, m3/p3.C, m4/module-info, m4/p4.C >> elapsed time (seconds): 0.943 >> >> ACTION: compile -- Failed. Compilation failed: Compilation failed >> REASON: .class file out of date or does not exist >> TIME:?? 0.938 seconds >> messages: >> command: compile >> /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/module-info.java >> /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/test/C.java >> /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/test/Service.java >> /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/test/Main.java >> /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m1/module-info.java >> /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m1/p1/C.java >> /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/module-info.java >> /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/p2/C.java >> /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/p2/internal/C.java >> /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m3/module-info.java >> /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m3/p3/C.java >> /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m4/module-info.java >> /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m4/p4/C.java >> reason: .class file out of date or does not exist >> Mode: othervm >> elapsed time (seconds): 0.938 >> configuration: >> javac compilation environment >> ? add modules: testng jcommander >> ? module path: /home/martin/ws/jdk10/jdk/test/JTwork/modules >> >> rerun: >> DISPLAY=localhost:10.0 \ >> HOME=/home/martin \ >> LANG=en_US.UTF-8 \ >> PATH=/bin:/usr/bin \ >> /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk/bin/javac >> \ >> -J-Dtest.src=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX >> \ >> -J-Dtest.src.path=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX >> \ >> -J-Dtest.classes=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d >> \ >> -J-Dtest.class.path=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d >> \ >> ??????? -J-Dtest.vm.opts= \ >> ??????? -J-Dtest.tool.vm.opts= \ >> ??????? -J-Dtest.compiler.opts= \ >> ??????? -J-Dtest.java.opts= \ >> -J-Dtest.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk >> \ >> -J-Dcompile.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk >> \ >> ??????? -J-Dtest.timeout.factor=1.0 \ >> @/home/martin/ws/jdk10/jdk/test/JTwork/java/lang/ModuleTests/addXXX/Driver.d/compile.0.jta >> >> STDOUT: >> STDERR: >> error: module testng reads package test from both test and testng >> 1 error >> >> TEST RESULT: Failed. Compilation failed: Compilation failed >> -------------------------------------------------- >> Test results: failed: 1 >> >> On Mon, Aug 21, 2017 at 12:12 PM, mandy chung > > wrote: >> >> ??? The test itself is a module that depends on testng.? So testng.jar >> ??? is added as an automatic module.? This test passes on my setup. >> >> ??? I am puzzling how jcommander.jar is added to the module path. Can >> ??? you send the .jtr file and list what's in JTwork/modules directory? >> >> ??? Mandy >> >> >> ??? On 8/17/17 6:22 PM, Martin Buchholz wrote: >> >> ??????? When I run the jtreg test >> ??????? java/lang/ModuleTests/addXXX >> ??????? I fail with >> >> ??????? direct: >> ??????? error: module testng reads package test from both test and >> testng >> >> ??????? In the javac command line I see: >> ????????? --add-modules testng,jcommander >> ??????? but ... testng and jcommander aren't modules; they're just >> ??????? garden variety >> ??????? jar files. >> >> ??????? Running jtreg 4.2-b07. >> >> >> > From martinrb at google.com Tue Aug 22 21:09:35 2017 From: martinrb at google.com (Martin Buchholz) Date: Tue, 22 Aug 2017 14:09:35 -0700 Subject: """error: module testng reads package test from both test and testng""" In-Reply-To: References: Message-ID: Mandy, thanks for the investigation. On Tue, Aug 22, 2017 at 12:38 PM, mandy chung wrote: > > The testng.jar version I had bundled with jcommander classes and hence the > error message reports com.beust.jcommander.* packages from jcommander and > testng module. It was an old version before testng was mavenized. If I > run jtreg with the testng and jcommander downloaded from maven, the test > passes. > Right. maven and jigsaw are both opinionated "module" systems. Modern testng and jcommander mavenized jar files are cleanly separated, from maven's point of view. > Jon, Jan, > I think the javac error message could be improved to make it clear that > the package is split in multiple module. In addition, the test only > contains explicit modules. It's strange that the javac reports that "the > unnamed module reads package xxx from ....". I will create a JBS issue on > improving the error message. Yes, this message is very confusing. From martinrb at google.com Tue Aug 22 21:55:52 2017 From: martinrb at google.com (Martin Buchholz) Date: Tue, 22 Aug 2017 14:55:52 -0700 Subject: """error: module testng reads package test from both test and testng""" In-Reply-To: References: Message-ID: On Tue, Aug 22, 2017 at 12:38 PM, mandy chung wrote: > Does your testng.jar contain classes of package "test"? I downloaded > testng from maven which does not have the package "test". > Sorry, I missed that question. Yes, for historical reasons we are using testng 6.9.8, and I see: $ ( wget -qOtestng.jar https://search.maven.org/remotecontent?filepath=org/testng/testng/6.9.8/testng-6.9.8.jar && jar tf testng.jar | grep '^test/[^/]*.class$' | tail; rm testng.jar) test/ReturnValueTest.class test/SampleInheritance.class test/SerializationTest.class test/SimpleBaseTest.class test/StaticTest$InnerStaticClass.class test/StaticTest.class test/Test1.class test/Test2.class test/TestHelper.class test/TestListener.class Including test/ is probably a packaging mistake. From mandy.chung at oracle.com Tue Aug 22 22:05:33 2017 From: mandy.chung at oracle.com (mandy chung) Date: Tue, 22 Aug 2017 15:05:33 -0700 Subject: """error: module testng reads package test from both test and testng""" In-Reply-To: References: Message-ID: <3bd7b6f0-a62e-d10e-49c3-027ba8d63ba2@oracle.com> On 8/22/17 2:55 PM, Martin Buchholz wrote: > > > On Tue, Aug 22, 2017 at 12:38 PM, mandy chung > wrote: > > Does your testng.jar contain classes of package "test"??? I > downloaded testng from maven which does not have the package "test". > > > Sorry, I missed that question.? Yes, for historical reasons we are > using testng 6.9.8, and I see: > > ? $ ( wget -qOtestng.jar > https://search.maven.org/remotecontent?filepath=org/testng/testng/6.9.8/testng-6.9.8.jar > && jar tf testng.jar | grep '^test/[^/]*.class$' | tail; rm testng.jar) > test/ReturnValueTest.class > test/SampleInheritance.class > test/SerializationTest.class > test/SimpleBaseTest.class > test/StaticTest$InnerStaticClass.class > test/StaticTest.class > test/Test1.class > test/Test2.class > test/TestHelper.class > test/TestListener.class > > Including test/ is probably a packaging mistake. Probably.? test package is not in 6.9.5 and 6.11 which I checked. Mandy From martinrb at google.com Tue Aug 22 22:52:24 2017 From: martinrb at google.com (Martin Buchholz) Date: Tue, 22 Aug 2017 15:52:24 -0700 Subject: """error: module testng reads package test from both test and testng""" In-Reply-To: References: Message-ID: I tried updating my jtreg from testng 6.9.8 to 6.9.9 and got the insufficiently helpful Error occurred during initialization of boot layer java.lang.module.FindException: Module testng not found, required by test even though this new jtreg can run other testng tests successfully. Full log below: $ jtr java/lang/ModuleTests/addXXX/Driver.java /home/martin/jtreg-binaries/current/bin/jtreg -noreport -agentvm -verbose:nopass,fail,error -vmoption:-enablesystemassertions -automatic -ignore:quiet -compilejdk:/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk -testjdk:/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk java/lang/ModuleTests/addXXX/Driver.java -------------------------------------------------- TEST: java/lang/ModuleTests/addXXX/Driver.java TEST JDK: /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk ACTION: build -- Passed. Build successful REASON: User specified action: run build test/* m1/* m2/* m3/* m4/* TIME: 1.481 seconds messages: command: build test/* m1/* m2/* m3/* m4/* reason: User specified action: run build test/* m1/* m2/* m3/* m4/* Test directory: compile: test/module-info, test/test.C, test/test.Service, test/test.Main, m1/module-info, m1/p1.C, m2/module-info, m2/p2.C, m2/p2.internal.C, m3/module-info, m3/p3.C, m4/module-info, m4/p4.C elapsed time (seconds): 1.481 ACTION: compile -- Passed. Compilation successful REASON: .class file out of date or does not exist TIME: 1.477 seconds messages: command: compile /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/module-info.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/test/C.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/test/Service.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/test/Main.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m1/module-info.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m1/p1/C.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/module-info.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/p2/C.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/p2/internal/C.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m3/module-info.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m3/p3/C.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m4/module-info.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m4/p4/C.java reason: .class file out of date or does not exist Mode: agentvm Agent id: 0 elapsed time (seconds): 1.477 configuration: Boot Layer (javac runtime environment) class path: /home/martin/jtreg-binaries/4.2-b08/lib/javatest.jar /home/martin/jtreg-binaries/4.2-b08/lib/jtreg.jar patch: java.base /home/martin/ws/jdk10/jdk/test/JTwork/patches/java.base javac compilation environment add modules: testng jcommander module path: /home/martin/ws/jdk10/jdk/test/JTwork/modules rerun: DISPLAY=localhost:10.0 \ HOME=/home/martin \ LANG=en_US.UTF-8 \ PATH=/bin:/usr/bin \ /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk/bin/javac \ -J-enablesystemassertions \ -J-Dtest.class.path.prefix=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ -J-Dtest.src=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ -J-Dtest.src.path=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ -J-Dtest.classes=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d \ -J-Dtest.class.path=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d \ -J-Dtest.vm.opts=-enablesystemassertions \ -J-Dtest.tool.vm.opts=-J-enablesystemassertions \ -J-Dtest.compiler.opts= \ -J-Dtest.java.opts= \ -J-Dtest.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk \ -J-Dcompile.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk \ -J-Dtest.timeout.factor=1.0 \ -d /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules \ --module-source-path /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ --module-path /home/martin/ws/jdk10/jdk/test/JTwork/modules \ --add-modules testng,jcommander /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/module-info.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/test/C.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/test/Service.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/test/test/Main.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m1/module-info.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m1/p1/C.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/module-info.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/p2/C.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/p2/internal/C.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m3/module-info.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m3/p3/C.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m4/module-info.java /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m4/p4/C.java direct: /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m1/module-info.java:23: warning: [module] module name component m1 should avoid terminal digits module m1 { ^ /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m2/module-info.java:23: warning: [module] module name component m2 should avoid terminal digits module m2 { ^ /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m3/module-info.java:23: warning: [module] module name component m3 should avoid terminal digits module m3 { ^ /home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX/m4/module-info.java:23: warning: [module] module name component m4 should avoid terminal digits module m4 { ^ 4 warnings ACTION: build -- Passed. All files up to date REASON: Named class compiled on demand TIME: 0.0 seconds messages: command: build test/test.Main reason: Named class compiled on demand elapsed time (seconds): 0.0 ACTION: testng -- Failed. Unexpected exit from test [exit code: 1] REASON: User specified action: run testng/othervm test/test.Main TIME: 0.215 seconds messages: command: testng test/test.Main reason: User specified action: run testng/othervm test/test.Main Mode: othervm [/othervm specified] elapsed time (seconds): 0.215 configuration: Boot Layer add modules: test m4 m2 m3 m1 module path: /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules STDOUT: Error occurred during initialization of boot layer java.lang.module.FindException: Module testng not found, required by test STDERR: rerun: DISPLAY=localhost:10.0 \ HOME=/home/martin \ LANG=en_US.UTF-8 \ PATH=/bin:/usr/bin \ CLASSPATH=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX:/home/martin/jtreg-binaries/4.2-b08/lib/testng.jar:/home/martin/jtreg-binaries/4.2-b08/lib/jcommander.jar:/home/martin/jtreg-binaries/4.2-b08/lib/javatest.jar:/home/martin/jtreg-binaries/4.2-b08/lib/jtreg.jar \ /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk/bin/java \ -Dtest.class.path.prefix=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ -Dtest.src=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ -Dtest.src.path=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ -Dtest.classes=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d \ -Dtest.class.path=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d \ -Dtest.vm.opts=-enablesystemassertions \ -Dtest.tool.vm.opts=-J-enablesystemassertions \ -Dtest.compiler.opts= \ -Dtest.java.opts= \ -Dtest.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk \ -Dcompile.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk \ -Dtest.timeout.factor=1.0 \ --module-path /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules \ --add-modules test,m4,m2,m3,m1 \ -enablesystemassertions \ com.sun.javatest.regtest.agent.MainWrapper /home/martin/ws/jdk10/jdk/test/JTwork/java/lang/ModuleTests/addXXX/Driver.d/testng.0.jta java/lang/ModuleTests/addXXX/Driver.java false test/test.Main TEST RESULT: Failed. Unexpected exit from test [exit code: 1] From mandy.chung at oracle.com Tue Aug 22 23:28:02 2017 From: mandy.chung at oracle.com (mandy chung) Date: Tue, 22 Aug 2017 16:28:02 -0700 Subject: """error: module testng reads package test from both test and testng""" In-Reply-To: References: Message-ID: <668c1dee-0c08-6940-a7de-6816de095e63@oracle.com> On 8/22/17 3:52 PM, Martin Buchholz wrote: > : > > ACTION: testng -- Failed. Unexpected exit from test [exit code: 1] > REASON: User specified action: run testng/othervm test/test.Main > TIME: ? 0.215 seconds > messages: > command: testng test/test.Main > reason: User specified action: run testng/othervm test/test.Main > Mode: othervm [/othervm specified] > elapsed time (seconds): 0.215 > configuration: > Boot Layer > ? add modules: test m4 m2 m3 m1 > ? module path: > /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules > > STDOUT: > Error occurred during initialization of boot layer > java.lang.module.FindException: Module testng not found, required by test > STDERR: > rerun: > DISPLAY=localhost:10.0 \ > HOME=/home/martin \ > LANG=en_US.UTF-8 \ > PATH=/bin:/usr/bin \ > CLASSPATH=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX:/home/martin/jtreg-binaries/4.2-b08/lib/testng.jar:/home/martin/jtreg-binaries/4.2-b08/lib/jcommander.jar:/home/martin/jtreg-binaries/4.2-b08/lib/javatest.jar:/home/martin/jtreg-binaries/4.2-b08/lib/jtreg.jar > \ > /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk/bin/java > \ > -Dtest.class.path.prefix=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX > \ > -Dtest.src=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ > -Dtest.src.path=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX > \ > -Dtest.classes=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d > \ > -Dtest.class.path=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d > \ > -Dtest.vm.opts=-enablesystemassertions \ > -Dtest.tool.vm.opts=-J-enablesystemassertions \ > ? ? ? ? -Dtest.compiler.opts= \ > ? ? ? ? -Dtest.java.opts= \ > -Dtest.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk > \ > -Dcompile.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk > \ > ? ? ? ? -Dtest.timeout.factor=1.0 \ > ? ? ? ? --module-path > /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules > \ ====> /home/martin/ws/jdk10/jdk/test/JTwork/modules is not in the module path.? Therefore testng is not found. I can't reproduce this error.? I downloaded testng 6.9.9 and it works for me.? This is the jtreg version I used. $ jtreg -version jtreg, version 4.2 fcs b08 Installed in /java/devtools/jtreg/jtreg-4.2/lib/jtreg.jar Running on platform version 9 from /java/re/jdk-9.jdk/Contents/Home. Built with Java(TM) 2 SDK, Version 1.7.0-b147 on July 21, 2017. Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. JCov 2.0-b18 beta TestNG (testng.jar): version 6.9.9 TestNG (jcommander.jar): version 1.72 Mandy > ? ? ? ? --add-modules test,m4,m2,m3,m1 \ > ? ? ? ? -enablesystemassertions \ > com.sun.javatest.regtest.agent.MainWrapper > /home/martin/ws/jdk10/jdk/test/JTwork/java/lang/ModuleTests/addXXX/Driver.d/testng.0.jta > java/lang/ModuleTests/addXXX/Driver.java false test/test.Main > > TEST RESULT: Failed. Unexpected exit from test [exit code: 1] From martinrb at google.com Wed Aug 23 01:18:52 2017 From: martinrb at google.com (Martin Buchholz) Date: Tue, 22 Aug 2017 18:18:52 -0700 Subject: """error: module testng reads package test from both test and testng""" In-Reply-To: <668c1dee-0c08-6940-a7de-6816de095e63@oracle.com> References: <668c1dee-0c08-6940-a7de-6816de095e63@oracle.com> Message-ID: I also tried upgrading jcommander.jar to 1.72 from 1.48, but get the same error. Debugging hints? On Tue, Aug 22, 2017 at 4:28 PM, mandy chung wrote: > > On 8/22/17 3:52 PM, Martin Buchholz wrote: > > : > > > ACTION: testng -- Failed. Unexpected exit from test [exit code: 1] > REASON: User specified action: run testng/othervm test/test.Main > TIME: 0.215 seconds > messages: > command: testng test/test.Main > reason: User specified action: run testng/othervm test/test.Main > Mode: othervm [/othervm specified] > elapsed time (seconds): 0.215 > configuration: > Boot Layer > add modules: test m4 m2 m3 m1 > module path: /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ > ModuleTests/addXXX/Driver.d/modules > > STDOUT: > Error occurred during initialization of boot layer > java.lang.module.FindException: Module testng not found, required by test > STDERR: > rerun: > DISPLAY=localhost:10.0 \ > HOME=/home/martin \ > LANG=en_US.UTF-8 \ > PATH=/bin:/usr/bin \ > CLASSPATH=/home/martin/ws/jdk10/jdk/test/JTwork/classes/ > java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/ > jdk10/jdk/test/java/lang/ModuleTests/addXXX:/home/ > martin/jtreg-binaries/4.2-b08/lib/testng.jar:/home/martin/ > jtreg-binaries/4.2-b08/lib/jcommander.jar:/home/martin/ > jtreg-binaries/4.2-b08/lib/javatest.jar:/home/martin/ > jtreg-binaries/4.2-b08/lib/jtreg.jar \ > /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk/bin/java > \ > -Dtest.class.path.prefix=/home/martin/ws/jdk10/jdk/test/ > JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/ > home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ > -Dtest.src=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX > \ > -Dtest.src.path=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX > \ > -Dtest.classes=/home/martin/ws/jdk10/jdk/test/JTwork/ > classes/java/lang/ModuleTests/addXXX/Driver.d \ > -Dtest.class.path=/home/martin/ws/jdk10/jdk/test/ > JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d \ > -Dtest.vm.opts=-enablesystemassertions \ > -Dtest.tool.vm.opts=-J-enablesystemassertions \ > -Dtest.compiler.opts= \ > -Dtest.java.opts= \ > -Dtest.jdk=/home/martin/ws/jdk10/build/linux-x86_64- > normal-server-release/images/jdk \ > -Dcompile.jdk=/home/martin/ws/jdk10/build/linux-x86_64- > normal-server-release/images/jdk \ > -Dtest.timeout.factor=1.0 \ > --module-path /home/martin/ws/jdk10/jdk/ > test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules \ > > > ====> /home/martin/ws/jdk10/jdk/test/JTwork/modules is not in the module > path. Therefore testng is not found. > > I can't reproduce this error. I downloaded testng 6.9.9 and it works for > me. This is the jtreg version I used. > > $ jtreg -version > jtreg, version 4.2 fcs b08 > Installed in /java/devtools/jtreg/jtreg-4.2/lib/jtreg.jar > Running on platform version 9 from /java/re/jdk-9.jdk/Contents/Home. > Built with Java(TM) 2 SDK, Version 1.7.0-b147 on July 21, 2017. > Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights > reserved. > Use is subject to license terms. > JCov 2.0-b18 beta > TestNG (testng.jar): version 6.9.9 > TestNG (jcommander.jar): version 1.72 > > > Mandy > > --add-modules test,m4,m2,m3,m1 \ > -enablesystemassertions \ > com.sun.javatest.regtest.agent.MainWrapper > /home/martin/ws/jdk10/jdk/test/JTwork/java/lang/ > ModuleTests/addXXX/Driver.d/testng.0.jta java/lang/ModuleTests/addXXX/Driver.java > false test/test.Main > > TEST RESULT: Failed. Unexpected exit from test [exit code: 1] > > > From mandy.chung at oracle.com Wed Aug 23 01:48:51 2017 From: mandy.chung at oracle.com (mandy chung) Date: Tue, 22 Aug 2017 18:48:51 -0700 Subject: """error: module testng reads package test from both test and testng""" In-Reply-To: References: <668c1dee-0c08-6940-a7de-6816de095e63@oracle.com> Message-ID: The error message is clear because testng is not found from the module path. Error occurred during initialization of boot layer java.lang.module.FindException: Module testng not found, required by test If you edit the rerun command from jtr file to add JTwork/modules to module path as follows: --module-path /home/martin/ws/jdk10/jdk/ test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules:/home/martin/ws/jdk10/jdk/ test/JTwork/modules If it runs successfully, then the question is why jtreg includes JTwork/modules in javac --module-path but not at run time in your local run but my local jtreg works fine.? Jon may have jtreg debugging tip. Mandy On 8/22/17 6:18 PM, Martin Buchholz wrote: > I also tried upgrading jcommander.jar to 1.72 from 1.48, but get the > same error. > Debugging hints? > > > On Tue, Aug 22, 2017 at 4:28 PM, mandy chung > wrote: > > > On 8/22/17 3:52 PM, Martin Buchholz wrote: >> : >> >> >> ACTION: testng -- Failed. Unexpected exit from test [exit code: 1] >> REASON: User specified action: run testng/othervm test/test.Main >> TIME: ? 0.215 seconds >> messages: >> command: testng test/test.Main >> reason: User specified action: run testng/othervm test/test.Main >> Mode: othervm [/othervm specified] >> elapsed time (seconds): 0.215 >> configuration: >> Boot Layer >> ? add modules: test m4 m2 m3 m1 >> ? module path: >> /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules >> >> STDOUT: >> Error occurred during initialization of boot layer >> java.lang.module.FindException: Module testng not found, required >> by test >> STDERR: >> rerun: >> DISPLAY=localhost:10.0 \ >> HOME=/home/martin \ >> LANG=en_US.UTF-8 \ >> PATH=/bin:/usr/bin \ >> CLASSPATH=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX:/home/martin/jtreg-binaries/4.2-b08/lib/testng.jar:/home/martin/jtreg-binaries/4.2-b08/lib/jcommander.jar:/home/martin/jtreg-binaries/4.2-b08/lib/javatest.jar:/home/martin/jtreg-binaries/4.2-b08/lib/jtreg.jar >> \ >> /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk/bin/java >> \ >> -Dtest.class.path.prefix=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX >> \ >> -Dtest.src=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX >> \ >> -Dtest.src.path=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX >> \ >> -Dtest.classes=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d >> \ >> -Dtest.class.path=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d >> \ >> -Dtest.vm.opts=-enablesystemassertions \ >> -Dtest.tool.vm.opts=-J-enablesystemassertions \ >> -Dtest.compiler.opts= \ >> -Dtest.java.opts= \ >> -Dtest.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk >> \ >> -Dcompile.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk >> \ >> -Dtest.timeout.factor=1.0 \ >> ? ? ? ? --module-path >> /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules >> \ > > ====> /home/martin/ws/jdk10/jdk/test/JTwork/modules is not in the > module path.? Therefore testng is not found. > > I can't reproduce this error.? I downloaded testng 6.9.9 and it > works for me.? This is the jtreg version I used. > > $ jtreg -version > jtreg, version 4.2 fcs b08 > Installed in /java/devtools/jtreg/jtreg-4.2/lib/jtreg.jar > Running on platform version 9 from /java/re/jdk-9.jdk/Contents/Home. > Built with Java(TM) 2 SDK, Version 1.7.0-b147 on July 21, 2017. > Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights > reserved. > Use is subject to license terms. > JCov 2.0-b18 beta > TestNG (testng.jar): version 6.9.9 > TestNG (jcommander.jar): version 1.72 > > > Mandy >> ? ? ? ? --add-modules test,m4,m2,m3,m1 \ >> -enablesystemassertions \ >> com.sun.javatest.regtest.agent.MainWrapper >> /home/martin/ws/jdk10/jdk/test/JTwork/java/lang/ModuleTests/addXXX/Driver.d/testng.0.jta >> java/lang/ModuleTests/addXXX/Driver.java false test/test.Main >> >> TEST RESULT: Failed. Unexpected exit from test [exit code: 1] > > From martinrb at google.com Wed Aug 23 02:26:03 2017 From: martinrb at google.com (Martin Buchholz) Date: Tue, 22 Aug 2017 19:26:03 -0700 Subject: """error: module testng reads package test from both test and testng""" In-Reply-To: References: <668c1dee-0c08-6940-a7de-6816de095e63@oracle.com> Message-ID: Indeed, when I rerun the command with your suggested module-path, it works (I had never used "rerun" before). So why does my jtreg not make these modules available at runtime? This is a fairly ordinary Ubuntu 14.4 system. $ DISPLAY=localhost:10.0 \ HOME=/home/martin \ LANG=en_US.UTF-8 \ PATH=/bin:/usr/bin \ CLASSPATH=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX:/home/martin/jtreg-binaries/4.2-b08-testng-6.9.9/lib/testng.jar:/home/martin/jtreg-binaries/4.2-b08-testng-6.9.9/lib/jcommander.jar:/home/martin/jtreg-binaries/4.2-b08-testng-6.9.9/lib/javatest.jar:/home/martin/jtreg-binaries/4.2-b08-testng-6.9.9/lib/jtreg.jar \ /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk/bin/java \ -Dtest.class.path.prefix=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ -Dtest.src=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ -Dtest.src.path=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ -Dtest.classes=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d \ -Dtest.class.path=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d \ -Dtest.vm.opts=-enablesystemassertions \ -Dtest.tool.vm.opts=-J-enablesystemassertions \ -Dtest.compiler.opts= \ -Dtest.java.opts= \ -Dtest.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk \ -Dcompile.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk \ -Dtest.timeout.factor=1.0 \ --module-path /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules:"/home/martin/ws/jdk10/jdk/test/JTwork/modules" \ --add-modules test,m4,m2,m3,m1 \ -enablesystemassertions \ com.sun.javatest.regtest.agent.MainWrapper /home/martin/ws/jdk10/jdk/test/JTwork/java/lang/ModuleTests/addXXX/Driver.d/testng.0.jta java/lang/ModuleTests/addXXX/Driver.java false test/test.Main [TestNG] Running: java/lang/ModuleTests/addXXX/Driver.java test test.Main.testAddExports(): success test test.Main.testAddOpens(): success test test.Main.testAddReads(): success test test.Main.testAddUses(): success =============================================== java/lang/ModuleTests/addXXX/Driver.java Total tests run: 4, Failures: 0, Skips: 0 =============================================== STATUS:Passed. On Tue, Aug 22, 2017 at 6:48 PM, mandy chung wrote: > The error message is clear because testng is not found from the module > path. > > Error occurred during initialization of boot layer > java.lang.module.FindException: Module testng not found, required by test > > If you edit the rerun command from jtr file to add JTwork/modules to > module path as follows: > > --module-path /home/martin/ws/jdk10/jdk/ > test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/mo > dules:/home/martin/ws/jdk10/jdk/ > test/JTwork/modules > > If it runs successfully, then the question is why jtreg includes > JTwork/modules in javac --module-path but not at run time in your local run > but my local jtreg works fine. Jon may have jtreg debugging tip. > > Mandy > > On 8/22/17 6:18 PM, Martin Buchholz wrote: > > I also tried upgrading jcommander.jar to 1.72 from 1.48, but get the same > error. > Debugging hints? > > > On Tue, Aug 22, 2017 at 4:28 PM, mandy chung > wrote: > >> >> On 8/22/17 3:52 PM, Martin Buchholz wrote: >> >> : >> >> >> ACTION: testng -- Failed. Unexpected exit from test [exit code: 1] >> REASON: User specified action: run testng/othervm test/test.Main >> TIME: 0.215 seconds >> messages: >> command: testng test/test.Main >> reason: User specified action: run testng/othervm test/test.Main >> Mode: othervm [/othervm specified] >> elapsed time (seconds): 0.215 >> configuration: >> Boot Layer >> add modules: test m4 m2 m3 m1 >> module path: /home/martin/ws/jdk10/jdk/test >> /JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules >> >> STDOUT: >> Error occurred during initialization of boot layer >> java.lang.module.FindException: Module testng not found, required by test >> STDERR: >> rerun: >> DISPLAY=localhost:10.0 \ >> HOME=/home/martin \ >> LANG=en_US.UTF-8 \ >> PATH=/bin:/usr/bin \ >> CLASSPATH=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java >> /lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/ >> test/java/lang/ModuleTests/addXXX:/home/martin/jtreg- >> binaries/4.2-b08/lib/testng.jar:/home/martin/jtreg- >> binaries/4.2-b08/lib/jcommander.jar:/home/martin/jtreg- >> binaries/4.2-b08/lib/javatest.jar:/home/martin/jtreg-binaries/4.2-b08/lib/jtreg.jar >> \ >> /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk/bin/java >> \ >> -Dtest.class.path.prefix=/home/martin/ws/jdk10/jdk/test/JTwo >> rk/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/ >> martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ >> -Dtest.src=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX >> \ >> -Dtest.src.path=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX >> \ >> -Dtest.classes=/home/martin/ws/jdk10/jdk/test/JTwork/classes >> /java/lang/ModuleTests/addXXX/Driver.d \ >> -Dtest.class.path=/home/martin/ws/jdk10/jdk/test/JTwork/ >> classes/java/lang/ModuleTests/addXXX/Driver.d \ >> -Dtest.vm.opts=-enablesystemassertions \ >> -Dtest.tool.vm.opts=-J-enablesystemassertions \ >> -Dtest.compiler.opts= \ >> -Dtest.java.opts= \ >> -Dtest.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk >> \ >> -Dcompile.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk >> \ >> -Dtest.timeout.factor=1.0 \ >> --module-path /home/martin/ws/jdk10/jdk/test >> /JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules \ >> >> >> ====> /home/martin/ws/jdk10/jdk/test/JTwork/modules is not in the module >> path. Therefore testng is not found. >> >> I can't reproduce this error. I downloaded testng 6.9.9 and it works for >> me. This is the jtreg version I used. >> >> $ jtreg -version >> jtreg, version 4.2 fcs b08 >> Installed in /java/devtools/jtreg/jtreg-4.2/lib/jtreg.jar >> Running on platform version 9 from /java/re/jdk-9.jdk/Contents/Home. >> Built with Java(TM) 2 SDK, Version 1.7.0-b147 on July 21, 2017. >> Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights >> reserved. >> Use is subject to license terms. >> JCov 2.0-b18 beta >> TestNG (testng.jar): version 6.9.9 >> TestNG (jcommander.jar): version 1.72 >> >> >> Mandy >> >> --add-modules test,m4,m2,m3,m1 \ >> -enablesystemassertions \ >> com.sun.javatest.regtest.agent.MainWrapper >> /home/martin/ws/jdk10/jdk/test/JTwork/java/lang/ModuleTests/addXXX/Driver.d/testng.0.jta >> java/lang/ModuleTests/addXXX/Driver.java false test/test.Main >> >> TEST RESULT: Failed. Unexpected exit from test [exit code: 1] >> >> >> > > From mandy.chung at oracle.com Tue Aug 29 22:02:45 2017 From: mandy.chung at oracle.com (mandy chung) Date: Tue, 29 Aug 2017 15:02:45 -0700 Subject: """error: module testng reads package test from both test and testng""" In-Reply-To: References: <668c1dee-0c08-6940-a7de-6816de095e63@oracle.com> Message-ID: <645585ce-12ca-d4ab-01f2-de660fab5f76@oracle.com> Jon, (I took out jigsaw-dev and core-lib-dev.? Just include jtreg-dev as now this is a question to jtreg. Is there any way to diagnose the issue Martin runs into?? His jtr file shows that compilation environment sets up the proper module path and --add-modules.? But the runtime is different that causes the test fails to initialize as it requires testng module. javac compilation environment ? add modules: testng jcommander ? module path: /home/martin/ws/jdk10/jdk/test/JTwork/modules ACTION: testng -- Failed. Unexpected exit from test [exit code: 1] REASON: User specified action: run testng/othervm test/test.Main TIME: ? 0.215 seconds messages: command: testng test/test.Main reason: User specified action: run testng/othervm test/test.Main Mode: othervm [/othervm specified] elapsed time (seconds): 0.215 configuration: Boot Layer ? add modules: test m4 m2 m3 m1 ? module path: /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules Mandy On 8/22/17 7:26 PM, Martin Buchholz wrote: > Indeed, when I rerun the command with your suggested module-path, it > works (I had never used "rerun" before). > So why does my jtreg not make these modules available at runtime?? > This is a fairly ordinary Ubuntu 14.4 system. > > ?$ DISPLAY=localhost:10.0 \ > HOME=/home/martin \ > LANG=en_US.UTF-8 \ > PATH=/bin:/usr/bin \ > CLASSPATH=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX:/home/martin/jtreg-binaries/4.2-b08-testng-6.9.9/lib/testng.jar:/home/martin/jtreg-binaries/4.2-b08-testng-6.9.9/lib/jcommander.jar:/home/martin/jtreg-binaries/4.2-b08-testng-6.9.9/lib/javatest.jar:/home/martin/jtreg-binaries/4.2-b08-testng-6.9.9/lib/jtreg.jar > \ > /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk/bin/java > \ > -Dtest.class.path.prefix=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX > \ > -Dtest.src=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ > -Dtest.src.path=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX > \ > -Dtest.classes=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d > \ > -Dtest.class.path=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d > \ > -Dtest.vm.opts=-enablesystemassertions \ > -Dtest.tool.vm.opts=-J-enablesystemassertions \ > -Dtest.compiler.opts= \ > -Dtest.java.opts= \ > -Dtest.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk > \ > -Dcompile.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk > \ > -Dtest.timeout.factor=1.0 \ > ? ? ? ? --module-path > /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules:"/home/martin/ws/jdk10/jdk/test/JTwork/modules" > \ > ? ? ? ? --add-modules test,m4,m2,m3,m1 \ > -enablesystemassertions \ > com.sun.javatest.regtest.agent.MainWrapper > /home/martin/ws/jdk10/jdk/test/JTwork/java/lang/ModuleTests/addXXX/Driver.d/testng.0.jta > java/lang/ModuleTests/addXXX/Driver.java false test/test.Main > [TestNG] Running: > java/lang/ModuleTests/addXXX/Driver.java > > test test.Main.testAddExports(): success > test test.Main.testAddOpens(): success > test test.Main.testAddReads(): success > test test.Main.testAddUses(): success > > =============================================== > java/lang/ModuleTests/addXXX/Driver.java > Total tests run: 4, Failures: 0, Skips: 0 > =============================================== > > STATUS:Passed. > > On Tue, Aug 22, 2017 at 6:48 PM, mandy chung > wrote: > > The error message is clear because testng is not found from the > module path. > > Error occurred during initialization of boot layer > java.lang.module.FindException: Module testng not found, required > by test > > If you edit the rerun command from jtr file to add JTwork/modules > to module path as follows: > > --module-path /home/martin/ws/jdk10/jdk/ > test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules:/home/martin/ws/jdk10/jdk/ > > test/JTwork/modules > > If it runs successfully, then the question is why jtreg includes > JTwork/modules in javac --module-path but not at run time in your > local run but my local jtreg works fine.? Jon may have jtreg > debugging tip. > > Mandy > > On 8/22/17 6:18 PM, Martin Buchholz wrote: >> I also tried upgrading jcommander.jar to 1.72 from 1.48, but get >> the same error. >> Debugging hints? >> >> >> On Tue, Aug 22, 2017 at 4:28 PM, mandy chung >> > wrote: >> >> >> On 8/22/17 3:52 PM, Martin Buchholz wrote: >>> : >>> >>> >>> ACTION: testng -- Failed. Unexpected exit from test [exit >>> code: 1] >>> REASON: User specified action: run testng/othervm >>> test/test.Main >>> TIME: ? 0.215 seconds >>> messages: >>> command: testng test/test.Main >>> reason: User specified action: run testng/othervm >>> test/test.Main >>> Mode: othervm [/othervm specified] >>> elapsed time (seconds): 0.215 >>> configuration: >>> Boot Layer >>> ? add modules: test m4 m2 m3 m1 >>> module path: >>> /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules >>> >>> STDOUT: >>> Error occurred during initialization of boot layer >>> java.lang.module.FindException: Module testng not found, >>> required by test >>> STDERR: >>> rerun: >>> DISPLAY=localhost:10.0 \ >>> HOME=/home/martin \ >>> LANG=en_US.UTF-8 \ >>> PATH=/bin:/usr/bin \ >>> CLASSPATH=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX:/home/martin/jtreg-binaries/4.2-b08/lib/testng.jar:/home/martin/jtreg-binaries/4.2-b08/lib/jcommander.jar:/home/martin/jtreg-binaries/4.2-b08/lib/javatest.jar:/home/martin/jtreg-binaries/4.2-b08/lib/jtreg.jar >>> \ >>> /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk/bin/java >>> \ >>> -Dtest.class.path.prefix=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX >>> \ >>> -Dtest.src=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX >>> \ >>> -Dtest.src.path=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX >>> \ >>> -Dtest.classes=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d >>> \ >>> -Dtest.class.path=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d >>> \ >>> -Dtest.vm.opts=-enablesystemassertions \ >>> -Dtest.tool.vm.opts=-J-enablesystemassertions \ >>> ? -Dtest.compiler.opts= \ >>> ? -Dtest.java.opts= \ >>> -Dtest.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk >>> \ >>> -Dcompile.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk >>> \ >>> ? -Dtest.timeout.factor=1.0 \ >>> ? --module-path >>> /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules >>> \ >> >> ====> /home/martin/ws/jdk10/jdk/test/JTwork/modules is not in >> the module path.? Therefore testng is not found. >> >> I can't reproduce this error.? I downloaded testng 6.9.9 and >> it works for me.? This is the jtreg version I used. >> >> $ jtreg -version >> jtreg, version 4.2 fcs b08 >> Installed in /java/devtools/jtreg/jtreg-4.2/lib/jtreg.jar >> Running on platform version 9 from >> /java/re/jdk-9.jdk/Contents/Home. >> Built with Java(TM) 2 SDK, Version 1.7.0-b147 on July 21, 2017. >> Copyright (c) 1999, 2016, Oracle and/or its affiliates. All >> rights reserved. >> Use is subject to license terms. >> JCov 2.0-b18 beta >> TestNG (testng.jar): version 6.9.9 >> TestNG (jcommander.jar): version 1.72 >> >> >> Mandy >>> --add-modules test,m4,m2,m3,m1 \ >>> -enablesystemassertions \ >>> com.sun.javatest.regtest.agent.MainWrapper >>> /home/martin/ws/jdk10/jdk/test/JTwork/java/lang/ModuleTests/addXXX/Driver.d/testng.0.jta >>> java/lang/ModuleTests/addXXX/Driver.java false test/test.Main >>> >>> TEST RESULT: Failed. Unexpected exit from test [exit code: 1] >> >> > > From jonathan.gibbons at oracle.com Tue Aug 29 22:36:04 2017 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Tue, 29 Aug 2017 15:36:04 -0700 Subject: """error: module testng reads package test from both test and testng""" In-Reply-To: <645585ce-12ca-d4ab-01f2-de660fab5f76@oracle.com> References: <668c1dee-0c08-6940-a7de-6816de095e63@oracle.com> <645585ce-12ca-d4ab-01f2-de660fab5f76@oracle.com> Message-ID: <59A5EC54.4020306@oracle.com> Martin, Sorry to be late to the party. I understand you're running some standard jdk tests, such as jdk/test/java/lang/ModuleTests/addXXX/Driver.java. I see the test explicitly requests /othervm mode. Is there anything else special I should know about how you are trying to run the test? Are you running concurrently with any other tests, or just this one test by itself. Are there any unusual permissions on the JTwork/modules directory, or its contents? I know "you guys" use a lot of symbolic links. Anything to be aware of there? jtreg should be setting up the module path in the same way. If jtreg omits an entry from the module path, one cause can be that the item is not found (or unreadable). But given the path is set up OK for compilation, it seems strange that the same or similar code would not work shortly afterwards at runtime. The test works for me, on a newly-build JDK 10, with no pre-existing JTwork, JTreport, on a fairly ordinary Ubuntu 14.04 system as well. -- Jon On 08/29/2017 03:02 PM, mandy chung wrote: > Jon, > > (I took out jigsaw-dev and core-lib-dev. Just include jtreg-dev as > now this is a question to jtreg. > > Is there any way to diagnose the issue Martin runs into? His jtr file > shows that compilation environment sets up the proper module path and > --add-modules. But the runtime is different that causes the test > fails to initialize as it requires testng module. > > javac compilation environment > add modules: testng jcommander > module path: /home/martin/ws/jdk10/jdk/test/JTwork/modules > > ACTION: testng -- Failed. Unexpected exit from test [exit code: 1] > REASON: User specified action: run testng/othervm test/test.Main > TIME: 0.215 seconds > messages: > command: testng test/test.Main > reason: User specified action: run testng/othervm test/test.Main > Mode: othervm [/othervm specified] > elapsed time (seconds): 0.215 > configuration: > Boot Layer > add modules: test m4 m2 m3 m1 > module path: > /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules > > Mandy > > On 8/22/17 7:26 PM, Martin Buchholz wrote: >> Indeed, when I rerun the command with your suggested module-path, it >> works (I had never used "rerun" before). >> So why does my jtreg not make these modules available at runtime? >> This is a fairly ordinary Ubuntu 14.4 system. >> >> $ DISPLAY=localhost:10.0 \ >> HOME=/home/martin \ >> LANG=en_US.UTF-8 \ >> PATH=/bin:/usr/bin \ >> CLASSPATH=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX:/home/martin/jtreg-binaries/4.2-b08-testng-6.9.9/lib/testng.jar:/home/martin/jtreg-binaries/4.2-b08-testng-6.9.9/lib/jcommander.jar:/home/martin/jtreg-binaries/4.2-b08-testng-6.9.9/lib/javatest.jar:/home/martin/jtreg-binaries/4.2-b08-testng-6.9.9/lib/jtreg.jar >> \ >> /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk/bin/java >> \ >> -Dtest.class.path.prefix=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX >> \ >> -Dtest.src=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX \ >> -Dtest.src.path=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX >> \ >> -Dtest.classes=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d >> \ >> -Dtest.class.path=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d >> \ >> -Dtest.vm.opts=-enablesystemassertions \ >> -Dtest.tool.vm.opts=-J-enablesystemassertions \ >> -Dtest.compiler.opts= \ >> -Dtest.java.opts= \ >> -Dtest.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk >> \ >> -Dcompile.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk >> \ >> -Dtest.timeout.factor=1.0 \ >> --module-path >> /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules:"/home/martin/ws/jdk10/jdk/test/JTwork/modules" >> \ >> --add-modules test,m4,m2,m3,m1 \ >> -enablesystemassertions \ >> com.sun.javatest.regtest.agent.MainWrapper >> /home/martin/ws/jdk10/jdk/test/JTwork/java/lang/ModuleTests/addXXX/Driver.d/testng.0.jta >> java/lang/ModuleTests/addXXX/Driver.java false test/test.Main >> [TestNG] Running: >> java/lang/ModuleTests/addXXX/Driver.java >> >> test test.Main.testAddExports(): success >> test test.Main.testAddOpens(): success >> test test.Main.testAddReads(): success >> test test.Main.testAddUses(): success >> >> =============================================== >> java/lang/ModuleTests/addXXX/Driver.java >> Total tests run: 4, Failures: 0, Skips: 0 >> =============================================== >> >> STATUS:Passed. >> >> On Tue, Aug 22, 2017 at 6:48 PM, mandy chung > > wrote: >> >> The error message is clear because testng is not found from the >> module path. >> >> Error occurred during initialization of boot layer >> java.lang.module.FindException: Module testng not found, required >> by test >> >> If you edit the rerun command from jtr file to add JTwork/modules >> to module path as follows: >> >> --module-path /home/martin/ws/jdk10/jdk/ >> test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules:/home/martin/ws/jdk10/jdk/ >> >> test/JTwork/modules >> >> If it runs successfully, then the question is why jtreg includes >> JTwork/modules in javac --module-path but not at run time in your >> local run but my local jtreg works fine. Jon may have jtreg >> debugging tip. >> >> Mandy >> >> On 8/22/17 6:18 PM, Martin Buchholz wrote: >>> I also tried upgrading jcommander.jar to 1.72 from 1.48, but get >>> the same error. >>> Debugging hints? >>> >>> >>> On Tue, Aug 22, 2017 at 4:28 PM, mandy chung >>> > wrote: >>> >>> >>> On 8/22/17 3:52 PM, Martin Buchholz wrote: >>>> : >>>> >>>> >>>> ACTION: testng -- Failed. Unexpected exit from test [exit >>>> code: 1] >>>> REASON: User specified action: run testng/othervm >>>> test/test.Main >>>> TIME: 0.215 seconds >>>> messages: >>>> command: testng test/test.Main >>>> reason: User specified action: run testng/othervm >>>> test/test.Main >>>> Mode: othervm [/othervm specified] >>>> elapsed time (seconds): 0.215 >>>> configuration: >>>> Boot Layer >>>> add modules: test m4 m2 m3 m1 >>>> module path: >>>> /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules >>>> >>>> STDOUT: >>>> Error occurred during initialization of boot layer >>>> java.lang.module.FindException: Module testng not found, >>>> required by test >>>> STDERR: >>>> rerun: >>>> DISPLAY=localhost:10.0 \ >>>> HOME=/home/martin \ >>>> LANG=en_US.UTF-8 \ >>>> PATH=/bin:/usr/bin \ >>>> CLASSPATH=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX:/home/martin/jtreg-binaries/4.2-b08/lib/testng.jar:/home/martin/jtreg-binaries/4.2-b08/lib/jcommander.jar:/home/martin/jtreg-binaries/4.2-b08/lib/javatest.jar:/home/martin/jtreg-binaries/4.2-b08/lib/jtreg.jar >>>> \ >>>> /home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk/bin/java >>>> \ >>>> -Dtest.class.path.prefix=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d:/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX >>>> \ >>>> -Dtest.src=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX >>>> \ >>>> -Dtest.src.path=/home/martin/ws/jdk10/jdk/test/java/lang/ModuleTests/addXXX >>>> \ >>>> -Dtest.classes=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d >>>> \ >>>> -Dtest.class.path=/home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d >>>> \ >>>> -Dtest.vm.opts=-enablesystemassertions \ >>>> -Dtest.tool.vm.opts=-J-enablesystemassertions \ >>>> -Dtest.compiler.opts= \ >>>> -Dtest.java.opts= \ >>>> -Dtest.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk >>>> \ >>>> -Dcompile.jdk=/home/martin/ws/jdk10/build/linux-x86_64-normal-server-release/images/jdk >>>> \ >>>> -Dtest.timeout.factor=1.0 \ >>>> --module-path >>>> /home/martin/ws/jdk10/jdk/test/JTwork/classes/java/lang/ModuleTests/addXXX/Driver.d/modules >>>> \ >>> >>> ====> /home/martin/ws/jdk10/jdk/test/JTwork/modules is not >>> in the module path. Therefore testng is not found. >>> >>> I can't reproduce this error. I downloaded testng 6.9.9 and >>> it works for me. This is the jtreg version I used. >>> >>> $ jtreg -version >>> jtreg, version 4.2 fcs b08 >>> Installed in /java/devtools/jtreg/jtreg-4.2/lib/jtreg.jar >>> Running on platform version 9 from >>> /java/re/jdk-9.jdk/Contents/Home. >>> Built with Java(TM) 2 SDK, Version 1.7.0-b147 on July 21, 2017. >>> Copyright (c) 1999, 2016, Oracle and/or its affiliates. All >>> rights reserved. >>> Use is subject to license terms. >>> JCov 2.0-b18 beta >>> TestNG (testng.jar): version 6.9.9 >>> TestNG (jcommander.jar): version 1.72 >>> >>> >>> Mandy >>>> --add-modules test,m4,m2,m3,m1 \ >>>> -enablesystemassertions \ >>>> com.sun.javatest.regtest.agent.MainWrapper >>>> /home/martin/ws/jdk10/jdk/test/JTwork/java/lang/ModuleTests/addXXX/Driver.d/testng.0.jta >>>> java/lang/ModuleTests/addXXX/Driver.java false test/test.Main >>>> >>>> TEST RESULT: Failed. Unexpected exit from test [exit code: 1] >>> >>> >> >> > From martinrb at google.com Wed Aug 30 00:49:38 2017 From: martinrb at google.com (Martin Buchholz) Date: Tue, 29 Aug 2017 17:49:38 -0700 Subject: """error: module testng reads package test from both test and testng""" In-Reply-To: <59A5EC54.4020306@oracle.com> References: <668c1dee-0c08-6940-a7de-6816de095e63@oracle.com> <645585ce-12ca-d4ab-01f2-de660fab5f76@oracle.com> <59A5EC54.4020306@oracle.com> Message-ID: On Tue, Aug 29, 2017 at 3:36 PM, Jonathan Gibbons < jonathan.gibbons at oracle.com> wrote: > Martin, > > Sorry to be late to the party. > > I understand you're running some standard jdk tests, such as > jdk/test/java/lang/ModuleTests/addXXX/Driver.java. > I see the test explicitly requests /othervm mode. > Is there anything else special I should know about how you are trying to > run the test? Are you running concurrently with any other tests, or just > this one test by itself. > I can repro the failure running the test by itself. (but naturally the failure was discovered running together with others) Are there any unusual permissions on the JTwork/modules directory, or its > contents? > We always recreate JTwork fresh each jtreg invocation. > I know "you guys" use a lot of symbolic links. Anything to be aware of > there? > I'm doing my testing here on my personal Ubuntu machine, deliberately free of googleisms. And the testng.jar files are readable, and @run testng works. > jtreg should be setting up the module path in the same way. If jtreg omits > an entry from the module path, one cause can be that the item is not found > (or unreadable). But given the path is set up OK for compilation, it seems > strange that the same or similar code would not work shortly afterwards at > runtime. > > The test works for me, on a newly-build JDK 10, with no pre-existing > JTwork, JTreport, on a fairly ordinary Ubuntu 14.04 system as well. > Hmmmm.... a mystery.