[Lldb-commits] [PATCH] D19943: XFail TestEnumTypes.py on Windows

Adrian McCarthy via lldb-commits lldb-commits at lists.llvm.org
Wed May 4 16:07:00 PDT 2016


amccarth created this revision.
amccarth added a reviewer: zturner.
amccarth added a subscriber: lldb-commits.

Dereferencing a null pointer in an `expr` "works" on Windows.  I believe that's a long-standing problem that's just been exposed by the reworking of this test last week.  The rest of this test works.

http://reviews.llvm.org/D19943

Files:
  packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
  packages/Python/lldbsuite/test/lang/c/enum_types/main.c

Index: packages/Python/lldbsuite/test/lang/c/enum_types/main.c
===================================================================
--- packages/Python/lldbsuite/test/lang/c/enum_types/main.c
+++ packages/Python/lldbsuite/test/lang/c/enum_types/main.c
@@ -31,7 +31,7 @@
     };
     enum days day;
     struct foo f;
-	f.op = NULL;
+    f.op = NULL;
     for (day = Monday - 1; day <= kNumDays + 1; day++)
     {
         printf("day as int is %i\n", (int)day); // Set break point at this line.
Index: packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
===================================================================
--- packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
+++ packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
@@ -19,6 +19,7 @@
         # Find the line number to break inside main().
         self.line = line_number('main.c', '// Set break point at this line.')
 
+    @expectedFailAll(oslist=['windows'])  // derefing the null pointer "works" on Windows
     def test(self):
         """Test 'image lookup -t days' and check for correct display and enum value printing."""
         self.build()
@@ -53,24 +54,24 @@
                        'kNumDays',
                        '}'])
 
-        enum_values = [ '-4', 
-                        'Monday', 
-                        'Tuesday', 
-                        'Wednesday', 
+        enum_values = [ '-4',
+                        'Monday',
+                        'Tuesday',
+                        'Wednesday',
                         'Thursday',
                         'Friday',
                         'Saturday',
                         'Sunday',
                         'kNumDays',
                         '5'];
-                                                                                                                             
+
         # Make sure a pointer to an anonymous enum type does crash LLDB and displays correctly using
         # frame variable and expression commands
         self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op'], patterns = ['0x0+$'])
         self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops', '*f.op', '<parent is NULL>'])
         self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$'], patterns = ['0x0+$'])
         self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['error:'], error = True)
-        
+
         bkpt = self.target().FindBreakpointByID(bkpt_id)
         for enum_value in enum_values:
             self.expect("frame variable day", 'check for valid enumeration value',


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19943.56216.patch
Type: text/x-patch
Size: 2690 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160504/05f3dc2f/attachment-0001.bin>


More information about the lldb-commits mailing list