]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix and adjust t_kprop.py 403/head
authorGreg Hudson <ghudson@mit.edu>
Wed, 10 Feb 2016 16:50:54 +0000 (11:50 -0500)
committerGreg Hudson <ghudson@mit.edu>
Mon, 29 Feb 2016 23:12:10 +0000 (18:12 -0500)
The listprincs check was at the wrong indentation level and had the
wrong argument grouping; fix it so we actually verify the propagation.

Stop using the -t (runonce) flag to kpropd, so that kpropd continues
to run until k5test.py terminates it.  Quit out of the read loop when
we see that the load process is completed, instead of looking for end
of input.  This change is needed in order to add hooks in k5test.py
for checking daemons for memory leaks before terminating them.

src/tests/t_kprop.py

index e2026c877aa7aec148d119695832d8dbebc83c71..d625627104602d33d7809782f68b0e2549aa0d9b 100755 (executable)
@@ -24,21 +24,21 @@ for realm in multipass_realms(create_user=False):
     realm.addprinc('wakawaka')
 
     # Start kpropd.
-    kpropd = realm.start_kpropd(slave, ['-d', '-t'])
+    kpropd = realm.start_kpropd(slave, ['-d'])
 
     realm.run([kdb5_util, 'dump', dumpfile])
     realm.run([kprop, '-f', dumpfile, '-P', str(realm.kprop_port()), hostname])
     output('*** kpropd output follows\n')
     while True:
         line = kpropd.stdout.readline()
-        if line == '':
+        if 'Database load process for full propagation completed' in line:
             break
         output('kpropd: ' + line)
         if 'Rejected connection' in line:
             fail('kpropd rejected connection from kprop')
 
-            out = realm.run([kadminl, 'listprincs', slave])
-            if 'wakawaka' not in out:
-                fail('Slave does not have all principals from master')
+    out = realm.run([kadminl, 'listprincs'], slave)
+    if 'wakawaka' not in out:
+        fail('Slave does not have all principals from master')
 
 success('kprop tests')