RFR 6946101: ShellScaffold.sh based tests can issue "write error: Broken pipe" messages

Pavel Punegov pavel.punegov at oracle.com
Thu Feb 27 08:20:54 PST 2014


Please review the fix for:
  https://bugs.openjdk.java.net/browse/JDK-6946101

webrev: 
  http://cr.openjdk.java.net/~iignatyev/ppunegov/6946101/webrev.00/


This change fixes two issues with the tests:
  1. Fix incorrect 'quit' command sending to JDB when JDB process was finished.
  2. Improve JDB unexpected exit detection and  process synchronization.

Description of fix:
  1. Add allowExit parameter to cmd() to show that the given command can finish
  JDB. E.g., 'cont' command make JDB execute debuggee to the end.
  If allowExit wasn't set for a command then  assume that it can't finish
  execution, and fail the test if it did.

  2. Make test fail if it tries to send 'quit' or 'exit' commands. This makes
  it impossible to send quit/exit from test by mistake. Scaffold will
  finish JDB by itself if JDB didn't finish before be a command with allowExit
  set. Add dofinish() function to be the only method that may exit JDB.

  3. Add proper synchronization into waitForFinish(). On all systems except
  SunOS use wait (from bash). On Solaris find the shell subprocess and wait for
  its finish. It replaces wait  used on all other systems, because it
  doesn't work on sh/ksh as in bash. 

  4. Fix tests: add allowExit to tests where it's needed.

-- 
Thanks,
Pavel Punegov


More information about the serviceability-dev mailing list