Conversation
When gProfiler cannot acquire the mutex (because another instance is running), it should exit with status 1 (error), not status 0 (success). This fixes test failures in test_preconditions.py where tests expect the container to fail when the mutex is already held. The behavior now aligns with other precondition checks (not root, not host PID) which correctly exit with status 1 on failure.
The test now expects the second gProfiler instance to exit with status 1 (error) instead of status 0 (success) when the mutex is already held. This aligns with the fix in main.py where we changed sys.exit(0) to sys.exit(1) for the mutex failure case.
Improvements: - Verify first container is running before starting second - Add explicit status checks for container states - Add descriptive assertion messages for better debugging - Verify first container remains running after second fails - Add comments explaining each test step This makes the test less flaky and easier to debug when it fails.
8975a70 to
87bc112
Compare
Changed from exact equality checks to 'contains' checks for stderr messages. This makes tests resilient to warnings (like the requests library dependency warning) being prepended to error output. The tests now check that the expected error message is present in stderr, rather than requiring stderr to be exactly equal to the expected message. Fixes test failures caused by: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer) Signed-off-by: Min Yeol Lim <min.yeol.lim@intel.com>
87bc112 to
bea6706
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots
Checklist: