Skip to content
  1. Aug 16, 2011
  2. Aug 12, 2011
    • Johnny Chen's avatar
      Add TestInferiorChanged.py to test that lldb reloads the inferior after it was... · 9f4f5d94
      Johnny Chen authored
      Add TestInferiorChanged.py to test that lldb reloads the inferior after it was changed during the debug session.
      First, main.c causes a crash, the inferior then gets re-built with main2.c which is not crashing.
      
      Add Base.cleanup(self, dictionary=None) for platform specfic way to do cleanup after build.
      This plugin method is used by the above test case to cleanup the main.c build before rebuild for main2.c.
      
      llvm-svn: 137500
      9f4f5d94
  3. Aug 11, 2011
  4. Aug 05, 2011
    • Johnny Chen's avatar
      o modify-python-lldb.py: · 36c5eb13
      Johnny Chen authored
        Add the rich comparison methods (__eq__, __ne__) to SBType, too.
      
      o lldbtest.py:
      
        Add debug utility method TestBase.DebugSBType().
      
      o test/python_api/type:
      
        Add tests for exercising SBType/SBTypeList API, including the SBTarget.FindTypes(type_name)
        API which returns a SBTypeList matching the type_name.
      
      llvm-svn: 136975
      36c5eb13
  5. Aug 03, 2011
    • Johnny Chen's avatar
      Add the real benchmarks comparing lldb against gdb for repeated expression evaluations. · aaa82ff9
      Johnny Chen authored
      Modify lldbbench.py so that lldbtest.line_number() utility function is available to
      BenchBase client as just line_number(), and modify lldbtest.py so that self.lldbExec
      (the full path for the 'lldb' executable) is available to BenchBase client as well.
      
      An example run of the test case on my MacBook Pro running Lion:
      
      1: test_compare_lldb_to_gdb (TestRepeatedExprs.RepeatedExprsCase)
         Test repeated expressions with lldb vs. gdb. ... 
      lldb_avg: 0.204339
      gdb_avg: 0.205721
      lldb_avg/gdb_avg: 0.993284
      ok
      
      llvm-svn: 136740
      aaa82ff9
  6. Aug 01, 2011
  7. Jul 30, 2011
    • Johnny Chen's avatar
      Add a @benchmarks_test decorator for test method we want to categorize as benchmarks test. · 5ccbccfc
      Johnny Chen authored
      The test driver now takes an option "+b" which enables to run just the benchmarks tests.
      By default, tests decorated with the @benchmarks_test decorator do not get run.
      
      Add an example benchmarks test directory which contains nothing for the time being,
      just to demonstrate the @benchmarks_test concept.
      
      For example,
      
      $ ./dotest.py -v benchmarks
      
      ...
      
      ----------------------------------------------------------------------
      Collected 2 tests
      
      1: test_with_gdb (TestRepeatedExprs.RepeatedExprssCase)
         Test repeated expressions with gdb. ... skipped 'benchmarks tests'
      2: test_with_lldb (TestRepeatedExprs.RepeatedExprssCase)
         Test repeated expressions with lldb. ... skipped 'benchmarks tests'
      
      ----------------------------------------------------------------------
      Ran 2 tests in 0.047s
      
      OK (skipped=2)
      $ ./dotest.py -v +b benchmarks
      
      ...
      
      ----------------------------------------------------------------------
      Collected 2 tests
      
      1: test_with_gdb (TestRepeatedExprs.RepeatedExprssCase)
         Test repeated expressions with gdb. ... running test_with_gdb
      benchmarks result for test_with_gdb
      ok
      2: test_with_lldb (TestRepeatedExprs.RepeatedExprssCase)
         Test repeated expressions with lldb. ... running test_with_lldb
      benchmarks result for test_with_lldb
      ok
      
      ----------------------------------------------------------------------
      Ran 2 tests in 0.270s
      
      OK
      
      Also mark some Python API tests which are missing the @python_api_test decorator.
      
      llvm-svn: 136553
      5ccbccfc
  8. Jul 16, 2011
  9. Jul 11, 2011
  10. Jun 27, 2011
    • Johnny Chen's avatar
      Add TestPrintObj.py to go with lang/objc/print-objc, which: · 89109ed1
      Johnny Chen authored
      Test "print object" where another thread blocks the print object from making progress.
      
      Set a breakpoint on the line in my_pthread_routine.  Then switch threads
      to the main thread, and do print the lock_me object.  Since that will
      try to get the lock already gotten by my_pthread_routime thread, it will
      have to switch to running all threads, and that should then succeed.
      
      llvm-svn: 133933
      89109ed1
  11. Jun 24, 2011
    • Johnny Chen's avatar
      o lldbtest.py: · b7373c92
      Johnny Chen authored
      Assign the test method name to self.testMethodName.  This can be useful for the
      test directory (see test/types for a good example) which houses a bunch of executables
      compiled from different source files.  The default build action is to create a.out as
      the binary executable, which can confuse the module cacheing mechanism and result in
      the debugger getting a stale image as the target to be debugged, and chaos ensues.
      
      o AbstractBase.py, TestThreadAPI.py:
      
      Use self.testMethodName to our advantage.
      
      o TestLoadUnload.py:
      
      Add expected failure marker to test case test_modules_search_paths().
      
      llvm-svn: 133768
      b7373c92
  12. Jun 21, 2011
  13. Jun 20, 2011
  14. Jun 15, 2011
    • Johnny Chen's avatar
      Simplify the base test class. Remove keyword argument setCookie from TestBase.runCmd() and · 5b67ca8c
      Johnny Chen authored
      remove the self.runStarted attribute since the automatic shutdown of processes associated
      with the targets are now performed automatically.
      
      llvm-svn: 133092
      5b67ca8c
    • Johnny Chen's avatar
      Add an API to SBDebugger class: · 3794ad95
      Johnny Chen authored
          bool SBDebugger::DeleteTarget(lldb::SBTarget &target);
      
      which is used in the test tearDown() phase to cleanup the debugger's target list
      so that it won't grow larger and larger as test cases are executed.  This is also
      a good opportunity to get rid of the arcane requirement that test cases exercising
      the Python API must assign the process object to self.process so that it gets
      shutdown gracefully.  Instead, the shutdown of the process associated with each
      target is now being now automatically.
      
      Also get rid of an API from SBTarget class:
      
          SBTarget::DeleteTargetFromList(lldb_private::TargetList *list);
      
      llvm-svn: 133091
      3794ad95
  15. Jun 14, 2011
  16. Jun 06, 2011
  17. Jun 01, 2011
  18. May 28, 2011
  19. May 25, 2011
  20. May 07, 2011
  21. May 06, 2011
  22. May 05, 2011
  23. May 04, 2011
  24. May 03, 2011
  25. Apr 27, 2011
  26. Apr 22, 2011
  27. Apr 19, 2011
  28. Apr 18, 2011
  29. Apr 15, 2011
  30. Mar 23, 2011
    • Johnny Chen's avatar
      Turns out that the test failure wrt: · ac77f3b2
      Johnny Chen authored
          rdar://problem/9173060 lldb hangs while running unique-types
      
      disappears if running with clang version >= 3.  Modify the TestUniqueTypes.py
      to detect if we are running with clang version < 3 and, if true, skip the test.
      
      Update the lldbtest.system() function to return a tuple of (stdoutdata, stderrdata)
      since we need the stderr data from "clang -v" command.  Modify existing clients of
      lldbtest.system() to now use, for example:
      
               # First, capture the golden output emitted by the oracle, i.e., the
               # series of printf statements.
      -        go = system("./a.out", sender=self)
      +        go = system("./a.out", sender=self)[0]
               # This golden list contains a list of (variable, value) pairs extracted
               # from the golden output.
               gl = []
      
      And add two utility functions to lldbutil.py.
      
      llvm-svn: 128162
      ac77f3b2
Loading