RFR: JDK-8192816 Let run-test save exit code

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Thu Nov 30 14:09:38 UTC 2017


To support all the use cases of the old test/Makefile way of running 
tests, we need to save the exit code from running tests.

This patch also includes three other bug fixes:
* Saving the test ID:s of the latest run in test-last-ids.txt, so we can 
programmatically discover which new tests were run.
* Test roots were not normalized for jtreg tests given only by group 
(e.g. ":tier1")
* Fix for solaris version of tr.

The last one was actually quite interesting, and took a while to figure 
out. On well-behaving unix systems, tr -c '[a-z]' '_' would take the 
complement of a-z and replace it by underscore. But on solaris, -c [a-z] 
would evaluate to a (not clearly defined) massive string of all 
characters except a-z in the current locale. And then, if the second 
string ('_') is *shorter* than the first, the behavior of tr is 
*undefinied* (which, in practice, means that it doesn't do anything). 
Like, "wtf?!? how could this possibly work for anyone?". The workaround, 
after much hair-pulling, turned out to be a notation to repeat a single 
character ('[_*1000]'), hoping that the character set never exceeds 
1000. *sigh*

Bug: https://bugs.openjdk.java.net/browse/JDK-8192816
WebRev: 
http://cr.openjdk.java.net/~ihse/JDK-8192816-let-run-test-save-exit-code/webrev.01

/Magnus




More information about the build-dev mailing list