krb5 commit: Relax t_sn2princ.py reverse resolution test
Tom Yu
tlyu at mit.edu
Mon May 30 22:33:56 EDT 2016
https://github.com/krb5/krb5/commit/45b34f8e8f10009435d86195ac17e02d1dd0684e
commit 45b34f8e8f10009435d86195ac17e02d1dd0684e
Author: Tom Yu <tlyu at mit.edu>
Date: Fri May 27 15:19:43 2016 -0400
Relax t_sn2princ.py reverse resolution test
Relax t_sn2princ.py check of the reverse resolution of the test
hostname. The new requirement is that it be different from the
forward resolved hostname. (There is also an existing implicit
requirement that it be in the mit.edu domain.) This makes
t_sn2princ.py more robust against changes in the reverse resolution of
the test hostname.
ticket: 8422 (new)
tags: pullup
target_version: 1.14-next
target_version: 1.13-next
src/tests/t_sn2princ.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/tests/t_sn2princ.py b/src/tests/t_sn2princ.py
index 4d27c6f..6a349c4 100755
--- a/src/tests/t_sn2princ.py
+++ b/src/tests/t_sn2princ.py
@@ -69,7 +69,6 @@ if offline:
# and reverse resolving to these names.
oname = 'ptr-mismatch.kerberos.org'
fname = 'www.kerberos.org'
-rname = 'kerberos-org.mit.edu'
# Verify forward resolution before testing for it.
try:
@@ -91,9 +90,11 @@ try:
names = socket.getnameinfo(sockaddr, socket.NI_NAMEREQD)
except socket.gaierror:
skip_rest('reverse sn2princ tests', 'cannot reverse resolve %s' % oname)
-if names[0].lower() != rname:
+rname = names[0].lower()
+if rname == fname:
skip_rest('reverse sn2princ tests',
- '%s reverse resolves to %s, not %s' % (oname, names[0], rname))
+ '%s reverse resolves to %s '
+ 'which should be different from %s' % (oname, rname, fname))
# Test default canonicalization (forward and reverse lookup).
test(oname, rname, 'R3')
More information about the cvs-krb5
mailing list