When RunTest.gmk runs jtreg tests, it prints the exitcode of jtreg into a file named exitcode.txt. Soemtimes, this fails and the exitcode.txt file is left empty. This is causing trouble in automated testing where the surrounding framework is expecting to check the result in that file.

I believe this is caused by a race in bash. We have seen similar races before and there is even a comment about it in the documentation for the ExecuteWithLog macro. If there is redirect of stdout in a command executed by ExecuteWithLog, that command must be surrounded by parens to run in a subshell. I first discovered this solution in JDK-8158629.

This patch puts parens around the jtreg and other test framework calls in RunTest.gmk.

Webrev: http://cr.openjdk.java.net/~erikj/8232834/webrev.jdk14.01/

Bug: https://bugs.openjdk.java.net/browse/JDK-8232834

/Erik

Reply via email to