New issue
Advanced search Search tips

Issue 916903 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Port p2p_ServeFiles, p2p_ShareFiles to Tast

Project Member Reported by nya@google.com, Dec 20

Issue description

This is a tracking bug for porting p2p_ServeFiles, p2p_ShareFiles to Tast.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/357c47543373a9bdebf6cb54a0d5e44a89ba4c47

commit 357c47543373a9bdebf6cb54a0d5e44a89ba4c47
Author: Shuhei Takahashi <nya@chromium.org>
Date: Fri Dec 28 08:43:13 2018

dev-go: Import github.com/hashicorp/mdns.

github.com/hashicorp/mdns is imported as dev-go/mdns for P2P Tast
tests.

github.com/miekg/dns is also imported as dev-go/dns as a dependency
of dev-go/mdns.

dev-go/crypto is updated to the latest version to build dev-go/dns.

BUG= chromium:916903 
TEST=sudo emerge dev-go/mdns dev-go/dns dev-go/crypto

Change-Id: I4ce0ebef2f78061f070b654cb42d3c1aeea103e5
Reviewed-on: https://chromium-review.googlesource.com/1390794
Commit-Ready: Shuhei Takahashi <nya@chromium.org>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>

[add] https://crrev.com/357c47543373a9bdebf6cb54a0d5e44a89ba4c47/dev-go/dns/dns-1.1.1.ebuild
[add] https://crrev.com/357c47543373a9bdebf6cb54a0d5e44a89ba4c47/dev-go/mdns/mdns-0.0.1.ebuild
[modify] https://crrev.com/357c47543373a9bdebf6cb54a0d5e44a89ba4c47/dev-go/crypto/crypto-0.0.1.ebuild
[add] https://crrev.com/357c47543373a9bdebf6cb54a0d5e44a89ba4c47/dev-go/dns/Manifest
[rename] https://crrev.com/357c47543373a9bdebf6cb54a0d5e44a89ba4c47/dev-go/crypto/crypto-0.0.1-r4.ebuild
[modify] https://crrev.com/357c47543373a9bdebf6cb54a0d5e44a89ba4c47/dev-go/crypto/Manifest
[add] https://crrev.com/357c47543373a9bdebf6cb54a0d5e44a89ba4c47/dev-go/mdns/Manifest

Project Member

Comment 2 by bugdroid1@chromium.org, Dec 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/c83aabbcb65651e9b39f9901375d2230edc57cda

commit c83aabbcb65651e9b39f9901375d2230edc57cda
Author: Shuhei Takahashi <nya@chromium.org>
Date: Fri Dec 28 21:01:24 2018

platform: Add P2P tests.

These Tast tests are ported from Autotest:

- platform.P2PClient (p2p_ConsumeFiles):
  Tests that Chromium OS can download files from local network peers
  with p2p-client by running fake P2P servers.
- platform.P2PServer (p2p_ServeFiles, p2p_ShareFiles):
  Tests that Chromium OS can serve files to local network peers with
  p2p-server by running a fake P2P client.

The most challenging part of these tests is that the P2P protocol
uses multicasts for DNS-SD, but multicasts do not work properly with
loopback network interfaces. The original P2P autotests avoided this
problem by using TUN/TAP network devices and emulating the network
stack in Python, which is incredible but a lot of work.

New Tast tests use network namespaces and virtual network interfaces
instead to tackle with the problem. We run avahi-daemon in the
network namespace, and connect it to the default network namespace
(where Tast test process run) with a pair of virtual network
interfaces. This way we can make sure multicast packets go through
routing instead of loopback. See p2p.go for a diagram illustrating
the configuration.

BUG= chromium:916903 
TEST=tast run DUT platform.P2P{Client,Server}
TEST=fast_build.sh -C
CQ-DEPEND=CL:1390794
CQ-DEPEND=CL:1390795
CQ-DEPEND=CL:1390796

Change-Id: I33fc31484805e74755370c6aa9a6863693e19be4
Reviewed-on: https://chromium-review.googlesource.com/1390680
Commit-Ready: Shuhei Takahashi <nya@chromium.org>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[add] https://crrev.com/c83aabbcb65651e9b39f9901375d2230edc57cda/src/chromiumos/tast/local/bundles/cros/platform/p2p_client.go
[add] https://crrev.com/c83aabbcb65651e9b39f9901375d2230edc57cda/src/chromiumos/tast/local/bundles/cros/platform/p2p/p2p.go
[add] https://crrev.com/c83aabbcb65651e9b39f9901375d2230edc57cda/src/chromiumos/tast/local/bundles/cros/platform/p2p_server.go
[modify] https://crrev.com/c83aabbcb65651e9b39f9901375d2230edc57cda/src/chromiumos/tast/local/upstart/upstart.go

Project Member

Comment 3 by bugdroid1@chromium.org, Dec 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/5ebe5355c006c4ebcab963d96c115c93c9e51861

commit 5ebe5355c006c4ebcab963d96c115c93c9e51861
Author: Shuhei Takahashi <nya@chromium.org>
Date: Fri Dec 28 21:01:24 2018

net-dns/avahi-daemon: Allow running in netns for testing.

Tast tests for P2P functionality need to run avahi-daemon in an
isolated network namespace. This patch allows it by passing NETNS
parameter to the avahi upstart job.

BUG= chromium:916903 
TEST=Patched avahi.conf locally
TEST=start avahi NETNS=foo
TEST=start avahi NETNS="foo rm -rf /tmp/foo"

Change-Id: I4b8f716c49c374cd7ad7238b6ba5ce941dcdff43
Reviewed-on: https://chromium-review.googlesource.com/1390795
Commit-Ready: Shuhei Takahashi <nya@chromium.org>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>

[modify] https://crrev.com/5ebe5355c006c4ebcab963d96c115c93c9e51861/net-dns/avahi-daemon/files/init/auto.conf
[rename] https://crrev.com/5ebe5355c006c4ebcab963d96c115c93c9e51861/net-dns/avahi-daemon/avahi-daemon-0.0.1-r7.ebuild
[modify] https://crrev.com/5ebe5355c006c4ebcab963d96c115c93c9e51861/net-dns/avahi-daemon/files/init/manual.conf

Project Member

Comment 4 by bugdroid1@chromium.org, Dec 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/3c0e4666a5d1c44edd2f897ba1e11dd21c937971

commit 3c0e4666a5d1c44edd2f897ba1e11dd21c937971
Author: Shuhei Takahashi <nya@chromium.org>
Date: Fri Dec 28 21:01:23 2018

tast-local-tests-cros: Depend on dev-go/mdns.

BUG= chromium:916903 
TEST=emerge-betty tast-local-tests-cros
CQ-DEPEND=CL:1390794

Change-Id: I95ea487a8fc6809e08626804778bdb025a4ad0b8
Reviewed-on: https://chromium-review.googlesource.com/1390796
Commit-Ready: Shuhei Takahashi <nya@chromium.org>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[modify] https://crrev.com/3c0e4666a5d1c44edd2f897ba1e11dd21c937971/chromeos-base/tast-local-tests-cros/tast-local-tests-cros-9999.ebuild

Status: Fixed (was: Assigned)
Note: boards with kernel v3.14 were failing because "ip netns" did not work, but they were fixed by crrev.com/c/361562 and crrev.com/c/361563.

Sign in to add a comment