Bug 31576 - [gdb/testsuite] FAIL: gdb.python/py-missing-debug.exp: source python script
Summary: [gdb/testsuite] FAIL: gdb.python/py-missing-debug.exp: source python script
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: testsuite (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 16.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-29 09:23 UTC by Tom de Vries
Modified: 2024-09-08 05:47 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2024-03-29 09:23:14 UTC
I started a leap 15.5 container on an aarch64-linux fedora asahi system, and ran into:
...
(gdb) PASS: gdb.python/py-missing-debug.exp: initial checks: debug info no longer found
source /data/vries/gdb/build/gdb/testsuite/outputs/gdb.python/py-missing-debug/py-missing-debug.py^M
Python Exception <class 'ImportError'>: Module 'curses' is not installed.^M
Use:^M
  sudo zypper install python36-curses^M
to install it.^M
Error occurred in Python: Module 'curses' is not installed.^M
Use:^M
  sudo zypper install python36-curses^M
to install it.^M
(gdb) FAIL: gdb.python/py-missing-debug.exp: source python script
...

So, I need to add python3-curses to my package list.

But the FAIL should be an UNSUPPORTED instead.
Comment 2 Sourceware Commits 2024-09-08 05:46:03 UTC
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=29c70787112e01cd52b53bf14bdcacb0a11e0725

commit 29c70787112e01cd52b53bf14bdcacb0a11e0725
Author: Tom de Vries <tdevries@suse.de>
Date:   Sun Sep 8 07:46:09 2024 +0200

    [gdb/testsuite] Handle missing curses in gdb.python/py-missing-debug.exp
    
    On a system with python 3.6, module gdb.missing_debug imports module curses,
    so when running test-case gdb.python/py-missing-debug.exp on a system without
    that module installed, we run into:
    ...
    (gdb) source py-missing-debug.py^M
    Python Exception <class 'ImportError'>: Module 'curses' is not installed.^M
    Use:^M
      sudo zypper install python36-curses^M
    to install it.^M
    Error occurred in Python: Module 'curses' is not installed.^M
    Use:^M
      sudo zypper install python36-curses^M
    to install it.^M
    (gdb) FAIL: gdb.python/py-missing-debug.exp: source python script
    ...
    
    Fix this by issuing UNSUPPORTED instead, and bailing out.
    
    Tested on x86_64-linux.
    
    Approved-by: Kevin Buettner <kevinb@redhat.com>
    
    PR testsuite/31576
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31576
Comment 3 Tom de Vries 2024-09-08 05:47:09 UTC
Fixed.