URL: https://github.com/SSSD/sssd/pull/5410 Author: madhuriupadhye Title: #5410: Test: AD: For crash in ad_get_account_domain_search Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5410/head:pr5410 git checkout pr5410
From 950c67d63113bbace5368f4ac4f91f76dc121de0 Mon Sep 17 00:00:00 2001 From: Madhuri Upadhye <mupad...@redhat.com> Date: Thu, 19 Nov 2020 12:39:15 +0530 Subject: [PATCH] Test: AD: For sssd crash in ad_get_account_domain_search Configures the AD domain and makes it unreachable by changing ad_domain parameter. Checks the request flag 0x0001 in log after sssd restart. Verifies: Issue: #5295 Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1734040 Signed-off-by: Madhuri Upadhye <mupad...@redhat.com> --- src/tests/multihost/ad/test_adparameters.py | 36 +++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/tests/multihost/ad/test_adparameters.py b/src/tests/multihost/ad/test_adparameters.py index daa925b599..b85310463c 100644 --- a/src/tests/multihost/ad/test_adparameters.py +++ b/src/tests/multihost/ad/test_adparameters.py @@ -7,6 +7,7 @@ import re from sssd.testlib.common.utils import sssdTools from sssd.testlib.common.utils import SSHClient +from sssd.testlib.common.paths import SSSD_DEFAULT_CONF @pytest.mark.adparameters @@ -747,3 +748,38 @@ def test_0017_gssspnego_adjoin(self, multihost): remove_pcap = 'rm -f %s' % pcapfile multihost.client[0].run_command(remove_pcap) assert status == 'PASS' + + @pytest.mark.tier1 + def test_0018_bz1734040(self, multihost, adjoin): + """ + @Title: ad_parameters: sssd crash in ad_get_account_domain_search + """ + # Automation of bug + # https://bugzilla.redhat.com/show_bug.cgi?id=1734040 + adjoin(membersw='adcli') + client = sssdTools(multihost.client[0]) + domain_name = client.get_domain_section_name() + client.backup_sssd_conf() + client.remove_sss_cache('/var/log/sssd') + sssdcfg = multihost.client[0].get_file_contents(SSSD_DEFAULT_CONF) + sssdcfg = re.sub(b'ad_domain = %s' % domain_name.encode('utf-8'), + b'ad_domain = example.com \ndebug_level = 9', sssdcfg) + multihost.client[0].put_file_contents(SSSD_DEFAULT_CONF, sssdcfg) + client.clear_sssd_cache() + cmd = multihost.client[0].run_command('getent passwd 0', + raiseonerr=True) + if cmd.returncode != 0: + status = 'FAIL' + else: + status = 'PASS' + time.sleep(10) + domain_log = '/var/log/sssd/sssd_%s.log' % domain_name + log = multihost.client[0].get_file_contents(domain_log).decode('utf-8') + msg = 'Flags\s.0x0001.' + find = re.compile(r'%s' % msg) + if not find.search(log): + status = 'FAIL' + else: + status = 'PASS' + client.restore_sssd_conf() + assert status == 'PASS'
_______________________________________________ sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org