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

gh-109972: Enhance test_gdb #110026

Merged
merged 2 commits into from
Sep 28, 2023
Merged

gh-109972: Enhance test_gdb #110026

merged 2 commits into from
Sep 28, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 28, 2023

  • Split PyBtTests.test_pycfunction() into 2 files, test_cfunction and test_cfunction_full, and 6 functions:

    • test_pycfunction_noargs()
    • test_pycfunction_o()
    • test_pycfunction_varargs()
    • test_pycfunction_varargs_keywords()
    • test_pycfunction_fastcall()
    • test_pycfunction_fastcall_keywords()
  • In verbose mode, these "pycfunction" tests now log each tested call.

  • Move get_gdb_repr() to PrettyPrintTests.

  • Replace DebuggerTests.get_sample_script() with SAMPLE_SCRIPT.

  • Rename checkout_hook_path to CHECKOUT_HOOK_PATH.

  • Rename gdb_version to GDB_VERSION_TEXT.

  • Replace (gdb_major_version, gdb_minor_version) with GDB_VERSION.

  • run_gdb() uses "backslashreplace" error handler.

  • Add check_gdb() function to util.py.

  • Enhance support.check_cflags_pgo(): check also for sysconfig PGO_PROF_USE_FLAG (if available) in compiler flags.

@vstinner
Copy link
Member Author

@encukou: test_cfunction contains the following commented code:

            # XXX: bound methods don't yet give nice tracebacks
            # '_testcapi.MethInstance()',

Should we try to reenable it, or remove the test?

* Split PyBtTests.test_pycfunction() into 2 files, test_cfunction and
  test_cfunction_full, and 6 functions:

  * test_pycfunction_noargs()
  * test_pycfunction_o()
  * test_pycfunction_varargs()
  * test_pycfunction_varargs_keywords()
  * test_pycfunction_fastcall()
  * test_pycfunction_fastcall_keywords()

* In verbose mode, these "pycfunction" tests now log each tested
  call.
* Move get_gdb_repr() to PrettyPrintTests.
* Replace DebuggerTests.get_sample_script() with SAMPLE_SCRIPT.
* Rename checkout_hook_path to CHECKOUT_HOOK_PATH.
* Rename gdb_version to GDB_VERSION_TEXT.
* Replace (gdb_major_version, gdb_minor_version) with GDB_VERSION.
* run_gdb() uses "backslashreplace" error handler.
* Add check_gdb() function to util.py.
* Enhance support.check_cflags_pgo(): check also for sysconfig
  PGO_PROF_USE_FLAG (if available) in compiler flags.
* Move some SkipTest checks to test_gdb/__init__.py.
* Elaborate why gdb cannot be tested on Windows: gdb doesn't support
  PDB debug symbol files.
@vstinner
Copy link
Member Author

macOS failed with: FAIL: test_interprocess_signal (test.test_signal.PosixTests.test_interprocess_signal)

I created issue gh-110033 for this test failure.

@vstinner
Copy link
Member Author

Windows x86 failed with: ERROR: tearDownClass (test.test_multiprocessing_spawn.test_manager.WithManagerTestPool)

I created issue gh-110036 for this test failure.

@vstinner vstinner enabled auto-merge (squash) September 28, 2023 16:39
@vstinner vstinner merged commit 757cbd4 into python:main Sep 28, 2023
@vstinner vstinner deleted the enhance_test_gdb branch September 28, 2023 17:04
@encukou
Copy link
Member

encukou commented Oct 3, 2023

Well, try to reenable would be better?
I don't know much about gdb tests though, to be honest...

@vstinner
Copy link
Member Author

vstinner commented Oct 3, 2023

@encukou:

Well, try to reenable would be better?
I don't know much about gdb tests though, to be honest...

Right now, I'm still trying to fix test_gdb existing tests :-( #110166

@bedevere-app
Copy link

bedevere-app bot commented Oct 4, 2023

GH-110351 is a backport of this pull request to the 3.12 branch.

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.

2 participants