[Bug 18816] New: TestAbbreviations.py is failing on Linux.

Bug ID 18816
Summary TestAbbreviations.py is failing on Linux.
Product lldb
Version unspecified
Hardware PC
OS Linux
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@cs.uiuc.edu
Reporter tfiala@google.com
Classification Unclassified

FAIL: LLDB (suite) :: TestAbbreviations.py (Linux tfiala2.mtv.corp.google.com
3.2.5-gg1336 #1 SMP Thu Aug 29 02:37:18 PDT 2013 x86_64 x86_64)

Synched to lldb svn r201214.

Output:

Session info generated @ Wed Feb 12 09:35:21 2014
runCmd: ap script
output: The following built-in commands may relate to 'script':
breakpoint command add  -- Add a set of commands to a breakpoint, to be
                           executed whenever the breakpoint is hit.
breakpoint command list -- List the script or set of commands to be executed
                           when the breakpoint is hit.
breakpoint list         -- List some or all breakpoints at configurable levels
                           of detail.
command alias           -- Allow users to define their own debugger command
                           abbreviations.
command script          -- A set of commands for managing or customizing script
                           commands.
command script add      -- Add a scripted function as an LLDB command.
command script clear    -- Delete all scripted commands.
command script delete   -- Delete a scripted command.
command script import   -- Import a scripting module in LLDB.
command script list     -- List defined scripted commands.
expression              -- Evaluate a C/ObjC/C++ expression in the current
                           program context, using user defined variables and
                           variables currently in scope.
frame variable          -- Show frame variables. All argument and local
                           variables that are in scope will be shown when no
                           arguments are given. If any arguments are specified,
                           they can be names of argument, local, file static
                           and file global variables. Children of aggregate
                           variables can be specified such as 'var->child.x'.
memory read             -- Read from the memory of the process being debugged.
script                  -- Pass an expression to the script interpreter for
                           evaluation and return the results. Drop into the
                           interactive interpreter if no expression is given.
target variable         -- Read global variable(s) prior to, or while running
                           your binary.
type summary add        -- Add a new summary style for a type.
watchpoint command add  -- Add a set of commands to a watchpoint, to be
                           executed whenever the watchpoint is hit.
watchpoint command list -- List the script or set of commands to be executed
                           when the watchpoint is hit.
watchpoint list         -- List all watchpoints at configurable levels of
                           detail.

The following settings variables may relate to 'script': 

script-lang -- The script language to be used for evaluating user-written
    scripts.
target.load-script-from-symbol-file -- Allow LLDB to load scripting resources
    embedded in symbol files when available.
interpreter.stop-command-source-on-error -- If true, LLDB will stop running a
    'command source' script upon encountering an error.
plugin.process.gdb-remote.target-definition-file -- The file that provides the
    description for remote target registers.

Expecting start string: The following built-in commands may relate to 'script':
Matched

Expecting sub string: breakpoint command add
Matched

Expecting sub string: breakpoint command list
Matched

Expecting sub string: breakpoint list
Matched

Expecting sub string: command alias
Matched

Expecting sub string: expression
Matched

Expecting sub string: script
Matched

runCmd: com a alias com al
output: 

runCmd: alias gurp help
output: 

runCmd: gurp target create
output:    Create a target using the argument as the main executable.

Syntax: target create <cmd-options> <filename>

Command Options Usage:
  target create [-d] [-a <arch>] [-p <platform-name>] [-v <none>] [-b <none>]
[-S <filename>] [-c <filename>] [-P <path>] [-s <filename>] [-r <filename>]
<filename>

       -P <path> ( --platform-path <path> )
            Path to the remote file to use for this target.

       -S <filename> ( --sysroot <filename> )
            Specify the SDK root directory that contains a root of all remote
            system files.

       -a <arch> ( --arch <arch> )
            Specify the architecture for the target.

       -b <none> ( --build <none> )
            Specify the initial SDK build number.

       -c <filename> ( --core <filename> )
            Fullpath to a core file to use for this target.

       -d ( --no-dependents )
            Don't load dependent files when creating the target, just add the
            specified executable.

       -p <platform-name> ( --platform <platform-name> )
            Specify name of the platform to use for this target, creating the
            platform if necessary.

       -r <filename> ( --remote-file <filename> )
            Fullpath to the file on the remote host if debugging remotely.

       -s <filename> ( --symfile <filename> )
            Fullpath to a stand alone debug symbols file for when debug symbols
            are not in the executable.

       -v <none> ( --version <none> )
            Specify the initial SDK version to use prior to connecting.

This command takes options and free-form arguments.  If your arguments
   resemble option specifiers (i.e., they start with a - or --), you must use '
   -- ' between the end of the command options and the beginning of the
   arguments.

Expecting sub string: Syntax: target create <cmd-options> <filename>
Matched

runCmd: com u gurp
output: 

runCmd: gurp
check of return status not required
runCmd failed!
error: 'gurp' is not a valid command.

Expecting sub string: error: 'gurp' is not a valid command.
Matched

runCmd: h
output: The following is a list of built-in, permanent debugger commands:

_regexp-attach    -- Attach to a process id if in decimal, otherwise treat the
                     argument as a process name to attach to.
_regexp-break     -- Set a breakpoint using a regular expression to specify the
                     location, where <linenum> is in decimal and <address> is
                     in hex.
_regexp-bt        -- Show a backtrace.  An optional argument is accepted; if
                     that argument is a number, it specifies the number of
                     frames to display.  If that argument is 'all', full
                     backtraces of all threads are displayed.
_regexp-display   -- Add an expression evaluation stop-hook.
_regexp-down      -- Go down "n" frames in the stack (1 frame by default).
_regexp-env       -- Implements a shortcut to viewing and setting environment
                     variables.
_regexp-jump      -- Sets the program counter to a new address.
_regexp-list      -- Implements the GDB 'list' command in all of its forms
                     except FILE:FUNCTION and maps them to the appropriate
                     'source list' commands.
_regexp-tbreak    -- Set a one shot breakpoint using a regular expression to
                     specify the location, where <linenum> is in decimal and
                     <address> is in hex.
_regexp-undisplay -- Remove an expression evaluation stop-hook.
_regexp-up        -- Go up "n" frames in the stack (1 frame by default).
apropos           -- Find a list of debugger commands related to a particular
                     word/subject.
breakpoint        -- A set of commands for operating on breakpoints. Also see
                     _regexp-break.
command           -- A set of commands for managing or customizing the debugger
                     commands.
disassemble       -- Disassemble bytes in the current function, or elsewhere in
                     the executable program as specified by the user.
expression        -- Evaluate a C/ObjC/C++ expression in the current program
                     context, using user defined variables and variables
                     currently in scope.
frame             -- A set of commands for operating on the current thread's
                     frames.
gdb-remote        -- Connect to a remote GDB server.  If no hostname is
                     provided, localhost is assumed.
gui               -- Switch into the curses based GUI mode.
help              -- Show a list of all debugger commands, or give details
                     about specific commands.
kdp-remote        -- Connect to a remote KDP server.  udp port 41139 is the
                     default port number.
log               -- A set of commands for operating on logs.
memory            -- A set of commands for operating on memory.
platform          -- A set of commands to manage and create platforms.
plugin            -- A set of commands for managing or customizing plugin
                     commands.
process           -- A set of commands for operating on a process.
quit              -- Quit out of the LLDB debugger.
register          -- A set of commands to access thread registers.
script            -- Pass an expression to the script interpreter for
                     evaluation and return the results. Drop into the
                     interactive interpreter if no expression is given.
settings          -- A set of commands for manipulating internal settable
                     debugger variables.
source            -- A set of commands for accessing source file information
target            -- A set of commands for operating on debugger targets.
thread            -- A set of commands for operating on one or more threads
                     within a running process.
type              -- A set of commands for operating on the type system
version           -- Show version of LLDB debugger.
watchpoint        -- A set of commands for operating on watchpoints.

For more information on any particular command, try 'help <command-name>'.

Expecting start string: The following is a list of built-in, permanent debugger
commands:
Matched

Adding tearDown hook:         def cleanup():
            self.runCmd("command alias t thread select")

runCmd: command unalias t
output: 

runCmd: t
check of return status not required
runCmd failed!
Ambiguous command 't'. Possible matches:
    target
    thread
    type
    tbreak

Expecting sub string: Ambiguous command 't'. Possible matches:
Matched

Expecting sub string: target
Matched

Expecting sub string: thread
Matched

Expecting sub string: type
Matched

runCmd: com sou ./change_prompt.lldb
output: 

Expecting pattern: Executing commands in '.*change_prompt.lldb'
Not matched

FAIL

Executing tearDown hook:         def cleanup():
            self.runCmd("command alias t thread select")

runCmd: command alias t thread select
output: 

Traceback (most recent call last):
  File "/mnt/ssd/work/git/llgs/llvm/tools/lldb/test/lldbtest.py", line 599, in
wrapper
    func(*args, **kwargs)
  File
"/mnt/ssd/work/git/llgs/llvm/tools/lldb/test/functionalities/abbreviation/TestAbbreviations.py",
line 52, in test_nonrunning_command_abbreviations
    patterns = ["Executing commands in '.*change_prompt.lldb'"])
  File "/mnt/ssd/work/git/llgs/llvm/tools/lldb/test/lldbtest.py", line 2013, in
expect
    msg if msg else EXP_MSG(str, exe))
AssertionError: False is not True : 'com sou ./change_prompt.lldb' returns
expected result
Config=x86_64-/usr/local/gcc/gcc-current/bin/gcc

os command: [['/usr/local/gcc/gcc-current/bin/gcc', '-v']]
with pid: 1720
stdout: 
stderr: Using built-in specs.
COLLECT_GCC=/usr/local/gcc/gcc-current/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc/gcc-4.8.2/libexec/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.8.2/configure --prefix=/usr/local/gcc/gcc-4.8.2
Thread model: posix
gcc version 4.8.2 (GCC) 

retcode: 0

To rerun this test, issue the following command from the 'test' directory:

./dotest.py -A x86_64 -C /usr/local/gcc/gcc-current/bin/gcc -v -t -f
AbbreviationsTestCase.test_nonrunning_command_abbreviations

Todd Fiala changed bug 18816

What Removed Added
Status NEW RESOLVED
Resolution FIXED

Comment # 5 on bug 18816 from Todd Fiala

Sending        test/functionalities/abbreviation/TestAbbreviations.py
Transmitting file data .
Committed revision 201357.