[issue37382] Improve conditional check for test_gdb

2019-07-02 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > if a change like that is pushed, all the fleet has to be monitored for > potential failures, as there are many older OSes supported there. If this breaks some buildbots, then we can find out more precisely under which conditions they fail. For example, if

[issue37382] Improve conditional check for test_gdb

2019-06-26 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Maybe open an issue to attempt to install gdb on Travis CI? I created PR 14395 for this. -- ___ Python tracker ___

[issue37382] Improve conditional check for test_gdb

2019-06-26 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: There is a fleet of buildbots with a variety og versions of gcc and gdb, so if a change like that is pushed, all the fleet has to be monitored for potential failures, as there are many older OSes supported there. -- nosy: +cstratak

[issue37382] Improve conditional check for test_gdb

2019-06-26 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: These python_is_optimized() tests were added in #8605 and #13628. Those issues talk about tests failing when CPython is compiled with -O2 or -O3. But, as I said here, I see no problems today with gcc -O3. So I'm guessing that either gcc or gdb improved such

[issue37382] Improve conditional check for test_gdb

2019-06-26 Thread STINNER Victor
STINNER Victor added the comment: If you want to understand why tests are currently skipped when Python is optimized, you should dig into the Git history. Not simply remove the decorator because it looks wrong to you. There is likely a story behind it.

[issue37382] Improve conditional check for test_gdb

2019-06-26 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I meant this part in test_gdb.py: if ((sysconfig.get_config_var('PGO_PROF_USE_FLAG') or 'xxx') in (sysconfig.get_config_var('PY_CORE_CFLAGS') or '')): raise unittest.SkipTest("test_gdb is not reliable on PGO builds") --

[issue37382] Improve conditional check for test_gdb

2019-06-26 Thread STINNER Victor
STINNER Victor added the comment: > That's true but unrelated to this issue. We already skip test_gdb completely > when PGO is enabled. What do you mean? support.PGO is something different: it's only used while profiling Python before Python is recompiled a second time. --

[issue37382] Improve conditional check for test_gdb

2019-06-26 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +14209 pull_request: https://github.com/python/cpython/pull/14395 ___ Python tracker ___

[issue37382] Improve conditional check for test_gdb

2019-06-26 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > The worst debugging experience is provided by PGO build. That's true but unrelated to this issue. We already skip test_gdb completely when PGO is enabled. -- ___ Python tracker

[issue37382] Improve conditional check for test_gdb

2019-06-26 Thread STINNER Victor
STINNER Victor added the comment: > I do run test_gdb locally but it's not very useful since most tests are > skipped by default because python_is_optimized() is True. Ah, I forgot to mention that I always compile Python using: ./configure -C --with-pydebug CFLAGS="-O0" && make -O0 is not

[issue37382] Improve conditional check for test_gdb

2019-06-26 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > If you modify code which can impact test_gdb, you can run test_gdb locally I do run test_gdb locally but it's not very useful since most tests are skipped by default because python_is_optimized() is True. That's the whole point of this issue: tests are

[issue37382] Improve conditional check for test_gdb

2019-06-26 Thread STINNER Victor
STINNER Victor added the comment: > I haven't seen that problem. As I said, all GDB tests pass when compiled with > "-O3 -g". Again, it depends on the optimization level, but IMHO it's not worth it to implement an heuristic to check if gdb has enough info to run tests. > The fact that

[issue37382] Improve conditional check for test_gdb

2019-06-26 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Depending on the compiler optimization level, gdb may or may not br able to > read variables and function arguments. I haven't seen that problem. As I said, all GDB tests pass when compiled with "-O3 -g". > IHMO it is fine to skip test_gdb if Python "is

[issue37382] Improve conditional check for test_gdb

2019-06-26 Thread STINNER Victor
STINNER Victor added the comment: Depending on the compiler optimization level, gdb may or may not br able to read variables and function arguments. IHMO it is fine to skip test_gdb if Python "is optimized". I don't think it is worth it to check the exact optimizatio level. The worst

[issue37382] Improve conditional check for test_gdb

2019-06-24 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- keywords: +patch pull_requests: +14151 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14331 ___ Python tracker ___

[issue37382] Improve conditional check for test_gdb

2019-06-24 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: The tests FAIL when CPython is compiled with "-O0 -g0" (without optimizations, without debug info) but tests PASS when compiled with "-O3 -g", showing that the check for "-g" is the right one. -- ___ Python

[issue37382] Improve conditional check for test_gdb

2019-06-24 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : Many tests in test_gdb are not run if python_is_optimized() is true. However, it's not entirely clear why we have this condition. For example, on my system, with the default CPython configuration, Python *is* optimized but still all gdb tests pass if I