From bef8df541950257dd443dcb2688287c302866646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20L=C3=B3pez?= Date: Tue, 17 Oct 2023 13:22:05 +0200 Subject: [PATCH 1/3] CI: Corrected the path to the logs Logs were not included in the artifacts because the path was incorrect. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4da87e45562..8fa0796d33c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,7 +120,7 @@ jobs: if-no-files-found: ignore name: ${{ matrix.tag }}-intgcheck path: | - ./sssd/*.log + ./sssd/var/log/sssd/*.log ./sssd/ci-build-debug/ci-*.log ./sssd/ci-build-debug/test-suite.log ./sssd/ci-build-debug/ci-mock-result/*.log From 80722ba7dca61cb9e078d097e4a04f6c42411ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20L=C3=B3pez?= Date: Tue, 17 Oct 2023 16:01:43 +0200 Subject: [PATCH 2/3] KCM: Clean the pipe after the test has finished Tests where sometimes failing because they were opening the pipe while KCM was shutting down. This was happening because tests were successfully opening the pipe because it was left over by the previous instance of KCM. So to avoid this we immediately remove the pipe during teardown. With this, tests will fail to open it and keep trying until it is re-created by the new instance of KCM. --- src/tests/intg/test_kcm.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tests/intg/test_kcm.py b/src/tests/intg/test_kcm.py index 0d2638f211f..7c44584b73b 100644 --- a/src/tests/intg/test_kcm.py +++ b/src/tests/intg/test_kcm.py @@ -114,8 +114,13 @@ def kcm_teardown(): try: os.unlink(os.path.join(config.SECDB_PATH, "secrets.ldb")) except OSError as osex: - if osex.errno == 2: - pass + if osex.errno != 2: + raise osex + try: + os.unlink(abs_sock_path) + except OSError as osex: + if osex.errno != 2: + raise osex request.addfinalizer(kcm_teardown) return kcm_pid From 877dadf21a0aba0d1c29a9131fbd18915743ea6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20L=C3=B3pez?= Date: Wed, 18 Oct 2023 09:29:43 +0200 Subject: [PATCH 3/3] TESTS: Give KDC time to initialize Some PAM tests sometimes fail because they starts before KDC has finished its initialization. Adding a short delay to let it complete its initialization before launching the actual tests. --- src/tests/intg/test_pam_responder.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/intg/test_pam_responder.py b/src/tests/intg/test_pam_responder.py index 81fffd11818..9f5b46b0430 100644 --- a/src/tests/intg/test_pam_responder.py +++ b/src/tests/intg/test_pam_responder.py @@ -827,6 +827,7 @@ def setup_krb5(request, kdc_instance, passwd_ops_setup): passwd_ops_setup.useradd(**USER2) kdc_instance.add_principal("user1", "Secret123User1") kdc_instance.add_principal("user2", "Secret123User2") + time.sleep(2) # Give KDC time to initialize return None