Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "shill/property_store_unittest.h" |
| 6 | |
| 7 | #include <map> |
| 8 | #include <string> |
Chris Masone | 889666b | 2011-07-03 12:58:50 -0700 | [diff] [blame] | 9 | #include <utility> |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 10 | #include <vector> |
| 11 | |
mukesh agrawal | 4d260da | 2012-01-30 11:53:52 -0800 | [diff] [blame] | 12 | #include <base/basictypes.h> |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 13 | #include <dbus-c++/dbus.h> |
| 14 | #include <gtest/gtest.h> |
| 15 | #include <gmock/gmock.h> |
| 16 | |
| 17 | #include "shill/dbus_adaptor.h" |
| 18 | #include "shill/error.h" |
Paul Stewart | 26b327e | 2011-10-19 11:38:09 -0700 | [diff] [blame] | 19 | #include "shill/event_dispatcher.h" |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 20 | #include "shill/manager.h" |
| 21 | #include "shill/mock_control.h" |
mukesh agrawal | 4d260da | 2012-01-30 11:53:52 -0800 | [diff] [blame] | 22 | #include "shill/property_accessor.h" |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 23 | #include "shill/property_store.h" |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 24 | |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 25 | using std::map; |
Chris Masone | 889666b | 2011-07-03 12:58:50 -0700 | [diff] [blame] | 26 | using std::string; |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 27 | using std::vector; |
Chris Masone | 8a56ad6 | 2011-07-02 15:27:57 -0700 | [diff] [blame] | 28 | using ::testing::Values; |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 29 | |
| 30 | namespace shill { |
| 31 | |
| 32 | // static |
| 33 | const ::DBus::Variant PropertyStoreTest::kBoolV = DBusAdaptor::BoolToVariant(0); |
| 34 | // static |
| 35 | const ::DBus::Variant PropertyStoreTest::kByteV = DBusAdaptor::ByteToVariant(0); |
| 36 | // static |
| 37 | const ::DBus::Variant PropertyStoreTest::kInt16V = |
| 38 | DBusAdaptor::Int16ToVariant(0); |
| 39 | // static |
| 40 | const ::DBus::Variant PropertyStoreTest::kInt32V = |
| 41 | DBusAdaptor::Int32ToVariant(0); |
| 42 | // static |
Darin Petkov | 63138a9 | 2012-02-06 14:09:15 +0100 | [diff] [blame] | 43 | const ::DBus::Variant PropertyStoreTest::kKeyValueStoreV = |
| 44 | DBusAdaptor::KeyValueStoreToVariant(KeyValueStore()); |
| 45 | // static |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 46 | const ::DBus::Variant PropertyStoreTest::kStringV = |
| 47 | DBusAdaptor::StringToVariant(""); |
| 48 | // static |
| 49 | const ::DBus::Variant PropertyStoreTest::kStringmapV = |
Chris Masone | a8a2c25 | 2011-06-27 22:16:30 -0700 | [diff] [blame] | 50 | DBusAdaptor::StringmapToVariant(Stringmap()); |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 51 | // static |
| 52 | const ::DBus::Variant PropertyStoreTest::kStringmapsV = |
Chris Masone | 889666b | 2011-07-03 12:58:50 -0700 | [diff] [blame] | 53 | DBusAdaptor::StringmapsToVariant(Stringmaps()); |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 54 | // static |
| 55 | const ::DBus::Variant PropertyStoreTest::kStringsV = |
Chris Masone | a8a2c25 | 2011-06-27 22:16:30 -0700 | [diff] [blame] | 56 | DBusAdaptor::StringsToVariant(Strings(1, "")); |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 57 | // static |
| 58 | const ::DBus::Variant PropertyStoreTest::kUint16V = |
| 59 | DBusAdaptor::Uint16ToVariant(0); |
| 60 | // static |
| 61 | const ::DBus::Variant PropertyStoreTest::kUint32V = |
| 62 | DBusAdaptor::Uint32ToVariant(0); |
| 63 | |
| 64 | PropertyStoreTest::PropertyStoreTest() |
mukesh agrawal | ffa3d04 | 2011-10-06 15:26:10 -0700 | [diff] [blame] | 65 | : internal_error_(Error::GetName(Error::kInternalError)), |
| 66 | invalid_args_(Error::GetName(Error::kInvalidArguments)), |
Chris Masone | 9d77993 | 2011-08-25 16:33:41 -0700 | [diff] [blame] | 67 | invalid_prop_(Error::GetName(Error::kInvalidProperty)), |
| 68 | path_(dir_.CreateUniqueTempDir() ? dir_.path().value() : ""), |
Chris Masone | 2176a88 | 2011-09-14 22:29:15 -0700 | [diff] [blame] | 69 | manager_(control_interface(), |
| 70 | dispatcher(), |
Thieu Le | 3426c8f | 2012-01-11 17:35:11 -0800 | [diff] [blame] | 71 | metrics(), |
Chris Masone | 2176a88 | 2011-09-14 22:29:15 -0700 | [diff] [blame] | 72 | glib(), |
Chris Masone | 9d77993 | 2011-08-25 16:33:41 -0700 | [diff] [blame] | 73 | run_path(), |
| 74 | storage_path(), |
| 75 | string()) { |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 76 | } |
| 77 | |
| 78 | PropertyStoreTest::~PropertyStoreTest() {} |
| 79 | |
Chris Masone | 9d77993 | 2011-08-25 16:33:41 -0700 | [diff] [blame] | 80 | void PropertyStoreTest::SetUp() { |
| 81 | ASSERT_FALSE(run_path().empty()); |
| 82 | ASSERT_FALSE(storage_path().empty()); |
| 83 | } |
| 84 | |
Chris Masone | 8a56ad6 | 2011-07-02 15:27:57 -0700 | [diff] [blame] | 85 | TEST_P(PropertyStoreTest, TestProperty) { |
| 86 | // Ensure that an attempt to write unknown properties returns InvalidProperty. |
| 87 | PropertyStore store; |
| 88 | ::DBus::Error error; |
mukesh agrawal | 6bb9e7c | 2012-01-30 14:57:54 -0800 | [diff] [blame] | 89 | EXPECT_FALSE(DBusAdaptor::SetProperty(&store, "", GetParam(), &error)); |
Chris Masone | 9d77993 | 2011-08-25 16:33:41 -0700 | [diff] [blame] | 90 | EXPECT_EQ(invalid_prop(), error.name()); |
Chris Masone | 8a56ad6 | 2011-07-02 15:27:57 -0700 | [diff] [blame] | 91 | } |
| 92 | |
| 93 | INSTANTIATE_TEST_CASE_P( |
| 94 | PropertyStoreTestInstance, |
| 95 | PropertyStoreTest, |
| 96 | Values(PropertyStoreTest::kBoolV, |
| 97 | PropertyStoreTest::kByteV, |
Chris Masone | 8a56ad6 | 2011-07-02 15:27:57 -0700 | [diff] [blame] | 98 | PropertyStoreTest::kInt16V, |
| 99 | PropertyStoreTest::kInt32V, |
Darin Petkov | 63138a9 | 2012-02-06 14:09:15 +0100 | [diff] [blame] | 100 | PropertyStoreTest::kStringV, |
Chris Masone | 8a56ad6 | 2011-07-02 15:27:57 -0700 | [diff] [blame] | 101 | PropertyStoreTest::kStringmapV, |
Chris Masone | 889666b | 2011-07-03 12:58:50 -0700 | [diff] [blame] | 102 | PropertyStoreTest::kStringsV, |
Chris Masone | 889666b | 2011-07-03 12:58:50 -0700 | [diff] [blame] | 103 | PropertyStoreTest::kUint16V, |
| 104 | PropertyStoreTest::kUint32V)); |
Chris Masone | 8a56ad6 | 2011-07-02 15:27:57 -0700 | [diff] [blame] | 105 | |
mukesh agrawal | 4d260da | 2012-01-30 11:53:52 -0800 | [diff] [blame] | 106 | template <typename T> |
| 107 | class PropertyStoreTypedTest : public PropertyStoreTest { |
| 108 | protected: |
| 109 | void RegisterProperty( |
| 110 | PropertyStore &store, const string &name, T *storage); |
| 111 | }; |
| 112 | |
| 113 | typedef ::testing::Types< |
| 114 | bool, int16, int32, KeyValueStore, string, Stringmap, Stringmaps, Strings, |
| 115 | uint8, uint16, uint32> PropertyTypes; |
| 116 | TYPED_TEST_CASE(PropertyStoreTypedTest, PropertyTypes); |
| 117 | |
| 118 | TYPED_TEST(PropertyStoreTypedTest, ClearProperty) { |
| 119 | PropertyStore store; |
| 120 | Error error; |
| 121 | TypeParam property; |
| 122 | RegisterProperty(store, "some property", &property); |
| 123 | EXPECT_TRUE(store.ClearProperty("some property", &error)); |
| 124 | } |
| 125 | |
| 126 | template<> void PropertyStoreTypedTest<bool>::RegisterProperty( |
| 127 | PropertyStore &store, const string &name, bool *storage) { |
| 128 | store.RegisterBool(name, storage); |
| 129 | } |
| 130 | |
| 131 | template<> void PropertyStoreTypedTest<int16>::RegisterProperty( |
| 132 | PropertyStore &store, const string &name, int16 *storage) { |
| 133 | store.RegisterInt16(name, storage); |
| 134 | } |
| 135 | |
| 136 | template<> void PropertyStoreTypedTest<int32>::RegisterProperty( |
| 137 | PropertyStore &store, const string &name, int32 *storage) { |
| 138 | store.RegisterInt32(name, storage); |
| 139 | } |
| 140 | |
| 141 | template<> void PropertyStoreTypedTest<KeyValueStore>::RegisterProperty( |
| 142 | PropertyStore &store, const string &name, KeyValueStore *storage) { |
| 143 | // We use |RegisterDerivedKeyValueStore|, because there is no non-derived |
| 144 | // version. (And it's not clear that we'll need one, outside of this |
| 145 | // test.) |
| 146 | store.RegisterDerivedKeyValueStore( |
| 147 | name, KeyValueStoreAccessor( |
| 148 | new PropertyAccessor<KeyValueStore>(storage))); |
| 149 | } |
| 150 | |
| 151 | template<> void PropertyStoreTypedTest<string>::RegisterProperty( |
| 152 | PropertyStore &store, const string &name, string *storage) { |
| 153 | store.RegisterString(name, storage); |
| 154 | } |
| 155 | |
| 156 | template<> void PropertyStoreTypedTest<Stringmap>::RegisterProperty( |
| 157 | PropertyStore &store, const string &name, Stringmap *storage) { |
| 158 | store.RegisterStringmap(name, storage); |
| 159 | } |
| 160 | |
| 161 | template<> void PropertyStoreTypedTest<Stringmaps>::RegisterProperty( |
| 162 | PropertyStore &store, const string &name, Stringmaps *storage) { |
| 163 | store.RegisterStringmaps(name, storage); |
| 164 | } |
| 165 | |
| 166 | template<> void PropertyStoreTypedTest<Strings>::RegisterProperty( |
| 167 | PropertyStore &store, const string &name, Strings *storage) { |
| 168 | store.RegisterStrings(name, storage); |
| 169 | } |
| 170 | |
| 171 | template<> void PropertyStoreTypedTest<uint8>::RegisterProperty( |
| 172 | PropertyStore &store, const string &name, uint8 *storage) { |
| 173 | store.RegisterUint8(name, storage); |
| 174 | } |
| 175 | |
| 176 | template<> void PropertyStoreTypedTest<uint16>::RegisterProperty( |
| 177 | PropertyStore &store, const string &name, uint16 *storage) { |
| 178 | store.RegisterUint16(name, storage); |
| 179 | } |
| 180 | |
| 181 | template<> void PropertyStoreTypedTest<uint32>::RegisterProperty( |
| 182 | PropertyStore &store, const string &name, uint32 *storage) { |
| 183 | store.RegisterUint32(name, storage); |
| 184 | } |
| 185 | |
| 186 | TEST_F(PropertyStoreTest, ClearBoolProperty) { |
| 187 | // We exercise both possibilities for the default value here, |
| 188 | // to ensure that Clear actually resets the property based on |
| 189 | // the property's initial value (rather than the language's |
| 190 | // default value for the type). |
| 191 | static const bool kDefaults[] = {true, false}; |
| 192 | for (size_t i = 0; i < arraysize(kDefaults); ++i) { |
| 193 | PropertyStore store; |
| 194 | Error error; |
| 195 | |
| 196 | const bool default_value = kDefaults[i]; |
| 197 | bool flag = default_value; |
| 198 | store.RegisterBool("some bool", &flag); |
| 199 | |
| 200 | EXPECT_TRUE(store.ClearProperty("some bool", &error)); |
| 201 | EXPECT_EQ(default_value, flag); |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | TEST_F(PropertyStoreTest, ClearPropertyNonexistent) { |
| 206 | PropertyStore store; |
| 207 | Error error; |
| 208 | |
| 209 | EXPECT_FALSE(store.ClearProperty("", &error)); |
| 210 | EXPECT_EQ(Error::kInvalidProperty, error.type()); |
| 211 | } |
| 212 | |
mukesh agrawal | ffa3d04 | 2011-10-06 15:26:10 -0700 | [diff] [blame] | 213 | TEST_F(PropertyStoreTest, SetStringmapsProperty) { |
| 214 | PropertyStore store; |
| 215 | ::DBus::Error error; |
mukesh agrawal | 6bb9e7c | 2012-01-30 14:57:54 -0800 | [diff] [blame] | 216 | EXPECT_FALSE(DBusAdaptor::SetProperty( |
mukesh agrawal | ffa3d04 | 2011-10-06 15:26:10 -0700 | [diff] [blame] | 217 | &store, "", PropertyStoreTest::kStringmapsV, &error)); |
| 218 | EXPECT_EQ(internal_error(), error.name()); |
| 219 | } |
| 220 | |
Eric Shienbrood | b23d4b9 | 2012-02-16 12:32:42 -0500 | [diff] [blame] | 221 | TEST_F(PropertyStoreTest, SetKeyValueStoreProperty) { |
| 222 | PropertyStore store; |
| 223 | ::DBus::Error error; |
| 224 | EXPECT_FALSE(DBusAdaptor::SetProperty( |
| 225 | &store, "", PropertyStoreTest::kKeyValueStoreV, &error)); |
| 226 | EXPECT_EQ(internal_error(), error.name()); |
| 227 | } |
| 228 | |
Gaurav Shah | 1b7a616 | 2011-11-09 11:41:01 -0800 | [diff] [blame] | 229 | TEST_F(PropertyStoreTest, WriteOnlyProperties) { |
| 230 | // Test that properties registered as write-only are not returned |
| 231 | // when using Get*PropertiesIter(). |
| 232 | PropertyStore store; |
| 233 | Error error; |
| 234 | { |
| 235 | const string keys[] = {"boolp1", "boolp2"}; |
| 236 | bool values[] = {true, true}; |
| 237 | store.RegisterWriteOnlyBool(keys[0], &values[0]); |
| 238 | store.RegisterBool(keys[1], &values[1]); |
| 239 | |
| 240 | ReadablePropertyConstIterator<bool> it = store.GetBoolPropertiesIter(); |
| 241 | error.Reset(); |
| 242 | EXPECT_FALSE(it.AtEnd()); |
| 243 | EXPECT_EQ(keys[1], it.Key()); |
| 244 | EXPECT_TRUE(values[1] == it.Value(&error)); |
| 245 | EXPECT_TRUE(error.IsSuccess()); |
| 246 | it.Advance(); |
| 247 | EXPECT_TRUE(it.AtEnd()); |
| 248 | } |
| 249 | { |
| 250 | const string keys[] = {"int16p1", "int16p2"}; |
| 251 | int16 values[] = {127, 128}; |
| 252 | store.RegisterWriteOnlyInt16(keys[0], &values[0]); |
| 253 | store.RegisterInt16(keys[1], &values[1]); |
| 254 | |
| 255 | ReadablePropertyConstIterator<int16> it = store.GetInt16PropertiesIter(); |
| 256 | error.Reset(); |
| 257 | EXPECT_FALSE(it.AtEnd()); |
| 258 | EXPECT_EQ(keys[1], it.Key()); |
| 259 | EXPECT_EQ(values[1], it.Value(&error)); |
| 260 | EXPECT_TRUE(error.IsSuccess()); |
| 261 | it.Advance(); |
| 262 | EXPECT_TRUE(it.AtEnd()); |
| 263 | } |
| 264 | { |
| 265 | const string keys[] = {"int32p1", "int32p2"}; |
| 266 | int32 values[] = {127, 128}; |
| 267 | store.RegisterWriteOnlyInt32(keys[0], &values[0]); |
| 268 | store.RegisterInt32(keys[1], &values[1]); |
| 269 | |
| 270 | ReadablePropertyConstIterator<int32> it = store.GetInt32PropertiesIter(); |
| 271 | error.Reset(); |
| 272 | EXPECT_FALSE(it.AtEnd()); |
| 273 | EXPECT_EQ(keys[1], it.Key()); |
| 274 | EXPECT_EQ(values[1], it.Value(&error)); |
| 275 | EXPECT_TRUE(error.IsSuccess()); |
| 276 | it.Advance(); |
| 277 | EXPECT_TRUE(it.AtEnd()); |
| 278 | } |
| 279 | { |
| 280 | const string keys[] = {"stringp1", "stringp2"}; |
| 281 | string values[] = {"noooo", "yesss"}; |
| 282 | store.RegisterWriteOnlyString(keys[0], &values[0]); |
| 283 | store.RegisterString(keys[1], &values[1]); |
| 284 | |
| 285 | ReadablePropertyConstIterator<string> it = store.GetStringPropertiesIter(); |
| 286 | error.Reset(); |
| 287 | EXPECT_FALSE(it.AtEnd()); |
| 288 | EXPECT_EQ(keys[1], it.Key()); |
| 289 | EXPECT_EQ(values[1], it.Value(&error)); |
| 290 | EXPECT_TRUE(error.IsSuccess()); |
| 291 | it.Advance(); |
| 292 | EXPECT_TRUE(it.AtEnd()); |
| 293 | } |
| 294 | { |
| 295 | const string keys[] = {"stringmapp1", "stringmapp2"}; |
| 296 | Stringmap values[2]; |
| 297 | values[0]["noooo"] = "yesss"; |
| 298 | values[1]["yesss"] = "noooo"; |
| 299 | store.RegisterWriteOnlyStringmap(keys[0], &values[0]); |
| 300 | store.RegisterStringmap(keys[1], &values[1]); |
| 301 | |
| 302 | ReadablePropertyConstIterator<Stringmap> it = |
| 303 | store.GetStringmapPropertiesIter(); |
| 304 | error.Reset(); |
| 305 | EXPECT_FALSE(it.AtEnd()); |
| 306 | EXPECT_EQ(keys[1], it.Key()); |
| 307 | EXPECT_TRUE(values[1] == it.Value(&error)); |
| 308 | EXPECT_TRUE(error.IsSuccess()); |
| 309 | it.Advance(); |
| 310 | EXPECT_TRUE(it.AtEnd()); |
| 311 | } |
| 312 | { |
| 313 | const string keys[] = {"stringmapsp1", "stringmapsp2"}; |
| 314 | Stringmaps values[2]; |
| 315 | Stringmap element; |
| 316 | element["noooo"] = "yesss"; |
| 317 | values[0].push_back(element); |
| 318 | element["yesss"] = "noooo"; |
| 319 | values[1].push_back(element); |
| 320 | |
| 321 | store.RegisterWriteOnlyStringmaps(keys[0], &values[0]); |
| 322 | store.RegisterStringmaps(keys[1], &values[1]); |
| 323 | |
| 324 | ReadablePropertyConstIterator<Stringmaps> it = |
| 325 | store.GetStringmapsPropertiesIter(); |
| 326 | error.Reset(); |
| 327 | EXPECT_FALSE(it.AtEnd()); |
| 328 | EXPECT_EQ(keys[1], it.Key()); |
| 329 | EXPECT_TRUE(values[1] == it.Value(&error)); |
| 330 | EXPECT_TRUE(error.IsSuccess()); |
| 331 | it.Advance(); |
| 332 | EXPECT_TRUE(it.AtEnd()); |
| 333 | } |
| 334 | { |
| 335 | const string keys[] = {"stringsp1", "stringsp2"}; |
| 336 | Strings values[2]; |
| 337 | string element; |
| 338 | element = "noooo"; |
| 339 | values[0].push_back(element); |
| 340 | element = "yesss"; |
| 341 | values[1].push_back(element); |
| 342 | store.RegisterWriteOnlyStrings(keys[0], &values[0]); |
| 343 | store.RegisterStrings(keys[1], &values[1]); |
| 344 | |
| 345 | ReadablePropertyConstIterator<Strings> it = |
| 346 | store.GetStringsPropertiesIter(); |
| 347 | error.Reset(); |
| 348 | EXPECT_FALSE(it.AtEnd()); |
| 349 | EXPECT_EQ(keys[1], it.Key()); |
| 350 | EXPECT_TRUE(values[1] == it.Value(&error)); |
| 351 | EXPECT_TRUE(error.IsSuccess()); |
| 352 | it.Advance(); |
| 353 | EXPECT_TRUE(it.AtEnd()); |
| 354 | } |
| 355 | { |
| 356 | const string keys[] = {"uint8p1", "uint8p2"}; |
| 357 | uint8 values[] = {127, 128}; |
| 358 | store.RegisterWriteOnlyUint8(keys[0], &values[0]); |
| 359 | store.RegisterUint8(keys[1], &values[1]); |
| 360 | |
| 361 | ReadablePropertyConstIterator<uint8> it = store.GetUint8PropertiesIter(); |
| 362 | error.Reset(); |
| 363 | EXPECT_FALSE(it.AtEnd()); |
| 364 | EXPECT_EQ(keys[1], it.Key()); |
| 365 | EXPECT_EQ(values[1], it.Value(&error)); |
| 366 | EXPECT_TRUE(error.IsSuccess()); |
| 367 | it.Advance(); |
| 368 | EXPECT_TRUE(it.AtEnd()); |
| 369 | } |
| 370 | { |
| 371 | const string keys[] = {"uint16p", "uint16p1"}; |
| 372 | uint16 values[] = {127, 128}; |
| 373 | store.RegisterWriteOnlyUint16(keys[0], &values[0]); |
| 374 | store.RegisterUint16(keys[1], &values[1]); |
| 375 | |
| 376 | ReadablePropertyConstIterator<uint16> it = store.GetUint16PropertiesIter(); |
| 377 | error.Reset(); |
| 378 | EXPECT_FALSE(it.AtEnd()); |
| 379 | EXPECT_EQ(keys[1], it.Key()); |
| 380 | EXPECT_EQ(values[1], it.Value(&error)); |
| 381 | EXPECT_TRUE(error.IsSuccess()); |
| 382 | it.Advance(); |
| 383 | EXPECT_TRUE(it.AtEnd()); |
| 384 | } |
| 385 | } |
| 386 | |
Chris Masone | b925cc8 | 2011-06-22 15:39:57 -0700 | [diff] [blame] | 387 | } // namespace shill |