Unbreak PingTest.

The test is failing because it expects ::1" to resolve to
"localhost", but it now resolves to "ip6-localhost".

Bug: 18791191
Bug: 19953381
Change-Id: I62279b6219c32e817253c686bf408f0a2fc1fa6b
This commit is contained in:
Lorenzo Colitti
2015-05-18 11:56:32 +09:00
parent 59d433f5ea
commit b1f33d49d0

View File

@@ -155,7 +155,7 @@ public class PingTest extends AndroidTestCase {
public void testLoopbackPing() throws ErrnoException, IOException {
// Generate a random ping packet and send it to localhost.
InetAddress ipv6Loopback = InetAddress.getByName(null);
assertEquals("localhost/::1", ipv6Loopback.toString());
assertEquals("::1", ipv6Loopback.getHostAddress());
for (int i = 0; i < NUM_PACKETS; i++) {
byte[] packet = pingPacket((int) (Math.random() * (MAX_SIZE - ICMP_HEADER_SIZE)));