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

test_gdb disables 25% of tests in optimized builds #75420

Closed
ambv opened this issue Aug 18, 2017 · 6 comments
Closed

test_gdb disables 25% of tests in optimized builds #75420

ambv opened this issue Aug 18, 2017 · 6 comments
Labels
3.7 (EOL) end of life tests Tests in the Lib/test dir

Comments

@ambv
Copy link
Contributor

ambv commented Aug 18, 2017

BPO 31237
Nosy @pitrou, @vstinner, @benjaminp, @davidmalcolm, @ambv

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2017-08-25.16:33:33.328>
created_at = <Date 2017-08-18.23:39:31.226>
labels = ['3.7', 'tests']
title = 'test_gdb disables 25% of tests in optimized builds'
updated_at = <Date 2017-08-25.16:33:33.328>
user = 'https://github.com/ambv'

bugs.python.org fields:

activity = <Date 2017-08-25.16:33:33.328>
actor = 'lukasz.langa'
assignee = 'none'
closed = True
closed_date = <Date 2017-08-25.16:33:33.328>
closer = 'lukasz.langa'
components = ['Tests']
creation = <Date 2017-08-18.23:39:31.226>
creator = 'lukasz.langa'
dependencies = []
files = []
hgrepos = []
issue_num = 31237
keywords = []
message_count = 6.0
messages = ['300554', '300555', '300649', '300650', '300653', '300847']
nosy_count = 5.0
nosy_names = ['pitrou', 'vstinner', 'benjamin.peterson', 'dmalcolm', 'lukasz.langa']
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue31237'
versions = ['Python 3.6', 'Python 3.7']

@ambv
Copy link
Contributor Author

ambv commented Aug 18, 2017

We are skipping a lot of tests when optimizations are enabled (which essentially means: compiled without --with-pydebug). This seems overly aggressive since most Python users are using the gdb bindings with a non-debug build.

I think we should have tests for py-bt, py-up, printing globals, etc. that run on a non-debug build.

@ambv ambv added 3.7 (EOL) end of life tests Tests in the Lib/test dir labels Aug 18, 2017
@vstinner
Copy link
Member

Sadly, python-gdb fails to get required data for some commands, so python-gdb doesn't work fully on optimized builds.

@ambv
Copy link
Contributor Author

ambv commented Aug 21, 2017

You're being vague, can you say which optimized builds and which data? As I mentioned, builds that actual users use are almost always compiled without --with-pydebug. That includes, say, the default RedHat python RPMs or the Debian DEBs that ship with those operating systems.

It's not enough for us to run those tests only for --with-pydebug, as shown by bpo-30983, which wasn't discovered sooner because it only affects shared non-debug builds.

@pitrou
Copy link
Member

pitrou commented Aug 21, 2017

I don't think it's a surprise that reconstructing high-level program information from a debugger works less well on optimized builds. Perhaps Dave Malcolm has more precise information about what is supposed to to work and what is not.

@davidmalcolm
Copy link
Member

The problem is that there are so many variables:

  • which version of which compiler
  • optimization flags
  • which version of gdb
  • which CPU architecture
    etc (and the compiler and/or gdb could be carrying patches from downstream distributors...)

All of these can affect the debugging experience; as soon as optimizations are turned on it's very hard to predict exactly how well we can capture the frame information in the debugger.

Hence it makes sense to skip these tests for optimized builds, to avoid creating noise in the buildbots.

Downstream distributions might want to re-enable the tests, if they have sufficient control over the compiler and debugger versions that are in use, I guess.

Or maybe there's a way to express some of the above sanely? Not sure.

Hope this is constructive.

@ambv
Copy link
Contributor Author

ambv commented Aug 25, 2017

I guess it's wontfix then. Sad, since that leaves us partially blind to regressions like bpo-30983.

@ambv ambv closed this as completed Aug 25, 2017
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.7 (EOL) end of life tests Tests in the Lib/test dir
Projects
None yet
Development

No branches or pull requests

4 participants