diff options
| author | Greg Hudson <ghudson@mit.edu> | 2012-04-24 17:04:29 +0000 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2012-04-24 17:04:29 +0000 |
| commit | 77e492489beadd3869c82775903bd2649ccf3f8f (patch) | |
| tree | c4359ec0326945c307104ac969f8c008e92acf41 /src/tests | |
| parent | f4a07458225ff011af06492d36c62400b34ad506 (diff) | |
| download | krb5-77e492489beadd3869c82775903bd2649ccf3f8f.tar.gz krb5-77e492489beadd3869c82775903bd2649ccf3f8f.tar.xz krb5-77e492489beadd3869c82775903bd2649ccf3f8f.zip | |
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
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25821 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/tests')
| -rwxr-xr-x | src/tests/t_general.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/tests/t_general.py b/src/tests/t_general.py index ea823b8f5..046f957f4 100755 --- a/src/tests/t_general.py +++ b/src/tests/t_general.py @@ -39,4 +39,22 @@ output = realm.run_as_client([klist], expected_code=1) 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@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') |
