Skip to content

Conversation

@martinkunkel2
Copy link
Contributor

Added cleanup in test_alive to ensure all spawned processes are terminated on successful test execution.

This also fixes a race condition that could occur: the check for process is_alive might be executing while more is still parsing the arguments.

Fixes #8429

Added cleanup in test_alive to ensure all spawned processes are
terminated on successful test execution.

This also fixes a race condition that could occur: the check for
process is_alive might be executing while more is still parsing
the arguments.
Copilot AI review requested due to automatic review settings August 4, 2025 19:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the test_alive function in the more utility tests by adding proper process cleanup and fixing a race condition. The changes ensure spawned processes are properly terminated after test execution and add synchronization to wait for the more command to fully start before checking if it's alive.

  • Added process cleanup with cmd.kill() to prevent orphaned processes
  • Fixed race condition by waiting for more to display content before asserting it's alive
  • Enhanced test setup by writing actual content to the test file instead of just creating an empty file

@github-actions
Copy link

github-actions bot commented Aug 4, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@github-actions
Copy link

github-actions bot commented Aug 5, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@sylvestre sylvestre merged commit 86dc293 into uutils:main Aug 6, 2025
90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

more: test_valid_arg leaves processes running after test completion

2 participants