From patchwork Fri May 20 18:49:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Stringer X-Patchwork-Id: 624594 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3rBH7K09ghz9sBc for ; Sat, 21 May 2016 04:50:20 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 5367E10CCB; Fri, 20 May 2016 11:50:18 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 1592D10CBB for ; Fri, 20 May 2016 11:50:16 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id 967B44200C2 for ; Fri, 20 May 2016 12:50:15 -0600 (MDT) X-ASG-Debug-ID: 1463770214-09eadd02f01d03d0001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar5.cudamail.com with ESMTP id duu2uoyX06xSe3qH (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 20 May 2016 12:50:14 -0600 (MDT) X-Barracuda-Envelope-From: joe@ovn.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO relay2-d.mail.gandi.net) (217.70.183.194) by mx3-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 20 May 2016 18:50:14 -0000 Received-SPF: pass (mx3-pf1.cudamail.com: SPF record at ovn.org designates 217.70.183.194 as permitted sender) X-Barracuda-Apparent-Source-IP: 217.70.183.194 X-Barracuda-RBL-IP: 217.70.183.194 Received: from mfilter31-d.gandi.net (mfilter31-d.gandi.net [217.70.178.162]) by relay2-d.mail.gandi.net (Postfix) with ESMTP id 3125EC5A5A; Fri, 20 May 2016 20:50:13 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter31-d.gandi.net Received: from relay2-d.mail.gandi.net ([IPv6:::ffff:217.70.183.194]) by mfilter31-d.gandi.net (mfilter31-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id Fkb0pHRywBQp; Fri, 20 May 2016 20:50:11 +0200 (CEST) X-Originating-IP: 208.91.2.4 Received: from archer.localdomain (unknown [208.91.2.4]) (Authenticated sender: joe@ovn.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id A8DD7C5A3C; Fri, 20 May 2016 20:50:10 +0200 (CEST) X-CudaMail-Envelope-Sender: joe@ovn.org From: Joe Stringer To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V1-519036735 X-CudaMail-DTE: 052016 X-CudaMail-Originating-IP: 217.70.183.194 Date: Fri, 20 May 2016 11:49:54 -0700 X-ASG-Orig-Subj: [##CM-V1-519036735##][PATCH 1/6] INSTALL.md: Document system-traffic tests. Message-Id: <1463770199-24391-2-git-send-email-joe@ovn.org> X-Mailer: git-send-email 2.8.2 In-Reply-To: <1463770199-24391-1-git-send-email-joe@ovn.org> References: <1463770199-24391-1-git-send-email-joe@ovn.org> X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1463770214 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH 1/6] INSTALL.md: Document system-traffic tests. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- INSTALL.md | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 76 insertions(+), 12 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 5b37786d973d..82f5188eacb8 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -101,6 +101,14 @@ To run the unit tests, you also need: - Perl. Version 5.10.1 is known to work. Earlier versions should also work. +The "system" tests for userspace and Linux datapaths also rely upon: + + - pyftpdlib. Version 1.2.0 is known to work. Earlier versions should + also work. + + - GNU wget. Version 1.16 is known to work. Earlier versions should + also work. + The ovs-vswitchd.conf.db(5) manpage will include an E-R diagram, in formats other than plain text, only if you have the following: @@ -593,24 +601,43 @@ test failures that you believe to represent bugs in Open vSwitch. Include the precise versions of Open vSwitch and Ryu in your bug report, plus any other information needed to reproduce the problem. -Vagrant -------- +Datapath traffic testing +------------------------ + +Open vSwitch also includes a suite of tests specifically for datapath +functionality, which can be run against the userspace or kernel datapaths. +If you are developing datapath features, it is recommended that you use +these tests and build upon them to verify your implementation. -Requires: Vagrant (version 1.7.0 or later) and a compatible hypervisor +The datapath tests make some assumptions about the environment. They +must be run under root privileges on a Linux system with support for +network namespaces. These tests are recommended to be run within an +isolated environment that is separate from your development system. + +For ease of use, a vagrant box is provided to invoke these tests. This +also provides kernel isolation, protecting your development host from +kernel panics or configuration conflicts in the testsuite. If you wish +to run the tests without using the vagrant box, there are further +instructions below. + +### Vagrant + +*Requires Vagrant (version 1.7.0 or later) and a compatible hypervisor* You must bootstrap and configure the sources (steps are in "Building and Installing Open vSwitch for Linux, FreeBSD or NetBSD" above) before you run the steps described here. A Vagrantfile is provided allowing to compile and provision the source -tree as found locally in a virtual machine using the following commands: +tree as found locally in a virtual machine using the following command: vagrant up - vagrant ssh -This will bring up w Fedora 20 VM by default, alternatively the -`Vagrantfile` can be modified to use a different distribution box as -base. Also, the VM can be reprovisioned at any time: +This will bring up a Fedora 20 VM by default. If you wish to use a +different box or a vagrant backend not supported by the default box, +the `Vagrantfile` can be modified to use a different box as base. + +The VM can be reprovisioned at any time: vagrant provision @@ -619,11 +646,10 @@ OVS out-of-tree compilation environment can be set up with: ./boot.sh vagrant provision --provision-with configure_ovs,build_ovs -This will set up an out-of-tree build environment in /home/vagrant/build. -The source code can be found in /vagrant. Out-of-tree build is preferred -to work around limitations of the sync file systems. +This will set up an out-of-tree build environment inside the VM in +/root/build. The source code can be found in /vagrant. -To recompile and reinstall OVS using RPM: +To recompile and reinstall OVS in the VM using RPM: ./boot.sh vagrant provision --provision-with configure_ovs,install_rpm @@ -635,6 +661,44 @@ the self-tests mentioned above. To run them: ./boot.sh vagrant provision --provision-with configure_ovs,test_ovs_kmod,test_ovs_system_userspace +The results of the testsuite reside in the VM root user's home directory: + + vagrant ssh + sudo -s + cd /root/build + ls tests/system* + +### Native + +The datapath testsuite as invoked by Vagrant above may also be run +manually on a Linux system with root privileges. If some tests are +being skipped, consider updating your iproute2 package and Linux kernel +version. These tests may take several minutes to complete, and cannot be +run in parallel. + +To invoke the system testsuite with the userspace datapath: + + make check-system-userspace + +Make targets are also provided for testing the Linux kernel module. +Note that these tests operate by inserting modules into the running +Linux kernel, so if the tests are able to trigger a bug in the OVS +kernel module or in the upstream kernel then the kernel may panic. + +To run the testsuite against the kernel module which is currently +installed on your system: + + make check-kernel + +To install the kernel module from the current build directory and +run the testsuite against that kernel module: + + make check-kmod + +The testsuite logs will be placed in tests/system-userspace-traffic.log +for the userspace target, or tests/system-kmod-traffic.log for the +kernel targets. + Continuous Integration with Travis-CI -------------------------------------