Bug 200742 - [lldb-webkit] OptionSet summary shows size 0 sometimes for non-empty set
Summary: [lldb-webkit] OptionSet summary shows size 0 sometimes for non-empty set
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-14 16:12 PDT by Daniel Bates
Modified: 2019-08-22 15:14 PDT (History)
4 users (show)

See Also:


Attachments
Patch (6.12 KB, patch)
2019-08-14 16:44 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
To land (7.10 KB, patch)
2019-08-22 15:05 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2019-08-14 16:12:57 PDT
Sometimes the LLDB-pretty printed OptionSet summary for a non-empty set is 0.
Comment 1 Daniel Bates 2019-08-14 16:44:49 PDT
Created attachment 376331 [details]
Patch
Comment 2 Daniel Bates 2019-08-21 15:42:53 PDT
Comment on attachment 376331 [details]
Patch

Clearing flags on attachment: 376331

Committed r248970: <https://trac.webkit.org/changeset/248970>
Comment 3 Daniel Bates 2019-08-21 15:42:54 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2019-08-21 15:43:42 PDT
<rdar://problem/54575345>
Comment 5 Ryan Haddad 2019-08-21 17:06:48 PDT
There is a lldb_webkit_unittest test failure after this change:

[1903/1912] lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFOptionSetProvider_empty failed:
  Traceback (most recent call last):
    File "/Volumes/Data/slave/mojave-release-tests-wk2/build/Tools/lldb/lldb_webkit_unittest.py", line 188, in serial_test_WTFOptionSetProvider_empty
      self.assertEqual(provider.get_child_at_index(0), None)
  AssertionError: <lldb.SBValue; proxy of <Swig Object of type 'lldb::SBValue *' at 0x1176af2a0> > != None
  
https://build.webkit.org/builders/Apple%20Mojave%20Release%20WK2%20(Tests)/builds/6078/steps/webkitpy-test/logs/stdio
Comment 6 Daniel Bates 2019-08-21 17:19:28 PDT
Not near a computer. Roll it out and I will fix offljne
Comment 7 Ryan Haddad 2019-08-21 17:23:20 PDT
Reverted r248970 for reason:

Caused lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFOptionSetProvider_empty to fail.

Committed r248980: <https://trac.webkit.org/changeset/248980>
Comment 8 Daniel Bates 2019-08-21 20:35:12 PDT
Something happened to EWS. It use to run these tests.
Comment 9 Daniel Bates 2019-08-22 15:05:43 PDT
Created attachment 377058 [details]
To land
Comment 10 Daniel Bates 2019-08-22 15:07:00 PDT
Comment on attachment 377058 [details]
To land

Clearing flags on attachment: 377058

Committed r249030: <https://trac.webkit.org/changeset/249030>
Comment 11 Daniel Bates 2019-08-22 15:07:01 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Daniel Bates 2019-08-22 15:08:34 PDT
Comment on attachment 377058 [details]
To land

View in context: https://bugs.webkit.org/attachment.cgi?id=377058&action=review

> Tools/lldb/lldb_webkit_unittest.py:188
> -        self.assertEqual(provider.get_child_at_index(0), None)
> +        self.assertEqual(provider.get_child_at_index(0).GetName(), 'm_storage')

In retrospect, probably would be better for this to assert provider.size == 0 and should add a new test to check that the last child of the provider is always 'm_storage'.
Comment 13 Daniel Bates 2019-08-22 15:14:40 PDT
Comment on attachment 377058 [details]
To land

View in context: https://bugs.webkit.org/attachment.cgi?id=377058&action=review

>> Tools/lldb/lldb_webkit_unittest.py:188
>> +        self.assertEqual(provider.get_child_at_index(0).GetName(), 'm_storage')
> 
> In retrospect, probably would be better for this to assert provider.size == 0 and should add a new test to check that the last child of the provider is always 'm_storage'.

Filed bug #201056 for this.