Blame SOURCES/0013-downstream-Make-tests-compatible-with-sssd_krb5_loca.patch

905476
From 9aa12e932f08651785519890896647069e7a30b1 Mon Sep 17 00:00:00 2001
905476
From: Julien Rische <jrische@redhat.com>
905476
Date: Wed, 7 Dec 2022 13:22:42 +0100
905476
Subject: [PATCH] [downstream] Make tests compatible with
905476
 sssd_krb5_locator_plugin.so
905476
905476
The sssd_krb5_locator_plugin.so plugin provided by sssd-client conflicts
905476
with the upstream test t_discover_uri.py. The test has to be modified in
905476
order to avoid false positive.
905476
---
905476
 src/lib/krb5/os/t_discover_uri.py | 9 ++++++++-
905476
 1 file changed, 8 insertions(+), 1 deletion(-)
905476
905476
diff --git a/src/lib/krb5/os/t_discover_uri.py b/src/lib/krb5/os/t_discover_uri.py
905476
index 87bac17929..26bc95a8dc 100644
905476
--- a/src/lib/krb5/os/t_discover_uri.py
905476
+++ b/src/lib/krb5/os/t_discover_uri.py
905476
@@ -1,3 +1,4 @@
905476
+from os.path import exists
905476
 from k5test import *
905476
 
905476
 entries = ('URI _kerberos.TEST krb5srv::kkdcp:https://kdc1 1 1\n',
905476
@@ -37,8 +38,14 @@ realm.env['RESOLV_WRAPPER_HOSTS'] = hosts_filename
905476
 out = realm.run(['./t_locate_kdc', 'TEST'], env=realm.env)
905476
 l = out.splitlines()
905476
 
905476
+if (exists('/usr/lib/krb5/plugins/libkrb5/sssd_krb5_locator_plugin.so')
905476
+    or exists('/usr/lib64/krb5/plugins/libkrb5/sssd_krb5_locator_plugin.so')):
905476
+    line_range = range(6, 14)
905476
+else:
905476
+    line_range = range(4, 12)
905476
+
905476
 j = 0
905476
-for i in range(4, 12):
905476
+for i in line_range:
905476
     if l[i].strip() != expected[j]:
905476
         fail('URI answers do not match')
905476
     j += 1
905476
-- 
905476
2.38.1
905476