Test Suite - Namespace: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
cd /home/build/libresswan/testing/pluto/basic-pluto-01 | cd /home/build/libresswan/testing/pluto/basic-pluto-01 | ||
../../utils/nsrun --ns | ../../utils/nsrun --ns | ||
</pre> | |||
# | == testrun == | ||
<pre> | |||
# run possible tests from testing/pluto/TESTLIST | |||
cd /home/build/libreswan | cd /home/build/libreswan | ||
# another important step generate x509 certifcates | # another important step generate x509 certifcates |
Revision as of 09:57, 21 September 2019
This is a quick guide to run libreswan tests under namespace. Be aware. the host would get lots of packages, need sudo without password permission
pre requists on the host
sudo without password
to check run "sudo bash -c true" if it does not ask for password you are good!
install testrun dependencies
# pre install check sudo bash -c true sudo make install-testing-rpm-dep: make base; sudo install-base #remember this will install pluto on your host!!
run a test
#as single test cd /home/build/libresswan/testing/pluto/basic-pluto-01 ../../utils/nsrun --ns
testrun
# run possible tests from testing/pluto/TESTLIST cd /home/build/libreswan # another important step generate x509 certifcates cd /home/build/libreswan/testing/x509/ && ./dist_certs.py && cd /home/build/libreswan/ make nsrun
useful alias/fuction
NSENTER () { ns=$1; nsargs="--mount=/run/mountns/${ns} --net=/run/netns/${ns} --uts=/run/utsns/${ns}"; NSENTER_CMD="/usr/bin/nsenter ${nsargs} "; sudo ${NSENTER_CMD} /bin/bash } to enter NSENTER east-basic-pluto-01