ATTENTION: policytool now contains no platform-specific codes anymore and should behaves exactly the same across all platforms. This also means:
  1. You may only need to test it on one platform
  2. You can create policy files for a platform which is different than the platform you are running policytool on
This is a multi-stage test. Click on "done" when you have completed reading these instructions.

First, policytool will be invoked.

  1. Find (or create) a temporary directory that you have write access to. (Example: 'C:\foo\tmp' on Windows or '/tmp' on other systems)
  2. Add new policy entry
  3. Add permission:
        Type                   Target name     Actions
        FilePermission         c:\\foo\\bar    read
        
    1. Press OK
    2. Confirm the file name warning dialog appears
    3. Choose Retain, confirm the permission edit dialog is closed
    4. Double click the newly created FilePermission entry to edit it
    5. Press OK
    6. Confirm the file name warning dialog appears
    7. Choose Edit, confirm the permission edit dialog is still opened
    8. change Target name to c:\foo\bar
    9. Press OK, no warning dialog is shown
  4. Add permission:
        Type                   Target name
        DelegationPermission   "me@SOMEWHERE" "you@SOMEWHERE"
        
    1. Press OK
    2. Double click the newly craeted DelegationPermission entry to edit it
    3. Confirm the target name is still "me@SOMEWHERE" "you@SOMEWHERE"
    4. Press OK
  5. Confirm there are 2 entries in the permission list
  6. Press Done
  7. Double click the new policy entry to edit it
  8. Add permission:
        Type
        AllPermission
        
  9. Add a new Principal, say, KerberosPrincipal with Principal Name as aaa
  10. Confirm there is 1 entry in the Principals list
  11. Confirm there are 3 entries in the permission list
  12. Press cancel
  13. Double click the policy entry to edit it
  14. Confirm there are ZERO entries in the Principals list
  15. Confirm there are 2 entries in the permission list
  16. Press cancel
  17. Save as "/tmp/p"
    (Or use the temporary directory mentioned in Step 0 if it's not '/tmp'. For example, "C:\foo\tmp\p" on Windows)
  18. Confirm that the file created in the previous step looks like
    /* AUTOMATICALLY GENERATED ON Tue Jul 19 16:27:30 CST 2005*/
    /* DO NOT EDIT */
    
    grant {
      permission java.io.FilePermission "c:\\foo\\bar", "read";
      permission javax.security.auth.kerberos.DelegationPermission "\"me@SOMEWHERE\" \"you@SOMEWHERE\"";
    };
    


Press "Pass" if ... press "Fail" otherwise.