shill: refactor pppd handling into a new class

Wrap pppd options so that callers don't need to know their details in
order to spawn a new instance.  Add new unit tests to ensure that the
commandline is being constructed properly.

BUG=none
TEST=all unit tests, with USE=vpn

Change-Id: If06b7fec3ffdf384eff542d324ef4d125d546765
Reviewed-on: https://chromium-review.googlesource.com/241199
Reviewed-by: Garret Kelly <gdk@chromium.org>
Commit-Queue: Garret Kelly <gdk@chromium.org>
Tested-by: Garret Kelly <gdk@chromium.org>
8 files changed
tree: 2c096354931221fc1cc2d36c74e9ab56b8dfbf55
  1. bin/
  2. cellular/
  3. dbus_bindings/
  4. doc/
  5. ethernet/
  6. init/
  7. mobile_operator_db/
  8. net/
  9. shims/
  10. supplicant/
  11. test-scripts/
  12. udev/
  13. upstart/
  14. vpn/
  15. wifi/
  16. wimax/
  17. .gitignore
  18. accessor_interface.h
  19. adaptor_interfaces.h
  20. arp_client.cc
  21. arp_client.h
  22. arp_client_unittest.cc
  23. arp_packet.cc
  24. arp_packet.h
  25. arp_packet_unittest.cc
  26. async_connection.cc
  27. async_connection.h
  28. async_connection_unittest.cc
  29. callbacks.h
  30. certificate_file.cc
  31. certificate_file.h
  32. certificate_file_unittest.cc
  33. connection.cc
  34. connection.h
  35. connection_health_checker.cc
  36. connection_health_checker.h
  37. connection_health_checker_unittest.cc
  38. connection_info.cc
  39. connection_info.h
  40. connection_info_reader.cc
  41. connection_info_reader.h
  42. connection_info_reader_unittest.cc
  43. connection_info_unittest.cc
  44. connection_tester.cc
  45. connection_tester.h
  46. connection_tester_unittest.cc
  47. connection_unittest.cc
  48. connectivity_trial.cc
  49. connectivity_trial.h
  50. connectivity_trial_unittest.cc
  51. control_interface.h
  52. crypto_des_cbc.cc
  53. crypto_des_cbc.h
  54. crypto_des_cbc_unittest.cc
  55. crypto_interface.h
  56. crypto_provider.cc
  57. crypto_provider.h
  58. crypto_provider_unittest.cc
  59. crypto_rot47.cc
  60. crypto_rot47.h
  61. crypto_rot47_unittest.cc
  62. crypto_util_proxy.cc
  63. crypto_util_proxy.h
  64. crypto_util_proxy_unittest.cc
  65. dbus_adaptor.cc
  66. dbus_adaptor.h
  67. dbus_adaptor_unittest.cc
  68. dbus_async_call_helper.h
  69. dbus_control.cc
  70. dbus_control.h
  71. dbus_manager.cc
  72. dbus_manager.h
  73. dbus_manager_unittest.cc
  74. dbus_name_watcher.cc
  75. dbus_name_watcher.h
  76. dbus_name_watcher_unittest.cc
  77. dbus_properties.cc
  78. dbus_properties.h
  79. dbus_properties_proxy.cc
  80. dbus_properties_proxy.h
  81. dbus_properties_proxy_interface.h
  82. dbus_properties_unittest.cc
  83. dbus_property_matchers.h
  84. dbus_service_proxy.cc
  85. dbus_service_proxy.h
  86. dbus_service_proxy_interface.h
  87. dbus_variant_gmock_printer.cc
  88. dbus_variant_gmock_printer.h
  89. default_profile.cc
  90. default_profile.h
  91. default_profile_unittest.cc
  92. device.cc
  93. device.h
  94. device_claimer.cc
  95. device_claimer.h
  96. device_claimer_unittest.cc
  97. device_dbus_adaptor.cc
  98. device_dbus_adaptor.h
  99. device_info.cc
  100. device_info.h
  101. device_info_unittest.cc
  102. device_stub.h
  103. device_unittest.cc
  104. dhcp_config.cc
  105. dhcp_config.h
  106. dhcp_config_unittest.cc
  107. dhcp_provider.cc
  108. dhcp_provider.h
  109. dhcp_provider_unittest.cc
  110. dhcp_proxy_interface.h
  111. dhcpcd_proxy.cc
  112. dhcpcd_proxy.h
  113. diagnostics_reporter.cc
  114. diagnostics_reporter.h
  115. diagnostics_reporter_unittest.cc
  116. dns_client.cc
  117. dns_client.h
  118. dns_client_factory.cc
  119. dns_client_factory.h
  120. dns_client_unittest.cc
  121. dns_server_tester.cc
  122. dns_server_tester.h
  123. dns_server_tester_unittest.cc
  124. eap_credentials.cc
  125. eap_credentials.h
  126. eap_credentials_unittest.cc
  127. eap_listener.cc
  128. eap_listener.h
  129. eap_listener_unittest.cc
  130. eap_protocol.h
  131. endpoint.cc
  132. endpoint.h
  133. ephemeral_profile.cc
  134. ephemeral_profile.h
  135. error.cc
  136. error.h
  137. error_unittest.cc
  138. event_dispatcher.cc
  139. event_dispatcher.h
  140. external_task.cc
  141. external_task.h
  142. external_task_unittest.cc
  143. file_io.cc
  144. file_io.h
  145. file_reader.cc
  146. file_reader.h
  147. file_reader_unittest.cc
  148. geolocation_info.cc
  149. geolocation_info.h
  150. glib.cc
  151. glib.h
  152. glib_io_handler_factory.cc
  153. glib_io_handler_factory.h
  154. glib_io_input_handler.cc
  155. glib_io_input_handler.h
  156. glib_io_ready_handler.cc
  157. glib_io_ready_handler.h
  158. HACKING
  159. hook_table.cc
  160. hook_table.h
  161. hook_table_unittest.cc
  162. http_proxy.cc
  163. http_proxy.h
  164. http_proxy_unittest.cc
  165. http_request.cc
  166. http_request.h
  167. http_request_unittest.cc
  168. http_url.cc
  169. http_url.h
  170. http_url_unittest.cc
  171. icmp.cc
  172. icmp.h
  173. icmp_unittest.cc
  174. ip_address_store.cc
  175. ip_address_store.h
  176. ip_address_store_unittest.cc
  177. ipconfig.cc
  178. ipconfig.h
  179. ipconfig_dbus_adaptor.cc
  180. ipconfig_dbus_adaptor.h
  181. ipconfig_unittest.cc
  182. key_file_store.cc
  183. key_file_store.h
  184. key_file_store_unittest.cc
  185. key_value_store.cc
  186. key_value_store.h
  187. key_value_store_unittest.cc
  188. link_monitor.cc
  189. link_monitor.h
  190. link_monitor_unittest.cc
  191. logging.cc
  192. logging.h
  193. manager.cc
  194. manager.h
  195. manager_dbus_adaptor.cc
  196. manager_dbus_adaptor.h
  197. manager_unittest.cc
  198. metrics.cc
  199. metrics.h
  200. metrics_unittest.cc
  201. mock_adaptors.cc
  202. mock_adaptors.h
  203. mock_ares.cc
  204. mock_ares.h
  205. mock_arp_client.cc
  206. mock_arp_client.h
  207. mock_async_connection.cc
  208. mock_async_connection.h
  209. mock_certificate_file.cc
  210. mock_certificate_file.h
  211. mock_connection.cc
  212. mock_connection.h
  213. mock_connection_health_checker.cc
  214. mock_connection_health_checker.h
  215. mock_connection_info_reader.cc
  216. mock_connection_info_reader.h
  217. mock_connectivity_trial.cc
  218. mock_connectivity_trial.h
  219. mock_control.cc
  220. mock_control.h
  221. mock_crypto_util_proxy.cc
  222. mock_crypto_util_proxy.h
  223. mock_dbus_manager.cc
  224. mock_dbus_manager.h
  225. mock_dbus_properties_proxy.cc
  226. mock_dbus_properties_proxy.h
  227. mock_dbus_service_proxy.cc
  228. mock_dbus_service_proxy.h
  229. mock_device.cc
  230. mock_device.h
  231. mock_device_claimer.cc
  232. mock_device_claimer.h
  233. mock_device_info.cc
  234. mock_device_info.h
  235. mock_dhcp_config.cc
  236. mock_dhcp_config.h
  237. mock_dhcp_provider.cc
  238. mock_dhcp_provider.h
  239. mock_dhcp_proxy.cc
  240. mock_dhcp_proxy.h
  241. mock_diagnostics_reporter.cc
  242. mock_diagnostics_reporter.h
  243. mock_dns_client.cc
  244. mock_dns_client.h
  245. mock_dns_client_factory.cc
  246. mock_dns_client_factory.h
  247. mock_dns_server_tester.cc
  248. mock_dns_server_tester.h
  249. mock_eap_credentials.cc
  250. mock_eap_credentials.h
  251. mock_eap_listener.cc
  252. mock_eap_listener.h
  253. mock_event_dispatcher.cc
  254. mock_event_dispatcher.h
  255. mock_external_task.cc
  256. mock_external_task.h
  257. mock_file_io.h
  258. mock_glib.cc
  259. mock_glib.h
  260. mock_http_request.cc
  261. mock_http_request.h
  262. mock_ip_address_store.cc
  263. mock_ip_address_store.h
  264. mock_ipconfig.cc
  265. mock_ipconfig.h
  266. mock_link_monitor.cc
  267. mock_link_monitor.h
  268. mock_log.cc
  269. mock_log.h
  270. mock_log_unittest.cc
  271. mock_manager.cc
  272. mock_manager.h
  273. mock_metrics.cc
  274. mock_metrics.h
  275. mock_passive_link_monitor.cc
  276. mock_passive_link_monitor.h
  277. mock_pending_activation_store.cc
  278. mock_pending_activation_store.h
  279. mock_portal_detector.cc
  280. mock_portal_detector.h
  281. mock_power_manager.cc
  282. mock_power_manager.h
  283. mock_power_manager_proxy.cc
  284. mock_power_manager_proxy.h
  285. mock_ppp_device.cc
  286. mock_ppp_device.h
  287. mock_ppp_device_factory.cc
  288. mock_ppp_device_factory.h
  289. mock_process_killer.cc
  290. mock_process_killer.h
  291. mock_profile.cc
  292. mock_profile.h
  293. mock_property_store.cc
  294. mock_property_store.h
  295. mock_proxy_factory.cc
  296. mock_proxy_factory.h
  297. mock_resolver.cc
  298. mock_resolver.h
  299. mock_routing_table.cc
  300. mock_routing_table.h
  301. mock_service.cc
  302. mock_service.h
  303. mock_socket_info_reader.cc
  304. mock_socket_info_reader.h
  305. mock_store.cc
  306. mock_store.h
  307. mock_traffic_monitor.cc
  308. mock_traffic_monitor.h
  309. mock_virtual_device.cc
  310. mock_virtual_device.h
  311. NETLINK_MESSAGES.txt
  312. nice_mock_control.cc
  313. nice_mock_control.h
  314. OWNERS
  315. passive_link_monitor.cc
  316. passive_link_monitor.h
  317. passive_link_monitor_unittest.cc
  318. pending_activation_store.cc
  319. pending_activation_store.h
  320. pending_activation_store_unittest.cc
  321. portal_detector.cc
  322. portal_detector.h
  323. portal_detector_unittest.cc
  324. power_manager.cc
  325. power_manager.h
  326. power_manager_proxy.cc
  327. power_manager_proxy.h
  328. power_manager_proxy_interface.h
  329. power_manager_unittest.cc
  330. ppp_daemon.cc
  331. ppp_daemon.h
  332. ppp_daemon_unittest.cc
  333. ppp_device.cc
  334. ppp_device.h
  335. ppp_device_factory.cc
  336. ppp_device_factory.h
  337. ppp_device_unittest.cc
  338. process_killer.cc
  339. process_killer.h
  340. process_killer_unittest.cc
  341. profile.cc
  342. profile.h
  343. profile_dbus_adaptor.cc
  344. profile_dbus_adaptor.h
  345. profile_dbus_property_exporter.cc
  346. profile_dbus_property_exporter.h
  347. profile_dbus_property_exporter_unittest.cc
  348. profile_unittest.cc
  349. property_accessor.h
  350. property_accessor_unittest.cc
  351. property_iterator.h
  352. property_observer.h
  353. property_observer_interface.h
  354. property_observer_unittest.cc
  355. property_store.cc
  356. property_store.h
  357. property_store_unittest.cc
  358. property_store_unittest.h
  359. protobuf_lite_streams.cc
  360. protobuf_lite_streams.h
  361. provider_db_unittest.bfd
  362. provider_interface.h
  363. proxy_factory.cc
  364. proxy_factory.h
  365. refptr_types.h
  366. resolver.cc
  367. resolver.h
  368. resolver_unittest.cc
  369. result_aggregator.cc
  370. result_aggregator.h
  371. result_aggregator_unittest.cc
  372. routing_table.cc
  373. routing_table.h
  374. routing_table_entry.h
  375. routing_table_unittest.cc
  376. rpc_task.cc
  377. rpc_task.h
  378. rpc_task_dbus_adaptor.cc
  379. rpc_task_dbus_adaptor.h
  380. rpc_task_unittest.cc
  381. scope_logger.cc
  382. scope_logger.h
  383. scope_logger_unittest.cc
  384. scoped_umask.cc
  385. scoped_umask.h
  386. service.cc
  387. service.h
  388. service_dbus_adaptor.cc
  389. service_dbus_adaptor.h
  390. service_property_change_notifier.cc
  391. service_property_change_notifier.h
  392. service_property_change_test.cc
  393. service_property_change_test.h
  394. service_sorter.h
  395. service_under_test.cc
  396. service_under_test.h
  397. service_unittest.cc
  398. shared_dbus_connection.cc
  399. shared_dbus_connection.h
  400. shill.gyp
  401. shill.gypi
  402. shill_ares.cc
  403. shill_ares.h
  404. shill_config.cc
  405. shill_config.h
  406. shill_daemon.cc
  407. shill_daemon.h
  408. shill_export.h
  409. shill_main.cc
  410. shill_test_config.cc
  411. shill_test_config.h
  412. shill_unittest.cc
  413. socket_info.cc
  414. socket_info.h
  415. socket_info_reader.cc
  416. socket_info_reader.h
  417. socket_info_reader_unittest.cc
  418. socket_info_unittest.cc
  419. static_ip_parameters.cc
  420. static_ip_parameters.h
  421. static_ip_parameters_unittest.cc
  422. store_interface.h
  423. stub_storage.h
  424. technology.cc
  425. technology.h
  426. technology_unittest.cc
  427. TESTING
  428. testing.h
  429. testrunner.cc
  430. tethering.cc
  431. tethering.h
  432. traffic_monitor.cc
  433. traffic_monitor.h
  434. traffic_monitor_unittest.cc
  435. virtual_device.cc
  436. virtual_device.h
  437. virtual_device_unittest.cc