JDK-6657688 : undefine DEBUG, factor out 'main' unit test code in jbroker files {security,maps,securemove}.cpp
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 6u10
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows,windows_vista
  • CPU: generic
  • Submitted: 2008-01-31
  • Updated: 2010-09-08
  • Resolved: 2008-03-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6u10 b13Fixed
Related Reports
Duplicate :  
Relates :  
Description
Per-file and per-directory security checking added to Java Kernel jbroker program for Java Kernel installs on Windows Vista includes error reporting conditionally compiled with preprocessor label DEBUG. DEBUG is currently defined in the three security modules (security.cpp,maps.cpp,securemove.cpp). With an error detected in file and directory move operations requested by the jbroker.cpp code a messagebox will currently pop up with specific error information. This temporary, specific information is intended for Java Kernel engineering. This is needed for testing of build 12 to insure no scenarios bring about unexpected error handling indicating a defect.

But this debug code must be disabled after build 12 testing to ensure any file/dir move failures will be reported by jbroker back to DownloadManager in the usual manner without any new user-visible behavior. 

In addition, each of the modules above has a "main method" conditionally compiled on a second variable. These main methods should be simplified so unit testing details are wholely contained in the test scripts (testsecurity, testmaps, testsecuremove). This is important to prevent environment or example.map detail changes from forcing changes to the .cpp files to keep the unit tests running.

Testing w/o DEBUG defined during compilation was done prior to the b12 putback of CR 6638662. This CR can be tested with binaries from a deployment nightly build well ahead of the b13 integration.

Comments
EVALUATION The less critical piece of this CR was not approved for b13 putback: it has been split off as CR 6663865.
15-02-2008

EVALUATION As a hedge in case CR 6661452 is not a dupe of this bug, the essential subset of this change has been put back (with a v0 review): Removed message box calls In addition, all the calls to exit() in the new security code were judged to be a mistake and were replaced with returns of detailed error codes back to jbroker.
13-02-2008

EVALUATION This additional change distributes the risk of CR 6638662 across two builds and greatly increases test feedback quality for build 12 without requiring changes to the source code used by jbroker.
31-01-2008