]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix slow kprop dejagnu test
authorGreg Hudson <ghudson@mit.edu>
Wed, 10 Oct 2012 17:11:46 +0000 (13:11 -0400)
committerGreg Hudson <ghudson@mit.edu>
Wed, 10 Oct 2012 17:14:15 +0000 (13:14 -0400)
Fix kpropd -S -t to actually exit after processing one connection (it
was breaking out of the switch statement, not the while loop).  Use
the -t when invoking kpropd from the dejagnu test framework;
previously it was unnecessary because kpropd -S -d exited after one
connection.  Clear up some confusion in the kprop.exp comments about
whether kpropd is expected to exit.

src/slave/kpropd.c
src/tests/dejagnu/config/default.exp
src/tests/dejagnu/krb-standalone/kprop.exp

index 83af0f82b05983d011137fe076e8d57c20e9bed4..afa02f43871ff6ea127e97287681d93888c47bc9 100644 (file)
@@ -432,7 +432,7 @@ do_standalone()
             close(s);
 
             if (runonce)
-                break;
+                exit(0);
         }
     }
     exit(0);
index 67963c579a03bcc9683a76008f6c68f63775ba18..bd45ecef3abed5f80163ba89fd853a1746bc0a14 100644 (file)
@@ -1510,7 +1510,7 @@ proc start_kpropd {} {
 
     envstack_push
     setup_kerberos_env slave
-    spawn $KPROPD -S -d -P [expr 10 + $portbase] -s $tmppwd/srvtab -f $tmppwd/incoming-slave-datatrans -p $KDB5_UTIL -a $tmppwd/kpropd-acl
+    spawn $KPROPD -S -d -t -P [expr 10 + $portbase] -s $tmppwd/srvtab -f $tmppwd/incoming-slave-datatrans -p $KDB5_UTIL -a $tmppwd/kpropd-acl
     set kpropd_pid [exp_pid]
     set kpropd_spawn_id $spawn_id
 #    send_user [list $KPROPD -S -d -P [expr 10 + $portbase] -s $tmppwd/srvtab -f $tmppwd/incoming-slave-datatrans -p $KDB5_UTIL -a $tmppwd/kpropd-acl]\n
index ed7ed684f9ff451299817941610eb290b183159c..cc1a26a2875eaaa8ca478091373cb584537334f8 100644 (file)
@@ -24,13 +24,11 @@ proc setup_slave {} {
 proc scan_kpropd_output {} {
     global kpropd_spawn_id kpropd_pid
 
-    # See if kpropd logged anything.
+    # See if kpropd logged anything.  It should exit after processing
+    # one kprop connection.
     expect {
        -i $kpropd_spawn_id
        eof {
-           # I think kpropd is supposed to run a loop in standalone
-           # mode, but exiting seems to be normal behavior.
-#          fail "kprop (server exited)"
            wait -i $kpropd_spawn_id
            unset kpropd_spawn_id kpropd_pid
        }