jmx-dev [PATCH] JDK-8005472: com/sun/jmx/remote/NotificationMarshalVersions/TestSerializationMismatch.sh failed on windows

Stuart Marks stuart.marks at oracle.com
Thu Jan 10 01:15:42 PST 2013


On 1/10/13 12:52 AM, Stuart Marks wrote:
> The exit status of some of the critical commands (such as the compilations)
> isn't checked, so if javac fails for some reason, the test might not report
> failure. Instead, some weird error might or might not be reported later (though
> one will still see the javac errors in the log).

Adding

	set -e

near the top of the script will enable a feature where the script will exit if 
any command gives a nonzero exit status. This avoids having to do a lot of 
tedious error checking of commands that just "do stuff" (like mkdir, rm, javac) 
but beware, some commands give a non-zero exit status somewhat unexpectedly, 
like grep.

s'marks



More information about the serviceability-dev mailing list