svn rev #25821: trunk/src/tests/

ghudson@MIT.EDU ghudson at MIT.EDU
Tue Apr 24 13:04:29 EDT 2012


http://src.mit.edu/fisheye/changelog/krb5/?cs=25821
Commit By: ghudson
Log Message:
Add KRB5_TRACE test case

In t_general.py, run kinit with KRB5_TRACE enabled and make sure we
see some basic strings in the resulting file.

ticket: 7113


Changed Files:
U   trunk/src/tests/t_general.py
Modified: trunk/src/tests/t_general.py
===================================================================
--- trunk/src/tests/t_general.py	2012-04-24 17:04:21 UTC (rev 25820)
+++ trunk/src/tests/t_general.py	2012-04-24 17:04:29 UTC (rev 25821)
@@ -39,4 +39,22 @@
 if 'No credentials cache found' not in output:
     fail('Expected error message not seen in klist output')
 
-success('Dump/load, FAST kinit, kdestroy')
+# Spot-check KRB5_TRACE output
+tracefile = os.path.join(realm.testdir, 'trace')
+realm.run_as_client(['env', 'KRB5_TRACE=' + tracefile, kinit,
+                     realm.user_princ], input=(password('user') + "\n"))
+f = open(tracefile, 'r')
+trace = f.read()
+f.close()
+expected = ('Sending initial UDP request',
+            'Received answer',
+            'Selected etype info',
+            'AS key obtained',
+            'Decrypted AS reply',
+            'FAST negotiation: available',
+            'Storing user at KRBTEST.COM')
+for e in expected:
+    if e not in trace:
+        fail('Expected output not in kinit trace log')
+
+success('Dump/load, FAST kinit, kdestroy, trace logging')



More information about the cvs-krb5 mailing list