krb5 commit [krb5-1.14]: Relax t_sn2princ.py reverse resolution test
Tom Yu
tlyu at mit.edu
Wed Jul 6 16:30:45 EDT 2016
https://github.com/krb5/krb5/commit/0e68b76e2ef6f88a1272594e43ae64315ec52676
commit 0e68b76e2ef6f88a1272594e43ae64315ec52676
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.
(cherry picked from commit 45b34f8e8f10009435d86195ac17e02d1dd0684e)
ticket: 8422
version_fixed: 1.14.3
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