commit | 1d499ed2d5eede24f55c7f6b8aaba06136ef4f22 | [log] [tgz] |
---|---|---|
author | Peter Qiu <zqiu@chromium.org> | Fri Jan 30 16:01:27 2015 -0800 |
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | Mon Feb 02 21:15:03 2015 +0000 |
tree | c4b7be666d144411a8200baed56e277f33c65143 | |
parent | 1e8414cbca190baa946388ede87a0b417c1f3d95 [diff] |
shill: add passive mode support Add a command line option to enable passive-mode. When this option is enabled, shill will not manage any devices by default. Remote application can specify the devices for shill to manage through org.chromium.flimflam.Manager::ReleaseInterface/ClaimInterface APIs. All devices claims will go through the default device claimer, with claimer name of empty string (""). While there, update the ReleaseInterface API to also take claimer name as an argument, so that the claimer name will be check before releasing a device. This is to avoid devices being released by other unknown claimers. BUG=chromium:454007 TEST=USE="asan clang" FEATURES=test emerge-$BOARD shill apmanager Manual Test: 1. Start shill with passive mode enabled, verify "/usr/local/lib/flimflam/list-device" does not return any device. 2. Use dbus-send command to release "eth0" device from default claimer, and verify "/usr/local/lib/flimflam/list-device" does return eth0 device. 3. Use dbus-send command to claim "eth0" device from default claimer, and verify "/usr/local/lib/flimflam/list-device" does not return any device. 4. Regression test with apmanager. Change-Id: I2b79a13e8aea0d07e9d7923ba3c26adb19237e1a Reviewed-on: https://chromium-review.googlesource.com/245123 Reviewed-by: Zeping Qiu <zqiu@chromium.org> Commit-Queue: Zeping Qiu <zqiu@chromium.org> Trybot-Ready: Zeping Qiu <zqiu@chromium.org> Tested-by: Zeping Qiu <zqiu@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org>