commit | 7efde5b3b20f36716b10bdd9691823443704caf1 | [log] [tgz] |
---|---|---|
author | mukesh agrawal <quiche@chromium.org> | Wed May 08 11:36:58 2013 -0700 |
committer | ChromeBot <chrome-bot@google.com> | Thu May 09 11:52:52 2013 -0700 |
tree | 663c2ffb6a97365edb65edd07b768aab7c1d0f27 | |
parent | 1c1dd351729e4d60ab24fdbfaf4fc439f14876c2 [diff] |
shill: make http_proxy unittests compile and run with clang The HTTPProxy object in the test fixture references the |sockets_| field of the test fixture. The HTTPProxy dtor, uses its reference to |sockets_| to close some sockets before going away. Unfortunately, though, the HTTPProxy object was declared before |sockets_|. Hence, it could be calling Close on garbage (rather than MockSockets). Fix the problem by reordering the declarations. Update EXPECTations accordingly. While there: fix a similar problem in openvpn_management_server unittests. BUG=chromium:238790 TEST=manual manual test ----------- $ make clean && FEATURES=test USE=clang cros_workon_make --board=link --test --reconf shill $ make clean && FEATURES=test cros_workon_make --board=link --test --reconf shill Both commands should run successfully (tests pass, no crashes) Change-Id: I2a7b6b4e831b5ac0854735c3c7caee9b48e08e9b Reviewed-on: https://gerrit.chromium.org/gerrit/50546 Commit-Queue: mukesh agrawal <quiche@chromium.org> Reviewed-by: mukesh agrawal <quiche@chromium.org> Tested-by: mukesh agrawal <quiche@chromium.org>