This is an archive of the discontinued LLVM Phabricator instance.

Add/update tests for lldb-mi
ClosedPublic

Authored by ki.stfu on Feb 4 2015, 7:56 AM.

Details

Summary

This patch includes following changes:

  • Fix comments and code style
  • Add new tests for many commands
  • Improve existing tests
  • Merge MiProgramArgsTestCase and MiExecTestCase
  • Improve runCmd of MiTestCaseBase: add exactly option
  • Improve test example (make it more complicated)

All tests pass on OS X.

Some of them are skipped. Soon I'll submit patches for them (they have been made already, but I can't submit them because not all my patches were accepted).

Some of tests are skipped because they require following patches:

Diff Detail

Event Timeline

ki.stfu updated this revision to Diff 19319.Feb 4 2015, 7:56 AM
ki.stfu retitled this revision from to Add/update tests for lldb-mi.
ki.stfu updated this object.
ki.stfu edited the test plan for this revision. (Show Details)
ki.stfu added reviewers: abidh, zturner, clayborg.
ki.stfu set the repository for this revision to rL LLVM.
ki.stfu added subscribers: Unknown Object (MLST), abidh, zturner, clayborg.
ki.stfu updated this object.Feb 4 2015, 8:05 AM
abidh edited edge metadata.Feb 4 2015, 9:11 AM

Some observations:

  1. I think you should have posted the pieces that dont depend on other patches. In this way, they can be reviewed and committed without waiting on others.
  2. The start and end address of 0 is still there in data disassemble command. Probably we can use a function address as start. Then end address can be start + 20 or something. If $pc is supported then that can be used too. GDB does a similar thing.
  3. I don't like interpreter-exec much. I think it should only be used if you can not do stuff using other MI commands.
ki.stfu added a comment.EditedFeb 4 2015, 9:26 AM
In D7410#118414, @abidh wrote:

Some observations:

  1. I think you should have posted the pieces that dont depend on other patches. In this way, they can be reviewed and committed without waiting on others.

It doesn't depend on other patches. I meant that some tests were disabled, but we can enable them when these patches will be submitted.

  1. The start and end address of 0 is still there in data disassemble command. Probably we can use a function address as start. Then end address can be start + 20 or something. If $pc is supported then that can be used too. GDB does a similar thing.

I'll fix it.

  1. I don't like interpreter-exec much. I think it should only be used if you can not do stuff using other MI commands.

I'll fix it where it's possible

clayborg accepted this revision.Feb 4 2015, 10:54 AM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Feb 4 2015, 10:54 AM
ki.stfu updated this revision to Diff 19352.Feb 4 2015, 2:54 PM
ki.stfu edited edge metadata.
ki.stfu removed rL LLVM as the repository for this revision.

Fix remarks:

  • Improve MiEvaluateTestCase (add more test cases, remove -interpreter-exec)
  • Improve -data-disassemble test (replace 0x0 to real address)

Can anyone commit it for me?

ki.stfu updated this object.Feb 4 2015, 3:11 PM
abidh added a comment.Feb 5 2015, 2:14 AM

I will commit it later today. Some of the tests fails on Linux. I am just looking if I can fix them. You should get commit access now so that you can commit your own patches.

abidh closed this revision.Feb 5 2015, 2:37 AM

Committed in 228286.

test/tools/lldb-mi/TestMiNotification.py