-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
gh-110995: Fix test_gdb check_usable_gdb() #110998
Conversation
Fix detection of gdb built without Python scripting support. * check_usable_gdb() doesn't check gdb exit code when calling run_gdb(). * Use shutil.which() to get the path to the gdb program.
This is what we see with real gdb without embedded Python support:
So at least that case seems to work as expected. We haven't tested with gdb with embedded Python support. |
@vstinner Should the check function die (either with unittest.SkipTest or with another Exception) when the process had non-zero exit code but the stdout was not empty? |
Perfect, that's exactly the expected behavior: skip the test.
GHA Ubuntu ran test_gdb tests: all passed.
test_gdb is complicated and fragile, in case of doubt, I prefer to not change the code. This change restores the status quo: same code than before. |
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
Fix detection of gdb built without Python scripting support. * check_usable_gdb() doesn't check gdb exit code when calling run_gdb(). * Use shutil.which() to get the path to the gdb program. (cherry picked from commit 920b3df) Co-authored-by: Victor Stinner <vstinner@python.org>
Fix detection of gdb built without Python scripting support. * check_usable_gdb() doesn't check gdb exit code when calling run_gdb(). * Use shutil.which() to get the path to the gdb program. (cherry picked from commit 920b3df) Co-authored-by: Victor Stinner <vstinner@python.org>
GH-111003 is a backport of this pull request to the 3.12 branch. |
GH-111004 is a backport of this pull request to the 3.11 branch. |
gh-110995: Fix test_gdb check_usable_gdb() (GH-110998) Fix detection of gdb built without Python scripting support. * check_usable_gdb() doesn't check gdb exit code when calling run_gdb(). * Use shutil.which() to get the path to the gdb program. (cherry picked from commit 920b3df) Co-authored-by: Victor Stinner <vstinner@python.org>
gh-110995: Fix test_gdb check_usable_gdb() (GH-110998) Fix detection of gdb built without Python scripting support. * check_usable_gdb() doesn't check gdb exit code when calling run_gdb(). * Use shutil.which() to get the path to the gdb program. (cherry picked from commit 920b3df) Co-authored-by: Victor Stinner <vstinner@python.org>
Fix detection of gdb built without Python scripting support. * check_usable_gdb() doesn't check gdb exit code when calling run_gdb(). * Use shutil.which() to get the path to the gdb program.
Fix detection of gdb built without Python scripting support. * check_usable_gdb() doesn't check gdb exit code when calling run_gdb(). * Use shutil.which() to get the path to the gdb program.
Fix detection of gdb built without Python scripting support.