New issue
Advanced search Search tips

Issue 650906 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 510287



Sign in to add a comment

Layout tests in bluetooth/requestDevice/canonicalizeFilter/ fail when run with --batch-size=1

Project Member Reported by jeffcarp@chromium.org, Sep 28 2016

Issue description

When run normally, this test passes:

./Tools/Scripts/run-webkit-tests -t Default bluetooth/requestDevice/canonicalizeFilter/empty-filter.html

But when run with batch-size=1:

./Tools/Scripts/run-webkit-tests -t Default bluetooth/requestDevice/canonicalizeFilter/empty-filter.html --batch-size=1

The test fails with output:

```
CONSOLE INFO: line 136: Web Bluetooth is available as an Origin Trial: https://bit.ly/WebBluetoothOriginTrial
This is a testharness.js-based test.
PASS A filter must restrict the devices in some way. 
Harness: the test ran to completion.


../../device/bluetooth/test/mock_bluetooth_adapter.cc:22: ERROR: this mock object should be deleted but never is. Its address is @0x37213fa4f820.
ERROR: 1 leaked mock object found at program exit.
```

This is true for most tests in the bluetooth/requestDevice/canonicalizeFilter/ directory, specifically:

- bluetooth/requestDevice/canonicalizeFilter/empty-filter.html
- bluetooth/requestDevice/canonicalizeFilter/empty-filters-member.html
- bluetooth/requestDevice/canonicalizeFilter/empty-namePrefix.html
- bluetooth/requestDevice/canonicalizeFilter/empty-services-member.html
- bluetooth/requestDevice/canonicalizeFilter/max-length-for-device-name-name.html
- bluetooth/requestDevice/canonicalizeFilter/max-length-for-device-name-namePrefix.html
- bluetooth/requestDevice/canonicalizeFilter/max-length-for-name-in-adv-name.html
- bluetooth/requestDevice/canonicalizeFilter/max-length-for-name-in-adv-namePrefix.html
- bluetooth/requestDevice/canonicalizeFilter/no-arguments.html
- bluetooth/requestDevice/canonicalizeFilter/no-filters-member.html
- bluetooth/requestDevice/canonicalizeFilter/unicode-max-length-for-device-name-name.html
- bluetooth/requestDevice/canonicalizeFilter/unicode-max-length-for-device-name-namePrefix.html
- bluetooth/requestDevice/canonicalizeFilter/unicode-max-length-for-name-in-adv-name.html
- bluetooth/requestDevice/canonicalizeFilter/unicode-max-length-for-name-in-adv-namePrefix.html
- bluetooth/requestDevice/canonicalizeFilter/wrong-service-in-optionalServices-member.html
- bluetooth/requestDevice/canonicalizeFilter/wrong-service-in-services-member.html

 
Blocking: 510287
Status: Available (was: Untriaged)
Hmm this is happening because the fake adapter is owned by a leaky LazyInstance.

From a quick check it seems that none of these tests actually need an adapter so we could just not set a fake adapter.
Thanks for taking a look at this, I can submit a CL to remove the calls to fake adapter from that directory.
sgtm. Thanks! fyi: tests that are not failing probably need the adapter, so it's not the whole directory.
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ad6d40ff799a200267e7cb25219970533199fc3e

commit ad6d40ff799a200267e7cb25219970533199fc3e
Author: jeffcarp <jeffcarp@chromium.org>
Date: Tue Oct 25 17:52:02 2016

Remove fake Bluetooth adapter from canonicalizeFilter tests. setBlueToothFakeAdapter is causing these tests to fail when --batch-size=1 and is not necessary for them to pass. (see bug for more context)

BUG= 650906 

Review-Url: https://codereview.chromium.org/2408533002
Cr-Commit-Position: refs/heads/master@{#427405}

[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/empty-filter.html
[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/empty-filters-member.html
[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/empty-namePrefix.html
[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/empty-services-member.html
[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/max-length-for-device-name-name.html
[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/max-length-for-device-name-namePrefix.html
[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/max-length-for-name-in-adv-name.html
[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/max-length-for-name-in-adv-namePrefix.html
[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/no-arguments.html
[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/no-filters-member.html
[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/unicode-max-length-for-device-name-name.html
[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/unicode-max-length-for-device-name-namePrefix.html
[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/unicode-max-length-for-name-in-adv-name.html
[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/unicode-max-length-for-name-in-adv-namePrefix.html
[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/wrong-service-in-optionalServices-member.html
[modify] https://crrev.com/ad6d40ff799a200267e7cb25219970533199fc3e/third_party/WebKit/LayoutTests/bluetooth/requestDevice/canonicalizeFilter/wrong-service-in-services-member.html

Comment 5 by ortuno@chromium.org, Nov 24 2016

Owner: jeffcarp@chromium.org
Status: Fixed (was: Available)

Sign in to add a comment