[arvados] updated: 2.7.0-6550-gd7eff3ca2b

git repository hosting git at public.arvados.org
Thu May 9 18:34:59 UTC 2024


Summary of changes:
 build/run-tests.sh                      |  6 ++++--
 services/fuse/tests/integration_test.py | 14 ++++++++++----
 services/fuse/tests/mount_test_base.py  | 14 ++++++++++----
 3 files changed, 24 insertions(+), 10 deletions(-)

       via  d7eff3ca2b97bd1729e85c3c85547c9519957b51 (commit)
       via  3b7b36a745e07b09bfa61932f5de2e22fb42a4e7 (commit)
      from  dcdaf7450fb66da2bc904a21f29660ac75e5864a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit d7eff3ca2b97bd1729e85c3c85547c9519957b51
Author: Brett Smith <brett.smith at curii.com>
Date:   Thu May 9 14:29:15 2024 -0400

    21207: Move FUSE test abort logs into pytest exit message
    
    Since pytest doesn't display live logs, they're no longer helpful. We
    could configure pytest to display live logs, but overall just moving the
    information to the exit message seems like a cleaner solution.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/services/fuse/tests/integration_test.py b/services/fuse/tests/integration_test.py
index 87f9374e41..24ac7baf04 100644
--- a/services/fuse/tests/integration_test.py
+++ b/services/fuse/tests/integration_test.py
@@ -93,9 +93,6 @@ class IntegrationTest(unittest.TestCase):
                         return func(self, *args, **kwargs)
                 finally:
                     if self.mount and self.mount.llfuse_thread.is_alive():
-                        logging.warning("IntegrationTest.mount:"
-                                            " llfuse thread still alive after umount"
-                                            " -- ending test suite to avoid deadlock")
                         # pytest uses exit status 2 when test collection failed.
                         # A UnitTest failing in setup/teardown counts as a
                         # collection failure, so pytest will exit with status 2
@@ -105,6 +102,6 @@ class IntegrationTest(unittest.TestCase):
                         # TODO: If we refactor these tests so they're not built
                         # on unittest, consider using a dedicated, non-pytest
                         # exit code like TEMPFAIL.
-                        pytest.exit("llfuse thread outlived test", 2)
+                        pytest.exit("llfuse thread outlived test - aborting test suite to avoid deadlock", 2)
             return wrapper
         return decorator
diff --git a/services/fuse/tests/mount_test_base.py b/services/fuse/tests/mount_test_base.py
index 590d1896f6..9768aeb74d 100644
--- a/services/fuse/tests/mount_test_base.py
+++ b/services/fuse/tests/mount_test_base.py
@@ -105,9 +105,6 @@ class MountTestBase(unittest.TestCase):
             t0 = time.time()
             self.llfuse_thread.join(timeout=60)
             if self.llfuse_thread.is_alive():
-                logger.warning("MountTestBase.tearDown():"
-                               " llfuse thread still alive 60s after umount"
-                               " -- ending test suite to avoid deadlock")
                 # pytest uses exit status 2 when test collection failed.
                 # A UnitTest failing in setup/teardown counts as a
                 # collection failure, so pytest will exit with status 2
@@ -117,7 +114,7 @@ class MountTestBase(unittest.TestCase):
                 # TODO: If we refactor these tests so they're not built
                 # on unittest, consider using a dedicated, non-pytest
                 # exit code like TEMPFAIL.
-                pytest.exit("llfuse thread outlived test", 2)
+                pytest.exit("llfuse thread outlived test - aborting test suite to avoid deadlock", 2)
             waited = time.time() - t0
             if waited > 0.1:
                 logger.warning("MountTestBase.tearDown(): waited %f s for llfuse thread to end", waited)

commit 3b7b36a745e07b09bfa61932f5de2e22fb42a4e7
Author: Brett Smith <brett.smith at curii.com>
Date:   Thu May 9 14:25:41 2024 -0400

    21207: Abort FUSE tests with exit status 2
    
    See comments for rationale.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/build/run-tests.sh b/build/run-tests.sh
index 42c7d1240c..0eb421454e 100755
--- a/build/run-tests.sh
+++ b/build/run-tests.sh
@@ -712,9 +712,11 @@ do_test_once() {
             fi
             python3 -m pytest ${testargs[$1]}
             result=$?
-            if [[ ${tries} < 3 && ${result} == 75 ]]
+            # pytest uses exit code 2 to mean "test collection failed."
+            # See discussion in FUSE's IntegrationTest and MountTestBase.
+            if [[ ${tries} < 3 && ${result} == 2 ]]
             then
-                printf '\n*****\n%s tests exited TEMPFAIL -- retrying\n*****\n\n' "$1"
+                printf '\n*****\n%s tests exited with code 2 -- retrying\n*****\n\n' "$1"
                 continue
             else
                 break
diff --git a/services/fuse/tests/integration_test.py b/services/fuse/tests/integration_test.py
index fa7bed7472..87f9374e41 100644
--- a/services/fuse/tests/integration_test.py
+++ b/services/fuse/tests/integration_test.py
@@ -96,6 +96,15 @@ class IntegrationTest(unittest.TestCase):
                         logging.warning("IntegrationTest.mount:"
                                             " llfuse thread still alive after umount"
                                             " -- ending test suite to avoid deadlock")
-                        pytest.exit("llfuse thread outlived test", os.EX_TEMPFAIL)
+                        # pytest uses exit status 2 when test collection failed.
+                        # A UnitTest failing in setup/teardown counts as a
+                        # collection failure, so pytest will exit with status 2
+                        # no matter what status you specify here. run-tests.sh
+                        # looks for this status, so specify 2 just to keep
+                        # everything as consistent as possible.
+                        # TODO: If we refactor these tests so they're not built
+                        # on unittest, consider using a dedicated, non-pytest
+                        # exit code like TEMPFAIL.
+                        pytest.exit("llfuse thread outlived test", 2)
             return wrapper
         return decorator
diff --git a/services/fuse/tests/mount_test_base.py b/services/fuse/tests/mount_test_base.py
index c7ba4d4fda..590d1896f6 100644
--- a/services/fuse/tests/mount_test_base.py
+++ b/services/fuse/tests/mount_test_base.py
@@ -108,7 +108,16 @@ class MountTestBase(unittest.TestCase):
                 logger.warning("MountTestBase.tearDown():"
                                " llfuse thread still alive 60s after umount"
                                " -- ending test suite to avoid deadlock")
-                pytest.exit("llfuse thread outlived test", os.EX_TEMPFAIL)
+                # pytest uses exit status 2 when test collection failed.
+                # A UnitTest failing in setup/teardown counts as a
+                # collection failure, so pytest will exit with status 2
+                # no matter what status you specify here. run-tests.sh
+                # looks for this status, so specify 2 just to keep
+                # everything as consistent as possible.
+                # TODO: If we refactor these tests so they're not built
+                # on unittest, consider using a dedicated, non-pytest
+                # exit code like TEMPFAIL.
+                pytest.exit("llfuse thread outlived test", 2)
             waited = time.time() - t0
             if waited > 0.1:
                 logger.warning("MountTestBase.tearDown(): waited %f s for llfuse thread to end", waited)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list