From patchwork Sun Jul 1 04:01:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonatan Schlag X-Patchwork-Id: 1856 Return-Path: Received: from mail01.ipfire.org (unknown [172.28.1.200]) by web02.i.ipfire.org (Postfix) with ESMTP id 4C9C46095C for ; Sat, 30 Jun 2018 20:02:15 +0200 (CEST) Received: from mail01.i.ipfire.org (localhost [127.0.0.1]) by mail01.ipfire.org (Postfix) with ESMTP id EF81610910C5; Sat, 30 Jun 2018 19:02:14 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1530381735; 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:references:list-id: list-unsubscribe:list-subscribe:list-post; bh=QkX23b+KSgRo/7VcppEl9G4OUbQOEKm9+ObpTpOFTg4=; b=xTDUMPaqwpchMesqHg8raW7fWKHcYbgqo685bziP12LejM3y4aMzxvx+daic8tpoV1y4Ty TV+284oiFWGddgIsDGqkNR6ZVuRnkhG2OYy/q3fPGyoDA4oScq6J6eZXirHUY8Mgh4a0vr fjR2g+geTh5J2iC1eM5PLmmP7YamKqJ7Y4OLhoLC2ab7xsQLFMDn4e2zteuOhhDdSPU34n 2M0G3Hx8EAGzG2dAzZRYTjfrdl7JAMc4wQhJM/xOWjtf8J9JYQrn4F8YI2ld+N5UnMIede 8MKNkb3UwclSd7+ryvgSZ/l2y6Ph50xC0v8R5m8w1BzHM7tiK1A96t4U8DRNlQ== Received: from bockland.local.familyschlag (unknown [46.183.103.17]) (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 924C110910C5; Sat, 30 Jun 2018 19:02:00 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1530381732; 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:references; bh=QkX23b+KSgRo/7VcppEl9G4OUbQOEKm9+ObpTpOFTg4=; b=ZDE2NEh80pCbHtakVIYgwGYCnK9KxMH+Z2u7Irj0p+EhigHokWEAe2qsJxDLn6CoxhibjV RRPXrUXDl8Xo/1f8bXxKO4b49pP1wML+tjsK4Cg0GYCIfxzTWDulo/awmFLL3OWND3YUB7 wr3YqJSP3LFRaCzYK95rQPVwo2mmwGvPFInROwXuN11Q//qmvV8ZqG1adYOAG7+1cTNQdh lZVPetlpKNVY93PLQU2wawIQr3NfbWb7LoEUCqSXWJQlyclp5ee6oDg5YoUk0xcALoL3X9 B7uMWeo+GMzAf8CPXADMmJiAStxci7tVcLvPKbo3hrUhtIuNAosiFQ9xg6L0MQ== From: Jonatan Schlag To: network@lists.ipfire.org Subject: [PATCH 1/3] This recipe just resets the network config to a clean state Date: Sat, 30 Jun 2018 20:01:40 +0200 Message-Id: <20180630180142.10382-1-jonatan.schlag@ipfire.org> X-Mailer: git-send-email 2.11.0 Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=jschlag smtp.mailfrom=jonatan.schlag@ipfire.org X-Spamd-Result: default: False [-4.94 / 11.00]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; NEURAL_HAM(-2.84)[-0.947,0]; FROM_HAS_DN(0.00)[]; BAYES_HAM(-3.00)[100.00%]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_CONTAINS_FROM(1.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[]; ASN(0.00)[asn:34953, ipnet:46.183.96.0/21, country:DE]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_ZERO(0.00)[0] X-Spam-Status: No, score=-4.94 X-Rspamd-Server: mail01.i.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 --- test/nitsi/include/network-reset | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/nitsi/include/network-reset diff --git a/test/nitsi/include/network-reset b/test/nitsi/include/network-reset new file mode 100644 index 0000000..d82e2b1 --- /dev/null +++ b/test/nitsi/include/network-reset @@ -0,0 +1 @@ +all: network reset --force From patchwork Sun Jul 1 04:01:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonatan Schlag X-Patchwork-Id: 1857 Return-Path: Received: from mail01.ipfire.org (unknown [172.28.1.200]) by web02.i.ipfire.org (Postfix) with ESMTP id 859F56095C for ; Sat, 30 Jun 2018 20:03:18 +0200 (CEST) Received: from mail01.i.ipfire.org (localhost [127.0.0.1]) by mail01.ipfire.org (Postfix) with ESMTP id 65F4310910C5; Sat, 30 Jun 2018 19:03:18 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1530381798; 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=VOh+CXTSlO4y2PCXJ0pZc9zZrPbJzN+EjomJiBuyma4=; b=lYDZcjqMMWby2gnYuc80TrOytnM98rROfo1hIPmBfYHDcCagmVff0oGSbtwJhu/A01YLBz kwRGrdYUGRzrQXFCrjmmJzqiP9JNOjnpfc+72ub0Bhv85+E2+tCLLLoQ0UeX8ROSMI+feb 7dPbqq/5741HSgW1o7KYQm15lgm90cqjFN1r9dnmLNsQk3a9iHLPjSb94aFBQIlc5GK15T yTQeqT2Xb/A1UZpNYMT2lMb/JUvriWPdi5e7N+4gNPTABoKYQKcTuWeBSxQ9vot57st2lR VQtEHJifDS2Y1OsQnfArGWgsEhp8AiPyRCxv97arzxbIc4zrY+6NCLH9XZ7u+g== Received: from bockland.local.familyschlag (unknown [46.183.103.17]) (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 5232B106CEFA; Sat, 30 Jun 2018 19:03:17 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1530381797; 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=VOh+CXTSlO4y2PCXJ0pZc9zZrPbJzN+EjomJiBuyma4=; b=P7O9Du3H2A368m6PI5KVv1MCL786fn61cfqKBvDEZYO3f79cPr6zm+BCzt729mP5iG5LMe VFIiPMBQOJlEbdY/wycmbuu5x/fRTyEiescmWwFPpmgPXABWDss+fuvJlTTFgRbL2EK9Ls 95j5L47fwWGVZdrgpt3Mi5cx10C9RtblR09r0rX+15CnGAwcUq/3F5Vg4c7jzYY8ku/seF H9FnDi+oFbf+nHstOs/l1wgsj+cJQoK1EnNZI9dPUIY0WUiUdMp2m41sm3dAwPEZN8+Njs 11RUzqgsGO8/lIb1TDMFXawWOKqZ0OZ72jG4ZViw1W/MJf1aQgyadLxPoQjA9A== From: Jonatan Schlag To: network@lists.ipfire.org Subject: [PATCH 2/3] Recipe to set network settings for each test Date: Sat, 30 Jun 2018 20:01:41 +0200 Message-Id: <20180630180142.10382-2-jonatan.schlag@ipfire.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180630180142.10382-1-jonatan.schlag@ipfire.org> References: <20180630180142.10382-1-jonatan.schlag@ipfire.org> Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=jschlag smtp.mailfrom=jonatan.schlag@ipfire.org X-Spamd-Result: default: False [-9.02 / 11.00]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; NEURAL_HAM(-2.92)[-0.972,0]; FROM_HAS_DN(0.00)[]; BAYES_HAM(-3.00)[100.00%]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_CONTAINS_FROM(1.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[]; ASN(0.00)[asn:34953, ipnet:46.183.96.0/21, country:DE]; REPLY(-4.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_ZERO(0.00)[0] X-Spam-Status: No, score=-9.02 X-Rspamd-Server: mail01.i.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" Some network settings are equal for each test (we always want debugging messages). We use this recipe to write them down once and using them via the include statement in every test. Signed-off-by: Jonatan Schlag --- test/nitsi/include/network-settings | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 test/nitsi/include/network-settings diff --git a/test/nitsi/include/network-settings b/test/nitsi/include/network-settings new file mode 100644 index 0000000..8a0facb --- /dev/null +++ b/test/nitsi/include/network-settings @@ -0,0 +1,2 @@ +# Generic network settings whcih are equal for each test +all: network settings DEBUG=1 \ No newline at end of file From patchwork Sun Jul 1 04:01:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonatan Schlag X-Patchwork-Id: 1858 Return-Path: Received: from mail01.ipfire.org (unknown [172.28.1.200]) by web02.i.ipfire.org (Postfix) with ESMTP id D487A6095C for ; Sat, 30 Jun 2018 20:03:33 +0200 (CEST) Received: from mail01.i.ipfire.org (localhost [127.0.0.1]) by mail01.ipfire.org (Postfix) with ESMTP id B5CD610910C5; Sat, 30 Jun 2018 19:03:33 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1530381813; 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=L93Huky1O4DV4Wipn4CEka7VHbddZ72WTLXJQSEMp+c=; b=LJHux3q4D2bvSO4a608lK8eh4FmmCIc6ahOmh5Pv0UFwBfDGU46BJV/YOyT0Y/rEQOKU7t XKJPtF7frTvWdzklezsO9UTND5V8aW84gTR296HavbEjesFdOAWBypirNPIOKbBJrNTj2i pjoZ4+ScgcUzW7IWUnIb5JbITejkNAmYzl8fIHI6s6mZ5Y+mUIINmoKrfQFuvA/CB1Rkrg 3iheQPP45NhS39sp7294XiJ5MeUSuy2HtTJbZG3G02Vu+v78KD/dU4GR88y9MlcqdSWv5c JX/aNTQ99Pbulq9ot1b/xc0GYRTgxo9gQVW7k0i6etNEOqBDQATkUL163tgt/Q== Received: from bockland.local.familyschlag (unknown [46.183.103.17]) (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 E1AF6106CEFA; Sat, 30 Jun 2018 19:03:30 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1530381811; 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=L93Huky1O4DV4Wipn4CEka7VHbddZ72WTLXJQSEMp+c=; b=09EYbrv4yeQ08du9TrmPjGPlwrqGh30dYeTnrGQXK3MlKcejacHSFvM2aUni+2EDlCn4Iv G9Ux3RaKubnuFzuNIUF/EBnqu8ronLPNsw7JU6aF8VcmK7f/XPOs9RwtWRCFNy/bcZMinB BoQy7qzP+pvhNU0aJmKRLfxeBPvT93OZnsV90zPzpnXo/DQ1bwmXP9FPsbLiTmw/kjRTMR SYqLehmLPs0F4LHNh8m0anVFxUrni0ai9m/LoijfS6zApn7ThwWUBlH4NRFuCSnIgeB1M9 ZvbcpMnMg3AdYdPfbUxZQrkncRBEFL9M1xX4aktYWWtcTePP1LkCWuxEeWP2TA== From: Jonatan Schlag To: network@lists.ipfire.org Subject: [PATCH 3/3] Add zone-new-bridge test Date: Sat, 30 Jun 2018 20:01:42 +0200 Message-Id: <20180630180142.10382-3-jonatan.schlag@ipfire.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180630180142.10382-1-jonatan.schlag@ipfire.org> References: <20180630180142.10382-1-jonatan.schlag@ipfire.org> Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=jschlag smtp.mailfrom=jonatan.schlag@ipfire.org X-Spamd-Result: default: False [-9.00 / 11.00]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; NEURAL_HAM(-2.90)[-0.968,0]; FROM_HAS_DN(0.00)[]; BAYES_HAM(-3.00)[100.00%]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_CONTAINS_FROM(1.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[]; ASN(0.00)[asn:34953, ipnet:46.183.96.0/21, country:DE]; REPLY(-4.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_ZERO(0.00)[0] X-Spam-Status: No, score=-9.00 X-Rspamd-Server: mail01.i.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" This test if we can execute 'network zone new upl0 bridge' Signed-off-by: Jonatan Schlag --- Makefile.am | 10 +++++++--- test/nitsi/test/zone-new-bridge/recipe | 9 +++++++++ test/nitsi/test/zone-new-bridge/settings.in | 9 +++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 test/nitsi/test/zone-new-bridge/recipe create mode 100644 test/nitsi/test/zone-new-bridge/settings.in diff --git a/Makefile.am b/Makefile.am index e56d0fb..e717133 100644 --- a/Makefile.am +++ b/Makefile.am @@ -596,17 +596,21 @@ CLEANFILES += \ NITSI_TESTS = \ test/nitsi/test/hello-world \ - test/nitsi/test/make-check + test/nitsi/test/make-check \ + test/nitsi/test/zone-new-bridge EXTRA_DIST += \ test/nitsi/test/hello-world/recipe \ test/nitsi/test/hello-world/settings \ test/nitsi/test/make-check/recipe.in \ - test/nitsi/test/make-check/settings.in + test/nitsi/test/make-check/settings.in \ + test/nitsi/test/zone-new-bridge/recipe \ + test/nitsi/test/zone-new-bridge/settings.in CLEANFILES += \ test/nitsi/test/make-check/recipe \ - test/nitsi/test/make-check/settings + test/nitsi/test/make-check/settings \ + test/nitsi/test/zone-new-bridge/settings NITSI_ENVIRONMENT = diff --git a/test/nitsi/test/zone-new-bridge/recipe b/test/nitsi/test/zone-new-bridge/recipe new file mode 100644 index 0000000..6c054df --- /dev/null +++ b/test/nitsi/test/zone-new-bridge/recipe @@ -0,0 +1,9 @@ +include: ../../include/make-install +include: ../../include/network-settings +include: ../../include/network-reset +all: network zone new upl0 bridge +# this returns zero if the device exists +all: ip link show upl0 +all: ls /sys/class/net/upl0 +# check that the config dir exists +all: ls /etc/network/zones/upl0 diff --git a/test/nitsi/test/zone-new-bridge/settings.in b/test/nitsi/test/zone-new-bridge/settings.in new file mode 100644 index 0000000..207cfa0 --- /dev/null +++ b/test/nitsi/test/zone-new-bridge/settings.in @@ -0,0 +1,9 @@ +[GENERAL] +name = zone-new-bridge +description = This test checks if we can create a new zone of the type 'bridge' + +copy_from = ../../../../@PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz +copy_to = /root/ + +[VIRTUAL_ENVIRONMENT] +path = ../../virtual-environment/basic