Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests failing in GitHub Actions #420

Merged

Conversation

PradyumnaKrishna
Copy link
Contributor

@PradyumnaKrishna PradyumnaKrishna commented Jul 18, 2022

Description of the changes being introduced by the pull request:

Test test_run_duplicate_streams_timeout fails sometimes, and after
some investigations it is found that the process used in the test
exits before considered for a Timeout.

To fix the test, the command is now replaced with another command.

Also, I consider testing this Pull Request multiple time using GitHub Actions
before merging to make sure the problem is now solved.

A failed test: https://github.com/secure-systems-lab/securesystemslib/runs/7280432273

Please verify and check that the pull request fulfils the following requirements:

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

tests/test_process.py Outdated Show resolved Hide resolved
Test `test_run_duplicate_streams_timeout` fails sometimes, and after
some investigations it is found that the process used in the test
exits before considered for a Timeout.
To fix the test, the command is now replaced with another command.

Signed-off-by: Pradyumna Krishna <git@onpy.in>
Copy link
Member

@lukpueh lukpueh left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! What do you think should be the expected behavior for timeout <= 0? It seems surprising that a subprocess can successfully run with timeout=-1, just because it finishes before we check for timeout. Would you mind taking a look how the subprocess module handles this?

@PradyumnaKrishna
Copy link
Contributor Author

PradyumnaKrishna commented Jul 18, 2022

Thanks for the fix! What do you think should be the expected behavior for timeout <= 0?

timeout in subprocess do pretty similar stuff, they checks it using an infinite while loop and breaks when the process exits.
We use while loop with a condition that the process is running.

@lukpueh lukpueh merged commit 2bec929 into secure-systems-lab:master Jul 19, 2022
@PradyumnaKrishna PradyumnaKrishna deleted the fix_process_timeout branch July 19, 2022 13:23
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.

2 participants