<div dir="ltr"><div>I get a failure in TestAliases.py without my change as well.  But the error I get is different than what you list  (occurs sooner at line 99).  It appears to be a bug in the test script itself, it's missing a space. on line 99 between the = and 'main.cpp'  Or am I running these tests wrong somehow?  If I add the space the test runs (without my diff).<br>
<br></div>I can see why my patch is causing the regression your reporting.  I think I'm going to have make the matches list remove dups (rather than just raw append).<br><div><br>matthews@matthews-linux:~/work/llvm/llvm/tools/lldb/test$ python dotest.py --executable ~/work/llvm/llvm/build/bin/lldb -q -p TestAliases.py<br>
UNSUPPORTED: LLDB (clang-x86_64) :: test_with_dsym (TestAliases.AliasTestCase) (requires Darwin) <br>FAIL: LLDB (clang-x86_64) :: test_with_dwarf (TestAliases.AliasTestCase)<br>======================================================================<br>
FAIL: test_with_dwarf (TestAliases.AliasTestCase)<br>----------------------------------------------------------------------<br>Traceback (most recent call last):<br>  File "/data/work/llvm/llvm/tools/lldb.svn/test/lldbtest.py", line 368, in wrapper<br>
    return func(self, *args, **kwargs)<br>  File "/data/work/llvm/llvm/tools/lldb.svn/test/functionalities/alias/TestAliases.py", line 24, in test_with_dwarf<br>    self.alias_tests ()<br>  File "/data/work/llvm/llvm/tools/lldb.svn/test/functionalities/alias/TestAliases.py", line 99, in alias_tests<br>
    "3: file ='main.cpp', line = 32, locations = 1" ])<br>  File "/data/work/llvm/llvm/tools/lldb.svn/test/lldbtest.py", line 1720, in expect<br>    msg if msg else EXP_MSG(str, exe))<br>AssertionError: False is not True : '3: file ='main.cpp', line = 32, locations = 1' returns expected result<br>
Config=x86_64-clang<br>----------------------------------------------------------------------<br>Ran 2 tests in 0.443s<br><br>FAILED (failures=1, skipped=1)<br><br><br><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Jun 14, 2013 at 12:15 PM, Kopec, Matt <span dir="ltr"><<a href="mailto:matt.kopec@intel.com" target="_blank">matt.kopec@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Matthew,<br>
<br>
I ran this patch against the lldb test suite and a regression came up. Here is how to quickly run the failing test and the corresponding output:<br>
<br>
mkopec1@mkopec1-linux:~/dev/llvm/tools/lldb/test$ python dotest.py --executable /home/mkopec1/dev/llvm/build/Debug+Asserts/bin/lldb -q -p TestAliases.py<br>
UNSUPPORTED: LLDB (clang-x86_64) :: test_with_dsym (TestAliases.AliasTestCase) (requires Darwin)<br>
FAIL: LLDB (clang-x86_64) :: test_with_dwarf (TestAliases.AliasTestCase)<br>
======================================================================<br>
FAIL: test_with_dwarf (TestAliases.AliasTestCase)<br>
----------------------------------------------------------------------<br>
Traceback (most recent call last):<br>
  File "/home/mkopec1/dev/llvm/tools/lldb/test/lldbtest.py", line 368, in wrapper<br>
    return func(self, *args, **kwargs)<br>
  File "/home/mkopec1/dev/llvm/tools/lldb/test/functionalities/alias/TestAliases.py", line 24, in test_with_dwarf<br>
    self.alias_tests ()<br>
  File "/home/mkopec1/dev/llvm/tools/lldb/test/functionalities/alias/TestAliases.py", line 139, in alias_tests<br>
    self.runCmd ("alias exprf2 expr --raw -f %1 --")<br>
  File "/home/mkopec1/dev/llvm/tools/lldb/test/lldbtest.py", line 1582, in runCmd<br>
    msg if msg else CMD_MSG(cmd))<br>
AssertionError: False is not True : Command 'alias exprf2 expr --raw -f %1 --' returns successfully<br>
Config=x86_64-clang<br>
----------------------------------------------------------------------<br>
Ran 2 tests in 0.633s<br>
<br>
FAILED (failures=1, skipped=1)<br>
<br>
Matt<br>
<div><div class="h5"><br>
On 2013-06-07, at 5:24 PM, Matthew Sorrels <<a href="mailto:sorrels.m@gmail.com">sorrels.m@gmail.com</a>> wrote:<br>
<br>
> When doing command completion with multiple command matches you will see the commands twice.  The best example of this bug is typing pl<tab><br>
><br>
> (lldb) pl<br>
> Available completions:<br>
>     platform<br>
>     plugin<br>
>     platform<br>
>     plugin<br>
><br>
><br>
> with this patch you get the expected result:<br>
><br>
> (lldb) pl<br>
> Available completions:<br>
>     platform<br>
>     plugin<br>
><br>
><br>
> The fix works because once an exact match for a command and a command+aliases fails it just asks for any inexact matches from both commands and aliases rather than asking for any inexact commands (which returns a list of matches) and then any inexact commands and aliases (which adds the commands to the list again plus any aliases).<br>

><br>
> If this seems reasonable, please commit it for me.  Thanks.<br>
><br>
><br>
> Index: source/Interpreter/CommandInterpreter.cpp<br>
> ===================================================================<br>
> --- source/Interpreter/CommandInterpreter.cpp    (revision 183564)<br>
> +++ source/Interpreter/CommandInterpreter.cpp    (working copy)<br>
> @@ -848,13 +848,7 @@<br>
>          command_obj = GetCommandSP (cmd_cstr, true, true, matches).get();<br>
>      }<br>
><br>
> -    // If there wasn't an exact match among the aliases, look for an inexact match<br>
> -    // in just the commands.<br>
> -<br>
> -    if (command_obj == NULL)<br>
> -        command_obj = GetCommandSP(cmd_cstr, false, false, matches).get();<br>
> -<br>
> -    // Finally, if there wasn't an inexact match among the commands, look for an inexact<br>
> +    // If there wasn't an exact match among the commands and aliases, look for an inexact<br>
>      // match in both the commands and aliases.<br>
>      if (command_obj == NULL)<br>
>          command_obj = GetCommandSP(cmd_cstr, true, false, matches).get();<br>
><br>
</div></div>> _______________________________________________<br>
> lldb-commits mailing list<br>
> <a href="mailto:lldb-commits@cs.uiuc.edu">lldb-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits</a><br>
<br>
</blockquote></div><br></div></div></div>