From 01578e76ca8f5027efb1b1f3b1f90f482f95a91a Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Thu, 2 Jan 2025 16:30:50 -0500 Subject: [PATCH] Rename the test_{daemon,direct}.py tests. (#959) The reason for this is somewhat difficult to explain. For many months now, we've had a regression in RHEL CI where Python would have a segmentation fault during the run of flake8 in the ros2cli package. After a bunch of local debugging, I found that there is some crash in Fast-DDS teardown. Specifically, sometimes it is attempting to join on a thread where the backing memory has already been erased somehow. Despite a lot of debugging, and the use of asan and valgrind, I have not been able to find what is removing that memory before the join happens. What does this have to do with flake8? pytest runs all tests within the same process, and in alphabetical order. So it turns out that the cleanup from the test_direct.py and test_daemon.py tests was being delayed enough that the Python interpreter garbage collector wouldn't actually delete it until flake8 started to run. By rearranging things like this, we ensure that flake8 runs before the daemon and the direct tests. I want to emphasize that this is a *workaround*; there is still a bug here somewhere. But this should at least get RHEL back to green for now. Signed-off-by: Chris Lalancette --- ros2cli/test/{test_daemon.py => test_ros2cli_daemon.py} | 0 ros2cli/test/{test_direct.py => test_ros2cli_direct.py} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename ros2cli/test/{test_daemon.py => test_ros2cli_daemon.py} (100%) rename ros2cli/test/{test_direct.py => test_ros2cli_direct.py} (100%) diff --git a/ros2cli/test/test_daemon.py b/ros2cli/test/test_ros2cli_daemon.py similarity index 100% rename from ros2cli/test/test_daemon.py rename to ros2cli/test/test_ros2cli_daemon.py diff --git a/ros2cli/test/test_direct.py b/ros2cli/test/test_ros2cli_direct.py similarity index 100% rename from ros2cli/test/test_direct.py rename to ros2cli/test/test_ros2cli_direct.py