public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/12227] New: -np needed to fix unreliable gdb.python/ testsuite results
@ 2010-11-18  3:45 jan.kratochvil at redhat dot com
  2010-11-18 13:18 ` [Bug python/12227] " jan.kratochvil at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2010-11-18  3:45 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12227

           Summary: -np needed to fix unreliable gdb.python/ testsuite
                    results
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: python
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jan.kratochvil@redhat.com


As a reproducer: Fedora 14 x86_64 system with gdb-7.2-23.fc14.x86_64 .
That means
  /usr/share/gdb/python/gdb/__init__.py
exists but
  /usr/share/gdb/python/gdb/command/pretty_printers.py
does not exist.

With FSF GDB HEAD 7.2.50.20101117-cvs on such system:
  ./configure --with-gdb-datadir=/usr/share/gdb
  make
  ./gdb/gdb -nx
  (gdb) set data-directory ./gdb/data-directory
  (gdb) python GdbSetPythonDirectory ('./gdb/data-directory/python')
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "<string>", line 48, in GdbSetPythonDirectory
    File "./gdb/data-directory/python/gdb/__init__.py", line 16, in <module>
      import gdb.command.pretty_printers
  ImportError: No module named pretty_printers
  Error while executing Python code.
  (gdb) q

The function gdb/testsuite/lib/gdb-python.exp gdb_check_python_config cannot
work as after the system Python scripts area already loaded it tries to:
        verbose -log "Installing system config from build tree."
        set gdb_data_dir "[pwd]/../data-directory"
        gdb_test_no_output "set data-directory $gdb_data_dir"
        gdb_test_no_output "python GdbSetPythonDirectory
('$gdb_data_dir/python')"

Even if Python modules can get unloaded this way still incompatible Python
system GDB modules could break a testsuite run for new GDB.

http://sourceware.org/gdb/wiki/2010_GCC_Summit_BoF
 * Testscase that test command completion, might be affected.
   * Do we want a new command-line option -np to deactivate this auto-loading?
   * Or should -nx turn off Python?

(I may have been pushing for -nx.)  But I see I use _always_ GDB with -nx as
packages contain unexpected .gdbinit  while I should normally use the Python
extensions so there should be some different option for it.

IMO the testsuite should always use this system-python-scripts disable and the
testfiles needing initialized python should load it by lib/gdb-python.exp .

I tried to patch it in but I see there more Python initialization decisions
need to be made in such patch.


Currently it causes:
Running gdb/testsuite/gdb.python/py-pp-maint.exp ...
PASS: gdb.python/py-pp-maint.exp: set data-directory
build-i686-redhat-linux-gnu/gdb/testsuite.unix.-m32/../data-directory
FAIL: gdb.python/py-pp-maint.exp: python GdbSetPythonDirectory
('build-i686-redhat-linux-gnu/gdb/testsuite.unix.-m32/../data-directory/python')
PASS: gdb.python/py-pp-maint.exp: b 67
PASS: gdb.python/py-pp-maint.exp: continue
FAIL: gdb.python/py-pp-maint.exp: info pretty-printer
FAIL: gdb.python/py-pp-maint.exp: info pretty-printer global .*function
FAIL: gdb.python/py-pp-maint.exp: info pretty-printer .* pp-test
PASS: gdb.python/py-pp-maint.exp: print flt enabled #1
PASS: gdb.python/py-pp-maint.exp: print ss enabled #1
FAIL: gdb.python/py-pp-maint.exp: disable pretty-printer
FAIL: gdb.python/py-pp-maint.exp: disable pretty-printer global
FAIL: gdb.python/py-pp-maint.exp: disable pretty-printer global
lookup_function_lookup_test
FAIL: gdb.python/py-pp-maint.exp: disable pretty-printer global pp-test:.*
FAIL: gdb.python/py-pp-maint.exp: info pretty-printer global .*function
FAIL: gdb.python/py-pp-maint.exp: info pretty-printer .* pp-test
FAIL: gdb.python/py-pp-maint.exp: print flt disabled
FAIL: gdb.python/py-pp-maint.exp: print ss disabled
FAIL: gdb.python/py-pp-maint.exp: enable pretty-printer global
lookup_function_lookup_test
FAIL: gdb.python/py-pp-maint.exp: enable pretty-printer global pp-test
FAIL: gdb.python/py-pp-maint.exp: enable pretty-printer global pp-test:.*ss.*
FAIL: gdb.python/py-pp-maint.exp: enable pretty-printer global pp-test:.*s.*
FAIL: gdb.python/py-pp-maint.exp: info pretty-printer
PASS: gdb.python/py-pp-maint.exp: print flt re-enabled
PASS: gdb.python/py-pp-maint.exp: print ss re-enabled

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug python/12227] -np needed to fix unreliable gdb.python/ testsuite results
  2010-11-18  3:45 [Bug python/12227] New: -np needed to fix unreliable gdb.python/ testsuite results jan.kratochvil at redhat dot com
@ 2010-11-18 13:18 ` jan.kratochvil at redhat dot com
  2010-12-07 19:22 ` cvs-commit at gcc dot gnu.org
  2010-12-12 11:25 ` jan.kratochvil at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2010-11-18 13:18 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12227

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-fedora14-linux-gnu
                 CC|                            |pmuldoon at redhat dot com,
                   |                            |tromey at redhat dot com
               Host|                            |x86_64-fedora14-linux-gnu
              Build|                            |x86_64-fedora14-linux-gnu

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug python/12227] -np needed to fix unreliable gdb.python/ testsuite results
  2010-11-18  3:45 [Bug python/12227] New: -np needed to fix unreliable gdb.python/ testsuite results jan.kratochvil at redhat dot com
  2010-11-18 13:18 ` [Bug python/12227] " jan.kratochvil at redhat dot com
@ 2010-12-07 19:22 ` cvs-commit at gcc dot gnu.org
  2010-12-12 11:25 ` jan.kratochvil at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2010-12-07 19:22 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12227

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2010-12-07 17:26:13 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    devans@sourceware.org    2010-12-07 17:26:06

Modified files:
    gdb            : ChangeLog NEWS main.c 
    gdb/doc        : ChangeLog gdb.texinfo 
    gdb/testsuite  : ChangeLog 
    gdb/testsuite/gdb.base: catch-syscall.exp 
    gdb/testsuite/lib: gdb-python.exp gdb.exp 
    gdb/testsuite/gdb.python: lib-types.exp py-pp-maint.exp 

Log message:
    PR python/12227
    * NEWS: Mention -data-directory.
    * main.c (captured_main): Recognize -data-directory.

    doc/
    * gdb.texinfo (Mode Options): Document -data-directory.
    (Data Files): Add reference to -data-directory.

    testsuite/
    * gdb.base/catch-syscall.exp (do_syscall_tests): Remove setting
    of data-directory.
    * lib/gdb-python.exp (gdb_check_python_config): Delete, all callers
    updated.
    * lib/gdb.exp (INTERNAL_GDBFLAGS): Add -data-directory.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.12359&r2=1.12360
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/NEWS.diff?cvsroot=src&r1=1.412&r2=1.413
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/main.c.diff?cvsroot=src&r1=1.87&r2=1.88
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/ChangeLog.diff?cvsroot=src&r1=1.1127&r2=1.1128
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.778&r2=1.779
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2524&r2=1.2525
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/catch-syscall.exp.diff?cvsroot=src&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/lib/gdb-python.exp.diff?cvsroot=src&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/lib/gdb.exp.diff?cvsroot=src&r1=1.160&r2=1.161
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.python/lib-types.exp.diff?cvsroot=src&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.python/py-pp-maint.exp.diff?cvsroot=src&r1=1.2&r2=1.3

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug python/12227] -np needed to fix unreliable gdb.python/ testsuite results
  2010-11-18  3:45 [Bug python/12227] New: -np needed to fix unreliable gdb.python/ testsuite results jan.kratochvil at redhat dot com
  2010-11-18 13:18 ` [Bug python/12227] " jan.kratochvil at redhat dot com
  2010-12-07 19:22 ` cvs-commit at gcc dot gnu.org
@ 2010-12-12 11:25 ` jan.kratochvil at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2010-12-12 11:25 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=12227

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2010-12-12 07:55:42 UTC ---
This is fixed now by Doug Evans.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-12  7:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18  3:45 [Bug python/12227] New: -np needed to fix unreliable gdb.python/ testsuite results jan.kratochvil at redhat dot com
2010-11-18 13:18 ` [Bug python/12227] " jan.kratochvil at redhat dot com
2010-12-07 19:22 ` cvs-commit at gcc dot gnu.org
2010-12-12 11:25 ` jan.kratochvil at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).