From patchwork Sat Aug 11 23:03:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonatan Schlag X-Patchwork-Id: 1877 Return-Path: Received: from mail01.ipfire.org (mail01.i.ipfire.org [172.28.1.200]) by web02.i.ipfire.org (Postfix) with ESMTP id 1CC5661DF5 for ; Sat, 11 Aug 2018 15:03:32 +0200 (CEST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 001D210A555B; Sat, 11 Aug 2018 14:03:31 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1533992612; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references:list-id:list-unsubscribe:list-subscribe:list-post; bh=MKez6jxx5pZiWFoFK3zu/pYa7Yn0GXVMXljk3sN3UBg=; b=pMlx6nub8vmSzUIy5HAYj1IvEIzAUCns/7kgeJcPHfv7JWTRVZKXAFx0LKK+UluQIiGXH9 kS0JiMuP5EyK0vDuKDXi9ABOWrIR9jKOnMXCEz7JpKg4QJ78rDwprvSlzD2EbDfmjKzbkN m5OY3ofhuZorbdjxbw+uOT9OMxb9zUnJ9uN/HMwoik16AzW25q+7SOusxg2j0JfhYvkzUx ESzXZJcFIGUmoabYg1d5LGvmSkjisXuQkpZly7LO0l4yKNBBZELld4oJEo+quU+jA32nVx pcTK8elOQ0E4YkePK6URQ9EYypwXsNykFKHzVFuYVvvlg3sBhpz+EDspyqBlHg== Received: from bockland.local.familyschlag (unknown [10.172.1.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 3D480109370A; Sat, 11 Aug 2018 14:03:30 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1533992610; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=MKez6jxx5pZiWFoFK3zu/pYa7Yn0GXVMXljk3sN3UBg=; b=UNFSR8oHX0Fa/ftUNEuKxuKDxo6aNOJNj/96HnPKMFAeQt0FxXa8l95qr8iC6z7ZDLZYhg kAqkCOh9aXDG7UwnuV9V8pndycrgjLTlt4NdKnYVj9A21nbSH7PksVu4+tTwHS97e7I3+e W/xaCVYsRRgy3uK75RMHCLfXBfEKyZEMU5SSbqUM5Le4EjVml1FwdLa44QttFbFKAhiBTD jMa8mphCTfOebu8/4OD3tKINUChPDrC2im5gnfSFHEzq6ACZh/ze1yhdn2ylL8/zhZTScr 2t1dbKrHyPEPSL7pGAJkYPWx2jNIw70ep8imZEaLiysCQfqNIHxzyeAiPoL9KQ== From: Jonatan Schlag To: network@lists.ipfire.org Subject: [PATCH 2/2] Add a test to check that we can attach ports to a zone of type bridge Date: Sat, 11 Aug 2018 15:03:23 +0200 Message-Id: <20180811130323.19669-2-jonatan.schlag@ipfire.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180811130323.19669-1-jonatan.schlag@ipfire.org> References: <20180811130323.19669-1-jonatan.schlag@ipfire.org> X-BeenThere: network@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List for the network package List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: network-bounces@lists.ipfire.org Sender: "network" Signed-off-by: Jonatan Schlag --- Makefile.am | 10 +++++++--- test/nitsi/test/zone-port-attach-bridge/.gitignore | 3 +++ test/nitsi/test/zone-port-attach-bridge/recipe | 9 +++++++++ test/nitsi/test/zone-port-attach-bridge/settings.in | 9 +++++++++ 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 test/nitsi/test/zone-port-attach-bridge/.gitignore create mode 100644 test/nitsi/test/zone-port-attach-bridge/recipe create mode 100644 test/nitsi/test/zone-port-attach-bridge/settings.in diff --git a/Makefile.am b/Makefile.am index 1ea715e..fa12f4e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -602,7 +602,8 @@ NITSI_TESTS = \ test/nitsi/test/hello-world \ test/nitsi/test/make-check \ test/nitsi/test/raw-device-get-by-mac \ - test/nitsi/test/zone-new-bridge + test/nitsi/test/zone-new-bridge \ + test/nitsi/test/zone-port-attach-bridge EXTRA_DIST += \ test/nitsi/test/hello-world/recipe \ @@ -612,13 +613,16 @@ EXTRA_DIST += \ test/nitsi/test/raw-device-get-by-mac/recipe \ test/nitsi/test/raw-device-get-by-mac/settings.in \ test/nitsi/test/zone-new-bridge/recipe \ - test/nitsi/test/zone-new-bridge/settings.in + test/nitsi/test/zone-new-bridge/settings.in \ + test/nitsi/test/zone-port-attach-bridge/recipe \ + test/nitsi/test/zone-port-attach-bridge/settings.in CLEANFILES += \ test/nitsi/test/make-check/recipe \ test/nitsi/test/make-check/settings \ test/nitsi/test/raw-device-get-by-mac/settings \ - test/nitsi/test/zone-new-bridge/settings + test/nitsi/test/zone-new-bridge/settings \ + test/nitsi/test/zone-port-attach-bridge/settings NITSI_ENVIRONMENT = diff --git a/test/nitsi/test/zone-port-attach-bridge/.gitignore b/test/nitsi/test/zone-port-attach-bridge/.gitignore new file mode 100644 index 0000000..8a9bd77 --- /dev/null +++ b/test/nitsi/test/zone-port-attach-bridge/.gitignore @@ -0,0 +1,3 @@ +/log +/recipe.log +/settings diff --git a/test/nitsi/test/zone-port-attach-bridge/recipe b/test/nitsi/test/zone-port-attach-bridge/recipe new file mode 100644 index 0000000..92dd262 --- /dev/null +++ b/test/nitsi/test/zone-port-attach-bridge/recipe @@ -0,0 +1,9 @@ +include: ../../include/make-install +include: ../../include/network-settings +include: ../../include/network-reset +alice: network zone new upl0 bridge +# Create a dummy port we can attach to upl0 +alice: network port new dummy +alice: network zone upl0 port attach d0 +# Check if the port is really attached +alice: ls /sys/class/net/upl0/brif/d0 \ No newline at end of file diff --git a/test/nitsi/test/zone-port-attach-bridge/settings.in b/test/nitsi/test/zone-port-attach-bridge/settings.in new file mode 100644 index 0000000..c52be6d --- /dev/null +++ b/test/nitsi/test/zone-port-attach-bridge/settings.in @@ -0,0 +1,9 @@ +[GENERAL] +name = zone-port-attach-bridge +description = This test checks if we cann attach a dummy port to a zone + +copy_from = ../../../../@PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz +copy_to = /root/ + +[VIRTUAL_ENVIRONMENT] +path = ../../virtual-environment/basic