changeset 7682:5f2a8db78aca

8019410: sun/security/krb5/auto/ReplayCacheTestProc.java Reviewed-by: mullan
author weijun
date Sat, 13 Jul 2013 08:47:49 +0800
parents 37c37361a7ad
children e4ce6502eac0
files test/sun/security/krb5/auto/ReplayCacheTestProc.java
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/sun/security/krb5/auto/ReplayCacheTestProc.java	Mon Jul 08 15:46:26 2013 -0400
+++ b/test/sun/security/krb5/auto/ReplayCacheTestProc.java	Sat Jul 13 08:47:49 2013 +0800
@@ -98,6 +98,14 @@
             kdc.writeKtab(OneKDC.KTAB);
             KDC.saveConfig(OneKDC.KRB5_CONF, kdc);
 
+            if (mode != -1) {
+                // A special native server to check basic sanity
+                if (ns(-1).waitFor() != 0) {
+                    Proc.d("Native mode sanity check failed, revert to java");
+                    mode = -1;
+                }
+            }
+
             pc = Proc.create("ReplayCacheTestProc").debug("C")
                     .args("client")
                     .start();
@@ -164,6 +172,11 @@
                         result[i].csize);
             }
             if (!finalOut) throw new Exception();
+        } else if (args[0].equals("N-1")) {
+            // Native mode sanity check
+            Proc.d("Detect start");
+            Context s = Context.fromUserKtab("*", OneKDC.KTAB, true);
+            s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID);
         } else if (args[0].equals("client")) {
             while (true) {
                 String title = Proc.textIn();