Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-109972: Split test_gdb into a package of 3 tests#109977

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 1 commit intopython:mainfromvstinner:split_test_gdb
Sep 28, 2023

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commentedSep 27, 2023
edited
Loading

Split test_gdb.py file into a test_gdb package made of multiple
tests, so tests can now be run in parallel.

  • Create Lib/test/test_gdb/ directory.
  • Split test_gdb.py into multiple files in Lib/test/test_gdb/
    directory.
  • Move Lib/test/gdb_sample.py to Lib/test/test_gdb/ directory.
    Update get_sample_script(): usefile to locate gdb_sample.py.
  • Move gdb_has_frame_select() and HAS_PYUP_PYDOWN to test_misc.py.
  • Explicitly skip test_gdb on Windows. Previously, test_gdb was
    skipped even if gdb was available because of
    gdb_has_frame_select().

@vstinner
Copy link
MemberAuthor

Test on PPC64LE RHEL8 3.x buildbot.

When Python is built with./configure --with-pydebug --with-lto && make -j10, test_gdb takes19 min 45 sec.

With this change, it takes12 min 2 sec when tests are run in parallel.

$ ./python -m test test_gdb -u all -j0 --slowest 0:00:00 load avg: 1.39 Run 3 tests in parallel using 3 worker processes0:00:30 load avg: 3.01 running (3): test_gdb.test_backtrace (30.0 sec), test_gdb.test_misc (30.0 sec), test_gdb.test_pretty_print (30.0 sec)0:01:00 load avg: 3.34 running (3): test_gdb.test_backtrace (1 min), test_gdb.test_misc (1 min), test_gdb.test_pretty_print (1 min)0:01:30 load avg: 3.67 running (3): test_gdb.test_backtrace (1 min 30 sec), test_gdb.test_misc (1 min 30 sec), test_gdb.test_pretty_print (1 min 30 sec)0:01:41 load avg: 3.72 [1/3] test_gdb.test_misc passed (1 min 41 sec) -- running (2): test_gdb.test_backtrace (1 min 41 sec), test_gdb.test_pretty_print (1 min 41 sec)0:02:11 load avg: 3.49 running (2): test_gdb.test_backtrace (2 min 11 sec), test_gdb.test_pretty_print (2 min 11 sec)0:02:41 load avg: 3.37 running (2): test_gdb.test_backtrace (2 min 41 sec), test_gdb.test_pretty_print (2 min 41 sec)0:03:11 load avg: 3.16 running (2): test_gdb.test_backtrace (3 min 11 sec), test_gdb.test_pretty_print (3 min 11 sec)0:03:41 load avg: 3.17 running (2): test_gdb.test_backtrace (3 min 41 sec), test_gdb.test_pretty_print (3 min 41 sec)0:04:11 load avg: 3.47 running (2): test_gdb.test_backtrace (4 min 11 sec), test_gdb.test_pretty_print (4 min 11 sec)0:04:41 load avg: 3.36 running (2): test_gdb.test_backtrace (4 min 41 sec), test_gdb.test_pretty_print (4 min 41 sec)0:05:11 load avg: 3.22 running (2): test_gdb.test_backtrace (5 min 11 sec), test_gdb.test_pretty_print (5 min 11 sec)0:05:41 load avg: 3.04 running (2): test_gdb.test_backtrace (5 min 41 sec), test_gdb.test_pretty_print (5 min 41 sec)0:06:11 load avg: 3.04 running (2): test_gdb.test_backtrace (6 min 11 sec), test_gdb.test_pretty_print (6 min 11 sec)0:06:41 load avg: 3.02 running (2): test_gdb.test_backtrace (6 min 41 sec), test_gdb.test_pretty_print (6 min 41 sec)0:07:11 load avg: 3.01 running (2): test_gdb.test_backtrace (7 min 11 sec), test_gdb.test_pretty_print (7 min 11 sec)0:07:19 load avg: 3.01 [2/3] test_gdb.test_pretty_print passed (7 min 19 sec) -- running (1): test_gdb.test_backtrace (7 min 19 sec)0:07:49 load avg: 2.55 running (1): test_gdb.test_backtrace (7 min 49 sec)0:08:19 load avg: 2.18 running (1): test_gdb.test_backtrace (8 min 19 sec)0:08:49 load avg: 1.71 running (1): test_gdb.test_backtrace (8 min 49 sec)0:09:19 load avg: 1.67 running (1): test_gdb.test_backtrace (9 min 19 sec)0:09:49 load avg: 1.46 running (1): test_gdb.test_backtrace (9 min 49 sec)0:10:19 load avg: 1.28 running (1): test_gdb.test_backtrace (10 min 19 sec)0:10:49 load avg: 1.17 running (1): test_gdb.test_backtrace (10 min 49 sec)0:11:19 load avg: 1.10 running (1): test_gdb.test_backtrace (11 min 19 sec)0:11:49 load avg: 1.06 running (1): test_gdb.test_backtrace (11 min 49 sec)0:12:02 load avg: 1.05 [3/3] test_gdb.test_backtrace passed (12 min 2 sec)== Tests result: SUCCESS ==10 slowest tests:- test_gdb.test_backtrace: 12 min 2 sec- test_gdb.test_pretty_print: 7 min 19 sec- test_gdb.test_misc: 1 min 41 secAll 3 tests OK.Total duration: 12 min 2 secTotal tests: run=51 skipped=1Total test files: run=3/3Result: SUCCESS

@vstinnervstinnerforce-pushed thesplit_test_gdb branch 2 times, most recently from754d551 to534bdadCompareSeptember 28, 2023 07:44
@vstinner
Copy link
MemberAuthor

vstinner commentedSep 28, 2023
edited
Loading

I splitted the test even more, I added test_cfunction and test_cfunction_full.

Timings on my Fedora 38 x86-64:

- test_gdb.test_pretty_print: 13.3 sec- test_gdb.test_cfunction: 10.5 sec- test_gdb.test_cfunction_full: 6.5 sec- test_gdb.test_misc: 3.9 sec- test_gdb.test_backtrace: 2.8 secTotal duration: 13.4 sec

Timings on RHEL8 ppc64le, buildbot with slowest test_gdb:

10 slowest tests:- test_gdb.test_cfunction: 9 min 33 sec- test_gdb.test_pretty_print: 8 min 36 sec- test_gdb.test_cfunction_full: 2 min 56 sec- test_gdb.test_misc: 1 min 49 sec- test_gdb.test_backtrace: 1 min 45 secTotal duration: 9 min 33 sec

@vstinnervstinnerforce-pushed thesplit_test_gdb branch 4 times, most recently from3c6bfc9 toc29b162CompareSeptember 28, 2023 10:30
@vstinner
Copy link
MemberAuthor

Hum, I went too far in terms of refactoring. I made this PR as simple as possible, to only split test_gdb into multiple files.

I will write a follow-up PR for the heavy refactoring.

Split test_gdb.py file into a test_gdb package made of multipletests, so tests can now be run in parallel.* Create Lib/test/test_gdb/ directory.* Split test_gdb.py into multiple files in Lib/test/test_gdb/  directory.* Move Lib/test/gdb_sample.py to Lib/test/test_gdb/ directory.  Update get_sample_script(): use __file__ to locate gdb_sample.py.* Move gdb_has_frame_select() and HAS_PYUP_PYDOWN to test_misc.py.* Explicitly skip test_gdb on Windows. Previously, test_gdb was  skipped even if gdb was available because of  gdb_has_frame_select().
@vstinner
Copy link
MemberAuthor

I added 5 minutes to buildbot timeout:python/buildmaster-config#408 Before, buildbots alwaysremoved 5 minutes to their default timeout of 20 minutes. I fixed this issue to have use more consistent timeouts on all Python CIs.

@vstinnervstinner merged commit8f324b7 intopython:mainSep 28, 2023
@vstinnervstinner deleted the split_test_gdb branchSeptember 28, 2023 11:24
@vstinnervstinner added the needs backport to 3.12only security fixes labelSep 28, 2023
@miss-islington
Copy link
Contributor

Thanks@vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry,@vstinner, I could not cleanly backport this to3.12 due to a conflict.
Please backport usingcherry_picker on command line.
cherry_picker 8f324b7ecd2df3036fab098c4c8ac185ac07b277 3.12

csm10495 pushed a commit to csm10495/cpython that referenced this pull requestSep 29, 2023
Split test_gdb.py file into a test_gdb package made of multipletests, so tests can now be run in parallel.* Create Lib/test/test_gdb/ directory.* Split test_gdb.py into multiple files in Lib/test/test_gdb/  directory.* Move Lib/test/gdb_sample.py to Lib/test/test_gdb/ directory.  Update get_sample_script(): use __file__ to locate gdb_sample.py.* Move gdb_has_frame_select() and HAS_PYUP_PYDOWN to test_misc.py.* Explicitly skip test_gdb on Windows. Previously, test_gdb was  skipped even if gdb was available because of  gdb_has_frame_select().
@vstinnervstinner added needs backport to 3.12only security fixes and removed needs backport to 3.12only security fixes labelsOct 4, 2023
@miss-islington
Copy link
Contributor

