aboutsummaryrefslogtreecommitdiff
path: root/doc/namespaces-helper-tools.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/namespaces-helper-tools.txt')
-rw-r--r--doc/namespaces-helper-tools.txt16
1 files changed, 7 insertions, 9 deletions
diff --git a/doc/namespaces-helper-tools.txt b/doc/namespaces-helper-tools.txt
index 6990e0155..b911dd6cc 100644
--- a/doc/namespaces-helper-tools.txt
+++ b/doc/namespaces-helper-tools.txt
@@ -8,18 +8,16 @@ LTP namespaces helper tools
LTP provides helper tools for creating and working with namespaces. These are
located in ltp/testcases/kernel/containers/share directory and include:
-* ns_create
+* tst_ns_create
** creates a child process in the new specified namespace(s)
** child is then daemonized and is running in the background
** PID of the daemonized child process is printed on the stdout
** the new namespace(s) is(are) maintained by the daemonized child process
** namespace(s) can be removed by killing the daemonized process
-* setns_check
-** check for setns() availability, should be called before using ns_exec
-* ns_exec
+* tst_ns_exec
** enters the namespace(s) of a process specified by a PID
** then executes the indicated program inside that namespace(s)
-* ns_ifmove
+* tst_ns_ifmove
** moves a network interface to the namespace of a process specified by a PID
Purpose of these helper tools is the ability to execute test cases utilizing
@@ -36,18 +34,18 @@ The following code shows how test cases can use the namespaces helper tools:
-------------------------------------------------------------------------------
# Creates a new network and ipc namespace and stores the PID of the daemonized
# process inside that namespace into variable myns
-myns=$(ns_create net,ipc)
+myns=$(tst_ns_create net,ipc)
ip link add veth0 type veth peer name veth1
# Executes command 'ip a' inside the namespace specified by PID in myns variable
-ns_exec $myns net,ipc ip a
+tst_ns_exec $myns net,ipc ip a
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
# Moves interface veth1 into the namespace specified by PID in myns variable
-ns_ifmove veth1 $myns
-ns_exec $myns net,ipc ip a
+tst_ns_ifmove veth1 $myns
+tst_ns_exec $myns net,ipc ip a
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
6: veth1: <BROADCAST> mtu 1500 qdisc noop state DOWN qlen 1000