Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bpo-33926: enable GDB tests on Travis CI #14395

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

Merged
merged 2 commits into from
Jun 27, 2019
Merged

Conversation

jdemeyer
Copy link
Contributor

@jdemeyer jdemeyer commented Jun 26, 2019

@tirkarthi
Copy link
Member

I guess this also resolves https://bugs.python.org/issue33926 . Thanks.

.travis.yml Outdated
# Use -O3 because we don't use debugger on Travis-CI
- CFLAGS="-I${OPENSSL_DIR}/include -O3"
# Use -Og because we want to run all GDB tests
- CFLAGS="-I${OPENSSL_DIR}/include -Og"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- CFLAGS="-I${OPENSSL_DIR}/include -Og"
- CFLAGS="-I${OPENSSL_DIR}/include"

.travis.yml Outdated
@@ -14,8 +14,8 @@ env:
- OPENSSL=1.1.1c
- OPENSSL_DIR="$HOME/multissl/openssl/${OPENSSL}"
- PATH="${OPENSSL_DIR}/bin:$PATH"
# Use -O3 because we don't use debugger on Travis-CI
- CFLAGS="-I${OPENSSL_DIR}/include -O3"
# Use -Og because we want to run all GDB tests
Copy link
Member

Choose a reason for hiding this comment

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

remove this comment line.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@jdemeyer
Copy link
Contributor Author

@methane: we need to use -O0 or -Og as optimization flag. This is because gdb tests are not run when CPython is compiled with the default -O3 level (IMHO, this is in itself a bug, however fixing that is more controversial that I expected, see #14331).

@jdemeyer
Copy link
Contributor Author

I guess this also resolves https://bugs.python.org/issue33926 . Thanks.

In fact, it fixes exactly that. So I'm changing the bpo number here.

@jdemeyer jdemeyer changed the title bpo-37382: enable GDB tests on Travis CI bpo-33926: enable GDB tests on Travis CI Jun 27, 2019
@methane
Copy link
Member

methane commented Jun 27, 2019

@methane: we need to use -O0 or -Og as optimization flag.

When configure --with-pydebug is used, it is set automatically. No need to set it explicitly.

@tirkarthi
Copy link
Member

@jdemeyer Can you please change the issue number in PR description from 32926 to 33926? I guess the bot keeps linking this PR to the issue 32926 for every comment made in this PR.

@jdemeyer
Copy link
Contributor Author

When configure --with-pydebug is used, it is set automatically.

OK, let's test that.

@jdemeyer jdemeyer changed the title bpo-33926: enable GDB tests on Travis CI [DO-NOT-MERGE] bpo-33926: enable GDB tests on Travis CI Jun 27, 2019
@jdemeyer jdemeyer changed the title [DO-NOT-MERGE] bpo-33926: enable GDB tests on Travis CI bpo-33926: enable GDB tests on Travis CI Jun 27, 2019
@jdemeyer
Copy link
Contributor Author

OK, this seems to work. I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

@methane: please review the changes made to this pull request.

@miss-islington
Copy link
Contributor

Thanks @jdemeyer for the PR, and @methane for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-14420 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 27, 2019
(cherry picked from commit 667eaff)

Co-authored-by: Jeroen Demeyer <[email protected]>
@tirkarthi
Copy link
Member

Does this change have any noticeable impact on CI timing? The merge run happened for 20 mins which used to be 10-12 mins earlier. The backport PR also completes in around 20 minutes.

miss-islington added a commit that referenced this pull request Jun 27, 2019
(cherry picked from commit 667eaff)

Co-authored-by: Jeroen Demeyer <[email protected]>
@methane
Copy link
Member

methane commented Jun 27, 2019

Does this change have any noticeable impact on CI timing? The merge run happened for 20 mins which used to be 10-12 mins earlier. The backport PR also completes in around 20 minutes.

Yes, it affects. I will compare the time of -Og and -O0.

@methane
Copy link
Member

methane commented Jun 27, 2019

-Og
real    5m3.236s
user    16m29.552s
sys     0m57.023s

-O0
real    6m56.909s
user    30m5.529s
sys     1m0.605s

@vstinner
Copy link
Member

Does this change have any noticeable impact on CI timing? The merge run happened for 20 mins which used to be 10-12 mins earlier. The backport PR also completes in around 20 minutes.

@vstinner
Copy link
Member

It's 1.8x slower.

@vstinner
Copy link
Member

Previously, we used -O3:

commit 8ff53564730f7ba503f5ad94418c309c48e8516d
Author: INADA Naoki <[email protected]>
Date:   Sat Feb 10 20:35:17 2018 +0900

    travis: Use -O3 option (GH-5599)
    
    We don't use debugger on Travis.

Is it really useful to make the pre-commit CI almost 2x slower just because of test_gdb? We already have a large fleet of post-commit buildbots which run test_gdb.

@methane
Copy link
Member

methane commented Jun 27, 2019

@vstinner
Copy link
Member

-Og isn't the default when building using --with-pydebug?

16 min 52 sec total, "Total duration: 12 min 4 sec" just for the tests, looks close to what we had using -O3. If test_gdb still pass, we should definitively use -Og :-) So yeah for #14423 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants