Skip to content

test_pdb fails with an --forever argument #121651

Closed

Description

@Eclips4

Bug report

Bug description:

./python -m test -v test_pdb --forever
== CPython 3.14.0a0 (heads/main:dc03ce797a, Jul 12 2024, 21:10:05) [Clang 15.0.0 (clang-1500.3.9.4)]
== macOS-14.5-arm64-arm-64bit-Mach-O little-endian
== Python build: debug
== cwd: /Users/admin/Projects/cpython/build/test_python_worker_92101æ
== CPU count: 8
== encodings: locale=UTF-8 FS=utf-8
== resources: all test resources are disabled, use -u option to unskip tests

Using random seed: 265477390
0:00:00 load avg: 1.70 Run tests sequentially in a single process
0:00:00 load avg: 1.70 [  1] test_pdb
test_checkline_after_reset (test.test_pdb.ChecklineTests.test_checkline_after_reset) ... ok
test_checkline_before_debugging (test.test_pdb.ChecklineTests.test_checkline_before_debugging) ... ok
test_checkline_is_not_executable (test.test_pdb.ChecklineTests.test_checkline_is_not_executable) ... ok
test_blocks_at_first_code_line (test.test_pdb.PdbTestCase.test_blocks_at_first_code_line) ... ok
test_breakpoint (test.test_pdb.PdbTestCase.test_breakpoint) ... ok
test_dir_as_script (test.test_pdb.PdbTestCase.test_dir_as_script) ... ok
test_errors_in_command (test.test_pdb.PdbTestCase.test_errors_in_command) ... ok
test_file_modified_after_execution (test.test_pdb.PdbTestCase.test_file_modified_after_execution) ... ok
test_file_modified_after_execution_with_multiple_instances (test.test_pdb.PdbTestCase.test_file_modified_after_execution_with_multiple_instances) ... ok
test_file_modified_after_execution_with_restart (test.test_pdb.PdbTestCase.test_file_modified_after_execution_with_restart) ... ok
test_find_function_empty_file (test.test_pdb.PdbTestCase.test_find_function_empty_file) ... ok
test_find_function_first_executable_line (test.test_pdb.PdbTestCase.test_find_function_first_executable_line) ... ok
test_find_function_found (test.test_pdb.PdbTestCase.test_find_function_found) ... ok
test_find_function_found_with_bom (test.test_pdb.PdbTestCase.test_find_function_found_with_bom) ... ok
test_find_function_found_with_encoding_cookie (test.test_pdb.PdbTestCase.test_find_function_found_with_encoding_cookie) ... ok
test_gh_93696_frozen_list (test.test_pdb.PdbTestCase.test_gh_93696_frozen_list) ... ok
test_gh_94215_crash (test.test_pdb.PdbTestCase.test_gh_94215_crash) ... ok
test_header (test.test_pdb.PdbTestCase.test_header) ... ok
test_invalid_cmd_line_options (test.test_pdb.PdbTestCase.test_invalid_cmd_line_options) ... ok
test_issue13120 (test.test_pdb.PdbTestCase.test_issue13120) ... ok
test_issue13183 (test.test_pdb.PdbTestCase.test_issue13183) ... ok
test_issue16180 (test.test_pdb.PdbTestCase.test_issue16180) ... ok
test_issue26053 (test.test_pdb.PdbTestCase.test_issue26053) ... ok
test_issue34266 (test.test_pdb.PdbTestCase.test_issue34266)
do_run handles exceptions from parsing its arg ... ok
test_issue36250 (test.test_pdb.PdbTestCase.test_issue36250) ... ok
test_issue42383 (test.test_pdb.PdbTestCase.test_issue42383) ... ok
test_issue42384 (test.test_pdb.PdbTestCase.test_issue42384)
When running `python foo.py` sys.path[0] is an absolute path. `python -m pdb foo.py` should behave the same ... ok
test_issue42384_symlink (test.test_pdb.PdbTestCase.test_issue42384_symlink)
When running `python foo.py` sys.path[0] resolves symlinks. `python -m pdb foo.py` should behave the same ... ok
test_issue46434 (test.test_pdb.PdbTestCase.test_issue46434) ... ok
test_issue7964 (test.test_pdb.PdbTestCase.test_issue7964) ... ok
test_issue84583 (test.test_pdb.PdbTestCase.test_issue84583) ... ok
test_module_is_run_as_main (test.test_pdb.PdbTestCase.test_module_is_run_as_main) ... ok
test_module_without_a_main (test.test_pdb.PdbTestCase.test_module_without_a_main) ... ok
test_non_utf8_encoding (test.test_pdb.PdbTestCase.test_non_utf8_encoding) ... ok
test_nonexistent_module (test.test_pdb.PdbTestCase.test_nonexistent_module) ... ok
test_package_without_a_main (test.test_pdb.PdbTestCase.test_package_without_a_main) ... ok
test_pdbrc_alias (test.test_pdb.PdbTestCase.test_pdbrc_alias) ... ok
test_pdbrc_basic (test.test_pdb.PdbTestCase.test_pdbrc_basic) ... ok
test_pdbrc_commands (test.test_pdb.PdbTestCase.test_pdbrc_commands) ... ok
test_pdbrc_empty_line (test.test_pdb.PdbTestCase.test_pdbrc_empty_line)
Test that empty lines in .pdbrc are ignored. ... ok
test_pdbrc_semicolon (test.test_pdb.PdbTestCase.test_pdbrc_semicolon) ... ok
test_post_mortem_restart (test.test_pdb.PdbTestCase.test_post_mortem_restart) ... ok
test_readrc_homedir (test.test_pdb.PdbTestCase.test_readrc_homedir) ... ok
test_readrc_kwarg (test.test_pdb.PdbTestCase.test_readrc_kwarg) ... ok
test_relative_imports (test.test_pdb.PdbTestCase.test_relative_imports) ... ok
test_relative_imports_on_plain_module (test.test_pdb.PdbTestCase.test_relative_imports_on_plain_module) ... ok
test_run_module (test.test_pdb.PdbTestCase.test_run_module) ... ok
test_run_module_with_args (test.test_pdb.PdbTestCase.test_run_module_with_args) ... ok
test_run_pdb_with_pdb (test.test_pdb.PdbTestCase.test_run_pdb_with_pdb) ... ok
test_safe_path (test.test_pdb.PdbTestCase.test_safe_path)
With safe_path set, pdb should not mangle sys.path[0] ... ok
test_spec (test.test_pdb.PdbTestCase.test_spec) ... ok
test_zipapp (test.test_pdb.PdbTestCase.test_zipapp) ... ok
setUpClass (test.test_pdb.PdbTestReadline) ... skipped 'libedit readline is not supported for pdb'
test_convenience_variables (test.test_pdb)
Doctest: test.test_pdb.test_convenience_variables ... ok
test_list_commands (test.test_pdb)
Doctest: test.test_pdb.test_list_commands ... ok
test_next_until_return_at_return_event (test.test_pdb)
Doctest: test.test_pdb.test_next_until_return_at_return_event ... ok
test_pdb_alias_command (test.test_pdb)
Doctest: test.test_pdb.test_pdb_alias_command ... ok
test_pdb_ambiguous_statements (test.test_pdb)
Doctest: test.test_pdb.test_pdb_ambiguous_statements ... ok
test_pdb_basic_commands (test.test_pdb)
Doctest: test.test_pdb.test_pdb_basic_commands ... ok
test_pdb_breakpoint_commands (test.test_pdb)
Doctest: test.test_pdb.test_pdb_breakpoint_commands ... ok
test_pdb_breakpoint_with_filename (test.test_pdb)
Doctest: test.test_pdb.test_pdb_breakpoint_with_filename ... ok
test_pdb_breakpoints_preserved_across_interactive_sessions (test.test_pdb)
Doctest: test.test_pdb.test_pdb_breakpoints_preserved_across_interactive_sessions ... ok
test_pdb_closure (test.test_pdb)
Doctest: test.test_pdb.test_pdb_closure ... ok
test_pdb_continue_in_bottomframe (test.test_pdb)
Doctest: test.test_pdb.test_pdb_continue_in_bottomframe ... ok
test_pdb_display_command (test.test_pdb)
Doctest: test.test_pdb.test_pdb_display_command ... ok
test_pdb_displayhook (test.test_pdb)
Doctest: test.test_pdb.test_pdb_displayhook ... ok
test_pdb_empty_line (test.test_pdb)
Doctest: test.test_pdb.test_pdb_empty_line ... ok
test_pdb_f_trace_lines (test.test_pdb)
Doctest: test.test_pdb.test_pdb_f_trace_lines ... ok
test_pdb_function_break (test.test_pdb)
Doctest: test.test_pdb.test_pdb_function_break ... ok
test_pdb_interact_command (test.test_pdb)
Doctest: test.test_pdb.test_pdb_interact_command ... ok
test_pdb_invalid_arg (test.test_pdb)
Doctest: test.test_pdb.test_pdb_invalid_arg ... ok
test_pdb_issue_20766 (test.test_pdb)
Doctest: test.test_pdb.test_pdb_issue_20766 ... ok
test_pdb_issue_43318 (test.test_pdb)
Doctest: test.test_pdb.test_pdb_issue_43318 ... ok
test_pdb_issue_gh_101517 (test.test_pdb)
Doctest: test.test_pdb.test_pdb_issue_gh_101517 ... ok
test_pdb_issue_gh_101673 (test.test_pdb)
Doctest: test.test_pdb.test_pdb_issue_gh_101673 ... ok
test_pdb_issue_gh_103225 (test.test_pdb)
Doctest: test.test_pdb.test_pdb_issue_gh_103225 ... ok
test_pdb_issue_gh_108976 (test.test_pdb)
Doctest: test.test_pdb.test_pdb_issue_gh_108976 ... ok
test_pdb_issue_gh_65052 (test.test_pdb)
Doctest: test.test_pdb.test_pdb_issue_gh_65052 ... ok
test_pdb_issue_gh_80731 (test.test_pdb)
Doctest: test.test_pdb.test_pdb_issue_gh_80731 ... ok
test_pdb_issue_gh_91742 (test.test_pdb)
Doctest: test.test_pdb.test_pdb_issue_gh_91742 ... ok
test_pdb_issue_gh_94215 (test.test_pdb)
Doctest: test.test_pdb.test_pdb_issue_gh_94215 ... ok
test_pdb_multiline_statement (test.test_pdb)
Doctest: test.test_pdb.test_pdb_multiline_statement ... ok
test_pdb_next_command_for_asyncgen (test.test_pdb)
Doctest: test.test_pdb.test_pdb_next_command_for_asyncgen ... ok
test_pdb_next_command_for_coroutine (test.test_pdb)
Doctest: test.test_pdb.test_pdb_next_command_for_coroutine ... ok
test_pdb_next_command_for_generator (test.test_pdb)
Doctest: test.test_pdb.test_pdb_next_command_for_generator ... ok
test_pdb_next_command_in_generator_for_loop (test.test_pdb)
Doctest: test.test_pdb.test_pdb_next_command_in_generator_for_loop ... ok
test_pdb_next_command_subiterator (test.test_pdb)
Doctest: test.test_pdb.test_pdb_next_command_subiterator ... ok
test_pdb_pp_repr_exc (test.test_pdb)
Doctest: test.test_pdb.test_pdb_pp_repr_exc ... ok
test_pdb_return_command_for_coroutine (test.test_pdb)
Doctest: test.test_pdb.test_pdb_return_command_for_coroutine ... ok
test_pdb_return_command_for_generator (test.test_pdb)
Doctest: test.test_pdb.test_pdb_return_command_for_generator ... ok
test_pdb_return_to_different_file (test.test_pdb)
Doctest: test.test_pdb.test_pdb_return_to_different_file ... ok
test_pdb_run_with_code_object (test.test_pdb)
Doctest: test.test_pdb.test_pdb_run_with_code_object ... ok
test_pdb_run_with_incorrect_argument (test.test_pdb)
Doctest: test.test_pdb.test_pdb_run_with_incorrect_argument ... ok
test_pdb_show_attribute_and_item (test.test_pdb)
Doctest: test.test_pdb.test_pdb_show_attribute_and_item ... ok
test_pdb_skip_modules (test.test_pdb)
Doctest: test.test_pdb.test_pdb_skip_modules ... ok
test_pdb_skip_modules_with_callback (test.test_pdb)
Doctest: test.test_pdb.test_pdb_skip_modules_with_callback ... ok
test_pdb_until_command_for_coroutine (test.test_pdb)
Doctest: test.test_pdb.test_pdb_until_command_for_coroutine ... ok
test_pdb_until_command_for_generator (test.test_pdb)
Doctest: test.test_pdb.test_pdb_until_command_for_generator ... ok
test_pdb_whatis_command (test.test_pdb)
Doctest: test.test_pdb.test_pdb_whatis_command ... ok
test_pdb_where_command (test.test_pdb)
Doctest: test.test_pdb.test_pdb_where_command ... ok
test_pdb_with_inline_breakpoint (test.test_pdb)
Doctest: test.test_pdb.test_pdb_with_inline_breakpoint ... ok
test_post_mortem (test.test_pdb)
Doctest: test.test_pdb.test_post_mortem ... ok
test_post_mortem_cause_no_context (test.test_pdb)
Doctest: test.test_pdb.test_post_mortem_cause_no_context ... ok
test_post_mortem_chained (test.test_pdb)
Doctest: test.test_pdb.test_post_mortem_chained ... ok
test_post_mortem_complex (test.test_pdb)
Doctest: test.test_pdb.test_post_mortem_complex ... ok
test_post_mortem_context_of_the_cause (test.test_pdb)
Doctest: test.test_pdb.test_post_mortem_context_of_the_cause ... ok
test_post_mortem_from_no_stack (test.test_pdb)
Doctest: test.test_pdb.test_post_mortem_from_no_stack ... ok
test_post_mortem_from_none (test.test_pdb)
Doctest: test.test_pdb.test_post_mortem_from_none ... ok
test_post_mortem_single_no_stack (test.test_pdb)
Doctest: test.test_pdb.test_post_mortem_single_no_stack ... ok

