-
-
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
test_gdb are not skipped properly if gdb is not available (instead, an uncaught exception is raised) #110995
Comments
vstinner
added a commit
to vstinner/cpython
that referenced
this issue
Oct 17, 2023
check_usable_gdb() doesn't check gdb exit code when calling run_gdb(). Use shutil.which() to get the path to the gdb program.
vstinner
added a commit
to vstinner/cpython
that referenced
this issue
Oct 17, 2023
check_usable_gdb() doesn't check gdb exit code when calling run_gdb(). Use shutil.which() to get the path to the gdb program.
vstinner
added a commit
to vstinner/cpython
that referenced
this issue
Oct 17, 2023
check_usable_gdb() doesn't check gdb exit code when calling run_gdb(). Use shutil.which() to get the path to the gdb program.
vstinner
added a commit
to vstinner/cpython
that referenced
this issue
Oct 17, 2023
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.
I wrote PR #110998 to fix test_gdb. I'm not sure of my fix. I tried to write a fake gdb which behaves as gdb, writes |
vstinner
added a commit
that referenced
this issue
Oct 17, 2023
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.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 17, 2023
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>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 17, 2023
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>
vstinner
added a commit
that referenced
this issue
Oct 17, 2023
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>
vstinner
added a commit
that referenced
this issue
Oct 17, 2023
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>
aisk
pushed a commit
to aisk/cpython
that referenced
this issue
Feb 11, 2024
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.
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this issue
Sep 2, 2024
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
I'm bootstrapping Python 3.13a1 in Fedora Linux.
In my environment I've got
gdb
built without Python. Now I want to build full Python and run its tests during the RPM build.What happens
Tests from package test_gdb fail due to uncaught exception.
What should happen
Tests should be marked as skipped and not executed at all.
Traceback
I believe the refactoring done in #110026 has introduced a regression.
run_gdb()
used to always return a tuple(stdout, stderr)
, but now it checks exitcode and raises an exception in case it's not what was expected.check_usable_gdb()
consumes the values returned fromrun_gdb()
and only then marks tests as skipped, but in this case the exception breaks the test run even before this can happen.cc: @vstinner
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: