Page MenuHomePhabricator

Fix tests broken by OptionValidator changes.
ClosedPublic

Authored by zturner on Jul 8 2014, 2:32 PM.

Details

Summary

Fix tests broken by the OptionValidator changes.

The getopt library has a structure called option (lowercase). We have a structure called Option (uppercase). previously the two structures had exactly the same definitions, and we were doing a C-style cast of an Option* to an option*. C-style casts don't bother to warn you when you cast to unrelated types, but in the original OptionValidator patch I modified the definition of Option.

This patch fixes the errors by building an array of option structures and filling it out the correct way before passing it to the getopt library.

Note: So that the focus remains on the fix for the test failures, this patch does not include all the content of the original patch which was reverted. If this change is approved, it will go in as a single commit consisting of the original path (which has been reverted) combined with this patch.

Diff Detail

Event Timeline

zturner updated this revision to Diff 11171.Jul 8 2014, 2:32 PM
zturner retitled this revision from to Fix tests broken by OptionValidator changes..
zturner updated this object.
zturner edited the test plan for this revision. (Show Details)
zturner added a reviewer: tfiala.
zturner added a subscriber: Unknown Object (MLST).

Added lldb-commits to subscribers

tfiala edited edge metadata.Jul 8 2014, 4:13 PM

Working on this now.

tfiala added a comment.Jul 8 2014, 4:37 PM

The Linux build and tests look fine with this change here layered on top of a revert of r212543 via:
svn merge -c -212543 .

I'm waiting on the MacOSX build and test, should be done within 10 minutes.

tfiala added a comment.Jul 8 2014, 5:08 PM

I've done the test run on MacOSX. I am seeing 7 new failures there. I'm rerunning the tests once again to see if it was something intermittent.

tfiala added a comment.Jul 8 2014, 5:13 PM

I'm getting these failures on MacOSX:

Failing Tests (17)
FAIL: LLDB (suite) :: TestAbbreviations.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestCommandHistory.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestDataFormatterObjC.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestDataFormatterStdMap.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestDataFormatterStdVector.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestProcessLaunch.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestCreateAfterAttach.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestHelp.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestRegisterVariables.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestStepAndBreakpoints.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestObjCMethods.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestHiddenIvars.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestObjCDynamicSBType.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestObjCDynamicValue.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestRealDefinition.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestTargetAPI.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)
FAIL: LLDB (suite) :: TestSettings.py (Darwin tfiala-macbookpro.roam.corp.google.com 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64 i386)

11 of them were pre-existing (see lldb-dev mails earlier).

Trying this one one other machine to see if it's something specific to tfiala-macbookpro (OSX 10.9.3, Xcode 6 Beta).

zturner updated this revision to Diff 11180.Jul 8 2014, 8:40 PM
zturner edited edge metadata.

Fixes the rest of the test failures. These were tricky to catch because they were surfacing as core dumps, and when a test core dumps it does not generate a test log file. This needs to be fixed in the test suite separately.

tfiala added a comment.Jul 9 2014, 7:52 AM

Trying this sometime this morning.

tfiala accepted this revision.Jul 9 2014, 8:29 AM
tfiala edited edge metadata.

This ran clean on the Linux build. When you do the svn merge -c -212543 . command to undo 212543, don't miss the new option that was added (I think "count") when you do the fixup - otherwise we'll lose that new option.

Came back clean on MacOSX too (well, the stock 11 failed I get are still there).

This revision is now accepted and ready to land.Jul 9 2014, 8:29 AM
zturner closed this revision.Jul 9 2014, 9:40 AM
zturner updated this revision to Diff 11203.

Closed by commit rL212628 (authored by @zturner).