074f65c0504cfba2062b934269b96e82e08f8cd9 |
|
13-Oct-2014 |
Christopher Wiley <wiley@chromium.org> |
autotest: Add register_service helper method to ZeroconfDaemon This allows us to easily register all the records needed to expose a 'service' in the Avahi sense of the word. BUG=chromium:418738 TEST=A pending test consumes this functionality without obvious issue. Change-Id: I6cb6be8652d41076cf88b7ca73aa7e953bd40c5c Reviewed-on: https://chromium-review.googlesource.com/223095 Tested-by: Christopher Wiley <wiley@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Christopher Wiley <wiley@chromium.org>
/external/autotest/client/cros/netprotos/zeroconf.py
|
cb9864e93dd06fd51555f96cf95df4dbf0ce02c4 |
|
26-Sep-2014 |
Christopher Wiley <wiley@chromium.org> |
Add InterfaceHost for ZeroconfDaemon Add a type of host that binds a UDP socket to a particular interface rather than relying on TUN/TAP support via the simulator. While here, change the tuples returned by cached_results to be namedtuples, and add some simple utilities to avahi_utils. BUG=chromium:412975 TEST=The test that depends on this passes. p2p_* still pass. Change-Id: I9aa07e7f2e07cabe9b07ded345fc4f15ebe67c46 Reviewed-on: https://chromium-review.googlesource.com/220440 Reviewed-by: Christopher Wiley <wiley@chromium.org> Commit-Queue: Christopher Wiley <wiley@chromium.org> Tested-by: Christopher Wiley <wiley@chromium.org>
/external/autotest/client/cros/netprotos/zeroconf.py
|
90000536174d9c752a91e48a0514a8eb2dd64441 |
|
16-Jan-2014 |
Alex Deymo <deymo@chromium.org> |
netprotos: Process authoritative answers on mDNS queries A mDNS query can contain a list of authoritative answers separated from the list of known answers to the sent queries. This patch makes the ZeroconfDaemon process those answers when they are seen on a query packet and includes a unittest for that case. BUG=chromium:328078 TEST=unittests and p2p_ServeFiles still passes. Change-Id: I0609d35a2eaf08118d30f3ed68ed89754e803a42 Reviewed-on: https://chromium-review.googlesource.com/182731 Tested-by: Alex Deymo <deymo@chromium.org> Reviewed-by: Don Garrett <dgarrett@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org>
/external/autotest/client/cros/netprotos/zeroconf.py
|
dd874b90d66b46deb889ee21438f5c27a9ca7647 |
|
15-Jan-2014 |
Alex Deymo <deymo@chromium.org> |
netprotos: Add initial unittests for Zeroconf module. The ZeroconfDaemon class provides a partial python implementation of the Zeroconf protocol used for integration testing of P2P features. The implementation is based on the lansim simulator but it can be run independently with a different underlying Host class with the same interface. This patch adds a new FakeHost and basic unit tests for the ZeroconfDaemon class. BUG=chromium:328078 TEST=./utils/unittest_suite.py --debug client.cros.netprotos.zeroconf_unittest Change-Id: Ie081f8ba9a78bc42603d7397c4e9be5ebe439a2e Reviewed-on: https://chromium-review.googlesource.com/182730 Tested-by: Alex Deymo <deymo@chromium.org> Reviewed-by: Don Garrett <dgarrett@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org>
/external/autotest/client/cros/netprotos/zeroconf.py
|
2c5c348c740930e6effa3e25441e6ba0080b3221 |
|
31-Oct-2013 |
Alex Deymo <deymo@chromium.org> |
p2p_ConsumeFiles: Raise error excetions and fix test. The test p2p_ConsumeFiles checks, among other things, that the p2p-client client hangs when there are too many connections on the network. This check was wrong and wasn't making the test fail because the error.TestFail exception was being created but not raised. This patch solves that problem and also fixes the test in a more robust way. The fake p2p server running on the simulator can now optionally update the network with the new shared file or number of connections, as the real p2p-server does. This notifies p2p-clients with a cached value of num_connections that a new value of num_connections is available. To achieve this, some locking between the test thread and the simulator thread is added to allow the test thread call functions that send packets but from the simulator thread. BUG=None TEST=lansim unittests, test_that p2p_ConsumeFiles and p2p_ShareFiles pass. Change-Id: I89ebf5a33d55cb3ab0f06283f79c6c335d162368 Reviewed-on: https://chromium-review.googlesource.com/175169 Reviewed-by: Don Garrett <dgarrett@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org>
/external/autotest/client/cros/netprotos/zeroconf.py
|
c39594fae840955bf530305e9349694be5953c8f |
|
11-Oct-2013 |
Alex Deymo <deymo@chromium.org> |
p2p: p2p_ShareFiles tests mDNS requests. This patch adds a few more steps to the recent p2p_ShareFiles test to verify that new shared .p2p file is announced by the p2p-server running on the DUT and a peer can actively discover it. BUG=chromium:271847 TEST=test_that p2p_ShareFiles Change-Id: I8bdba85034eb78975d1731ec6b64c96c61ede122 Reviewed-on: https://chromium-review.googlesource.com/174398 Tested-by: Alex Deymo <deymo@chromium.org> Reviewed-by: Don Garrett <dgarrett@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org>
/external/autotest/client/cros/netprotos/zeroconf.py
|
e24633e8df180e0479e78d641a6643e3ec36845d |
|
10-Oct-2013 |
Alex Deymo <deymo@chromium.org> |
p2p: New p2p_ShareFiles test. This test passively checks that the DUT exposes the right information over mDNS when the service p2p is running. To achieve this a new CrosP2PClient class implements the client part of the P2P protocol, but only in a passive way. This means that this fake client doesn't send any request to the DUT. Nevertheless, the mDNS/DNS-SD protocol states that the DUT should annouce the records to the multicast address. This can be extended later to actively request the same information. BUG=chromium:271847 TEST=test_that --fast -b link <dut_ip> p2p_ShareFiles Change-Id: I9f4e61e3094dd876dfaf749df051d42ebf8f59a8 Reviewed-on: https://chromium-review.googlesource.com/172894 Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org>
/external/autotest/client/cros/netprotos/zeroconf.py
|
8cbb993ebc2483d0576ecefbd05d425abd91b5d9 |
|
11-Oct-2013 |
Alex Deymo <deymo@chromium.org> |
netprotos: ZeroconfDaemon don't flush PTR records. mDNS/DNS-SD PTR records are used to discover hosts on the network using a generic protocol name. A host will reply to such request with a PTR (domain pointer) from this generic protocol name to its specific service name. For example, a PTR request for "_cros_p2p._tcp.local" will be replied by several hosts on the network implementing the cros_p2p protocol with responses like "my-hostname._cros_p2p._tcp.local". A host seeing these responses will simply accumulate all the pointer (PTR) responses as they are all valid and will consider them all. In the example before, this means that there are multiple hosts providing the _cros_p2p._tcp.local service, which is normally the case. Setting the DNS_CACHE_FLUSH for one these replies will force a host receiving that response to wipe all the other responses for "_cros_p2p._tcp.local" and keep only that one, which isn't the intended message since several hosts are providing responses to the same generic domain. This patch removes the DNS_CACHE_FLUSH bit from those responses. BUG=chromium:271847 TEST="test_that p2p_ConsumeFiles" still works. Change-Id: Icfaefafd028ec3f1736e71187694454dfe73ecd3 Reviewed-on: https://chromium-review.googlesource.com/172726 Reviewed-by: David Zeuthen <zeuthen@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org>
/external/autotest/client/cros/netprotos/zeroconf.py
|
732dfe9c1124b51b906cb6510f219ad84be58836 |
|
03-Oct-2013 |
Alex Deymo <deymo@chromium.org> |
netprotos: New Zeroconf and P2P server support based on lansim. This patch adds two new classes based on the lansim asynchronous socket interface allowing a user to simulate a host running a Zeroconf/avahi daemon and a P2P server daemon. The examples on the netprotos/__init__.py documentation file show the usage of these two new classes. BUG=chromium:288385 TEST=Manual test: Ran the simulator following the examples on the documentation and use p2p-client to discover the files shared by the simulated P2P server. "p2p-client --list-all" lists all the files shared on the fake interface and "p2p-client --get-url=some_payload" returns the URL for the provided fake host. Change-Id: Ic4f0393768e29fcb3d13e450ad0e8dd2fe1efec3 Reviewed-on: https://chromium-review.googlesource.com/170527 Reviewed-by: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org>
/external/autotest/client/cros/netprotos/zeroconf.py
|