From: Vadim Kochan <vadim4j@gmail.com>
To: netdev@vger.kernel.org
Cc: Vadim Kochan <vadim4j@gmail.com>
Subject: [PATCH iproute2 1/2] tests: Run each test in network namespace
Date: Tue, 12 May 2015 17:40:15 +0300 [thread overview]
Message-ID: <1431441616-25174-2-git-send-email-vadim4j@gmail.com> (raw)
In-Reply-To: <1431441616-25174-1-git-send-email-vadim4j@gmail.com>
From: Vadim Kochan <vadim4j@gmail.com>
Changed to forcely running each test in network
namespace to do not affect on current network setup.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
---
testsuite/Makefile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/testsuite/Makefile b/testsuite/Makefile
index a2c8a2d..4b945b0 100644
--- a/testsuite/Makefile
+++ b/testsuite/Makefile
@@ -1,9 +1,11 @@
## -- Config --
DEV := lo
-PREFIX := sudo -E
+PREFIX := sudo -E unshare -n
RESULTS_DIR := results
## -- End Config --
+HAVE_UNSHARED_UTIL := $(shell unshare --version 2> /dev/null)
+
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
TESTS := $(patsubst tests/%,%,$(call rwildcard,tests/,*.t))
@@ -38,6 +40,9 @@ distclean: clean
echo "Entering iproute2" && cd iproute2 && $(MAKE) distclean && cd ..;
$(TESTS): clean
+ifeq (,$(HAVE_UNSHARED_UTIL))
+ $(error Please install util-linux tools to run tests in separated network namespace)
+endif
@mkdir -p $(RESULTS_DIR)
@for d in $(TESTS_DIR); do \
--
2.3.1
next prev parent reply other threads:[~2015-05-12 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 14:40 [PATCH iproute2 0/2] Run tests forcely in separated netns Vadim Kochan
2015-05-12 14:40 ` Vadim Kochan [this message]
2015-05-12 14:40 ` [PATCH iproute2 2/2] tests: Add test for 'ip route add default' Vadim Kochan
2015-05-21 21:46 ` [PATCH iproute2 0/2] Run tests forcely in separated netns Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431441616-25174-2-git-send-email-vadim4j@gmail.com \
--to=vadim4j@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).