580717f35931982b0a98fef941ecf445a8092348 |
|
24-Jul-2015 |
Don Garrett <dgarrett@google.com> |
unittests: Make all unittests directly runnable. After this, you can run all of the unittests directly, though some of them don't pass when run that way. BUG=chromium:476304 TEST=Ran tests. Change-Id: I07adeb8dbb6f1d2c0bd6287c4ede7300a8211275 Reviewed-on: https://chromium-review.googlesource.com/288372 Tested-by: Don Garrett <dgarrett@chromium.org> Trybot-Ready: Don Garrett <dgarrett@chromium.org> Reviewed-by: Mungyung Ryu <mkryu@google.com> Commit-Queue: Don Garrett <dgarrett@chromium.org>
/external/autotest/client/cros/dhcp_unittest.py
|
8962b2d93ea3ac596b0ac46b1798c67bccd5e3d2 |
|
08-Feb-2014 |
mukesh agrawal <quiche@chromium.org> |
autotest (dhcp): improve dhcp debugging When we receive an unexpected message, log the type of message received, and the type expected. This should make it easier to diagnose failures. While there: fix some warnings about parameters to loggers. (Send the parameters through, instead of applying the format operator.) BUG=chromium:341946 TEST=network_DhcpRenew, network_DhcpNegotiationSuccess, manual manual testing: commented out None entry in MESSAGE_TYPE_BY_NUM, saw network_DhcpNegotiationSuccess fail Change-Id: Ia10af1d85436953607d0b6592d440ce8d7defe3e Reviewed-on: https://chromium-review.googlesource.com/185495 Tested-by: mukesh agrawal <quiche@chromium.org> Reviewed-by: Christopher Wiley <wiley@chromium.org> Commit-Queue: mukesh agrawal <quiche@chromium.org>
/external/autotest/client/cros/dhcp_unittest.py
|
584440a51134ef8decac9c5ff9aefb5b47116e3d |
|
16-Nov-2012 |
Paul Stewart <pstew@chromium.org> |
autotest: dhcp: Add test for classless static routes Add parsing and serialization of the DHCP classless static route option. Add a unit test for the above. Add verification that classless static route options are converted into a default route. Add a test that uses the classless static route option. BUG=chromium-os:25908 TEST=Unit test + run auto test CQ-DEPEND=I6acecb09258229d84d4aa43372a1dc13fbac1df5 Change-Id: Id371841657c45bc3033fb5cc9944d8af5b032402 Reviewed-on: https://gerrit.chromium.org/gerrit/38204 Commit-Ready: Paul Stewart <pstew@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org> Tested-by: Paul Stewart <pstew@chromium.org>
/external/autotest/client/cros/dhcp_unittest.py
|
d0a6e4788c165b272c5da08e5f5630ea3d14c2ed |
|
19-Sep-2012 |
Christopher Wiley <wiley@chromium.org> |
autotest: Add domain search list option to DHCP test logic Add logic to parse and seriallize DHCP domain search lists to the DHCP test framework. BUG=chromium-os:34417 TEST=Added unit tests for parsing and seriallization Change-Id: I3b80c193348492bd711fb443484b67243ca4d5e0 Reviewed-on: https://gerrit.chromium.org/gerrit/33320 Tested-by: Christopher Wiley <wiley@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org> Commit-Ready: Christopher Wiley <wiley@chromium.org>
/external/autotest/client/cros/dhcp_unittest.py
|
30b095f46114605a4013a2840c02ea90cf76f9e9 |
|
14-Sep-2012 |
Christopher Wiley <wiley@chromium.org> |
autotest: Make Dhcp Options optional Stop building certain magical options into the packet creation factories, and move that creation logic out into the handlers. It's impossible to anticipate every possible option you might want in a test, so the decision should be entirely up to the test. BUG=chromium-os:34417 TEST=Unit test still runs, autotests still pass Change-Id: I17e3415136cef64c48c9c1f2db53440c0d75a3b0 Reviewed-on: https://gerrit.chromium.org/gerrit/33160 Tested-by: Christopher Wiley <wiley@chromium.org> Reviewed-by: mukesh agrawal <quiche@chromium.org> Commit-Ready: Christopher Wiley <wiley@chromium.org>
/external/autotest/client/cros/dhcp_unittest.py
|
90c515dd484c31e2973142660a71bd596314a89b |
|
19-Sep-2012 |
Christopher Wiley <wiley@chromium.org> |
autotest: Make DHCP Options easier to use Essentially, this means that we move knowledge about seriallizing DHCP options into the option itself. This means that instead of forcing consumers to say things like: packet.set_option(OPTION_REQUESTED_IP, "\x0A\x0A\x01\x01") consumers just need to say: packet.set_option(OPTION_REQUESTED_IP, "10.10.1.1") This way, consumers don't need to know the actual wire format of an option. This will be helpful when I introduce more complicated options with esoteric seriallization procedures that no one should have to know to write a test. BUG=chromium-os:34417 TEST=Unit test, autotests still pass Change-Id: Ib2f1dd36645cb55edb941953673a4f3dc3f93ec6 Reviewed-on: https://gerrit.chromium.org/gerrit/33235 Commit-Ready: Christopher Wiley <wiley@chromium.org> Reviewed-by: Christopher Wiley <wiley@chromium.org> Tested-by: Christopher Wiley <wiley@chromium.org>
/external/autotest/client/cros/dhcp_unittest.py
|
a5f16dba60b7d501de2e9f8e345f992b0000bcec |
|
13-Sep-2012 |
Christopher Wiley <wiley@chromium.org> |
autotest: Change DHCP Field and Option to namedtuple This lets us use these objects as fields in a dictionary without implementing a lot of very tedious operation methods. This in turn fixes this nonsense where we use the names of Options in some places and the Option numbers in others. BUG=chromium-os:34417 TEST=unittests pass, autotest tests pass Change-Id: I971b98505d0a1e95fd40e6ea3557a7dee63dfa62 Reviewed-on: https://gerrit.chromium.org/gerrit/33151 Commit-Ready: Christopher Wiley <wiley@chromium.org> Reviewed-by: Christopher Wiley <wiley@chromium.org> Tested-by: Christopher Wiley <wiley@chromium.org>
/external/autotest/client/cros/dhcp_unittest.py
|
19b39f62edb37c2971b4a32fb9aad664ccd36c90 |
|
31-Aug-2012 |
Christopher Wiley <wiley@chromium.org> |
autotest: Add more helpers for packet handling Add a handling rule and some test logic for IPv4 DHCP REQUEST packets. Add logic to generate request and acknowledgement packets. Now we have enough framework in place to mock up a full DHCP lease negotiation, from DISCOVERY through ACKNOWLEDGEMENT. BUG=chromium-os:32809 TEST=Added some test logic to dhcp_unittest.py Change-Id: I24c7a4b0ebb8f31818eefa76da6f35bad09918ff Reviewed-on: https://gerrit.chromium.org/gerrit/32812 Commit-Ready: Christopher Wiley <wiley@chromium.org> Reviewed-by: Christopher Wiley <wiley@chromium.org> Tested-by: Christopher Wiley <wiley@chromium.org>
/external/autotest/client/cros/dhcp_unittest.py
|
1964458a980b17c71ea10f9c00c59fe15bb83a96 |
|
17-Aug-2012 |
Christopher Wiley <wiley@chromium.org> |
autotest: Add tools for writing DHCP tests Add dhcp_test_server, dhcp_packet, and dhcp_handling_rule. dhcp_test_server starts up a thread to watch a given port for DHCP packets, and can be programmed with instances of DhcpHandlingRule to expect certain packets and report errors. dhcp_packet defines utility logic to create and parse DHCP packets. There are much more elaborate comments and example usages at the top of all three files. Because this is a fairly elaborate piece of logic, I wrote some simple sanity tests for both DhcpPacket and DhcpTestServer that may be run with $ python dhcp_packet && echo Test passed. $ python dhcp_test_server && echo Test passed. The tests in dhcp_packet.py make sure that packet and serialization works for discovery packets. Tests in dhcp_test_server.py walk through a simple test case where the server expects a DISCOVERY packet, and the client expects a valid response. For debugging and sanity checking, I've taken packet logs of a conversation between dhclient and dhcpd negotiating a ip lease. These logs are in dhcp_test_data/*. I use these logs in the test for DhcpPacket, but they could conceviably be useful in future testing. BUG=chromium-os:32809 TEST=as described above Change-Id: I04c6806e8b02446b0758e507c14ba85f6d10e30f Reviewed-on: https://gerrit.chromium.org/gerrit/31134 Tested-by: Christopher Wiley <wiley@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org> Commit-Ready: Christopher Wiley <wiley@chromium.org>
/external/autotest/client/cros/dhcp_unittest.py
|