Clean up test results on Windows.

Remove XFAIL from some tests that now pass.
Add XFAIL to some tests that now fail.
Fix a crasher where a null pointer check isn't guarded.
Properly handle all types of errors in SymbolFilePDB.

llvm-svn: 269454
This commit is contained in:
Zachary Turner 2016-05-13 18:26:30 +00:00
parent 609fae3893
commit 4fd6a96008
12 changed files with 19 additions and 9 deletions

View File

@ -23,6 +23,7 @@ class TestExprLookupAnonStructTypedef(TestBase):
# Find the breakpoint
self.line = line_number('main.cpp', '// lldb testsuite break')
@expectedFailureAll(oslist=["windows"])
def test(self):
"""Test typedeffed untagged struct arguments for function call expressions"""
self.build()

View File

@ -57,7 +57,6 @@ class BasicExprCommandsTestCase(TestBase):
patterns = ["\(float\) \$.* = 2\.234"])
# (float) $2 = 2.234
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
def test_many_expr_commands(self):
self.build_and_run()

View File

@ -23,7 +23,6 @@ class DataFormatterSynthTypeTestCase(TestBase):
self.line = line_number('main.cpp', 'break here')
@skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24462, Data formatters have problems on Windows")
def test_with_run_command(self):
"""Test using Python synthetic children provider to provide a typename."""
self.build()

View File

@ -9,6 +9,7 @@ from __future__ import print_function
import os, time
import re
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
import lldbsuite.test.lldbutil as lldbutil
@ -22,6 +23,7 @@ class MemoryCacheTestCase(TestBase):
# Find the line number to break inside main().
self.line = line_number('main.cpp', '// Set break point at this line.')
@expectedFlakeyOS(oslist=["windows"])
def test_memory_cache(self):
"""Test the MemoryCache class with a sequence of 'memory read' and 'memory write' operations."""
self.build()

View File

@ -8,6 +8,7 @@ from __future__ import print_function
import os, time
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
import lldbsuite.test.lldbutil as lldbutil
@ -24,6 +25,7 @@ class WatchpointSetErrorTestCase(TestBase):
self.line = line_number(self.source, '// Set break point at this line.')
# Build dictionary to have unique executable names for each test method.
@expectedFailureAll(oslist=["windows"])
def test_error_cases_with_watchpoint_set(self):
"""Test error cases with the 'watchpoint set' command."""
self.build()

View File

@ -24,7 +24,6 @@ class SetValuesTestCase(TestBase):
self.line4 = line_number('main.c', '// Set break point #4.')
self.line5 = line_number('main.c', '// Set break point #5.')
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
def test(self):
"""Test settings and readings of program variables."""
self.build()

View File

@ -1,4 +1,4 @@
from lldbsuite.test import lldbinline
from lldbsuite.test import decorators
lldbinline.MakeInlineTest(__file__, globals(), [decorators.expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")] )
lldbinline.MakeInlineTest(__file__, globals(), [] )

View File

@ -9,6 +9,7 @@ from __future__ import print_function
import os, time
import re
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
import lldbsuite.test.lldbutil as lldbutil
@ -22,6 +23,7 @@ class UnsignedTypesTestCase(TestBase):
# Find the line number to break inside main().
self.line = line_number('main.cpp', '// Set break point at this line.')
@expectedFailureAll(oslist=["windows"])
def test(self):
"""Test that variables with unsigned types display correctly."""
self.build()

View File

@ -107,6 +107,7 @@ class EventAPITestCase(TestBase):
@add_test_categories(['pyapi'])
@expectedFlakeyLinux("llvm.org/pr23730") # Flaky, fails ~1/100 cases
@expectedFlakeyOS(oslist=["windows"])
def test_wait_for_event(self):
"""Exercise SBListener.WaitForEvent() API."""
self.build()

View File

@ -16,6 +16,7 @@ class SymbolContextTwoFilesTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(['pyapi'])
@expectedFailureAll(oslist=["windows"])
def test_lookup_by_address(self):
"""Test lookup by address in a module with multiple compilation units"""
self.build()

View File

@ -3617,10 +3617,14 @@ DWARFASTParserClang::GetClangDeclForDIE (const DWARFDIE &die)
{
SymbolFileDWARF *dwarf = die.GetDWARF();
Type *type = GetTypeForDIE(die);
const char *name = die.GetName();
clang::DeclContext *decl_context = ClangASTContext::DeclContextGetAsDeclContext(dwarf->GetDeclContextContainingUID(die.GetID()));
decl = m_ast.CreateVariableDeclaration(decl_context, name,
ClangUtil::GetQualType(type->GetForwardCompilerType()));
if (dwarf && type)
{
const char *name = die.GetName();
clang::DeclContext *decl_context =
ClangASTContext::DeclContextGetAsDeclContext(dwarf->GetDeclContextContainingUID(die.GetID()));
decl = m_ast.CreateVariableDeclaration(decl_context, name,
ClangUtil::GetQualType(type->GetForwardCompilerType()));
}
break;
}
case DW_TAG_imported_declaration:

View File

@ -121,7 +121,7 @@ SymbolFilePDB::CalculateAbilities()
auto error = loadDataForEXE(PDB_ReaderType::DIA, llvm::StringRef(exePath), m_session_up);
if (error)
{
handleAllErrors(std::move(error), [](const GenericError &GE) {});
llvm::consumeError(std::move(error));
return 0;
}
}