----------------------------------------------------------------------
Ran 108 tests in 4.367s

OK (skipped=1)
0:00:04 load avg: 1.80 [  2] test_pdb
test_checkline_after_reset (test.test_pdb.ChecklineTests.test_checkline_after_reset) ... ok
test_checkline_before_debugging (test.test_pdb.ChecklineTests.test_checkline_before_debugging) ... ok
test_checkline_is_not_executable (test.test_pdb.ChecklineTests.test_checkline_is_not_executable) ... ok
test_blocks_at_first_code_line (test.test_pdb.PdbTestCase.test_blocks_at_first_code_line) ... ok
test_breakpoint (test.test_pdb.PdbTestCase.test_breakpoint) ... ok
test_dir_as_script (test.test_pdb.PdbTestCase.test_dir_as_script) ... ok
test_errors_in_command (test.test_pdb.PdbTestCase.test_errors_in_command) ... ok
test_file_modified_after_execution (test.test_pdb.PdbTestCase.test_file_modified_after_execution) ... ok
test_file_modified_after_execution_with_multiple_instances (test.test_pdb.PdbTestCase.test_file_modified_after_execution_with_multiple_instances) ... ok
test_file_modified_after_execution_with_restart (test.test_pdb.PdbTestCase.test_file_modified_after_execution_with_restart) ... ok
test_find_function_empty_file (test.test_pdb.PdbTestCase.test_find_function_empty_file) ... ok
test_find_function_first_executable_line (test.test_pdb.PdbTestCase.test_find_function_first_executable_line) ... ok
test_find_function_found (test.test_pdb.PdbTestCase.test_find_function_found) ... ok
test_find_function_found_with_bom (test.test_pdb.PdbTestCase.test_find_function_found_with_bom) ... ok
test_find_function_found_with_encoding_cookie (test.test_pdb.PdbTestCase.test_find_function_found_with_encoding_cookie) ... ok
test_gh_93696_frozen_list (test.test_pdb.PdbTestCase.test_gh_93696_frozen_list) ... ok
test_gh_94215_crash (test.test_pdb.PdbTestCase.test_gh_94215_crash) ... ok
test_header (test.test_pdb.PdbTestCase.test_header) ... FAIL

======================================================================
FAIL: test_header (test.test_pdb.PdbTestCase.test_header)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/admin/Projects/cpython/Lib/test/test_pdb.py", line 3394, in test_header
    self.assertEqual(stdout.getvalue(), header + '\n')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '' != 'Nobody expects... blah, blah, blah\n'
+ Nobody expects... blah, blah, blah


----------------------------------------------------------------------
Ran 18 tests in 0.812s

FAILED (failures=1)
test test_pdb failed

== Tests result: FAILURE ==

1 test failed:
    test_pdb

1 test OK.

Total duration: 5.4 sec
Total tests: run=126 failures=1 skipped=1
Total test files: run=2 failed=1
Result: FAILURE

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    testsTests in the Lib/test dir
    on Jul 12, 2024
  2. Eclips4 commented on Jul 12, 2024

    @Eclips4
    MemberAuthor
  3. Eclips4 commented on Jul 12, 2024

    @Eclips4
    MemberAuthor

    Bisected to 690b935

  4. added a commit that references this issue on Jul 13, 2024
  5. gaogaotiantian commented on Jul 13, 2024

    @gaogaotiantian
    Member

    Fixed in #121724

  6. added a commit that references this issue on Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions