From: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
To: linux-arch@vger.kernel.org
Cc: Hajime Tazaki <tazaki@sfc.wide.ad.jp>,
Arnd Bergmann <arnd@arndb.de>, Jonathan Corbet <corbet@lwn.net>,
Jhristoph Lameter <cl@linux.com>,
Jekka Enberg <penberg@kernel.org>,
Javid Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Jndrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
netdev@vger.kernel.org, linux-mm@kvack.org,
Jeff Dike <jdike@addtoit.com>,
Richard Weinberger <richard@nod.at>,
Rusty Russell <rusty@rustcorp.com.au>,
Ryo Nakamura <upa@haeena.net>,
Christoph Paasch <christoph.paasch@gmail.com>,
Mathieu Lacage <mathieu.lacage@gmail.com>,
libos-nuse@googlegroups.com
Subject: [RFC PATCH v2 11/11] lib: tools used for test scripts
Date: Fri, 17 Apr 2015 18:36:14 +0900 [thread overview]
Message-ID: <1429263374-57517-12-git-send-email-tazaki@sfc.wide.ad.jp> (raw)
In-Reply-To: <1429263374-57517-1-git-send-email-tazaki@sfc.wide.ad.jp>
These auxiliary files are used for make test ARCH=lib.
Signed-off-by: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
---
tools/testing/libos/.gitignore | 6 +++++
tools/testing/libos/Makefile | 38 +++++++++++++++++++++++++++
tools/testing/libos/README | 15 +++++++++++
tools/testing/libos/bisect.sh | 10 +++++++
tools/testing/libos/dce-test.sh | 23 ++++++++++++++++
tools/testing/libos/nuse-test.sh | 57 ++++++++++++++++++++++++++++++++++++++++
6 files changed, 149 insertions(+)
create mode 100644 tools/testing/libos/.gitignore
create mode 100644 tools/testing/libos/Makefile
create mode 100644 tools/testing/libos/README
create mode 100755 tools/testing/libos/bisect.sh
create mode 100755 tools/testing/libos/dce-test.sh
create mode 100755 tools/testing/libos/nuse-test.sh
diff --git a/tools/testing/libos/.gitignore b/tools/testing/libos/.gitignore
new file mode 100644
index 0000000..57a74a0
--- /dev/null
+++ b/tools/testing/libos/.gitignore
@@ -0,0 +1,6 @@
+*.pcap
+files-*
+bake
+buildtop
+core
+exitprocs
diff --git a/tools/testing/libos/Makefile b/tools/testing/libos/Makefile
new file mode 100644
index 0000000..3da25429
--- /dev/null
+++ b/tools/testing/libos/Makefile
@@ -0,0 +1,38 @@
+ADD_PARAM?=
+
+all: test
+
+bake:
+ hg clone http://code.nsnam.org/bake
+
+check_pkgs:
+ @./bake/bake.py check | grep Bazaar | grep OK || (echo "bzr is missing" && ./bake/bake.py check)
+ @./bake/bake.py check | grep autoreconf | grep OK || (echo "autotools is missing" && ./bake/bake.py check && exit 1)
+
+testbin: bake check_pkgs
+ @cp ../../../arch/lib/tools/bakeconf-linux.xml bake/bakeconf.xml
+ @mkdir -p buildtop/build/bin_dce
+ cd buildtop ; \
+ ../bake/bake.py configure -e dce-linux-inkernel $(BAKECONF_PARAMS)
+ cd buildtop ; \
+ ../bake/bake.py show --enabledTree | grep -v -E "pygoocanvas|graphviz|python-dev" | grep Missing && (echo "required packages are missing") || echo ""
+ cd buildtop ; \
+ ../bake/bake.py download ; \
+ ../bake/bake.py update ; \
+ ../bake/bake.py build
+
+test:
+ @./dce-test.sh ADD_PARAM=$(ADD_PARAM)
+
+test-valgrind:
+ @./dce-test.sh -g ADD_PARAM=$(ADD_PARAM)
+
+test-fault-injection:
+ @./dce-test.sh -f ADD_PARAM=$(ADD_PARAM)
+
+clean:
+# @rm -rf buildtop
+ @rm -f *.pcap
+ @rm -rf files-*
+ @rm -f exitprocs
+ @rm -f core
diff --git a/tools/testing/libos/README b/tools/testing/libos/README
new file mode 100644
index 0000000..51ac5a5
--- /dev/null
+++ b/tools/testing/libos/README
@@ -0,0 +1,15 @@
+
+- bisect.sh
+a sample script to bisect an issue of network stack code with the help
+of LibOS (and ns-3 network simulator). This was used to detect the issue
+for the following patch.
+
+http://patchwork.ozlabs.org/patch/436351/
+
+- dce-test.sh
+a test script invoked by 'make test ARCH=lib'. The contents of test
+scenario are implemented as test suites of ns-3 network simulator.
+
+- nuse-test.sh
+a simple test script for Network Stack in Userspace (NUSE).
+
diff --git a/tools/testing/libos/bisect.sh b/tools/testing/libos/bisect.sh
new file mode 100755
index 0000000..9377ac3
--- /dev/null
+++ b/tools/testing/libos/bisect.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+git merge origin/nuse --no-commit
+make clean ARCH=lib
+make library ARCH=lib OPT=no
+make test ARCH=lib ADD_PARAM=" -s dce-umip"
+RET=$?
+git reset --hard
+
+exit $RET
diff --git a/tools/testing/libos/dce-test.sh b/tools/testing/libos/dce-test.sh
new file mode 100755
index 0000000..e81e2d8
--- /dev/null
+++ b/tools/testing/libos/dce-test.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -e
+#set -x
+export LD_LOG=symbol-fail
+#VERBOSE="-v"
+VALGRIND=""
+FAULT_INJECTION=""
+
+if [ "$1" = "-g" ] ; then
+ VALGRIND="-g"
+# Not implemneted yet.
+#elif [ "$1" = "-f" ] ; then
+# FAULT_INJECTION="-f"
+fi
+
+# FIXME
+#export NS_ATTRIBUTE_DEFAULT='ns3::DceManagerHelper::LoaderFactory=ns3::\
+#DlmLoaderFactory[];ns3::TaskManager::FiberManagerType=UcontextFiberManager'
+
+cd buildtop/source/ns-3-dce
+LD_LIBRARY_PATH=${srctree} ./test.py -n ${VALGRIND} ${FAULT_INJECTION}\
+ ${VERBOSE} ${ADD_PARAM}
diff --git a/tools/testing/libos/nuse-test.sh b/tools/testing/libos/nuse-test.sh
new file mode 100755
index 0000000..198e7e4
--- /dev/null
+++ b/tools/testing/libos/nuse-test.sh
@@ -0,0 +1,57 @@
+#!/bin/bash -e
+
+LIBOS_TOOLS=arch/lib/tools
+
+IFNAME=`ip route |grep default | awk '{print $5}'`
+GW=`ip route |grep default | awk '{print $3}'`
+#XXX
+IPADDR=`echo $GW | sed -r "s/([0-9]+\.[0-9]+\.[0-9]+\.)([0-9]+)$/\1\`expr \2 + 10\`/"`
+
+# ip route
+# ip address
+# ip link
+
+NUSE_CONF=/tmp/nuse.conf
+
+cat > ${NUSE_CONF} << ENDCONF
+
+interface ${IFNAME}
+ address ${IPADDR}
+ netmask 255.255.255.0
+ macaddr 00:01:01:01:01:02
+ viftype RAW
+
+route
+ network 0.0.0.0
+ netmask 0.0.0.0
+ gateway ${GW}
+
+ENDCONF
+
+cd ${LIBOS_TOOLS}
+sudo NUSECONF=${NUSE_CONF} ./nuse ping 127.0.0.1 -c 2
+
+# rump test
+sudo NUSECONF=${NUSE_CONF} ./nuse sleep 5 &
+
+sleep 2
+PID_SLEEP=`/bin/ls -ltr /tmp/rump-server-nuse.* | tail -1 | awk '{print $9}' | sed -e "s/.*rump-server-nuse\.//g" | sed "s/=//"`
+RUMP_URL=unix:///tmp/rump-server-nuse.$PID_SLEEP
+# ls -ltr /tmp/*
+
+sudo chmod 777 /tmp/rump-server-nuse.$PID_SLEEP
+LD_PRELOAD=./libnuse-hijack.so RUMPHIJACK=socket=all \
+ RUMP_SERVER=$RUMP_URL ip addr show
+
+wait %1
+
+if [ "$1" == "--extended" ] ; then
+sudo NUSECONF=${NUSE_CONF} ./nuse ping ${GW} -c 2
+sudo NUSECONF=${NUSE_CONF} ./nuse iperf -c ${GW} -p 2000 -t 3
+sudo NUSECONF=${NUSE_CONF} ./nuse iperf -c ${GW} -p 8 -u -t 3
+sudo NUSECONF=${NUSE_CONF} ./nuse dig www.google.com
+sudo NUSECONF=${NUSE_CONF} ./nuse host www.google.com
+sudo NUSECONF=${NUSE_CONF} ./nuse nslookup www.google.com
+#sudo NUSECONF=${NUSE_CONF} ./nuse nc www.google.com 80
+sudo NUSECONF=${NUSE_CONF} ./nuse wget www.google.com -O -
+fi
--
2.1.0
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-04-17 9:36 UTC|newest]
Thread overview: 117+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 13:10 [RFC PATCH 00/11] an introduction of library operating system for Linux (LibOS) Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 01/11] sysctl: make some functions unstatic to access by arch/lib Hajime Tazaki
2015-03-24 16:13 ` Joe Perches
2015-03-25 15:31 ` Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 02/11] slab: add private memory allocator header for arch/lib Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 03/11] lib: public headers and API implementations for userspace programs Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 04/11] lib: memory management (kernel glue code) Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 05/11] lib: time handling " Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 06/11] lib: context and scheduling " Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 07/11] lib: sysctl " Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 08/11] lib: other kernel glue layer code Hajime Tazaki
2015-03-29 18:17 ` Richard Weinberger
2015-03-31 7:36 ` Hajime Tazaki
2015-04-03 1:24 ` Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 09/11] lib: asm-generic files Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 10/11] lib: libos build scripts and documentation Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 11/11] lib: tools used for test scripts Hajime Tazaki
2015-03-24 13:21 ` [RFC PATCH 00/11] an introduction of library operating system for Linux (LibOS) Richard Weinberger
2015-03-24 14:25 ` Hajime Tazaki
2015-03-24 14:32 ` Richard Weinberger
2015-03-24 15:24 ` Hajime Tazaki
2015-03-24 15:27 ` Richard Weinberger
2015-03-25 14:48 ` Hajime Tazaki
2015-03-25 22:50 ` Richard Weinberger
2015-03-26 16:24 ` Hajime Tazaki
2015-03-26 18:55 ` Richard Weinberger
2015-03-27 3:31 ` Rusty Russell
2015-03-27 3:49 ` Geert Uytterhoeven
2015-03-27 5:52 ` Richard Weinberger
2015-03-27 6:05 ` Hajime Tazaki
2015-03-27 6:34 ` Hajime Tazaki
2015-03-27 9:21 ` Richard Weinberger
2015-03-27 15:17 ` Antti Kantee
2015-03-28 21:17 ` Richard Weinberger
2015-03-29 15:36 ` Hajime Tazaki
2015-03-29 16:47 ` Richard Weinberger
2015-03-29 16:59 ` Antti Kantee
2015-03-29 18:05 ` Richard Weinberger
2015-03-29 15:06 ` Hajime Tazaki
2015-03-30 6:41 ` Richard Weinberger
2015-03-31 7:47 ` Hajime Tazaki
2015-04-09 8:36 ` Richard Weinberger
2015-04-14 3:20 ` Hajime Tazaki
2015-04-01 1:29 ` Rusty Russell
2015-04-03 1:43 ` Hajime Tazaki
2015-04-07 1:25 ` Rusty Russell
2015-04-17 9:36 ` [RFC PATCH v2 " Hajime Tazaki
2015-04-17 9:36 ` [RFC PATCH v2 01/11] sysctl: make some functions unstatic to access by arch/lib Hajime Tazaki
2015-04-17 9:36 ` [RFC PATCH v2 02/11] slab: add private memory allocator header for arch/lib Hajime Tazaki
2015-04-17 12:17 ` Christoph Lameter
2015-04-17 12:44 ` Richard Weinberger
2015-04-17 15:02 ` Hajime Tazaki
2015-04-17 15:08 ` Richard Weinberger
2015-04-17 15:27 ` Hajime Tazaki
2015-04-17 22:26 ` Christoph Lameter
2015-04-17 9:36 ` [RFC PATCH v2 03/11] lib: public headers and API implementations for userspace programs Hajime Tazaki
2015-04-17 9:36 ` [RFC PATCH v2 04/11] lib: memory management (kernel glue code) Hajime Tazaki
2015-04-17 9:36 ` [RFC PATCH v2 05/11] lib: time handling " Hajime Tazaki
2015-04-17 9:36 ` [RFC PATCH v2 06/11] lib: context and scheduling " Hajime Tazaki
2015-04-17 9:36 ` [RFC PATCH v2 07/11] lib: sysctl " Hajime Tazaki
2015-04-17 9:36 ` [RFC PATCH v2 08/11] lib: other kernel glue layer code Hajime Tazaki
2015-04-17 9:36 ` [RFC PATCH v2 09/11] lib: asm-generic files Hajime Tazaki
2015-04-17 9:36 ` [RFC PATCH v2 10/11] lib: libos build scripts and documentation Hajime Tazaki
2015-04-17 9:36 ` Hajime Tazaki [this message]
2015-04-19 13:28 ` [RFC PATCH v3 00/10] an introduction of library operating system for Linux (LibOS) Hajime Tazaki
2015-04-19 13:28 ` [RFC PATCH v3 01/10] sysctl: make some functions unstatic to access by arch/lib Hajime Tazaki
2015-04-19 13:28 ` [RFC PATCH v3 02/10] slab: add SLIB (Library memory allocator) for arch/lib Hajime Tazaki
2015-04-19 13:28 ` [RFC PATCH v3 03/10] lib: public headers and API implementations for userspace programs Hajime Tazaki
2015-04-19 13:28 ` [RFC PATCH v3 04/10] lib: time handling (kernel glue code) Hajime Tazaki
2015-04-19 13:28 ` [RFC PATCH v3 05/10] lib: context and scheduling functions (kernel glue code) for libos Hajime Tazaki
2015-04-19 13:28 ` [RFC PATCH v3 06/10] lib: sysctl handling (kernel glue code) Hajime Tazaki
2015-04-19 13:28 ` [RFC PATCH v3 07/10] lib: other kernel glue layer code Hajime Tazaki
2015-04-19 13:28 ` [RFC PATCH v3 08/10] lib: auxially files for auto-generated asm-generic files of libos Hajime Tazaki
2015-04-19 13:28 ` [RFC PATCH v3 09/10] lib: libos build scripts and documentation Hajime Tazaki
2015-04-20 20:43 ` Paul Bolle
2015-04-22 5:33 ` Hajime Tazaki
2015-04-19 13:28 ` [RFC PATCH v3 10/10] lib: tools used for test scripts Hajime Tazaki
2015-04-24 7:40 ` [RFC PATCH v3 00/10] an introduction of library operating system for Linux (LibOS) Richard Weinberger
2015-04-24 8:22 ` Hajime Tazaki
2015-04-24 8:59 ` Richard Weinberger
2015-04-24 9:50 ` Hajime Tazaki
2015-04-27 3:00 ` [PATCH v4 00/10] an introduction of Linux library operating system (LibOS) Hajime Tazaki
2015-04-27 3:00 ` [PATCH v4 01/10] sysctl: make some functions unstatic to access by arch/lib Hajime Tazaki
2015-04-27 3:00 ` [PATCH v4 02/10] slab: add SLIB (Library memory allocator) for arch/lib Hajime Tazaki
2015-04-27 3:00 ` [PATCH v4 03/10] lib: public headers and API implementations for userspace programs Hajime Tazaki
2015-04-27 3:00 ` [PATCH v4 04/10] lib: time handling (kernel glue code) Hajime Tazaki
2015-04-27 3:00 ` [PATCH v4 05/10] lib: context and scheduling functions (kernel glue code) for libos Hajime Tazaki
2015-04-27 3:00 ` [PATCH v4 06/10] lib: sysctl handling (kernel glue code) Hajime Tazaki
2015-04-27 3:00 ` [PATCH v4 07/10] lib: other kernel glue layer code Hajime Tazaki
2015-04-27 3:00 ` [PATCH v4 08/10] lib: auxially files for auto-generated asm-generic files of libos Hajime Tazaki
2015-04-27 3:00 ` [PATCH v4 09/10] lib: libos build scripts and documentation Hajime Tazaki
2015-04-27 3:00 ` [PATCH v4 10/10] lib: tools used for test scripts Hajime Tazaki
2015-04-27 7:29 ` [PATCH v4 00/10] an introduction of Linux library operating system (LibOS) Richard Weinberger
2015-04-27 7:39 ` Richard Weinberger
2015-04-29 23:16 ` Hajime Tazaki
2015-05-13 5:28 ` [PATCH v5 " Hajime Tazaki
2015-05-13 5:28 ` [PATCH v5 01/10] sysctl: make some functions unstatic to access by arch/lib Hajime Tazaki
2015-05-13 5:28 ` [PATCH v5 02/10] slab: add SLIB (Library memory allocator) for arch/lib Hajime Tazaki
2015-05-13 5:28 ` [PATCH v5 03/10] lib: public headers and API implementations for userspace programs Hajime Tazaki
2015-05-13 5:28 ` [PATCH v5 04/10] lib: time handling (kernel glue code) Hajime Tazaki
2015-05-13 5:28 ` [PATCH v5 05/10] lib: context and scheduling functions (kernel glue code) for libos Hajime Tazaki
2015-05-13 5:28 ` [PATCH v5 06/10] lib: sysctl handling (kernel glue code) Hajime Tazaki
2015-05-13 5:28 ` [PATCH v5 07/10] lib: other kernel glue layer code Hajime Tazaki
2015-05-13 5:28 ` [PATCH v5 08/10] lib: auxiliary files for auto-generated asm-generic files of libos Hajime Tazaki
2015-05-13 5:28 ` [PATCH v5 09/10] lib: libos build scripts and documentation Hajime Tazaki
2015-05-13 5:28 ` [PATCH v5 10/10] lib: tools used for test scripts Hajime Tazaki
2015-09-03 14:16 ` [PATCH v6 00/10] an introduction of Linux library operating system (LibOS) Hajime Tazaki
2015-09-03 14:16 ` [PATCH v6 01/10] sysctl: make some functions unstatic to access by arch/lib Hajime Tazaki
2015-09-03 14:16 ` [PATCH v6 02/10] slab: add SLIB (Library memory allocator) for arch/lib Hajime Tazaki
2015-09-03 14:16 ` [PATCH v6 03/10] lib: public headers and API implementations for userspace programs Hajime Tazaki
2015-09-03 14:16 ` [PATCH v6 04/10] lib: time handling (kernel glue code) Hajime Tazaki
2015-09-03 14:16 ` [PATCH v6 05/10] lib: context and scheduling functions (kernel glue code) for libos Hajime Tazaki
2015-09-03 14:16 ` [PATCH v6 06/10] lib: sysctl handling (kernel glue code) Hajime Tazaki
2015-09-03 14:16 ` [PATCH v6 07/10] lib: other kernel glue layer code Hajime Tazaki
2015-09-03 14:16 ` [PATCH v6 08/10] lib: auxiliary files for auto-generated asm-generic files of libos Hajime Tazaki
2015-09-03 14:16 ` [PATCH v6 09/10] lib: libos build scripts and documentation Hajime Tazaki
2015-09-03 14:16 ` [PATCH v6 10/10] lib: tools used for test scripts Hajime Tazaki
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=1429263374-57517-12-git-send-email-tazaki@sfc.wide.ad.jp \
--to=tazaki@sfc.wide.ad.jp \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=christoph.paasch@gmail.com \
--cc=cl@linux.com \
--cc=corbet@lwn.net \
--cc=iamjoonsoo.kim@lge.com \
--cc=jdike@addtoit.com \
--cc=libos-nuse@googlegroups.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mathieu.lacage@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=penberg@kernel.org \
--cc=richard@nod.at \
--cc=rientjes@google.com \
--cc=rusty@rustcorp.com.au \
--cc=upa@haeena.net \
/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).