Thanks@vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry,@vstinner, I could not cleanly backport this to3.12 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker 8f324b7ecd2df3036fab098c4c8ac185ac07b277 3.12

vstinner added a commit to vstinner/cpython that referenced this pull requestOct 4, 2023
Split test_gdb.py file into a test_gdb package made of multipletests, so tests can now be run in parallel.* Create Lib/test/test_gdb/ directory.* Split test_gdb.py into multiple files in Lib/test/test_gdb/  directory.* Move Lib/test/gdb_sample.py to Lib/test/test_gdb/ directory.  Update get_sample_script(): use __file__ to locate gdb_sample.py.* Move gdb_has_frame_select() and HAS_PYUP_PYDOWN to test_misc.py.* Explicitly skip test_gdb on Windows. Previously, test_gdb was  skipped even if gdb was available because of  gdb_has_frame_select().(cherry picked from commit8f324b7)
@bedevere-app
Copy link

GH-110339 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelOct 4, 2023
vstinner added a commit that referenced this pull requestOct 4, 2023
…110339)gh-109972: Split test_gdb.py into test_gdb package (#109977)Split test_gdb.py file into a test_gdb package made of multipletests, so tests can now be run in parallel.* Create Lib/test/test_gdb/ directory.* Split test_gdb.py into multiple files in Lib/test/test_gdb/  directory.* Move Lib/test/gdb_sample.py to Lib/test/test_gdb/ directory.  Update get_sample_script(): use __file__ to locate gdb_sample.py.* Move gdb_has_frame_select() and HAS_PYUP_PYDOWN to test_misc.py.* Explicitly skip test_gdb on Windows. Previously, test_gdb was  skipped even if gdb was available because of  gdb_has_frame_select().(cherry picked from commit8f324b7)
vstinner added a commit to vstinner/cpython that referenced this pull requestOct 4, 2023
…on#109977) (python#110339)pythongh-109972: Split test_gdb.py into test_gdb package (python#109977)Split test_gdb.py file into a test_gdb package made of multipletests, so tests can now be run in parallel.* Create Lib/test/test_gdb/ directory.* Split test_gdb.py into multiple files in Lib/test/test_gdb/  directory.* Move Lib/test/gdb_sample.py to Lib/test/test_gdb/ directory.  Update get_sample_script(): use __file__ to locate gdb_sample.py.* Move gdb_has_frame_select() and HAS_PYUP_PYDOWN to test_misc.py.* Explicitly skip test_gdb on Windows. Previously, test_gdb was  skipped even if gdb was available because of  gdb_has_frame_select().(cherry picked from commit8f324b7)(cherry picked from commite7a61d3)
vstinner added a commit that referenced this pull requestOct 4, 2023
#110343)[3.12]gh-109972: Split test_gdb.py into test_gdb package (#109977) (#110339)gh-109972: Split test_gdb.py into test_gdb package (#109977)Split test_gdb.py file into a test_gdb package made of multipletests, so tests can now be run in parallel.* Create Lib/test/test_gdb/ directory.* Split test_gdb.py into multiple files in Lib/test/test_gdb/  directory.* Move Lib/test/gdb_sample.py to Lib/test/test_gdb/ directory.  Update get_sample_script(): use __file__ to locate gdb_sample.py.* Move gdb_has_frame_select() and HAS_PYUP_PYDOWN to test_misc.py.* Explicitly skip test_gdb on Windows. Previously, test_gdb was  skipped even if gdb was available because of  gdb_has_frame_select().(cherry picked from commit8f324b7)(cherry picked from commite7a61d3)
Glyphack pushed a commit to Glyphack/cpython that referenced this pull requestSep 2, 2024
Split test_gdb.py file into a test_gdb package made of multipletests, so tests can now be run in parallel.* Create Lib/test/test_gdb/ directory.* Split test_gdb.py into multiple files in Lib/test/test_gdb/  directory.* Move Lib/test/gdb_sample.py to Lib/test/test_gdb/ directory.  Update get_sample_script(): use __file__ to locate gdb_sample.py.* Move gdb_has_frame_select() and HAS_PYUP_PYDOWN to test_misc.py.* Explicitly skip test_gdb on Windows. Previously, test_gdb was  skipped even if gdb was available because of  gdb_has_frame_select().
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@vstinnervstinner

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@vstinner@miss-islington

[8]ページ先頭

©2009-2025 Movatter.jp