-
-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start/stop agent with every vm/jdwp test #6044
base: master
Are you sure you want to change the base?
Conversation
jck/jck-jdwp-test-drive.sh
Outdated
startJCKAgent | ||
# cp generated.jtb temp_jdwp.jtb | ||
# Replace tests=vm/jdwp line with tests=<TEST_CASE> | ||
# Not sure what to do here ^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EXEC_RUNTIME_TEST will contain @$(REPORTDIR)/generated.jtb
you will need to probably use a new EXEC_RUNTIME_TEST_JDWP that does not have @$(REPORTDIR)/generated.jtb, and pass the generated.jtb as another param to this script... then use that as the basis of the cp generated.jtb...
then add the temp.jtb to the end of each EXEC... ie.
startJCKHarness "$2" @temp.jtb
jck/jck-jdwp-test-drive.sh
Outdated
startTNameServ "$2" | ||
startJCKHarness "$3" | ||
harnessExitCode=$? | ||
stopTNameServ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for start/stopTNameServ
jck/jck.mk
Outdated
@@ -174,6 +174,7 @@ EXEC_RUNTIME_TEST = $(JAVA_TO_TEST) -jar $(JCK_ROOT)/JCK-runtime-$(JCK_VERSION_N | |||
EXEC_COMPILER_TEST = $(JAVA_TO_TEST) -jar $(JCK_ROOT)/JCK-compiler-$(JCK_VERSION_NUMBER)/lib/javatest.jar -config $(CONFIG_ALT_PATH)/$(JCK_VERSION)/compiler.jti @$(REPORTDIR)/generated.jtb | |||
EXEC_DEVTOOLS_TEST = $(JAVA_TO_TEST) -jar $(JCK_ROOT)/JCK-devtools-$(JCK_VERSION_NUMBER)/lib/javatest.jar -config $(CONFIG_ALT_PATH)/$(JCK_VERSION)/devtools.jti @$(REPORTDIR)/generated.jtb | |||
EXEC_RUNTIME_TEST_WITH_AGENT = $(TEST_ROOT)/jck/agent-drive.sh '$(START_AGENT_GENERIC)' '$(EXEC_RUNTIME_TEST)' | |||
EXEC_RUNTIME_TEST_JDWP = $(TEST_ROOT)/jck/jck-jdwp-test-drive.sh '$(START_AGENT_GENERIC)' '$(EXEC_RUNTIME_TEST)' '$(JCK_ROOT)/JCK-runtime-$(JCK_VERSION_NUMBER)/tests/vm/jdwp/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to separate @$(REPORTDIR)/generated.jtb from '$('$(EXEC_RUNTIME_TEST)')'
so create a new EXEC_RUNTIME_TEST_JDWP
jck/jck-jdwp-test-drive.sh
Outdated
# Replace tests=vm/jdwp line with tests=<TEST_CASE> | ||
# Not sure what to do here ^^ | ||
startTNameServ "$2" | ||
startJCKHarness "$3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to have a hard process timeout on the testcase run in case it hangs... as we know the jtharness does not time it out...
Try adding logic like this, note needs to work for all platforms... :
${startJCKHarness} &
pid=$!
sleep 60 # 60 second timeout
if kill -s 0 $pid 2>nul; then
echo "Testcase ?? : Process $pid is still running after 60 seconds... killing..."
kill -9 $pid
harnessExitCode=124
else
wait $pid
harnessExitCode=$?
fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also you will need to keep the worst harnessExitCode, to exit the whole jdwp loop with a non-0 rc if one or more fails...
jck/jck-jdwp-test-drive.sh
Outdated
# Not sure what to do here ^^ | ||
startTNameServ "$2" | ||
startJCKHarness "$3" | ||
harnessExitCode=$? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also another complication, we need to report the status report after each jdwp testcase otherwise it will be overwritten, we could try merging the report.xml's but not sure that will work...
So maybe easiest to simply report on each after each testcase, so i think we need this after each testcase:
$(TEST_STATUS) ;
$(GEN_SUMMARY_GENERIC) tests=???? testsuite=RUNTIME
ref https://adoptium.slack.com/archives/C024CQ8SV7D/p1741793994007659
jck-jdwp-test-drive.sh has only the stuff from agent-drive.sh that we need.
I dont know how exactly the below steps would look but they should go in jck-jdwp-test-drive.sh line 40
I think ive got the start/stop agent steps right, I mimicked what
aqa-tests/jck/agent-drive.sh
Line 68 in 028491c
EXEC_RUNTIME_TEST_WITH_AGENT
doesfind $4 -type f -name "*.java"
will display all of the test files in $ (JCK_ROOT)/JCK-runtime-$(JCK_VERSION_NUMBER)/tests/vm/jdwp/