The legacy regression tests heavily depend on the legacy API.
It's much more efficient to build this from scratch than
trying to port this to new API.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
regression-tests/README.md | 112 ------
regression-tests/env/lnst-ctl.conf | 16 -
regression-tests/run-test.sh | 253 --------------
regression-tests/tests/0/desc | 6 -
regression-tests/tests/0/run.sh | 24 --
regression-tests/tests/1/desc | 4 -
regression-tests/tests/1/recipe.xml | 33 --
regression-tests/tests/1/run.sh | 12 -
regression-tests/tests/10/desc | 4 -
.../tests/10/prefix-check-taskapi.xml | 33 --
regression-tests/tests/10/prefix-check.py | 15 -
regression-tests/tests/10/prefix-check.xml | 44 ---
regression-tests/tests/10/run.sh | 39 ---
regression-tests/tests/11/desc | 3 -
regression-tests/tests/11/recipe.xml | 33 --
regression-tests/tests/11/run.sh | 15 -
regression-tests/tests/12/desc | 1 -
regression-tests/tests/12/run.sh | 12 -
regression-tests/tests/12/sm01.xml | 7 -
regression-tests/tests/12/sm02.xml | 7 -
regression-tests/tests/12/xinclude-check.xml | 13 -
regression-tests/tests/13/desc | 1 -
regression-tests/tests/13/run.sh | 22 --
.../tests/13/taskapi-alias-check.py | 9 -
.../tests/13/taskapi-alias-check.xml | 38 --
.../tests/13/taskapi-alias-namespace-check.py | 8 -
.../13/taskapi-alias-namespace-check.xml | 41 ---
regression-tests/tests/14/desc | 3 -
regression-tests/tests/14/recipe1.xml | 68 ----
regression-tests/tests/14/recipe2.xml | 79 -----
regression-tests/tests/14/run.sh | 17 -
regression-tests/tests/15/desc | 3 -
regression-tests/tests/15/recipe.xml | 33 --
regression-tests/tests/15/run.sh | 12 -
regression-tests/tests/16/desc | 3 -
regression-tests/tests/16/recipe.xml | 37 --
regression-tests/tests/16/run.sh | 14 -
regression-tests/tests/17/desc | 3 -
regression-tests/tests/17/recipe.xml | 38 --
regression-tests/tests/17/run.sh | 14 -
regression-tests/tests/18/desc | 6 -
regression-tests/tests/18/recipe.xml | 26 --
regression-tests/tests/18/run.sh | 19 -
regression-tests/tests/19/desc | 3 -
regression-tests/tests/19/recipe.xml | 17 -
regression-tests/tests/19/run.sh | 19 -
regression-tests/tests/2/desc | 5 -
regression-tests/tests/2/recipe.xml | 74 ----
regression-tests/tests/2/run.sh | 12 -
regression-tests/tests/20/desc | 3 -
regression-tests/tests/20/recipe1.xml | 47 ---
regression-tests/tests/20/recipe2.xml | 31 --
regression-tests/tests/20/run.sh | 20 --
regression-tests/tests/21/desc | 3 -
regression-tests/tests/21/lnst-ctl.conf | 3 -
regression-tests/tests/21/recipe.xml | 55 ---
regression-tests/tests/21/run.sh | 18 -
.../tests/21/test_modules/TCPConnection.py | 60 ----
.../tests/21/test_tools/tcp_conn/Makefile | 12 -
.../21/test_tools/tcp_conn/lnst-setup.sh | 3 -
.../21/test_tools/tcp_conn/tcp_connect.c | 281 ---------------
.../tests/21/test_tools/tcp_conn/tcp_listen.c | 330 ------------------
regression-tests/tests/22/desc | 3 -
regression-tests/tests/22/lnst-ctl.conf | 2 -
regression-tests/tests/22/pool/slave1.xml | 6 -
regression-tests/tests/22/pool/slave2.xml | 6 -
regression-tests/tests/22/recipe.xml | 26 --
regression-tests/tests/22/run.sh | 18 -
regression-tests/tests/23/desc | 3 -
regression-tests/tests/23/lnst-ctl.conf | 2 -
regression-tests/tests/23/recipe.xml | 42 ---
regression-tests/tests/23/run.sh | 19 -
.../tests/23/test_modules/IcmpPing.py | 71 ----
regression-tests/tests/24/desc | 6 -
regression-tests/tests/24/recipe_fail.xml | 33 --
regression-tests/tests/24/recipe_pass.xml | 33 --
regression-tests/tests/24/run.sh | 22 --
regression-tests/tests/25/desc | 12 -
regression-tests/tests/25/recipe1.xml | 44 ---
regression-tests/tests/25/recipe2.xml | 53 ---
regression-tests/tests/25/recipe3.xml | 28 --
regression-tests/tests/25/run.sh | 27 --
regression-tests/tests/26/desc | 7 -
regression-tests/tests/26/recipe1.xml | 46 ---
regression-tests/tests/26/recipe2.xml | 46 ---
regression-tests/tests/26/run.sh | 24 --
regression-tests/tests/27/desc | 10 -
regression-tests/tests/27/recipe1.xml | 32 --
regression-tests/tests/27/recipe2.xml | 32 --
regression-tests/tests/27/recipe3.xml | 31 --
regression-tests/tests/27/recipe4.xml | 31 --
regression-tests/tests/27/recipe5.xml | 32 --
regression-tests/tests/27/recipe6.xml | 30 --
regression-tests/tests/27/recipe7.xml | 30 --
regression-tests/tests/27/recipe8.xml | 32 --
regression-tests/tests/27/run.sh | 48 ---
regression-tests/tests/28/desc | 6 -
regression-tests/tests/28/recipe1.py | 20 --
regression-tests/tests/28/recipe1.xml | 16 -
regression-tests/tests/28/recipe2.py | 18 -
regression-tests/tests/28/recipe2.xml | 16 -
regression-tests/tests/28/recipe3.py | 11 -
regression-tests/tests/28/recipe3.xml | 16 -
regression-tests/tests/28/recipe4.py | 15 -
regression-tests/tests/28/recipe4.xml | 16 -
regression-tests/tests/28/run.sh | 34 --
regression-tests/tests/3/desc | 8 -
regression-tests/tests/3/recipe.xml | 21 --
regression-tests/tests/3/run.sh | 12 -
regression-tests/tests/4/desc | 3 -
regression-tests/tests/4/recipe.xml | 43 ---
regression-tests/tests/4/run.sh | 19 -
regression-tests/tests/5/desc | 3 -
regression-tests/tests/5/recipe.xml | 29 --
regression-tests/tests/5/run.sh | 20 --
regression-tests/tests/6/desc | 4 -
regression-tests/tests/6/recipe.xml | 35 --
regression-tests/tests/6/run.sh | 19 -
regression-tests/tests/7/desc | 4 -
regression-tests/tests/7/recipe.xml | 24 --
regression-tests/tests/7/run.sh | 19 -
regression-tests/tests/7/task.py | 23 --
regression-tests/tests/8/desc | 3 -
regression-tests/tests/8/recipe.xml | 26 --
regression-tests/tests/8/run.sh | 12 -
regression-tests/tests/9/desc | 3 -
regression-tests/tests/9/recipe.xml | 24 --
regression-tests/tests/9/run.sh | 12 -
regression-tests/tests/9/task.py | 9 -
regression-tests/tests/lib.sh | 67 ----
130 files changed, 3673 deletions(-)
delete mode 100644 regression-tests/README.md
delete mode 100644 regression-tests/env/lnst-ctl.conf
delete mode 100755 regression-tests/run-test.sh
delete mode 100644 regression-tests/tests/0/desc
delete mode 100755 regression-tests/tests/0/run.sh
delete mode 100644 regression-tests/tests/1/desc
delete mode 100644 regression-tests/tests/1/recipe.xml
delete mode 100755 regression-tests/tests/1/run.sh
delete mode 100644 regression-tests/tests/10/desc
delete mode 100644 regression-tests/tests/10/prefix-check-taskapi.xml
delete mode 100644 regression-tests/tests/10/prefix-check.py
delete mode 100644 regression-tests/tests/10/prefix-check.xml
delete mode 100755 regression-tests/tests/10/run.sh
delete mode 100644 regression-tests/tests/11/desc
delete mode 100644 regression-tests/tests/11/recipe.xml
delete mode 100755 regression-tests/tests/11/run.sh
delete mode 100644 regression-tests/tests/12/desc
delete mode 100755 regression-tests/tests/12/run.sh
delete mode 100644 regression-tests/tests/12/sm01.xml
delete mode 100644 regression-tests/tests/12/sm02.xml
delete mode 100644 regression-tests/tests/12/xinclude-check.xml
delete mode 100644 regression-tests/tests/13/desc
delete mode 100755 regression-tests/tests/13/run.sh
delete mode 100644 regression-tests/tests/13/taskapi-alias-check.py
delete mode 100644 regression-tests/tests/13/taskapi-alias-check.xml
delete mode 100644 regression-tests/tests/13/taskapi-alias-namespace-check.py
delete mode 100644 regression-tests/tests/13/taskapi-alias-namespace-check.xml
delete mode 100644 regression-tests/tests/14/desc
delete mode 100644 regression-tests/tests/14/recipe1.xml
delete mode 100644 regression-tests/tests/14/recipe2.xml
delete mode 100755 regression-tests/tests/14/run.sh
delete mode 100644 regression-tests/tests/15/desc
delete mode 100644 regression-tests/tests/15/recipe.xml
delete mode 100755 regression-tests/tests/15/run.sh
delete mode 100644 regression-tests/tests/16/desc
delete mode 100644 regression-tests/tests/16/recipe.xml
delete mode 100755 regression-tests/tests/16/run.sh
delete mode 100644 regression-tests/tests/17/desc
delete mode 100644 regression-tests/tests/17/recipe.xml
delete mode 100755 regression-tests/tests/17/run.sh
delete mode 100644 regression-tests/tests/18/desc
delete mode 100644 regression-tests/tests/18/recipe.xml
delete mode 100755 regression-tests/tests/18/run.sh
delete mode 100644 regression-tests/tests/19/desc
delete mode 100644 regression-tests/tests/19/recipe.xml
delete mode 100755 regression-tests/tests/19/run.sh
delete mode 100644 regression-tests/tests/2/desc
delete mode 100644 regression-tests/tests/2/recipe.xml
delete mode 100755 regression-tests/tests/2/run.sh
delete mode 100644 regression-tests/tests/20/desc
delete mode 100644 regression-tests/tests/20/recipe1.xml
delete mode 100644 regression-tests/tests/20/recipe2.xml
delete mode 100755 regression-tests/tests/20/run.sh
delete mode 100644 regression-tests/tests/21/desc
delete mode 100644 regression-tests/tests/21/lnst-ctl.conf
delete mode 100644 regression-tests/tests/21/recipe.xml
delete mode 100755 regression-tests/tests/21/run.sh
delete mode 100644 regression-tests/tests/21/test_modules/TCPConnection.py
delete mode 100644 regression-tests/tests/21/test_tools/tcp_conn/Makefile
delete mode 100755 regression-tests/tests/21/test_tools/tcp_conn/lnst-setup.sh
delete mode 100644 regression-tests/tests/21/test_tools/tcp_conn/tcp_connect.c
delete mode 100644 regression-tests/tests/21/test_tools/tcp_conn/tcp_listen.c
delete mode 100644 regression-tests/tests/22/desc
delete mode 100644 regression-tests/tests/22/lnst-ctl.conf
delete mode 100644 regression-tests/tests/22/pool/slave1.xml
delete mode 100644 regression-tests/tests/22/pool/slave2.xml
delete mode 100644 regression-tests/tests/22/recipe.xml
delete mode 100755 regression-tests/tests/22/run.sh
delete mode 100644 regression-tests/tests/23/desc
delete mode 100644 regression-tests/tests/23/lnst-ctl.conf
delete mode 100644 regression-tests/tests/23/recipe.xml
delete mode 100755 regression-tests/tests/23/run.sh
delete mode 100644 regression-tests/tests/23/test_modules/IcmpPing.py
delete mode 100644 regression-tests/tests/24/desc
delete mode 100644 regression-tests/tests/24/recipe_fail.xml
delete mode 100644 regression-tests/tests/24/recipe_pass.xml
delete mode 100755 regression-tests/tests/24/run.sh
delete mode 100644 regression-tests/tests/25/desc
delete mode 100644 regression-tests/tests/25/recipe1.xml
delete mode 100644 regression-tests/tests/25/recipe2.xml
delete mode 100644 regression-tests/tests/25/recipe3.xml
delete mode 100755 regression-tests/tests/25/run.sh
delete mode 100644 regression-tests/tests/26/desc
delete mode 100644 regression-tests/tests/26/recipe1.xml
delete mode 100644 regression-tests/tests/26/recipe2.xml
delete mode 100755 regression-tests/tests/26/run.sh
delete mode 100644 regression-tests/tests/27/desc
delete mode 100644 regression-tests/tests/27/recipe1.xml
delete mode 100644 regression-tests/tests/27/recipe2.xml
delete mode 100644 regression-tests/tests/27/recipe3.xml
delete mode 100644 regression-tests/tests/27/recipe4.xml
delete mode 100644 regression-tests/tests/27/recipe5.xml
delete mode 100644 regression-tests/tests/27/recipe6.xml
delete mode 100644 regression-tests/tests/27/recipe7.xml
delete mode 100644 regression-tests/tests/27/recipe8.xml
delete mode 100755 regression-tests/tests/27/run.sh
delete mode 100644 regression-tests/tests/28/desc
delete mode 100644 regression-tests/tests/28/recipe1.py
delete mode 100644 regression-tests/tests/28/recipe1.xml
delete mode 100644 regression-tests/tests/28/recipe2.py
delete mode 100644 regression-tests/tests/28/recipe2.xml
delete mode 100644 regression-tests/tests/28/recipe3.py
delete mode 100644 regression-tests/tests/28/recipe3.xml
delete mode 100644 regression-tests/tests/28/recipe4.py
delete mode 100644 regression-tests/tests/28/recipe4.xml
delete mode 100755 regression-tests/tests/28/run.sh
delete mode 100644 regression-tests/tests/3/desc
delete mode 100644 regression-tests/tests/3/recipe.xml
delete mode 100755 regression-tests/tests/3/run.sh
delete mode 100644 regression-tests/tests/4/desc
delete mode 100644 regression-tests/tests/4/recipe.xml
delete mode 100755 regression-tests/tests/4/run.sh
delete mode 100644 regression-tests/tests/5/desc
delete mode 100644 regression-tests/tests/5/recipe.xml
delete mode 100755 regression-tests/tests/5/run.sh
delete mode 100644 regression-tests/tests/6/desc
delete mode 100644 regression-tests/tests/6/recipe.xml
delete mode 100755 regression-tests/tests/6/run.sh
delete mode 100644 regression-tests/tests/7/desc
delete mode 100644 regression-tests/tests/7/recipe.xml
delete mode 100755 regression-tests/tests/7/run.sh
delete mode 100644 regression-tests/tests/7/task.py
delete mode 100644 regression-tests/tests/8/desc
delete mode 100644 regression-tests/tests/8/recipe.xml
delete mode 100755 regression-tests/tests/8/run.sh
delete mode 100644 regression-tests/tests/9/desc
delete mode 100644 regression-tests/tests/9/recipe.xml
delete mode 100755 regression-tests/tests/9/run.sh
delete mode 100644 regression-tests/tests/9/task.py
delete mode 100644 regression-tests/tests/lib.sh
diff --git a/regression-tests/README.md b/regression-tests/README.md
deleted file mode 100644
index 7798333..0000000
--- a/regression-tests/README.md
+++ /dev/null
@@ -1,112 +0,0 @@
-# lnst-tests
-
-**lnst-tests** is a regression test suite for the Linux Network Stack Test
-Project. It contains a number of test cases and scenario to verify LNST
-before releases and also to catch bugs and regressions.
-
-In case you're interested in contributing to our project you should be
-interested in this page as well since we won't be accepting contributions that
-break any of our tests.
-
-Currently there are two sets of tests that reside in our repository:
-* smoke tests, located in ```recipes/smoke/```
-* regression tests, located in ```regression-tests/```
-
-It is important to note that all of these tests were created to test LNST
-functionality for bugs. For this reason we assume that when running these
-tests, they're being run on stable systems.
-
-## Required Non-default Packages on slave machines
-
-* rsync
-* python-lxml (usually installed by default)
-* python-pyroute2 (available in fedora repositories, epel6 and epel7)
-* tar
-* bzip2
-* make
-* gcc
-
-## Smoke tests
-
-Smoke tests were created to cover a wide area of basic LNST functionality, but
-avoid testing for more complex/in-depth bugs.
-
-As was mentioned before, smoke tests are located in the ```recipes/smoke/```
-directory. Here you can find a subdirectory ```lib/``` and a python script
-```generate-recipes.py```. The ```lib/``` directory contains 4 types of files:
-* ```recipe-temp.xml``` recipe template file,
-* ```conf-*.xml``` network configuration files,
-* ```task-*.xml``` task definition files,
-* ```variables.conf``` file.
-
-The generate-recipes script loads the remplate file and fills it with two
-configuration files and all the task files to create recipes for all possible
-configuration combinations. The generated recipes are placed in the
-```recipes/smoke/tests/``` directory.
-
-Finally the variables file defines values for some variables (e.g. result of a
-command), that are dependent on the combination of the configuration files.
-When a recipe file is generated these variables are replaced with their
-respective values.
-
-To run these recipes you need to have 2 machines available in the pool you've
-configured and you can use the following command:
-```
-lnst-ctl -d run recipes/smoke/tests/*
-```
-
-## Regression tests
-
-Regression tests were created as a means to test for specific bugs that we have
-already fixed. Our policy is to add a new regression test every time we fix a
-more serious bug, however this isn't always possible due to different reasons.
-If you find a bug in LNST and you want to contribute a patch that fixes it, it
-is **highly recommended** to also create a regression test.
-
-The directory structure for regression tests is as follows:
-* ```regression-tests/``` is the main directory where everything related to
- regression tests is located.
-* ```regression-tests/env/``` contains a LNST environment that is used by the
- regression tests. It contains a lnst-ctl configuration file and you're
- expected to create a machine pool directory here.
-* ```regression-tests/tests/``` contains all the regression tests we currently
- have, isolated in their own directories that are numbered. You can also find
- the ```lib.sh``` file which contains definitions of some useful functions.
-* ```regression-tests/tests/<test_number>/``` represents a regression test. It
- contains everything the tests needs. You can always find at least 2 files
- here: the ```run.sh``` script that executes the test, and ```desc``` which is
- a text file that contains the description of the test.
-* ```regression-tests/run-test.sh``` is the script that controls the execution
- of regression tests.
-
-Before running the regression tests, you need to prepare the environment. As
-was mentioned the ```env/``` directory already contains the ```lnst-ctl.conf```
-file. In addition to that you are also expected to create a machine pool
-directory ```regression-tests/env/pool/``` and fill it with at least two slave
-machine description files that should be used. Alternatively you can also use
-your local configuration in ```~/.lnst/```, to do this you just need to use the
-**-c** argument of the run-test.sh script.
-
-In addition to this you need to ensure that the slave machines are running and
-you have configured automatic ssh access to them. This is all the preparation
-you need to do to run the regression tests, the ```run-test.sh``` script will
-take care of synchronizing LNST to all the necessary machines, running
-lnst-slave and lnst-ctl processes and cleaning them up in the end as well.
-
-When it comes to running the tests you first need to change to the
-```regression-tests``` directory and from here you have several options
-depending on how you run the ```run-test.sh``` script.
-```sh
-Usage: ./run-test.sh [-c] [-r revision] [-l logdir] [-t list_of_tests] [-u url] [-n]
- -r revision Test a specific git branch/rev/tag
- Note: ignored when -s is used
- -l logdir Save test results to a directory
- -t list_of_tests Run only these tests
- Example: -t 0,1,2 will run tests 0, 1, and 2
- -n Disable use of NetworkManager on slavemachines
- Note: enabled by default
- -u url URL pointing to LNST repository that should be used
- Note: git clone and checkout by default
- -s use rsync instead of git
- -c use user configuration
-```
diff --git a/regression-tests/env/lnst-ctl.conf b/regression-tests/env/lnst-ctl.conf
deleted file mode 100644
index 12db8c9..0000000
--- a/regression-tests/env/lnst-ctl.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-[environment]
-mac_pool_range = 52:54:01:00:00:01 52:54:01:FF:FF:FF
-rpcport = 9999
-test_tool_dirs = ./test_tools
-test_module_dirs = ./test_modules
-log_dir = ./Logs
-xslt_url =
http://www.lnst-project.org/files/result_xslt/xml_to_html.xsl
-allow_virtual = True
-
-[colours]
-faded = extended(242) default 0
-info = extended(228) default 1
-warning = extended(208) default 1
-
-[pools]
-lnst = ./pool/
diff --git a/regression-tests/run-test.sh b/regression-tests/run-test.sh
deleted file mode 100755
index 02fa126..0000000
--- a/regression-tests/run-test.sh
+++ /dev/null
@@ -1,253 +0,0 @@
-#!/usr/bin/bash
-
-function get_hostname
-{
- sed -n "s/.*param name=['\"]hostname['\"]
value=['\"]\([^'\"]\+\)['\"].*/\1/p" $1
-}
-
-function log
-{
- if [ -n "$log_dir" ]; then
- echo "$1" | tee -a "$log_dir/log"
- else
- echo "$1"
- fi
-}
-
-function logn
-{
- if [ -n "$log_dir" ]; then
- echo -n "$1" | tee -a "$log_dir/log"
- else
- echo -n "$1"
- fi
-}
-
-function logtest
-{
- if [ -n "$log_dir" ]; then
- log_path="$log_dir/$test_dir"
- mkdir -p "$log_path"
- (tee $log_path/stdout.log) 3>&1 1>&2 2>&3 | tee
$log_path/stderr.log
- else
- cat
- fi
-}
-
-function print_separator
-{
- log
"--------------------------------------------------------------------------------"
-}
-
-function usage
-{
- echo "Usage: $0 [-c] [-r revision] [-l logdir] [-t list_of_tests] [-u url]
[-n]"
- echo " -r revision Test a specific git branch/rev/tag"
- echo " Note: ignored when -s is used"
- echo " -l logdir Save test results to a directory"
- echo " -t list_of_tests Run only these tests"
- echo " Example: -t 0,1,2 will run tests 0, 1, and 2"
- echo " -n Disable use of NetworkManager on
slavemachines"
- echo " Note: enabled by default"
- echo " -u url URL pointing to LNST repository that should be
used"
- echo " Note: git clone and checkout by default"
- echo " -s use rsync instead of git"
- echo " -c use user configuration"
- exit 0
-}
-
-function get_pool_dirs
-{
- if [ "$use_user_conf" = "true" ]; then
- command lnst-ctl --dump-pools 2>/dev/null | cut -d = -f2
- else
- command lnst-ctl -C $repo/lnst-ctl.conf --dump-pools 2>/dev/null |
- cut -d = -f2
- fi
-}
-
-# ---
-
-#default repository url
-url="../"
-use_git=true
-export use_user_conf="false"
-
-while getopts "chlr:t:g:ns" OPTION
-do
- case $OPTION in
- c) use_user_conf="true" ;;
- h) usage ;;
- l) log_dir_name="results-`date "+%Y-%m-%d-%I-%M-%S"`"
- mkdir -p $log_dir_name
- log_dir=`realpath $log_dir_name`;;
- r) rev="$OPTARG";;
- t) tests="`tr "," " "
<<<"$OPTARG"`" ;;
- n) nm_off="yes";;
- g) url="$OPTARG";;
- s) use_git=false;;
- \?) exit 1;;
- esac
-done
-
-# Check for test suite lock
-if [ -e .lock ]; then
- pid=`cat .lock`
- echo "The test suite is locked by process $pid." \
- "Someone might be using it right now."
- echo "Type 'unlock' if you wish to proceed anyway:"
- read -e input
- if [ "$input" != "unlock" ]; then
- exit 1
- fi
-fi
-
-# Lock the test suite
-echo "$$" >.lock
-
-# Clone the repo
-export repo=`mktemp -d`
-if $use_git ; then
- git clone $url $repo
-else
- rsync -r $url $repo
-fi
-
-if $use_git ; then
- # Checkout the appropriate revision/tag
- if [ ! -z "$rev" ]; then
- pushd . >/dev/null
- cd $repo
- git checkout "$rev"
- popd >/dev/null
- else
- log "Revision not specified, using HEAD."
- rev="HEAD"
- fi
-fi
-
-# Load the proper config
-#rm -rf ~/.lnst
-#cp -r env ~/.lnst
-cp -r env/* $repo/
-
-pool_dirs=`PATH="$repo:$PATH" get_pool_dirs`
-
-# Scan the pool and prepare the machines in it
-for pool_dir in $pool_dirs; do
- for machine in `ls -1 $pool_dir`; do
- hostname=`get_hostname $pool_dir/$machine`
-
- # In case this script was killed and there are any slave processes
- # left hanging on the machine.
- ssh "root@$hostname" 'for p in `pgrep lnst-slave`; do kill -9 $p;
done'
-
- # Create a temporary dir for the git tree to be tested
- remote_repo=`ssh "root@$hostname" "mktemp -d"`
-
- # Transfer the repo to the machine
- rsync -r --exclude "Logs" --exclude ".git" "$repo/"
\
- "root@$hostname:$remote_repo"
-
- if [ ! -z $nm_off ]; then
- ssh "root@$hostname" "cd $remote_repo && echo
\"use_nm = false\" >> lnst-slave.conf"
- fi
-
- # Start the slave process
- ssh -n -t -t "root@$hostname" "cd $remote_repo &&
./lnst-slave" >/dev/null \
- 2>/dev/null &
- pid=$!
-
- # Save the status (hostname, pid of the ssh session, repo path)
- # so we can cleanup things properly after the tests.
- if [ -z "$slave_status" ]; then
- slave_status="$hostname $pid $remote_repo"
- else
- slave_status="$hostname $pid $remote_repo
- $slave_status"
- fi
- done
-done
-
-sleep 1
-
-summary="Summary:"
-
-# Run the tests in the tests/ directory
-print_separator
-
-# In case the list of test names to run was omitted, run all of them
-if [ -z "$tests" ]; then
- tests="`command ls -1 tests/ | grep -v '\.sh$' | sort -n`"
-fi
-
-for test_name in $tests; do
- test_dir=`realpath tests/$test_name`
- if [ -e "$test_dir/run.sh" ]; then
- logn "Running test #$test_name: "
- if [ -e $test_dir/desc ]; then
- while read line; do log " $line"; done < $test_dir/desc
- else
- logn "\n"
- fi
- print_separator
-
- pushd . >/dev/null
- cd $test_dir
-
- chmod +x run.sh
- if [ -n "$log_dir" ]; then
- log_path="$log_dir/$test_name"
- mkdir -p "$log_path"
-
- # A bit of black magic in bash.
- # Explanation:
http://bit.ly/1dxuMJI
- log "`PATH="$repo:$PATH" ./run.sh \
- > >(tee $log_path/stdout.log) \
- 2> >(tee $log_path/stderr.log >&2)`"
- else
- PATH="$repo:$PATH" ./run.sh
- fi
-
- rv=$?
-
- popd >/dev/null
-
- print_separator
- if [ "$rv" -eq "0" ]; then
- log "Result #$test_name: PASS"
- summary=`echo -e "$summary\n test #$test_name: PASS"`
- else
- log "Result #$test_name: FAIL"
- summary=`echo -e "$summary\n test #$test_name: FAIL"`
- #break
- fi
- print_separator
- else
- log "Skipping test #$test_name, run.sh file not found."
- print_separator
- summary=`echo -e "$summary\n test #$test_name: SKIPPED"`
- fi
-done
-
-log "$summary"
-print_separator
-
-sleep 1
-
-# Cleanup
-if [ -n "$slave_status" ]; then
- while read line; do
- hostname=`awk '{print $1}' <<<"$line"`
- pid=`awk '{print $2}' <<<"$line"`
- remote_repo=`awk '{print $3}' <<<"$line"`
-
- echo "kill $pid"
- kill $pid
- ssh -n "root@$hostname" "rm -r $remote_repo"
- done <<< "$slave_status"
-fi
-
-rm -rf $repo
-
-rm -rf .lock
diff --git a/regression-tests/tests/0/desc b/regression-tests/tests/0/desc
deleted file mode 100644
index 3e9a2cf..0000000
--- a/regression-tests/tests/0/desc
+++ /dev/null
@@ -1,6 +0,0 @@
-Run lnst-ctl without any parameters
-
-A test for Issue #6. The lnst-ctl script failed in case it was run with
-no arguments at all.
-
-https://github.com/jpirko/lnst/issues/6
diff --git a/regression-tests/tests/0/run.sh b/regression-tests/tests/0/run.sh
deleted file mode 100755
index ced2cbd..0000000
--- a/regression-tests/tests/0/run.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-# initialize the test
-init_test
-
-# In this case, we want to catch the log for asserts.
-log="`lnst-ctl`"
-rv=$?
-
-# But we also want the log to be shown in test results.
-echo "$log"
-
-# To keep the lnst-ctl log separated from the asserts
-print_separator
-
-assert_log "ERROR" "No action specified" "$log"
-
-# Check the return value
-assert_status "error" $rv
-
-# finish the test
-end_test
diff --git a/regression-tests/tests/1/desc b/regression-tests/tests/1/desc
deleted file mode 100644
index d14cd8a..0000000
--- a/regression-tests/tests/1/desc
+++ /dev/null
@@ -1,4 +0,0 @@
-Basic sanity ping test
-
-This test just executes a ping between two arbitrary machines with a
-single plain ethernet interface.
diff --git a/regression-tests/tests/1/recipe.xml b/regression-tests/tests/1/recipe.xml
deleted file mode 100644
index 33fdaf1..0000000
--- a/regression-tests/tests/1/recipe.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="1">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="192.168.100.10/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="2">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="192.168.100.11/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run module="IcmpPing" host="1"
timeout="30">
- <options>
- <option name="addr"
value="{ip(2,testiface)}"/>
- <option name="count" value="40"/>
- <option name="interval" value="0.2"/>
- <option name="limit_rate" value="95"/>
- </options>
- </run>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/1/run.sh b/regression-tests/tests/1/run.sh
deleted file mode 100755
index 45e9995..0000000
--- a/regression-tests/tests/1/run.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl run recipe.xml
-rv=$?
-
-assert_status "pass" "$rv"
-
-end_test
diff --git a/regression-tests/tests/10/desc b/regression-tests/tests/10/desc
deleted file mode 100644
index 77fc69a..0000000
--- a/regression-tests/tests/10/desc
+++ /dev/null
@@ -1,4 +0,0 @@
-Check the prefix template function
-
-Check that the prefix function works correctly from the recipe and also from
-a python program using Task API.
diff --git a/regression-tests/tests/10/prefix-check-taskapi.xml
b/regression-tests/tests/10/prefix-check-taskapi.xml
deleted file mode 100644
index efc96b9..0000000
--- a/regression-tests/tests/10/prefix-check-taskapi.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="client">
- <interfaces>
- <eth id="nic1" label="inet">
- <addresses>
- <address value="192.168.200.3/24"/>
- </addresses>
- </eth>
- <eth id="nic2" label="inet">
- <addresses>
- <address value="192.168.202.3/16"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="lb">
- <interfaces>
- <eth id="nic1" label="inet">
- <addresses>
- <address value="192.168.200.4/24"/>
- </addresses>
- </eth>
- <eth id="nic2" label="inet">
- <addresses>
- <address value="192.168.202.4/16"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
- <task python="./prefix-check.py"/>
-</lnstrecipe>
diff --git a/regression-tests/tests/10/prefix-check.py
b/regression-tests/tests/10/prefix-check.py
deleted file mode 100644
index 34d674d..0000000
--- a/regression-tests/tests/10/prefix-check.py
+++ /dev/null
@@ -1,15 +0,0 @@
-from lnst.Controller.Task import ctl
-
-m = ctl.get_host("lb")
-
-addr1 = m.get_ip("nic1")
-addr2 = m.get_ip("nic2")
-
-pfx1 = m.get_prefix("nic1")
-pfx2 = m.get_prefix("nic2")
-
-m.run("echo %s" % addr1)
-m.run("echo %s" % addr2)
-m.run("echo %s" % pfx1)
-m.run("echo %s" % pfx2)
-
diff --git a/regression-tests/tests/10/prefix-check.xml
b/regression-tests/tests/10/prefix-check.xml
deleted file mode 100644
index 1b9ecba..0000000
--- a/regression-tests/tests/10/prefix-check.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="client">
- <interfaces>
- <eth id="nic1" label="inet">
- <addresses>
- <address value="192.168.200.3/24"/>
- </addresses>
- </eth>
- <eth id="nic2" label="inet">
- <addresses>
- <address value="192.168.202.3/16"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="lb">
- <interfaces>
- <eth id="nic1" label="inet">
- <addresses>
- <address value="192.168.200.4/24"/>
- </addresses>
- </eth>
- <eth id="nic2" label="inet">
- <addresses>
- <address value="192.168.202.4/16"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
- <task>
- <run module="IcmpPing" host="client">
- <options>
- <option name="addr" value="{ip(lb,nic1)}"/>
- <option name="count" value="1"/>
- </options>
- </run>
- <run host="lb" command="echo {ip(lb,nic1)}"/>
- <run host="lb" command="echo {prefix(lb,nic1)}"/>
- <run host="lb" command="echo {ip(lb,nic2,0)}"/>
- <run host="lb" command="echo {prefix(lb,nic2,0)}"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/10/run.sh b/regression-tests/tests/10/run.sh
deleted file mode 100755
index 55d7815..0000000
--- a/regression-tests/tests/10/run.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run prefix-check.xml | tee test10.log
-rv=${PIPESTATUS[0]}
-
-log=`cat test10.log`
-
-rm -f test10.log
-
-print_separator
-
-assert_status "pass" "$rv"
-
-assert_log "DEBUG" "echo 24" "$log"
-assert_log "DEBUG" "echo 192.168.200.4" "$log"
-assert_log "DEBUG" "echo 16" "$log"
-assert_log "DEBUG" "echo 192.168.202.4" "$log"
-
-lnst-ctl -d run prefix-check-taskapi.xml | tee test10-api.log
-rv=${PIPESTATUS[0]}
-
-log=`cat test10-api.log`
-
-rm -f test10-api.log
-
-print_separator
-
-assert_status "pass" "$rv"
-
-assert_log "DEBUG" "echo 24" "$log"
-assert_log "DEBUG" "echo 192.168.200.4" "$log"
-assert_log "DEBUG" "echo 16" "$log"
-assert_log "DEBUG" "echo 192.168.202.4" "$log"
-
-end_test
diff --git a/regression-tests/tests/11/desc b/regression-tests/tests/11/desc
deleted file mode 100644
index 6744e6c..0000000
--- a/regression-tests/tests/11/desc
+++ /dev/null
@@ -1,3 +0,0 @@
-An exception raised during configuration
-
-This causes the slave to die!
diff --git a/regression-tests/tests/11/recipe.xml b/regression-tests/tests/11/recipe.xml
deleted file mode 100644
index 2bb2c8d..0000000
--- a/regression-tests/tests/11/recipe.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="1">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="a192.168.100.10/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="2">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="192.168.100.11/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run module="IcmpPing" host="1"
timeout="30">
- <options>
- <option name="addr"
value="{ip(2,testiface)}"/>
- <option name="count" value="40"/>
- <option name="interval" value="0.2"/>
- <option name="limit_rate" value="95"/>
- </options>
- </run>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/11/run.sh b/regression-tests/tests/11/run.sh
deleted file mode 100755
index d32561f..0000000
--- a/regression-tests/tests/11/run.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run recipe.xml
-rv=$?
-
-assert_status "error" "$rv"
-
-lnst-ctl -d run recipe.xml
-rv=$?
-
-end_test
diff --git a/regression-tests/tests/12/desc b/regression-tests/tests/12/desc
deleted file mode 100644
index e8dbb4b..0000000
--- a/regression-tests/tests/12/desc
+++ /dev/null
@@ -1 +0,0 @@
-Check xinclude resolving as described in issue #29
diff --git a/regression-tests/tests/12/run.sh b/regression-tests/tests/12/run.sh
deleted file mode 100755
index db8e724..0000000
--- a/regression-tests/tests/12/run.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run xinclude-check.xml
-rv=$?
-
-assert_status "pass" "$rv"
-
-end_test
diff --git a/regression-tests/tests/12/sm01.xml b/regression-tests/tests/12/sm01.xml
deleted file mode 100644
index 96a4f6f..0000000
--- a/regression-tests/tests/12/sm01.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<interfaces>
- <eth id="1" label="testnet">
- <addresses>
- <address value="192.168.100.10/24" />
- </addresses>
- </eth>
-</interfaces>
diff --git a/regression-tests/tests/12/sm02.xml b/regression-tests/tests/12/sm02.xml
deleted file mode 100644
index f1e1f02..0000000
--- a/regression-tests/tests/12/sm02.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<interfaces>
- <eth id="1" label="testnet">
- <addresses>
- <address value="192.168.100.20/24" />
- </addresses>
- </eth>
-</interfaces>
diff --git a/regression-tests/tests/12/xinclude-check.xml
b/regression-tests/tests/12/xinclude-check.xml
deleted file mode 100644
index 6bdf7bf..0000000
--- a/regression-tests/tests/12/xinclude-check.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<lnstrecipe
xmlns:xi="http://www.w3.org/2003/XInclude">
- <network>
- <host id="1">
- <xi:include href="sm01.xml"/>
- </host>
- <host id="2">
- <xi:include href="sm02.xml"/>
- </host>
- </network>
- <task>
- <run command="echo {ip(1,1)}" host="2"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/13/desc b/regression-tests/tests/13/desc
deleted file mode 100644
index 22b8aeb..0000000
--- a/regression-tests/tests/13/desc
+++ /dev/null
@@ -1 +0,0 @@
-This test checks that aliases are visible in python tasks
diff --git a/regression-tests/tests/13/run.sh b/regression-tests/tests/13/run.sh
deleted file mode 100755
index b72d1e2..0000000
--- a/regression-tests/tests/13/run.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run taskapi-alias-check.xml
-rv=$?
-
-assert_status "pass" "$rv"
-
-lnst-ctl -d -A alias1="value2" run taskapi-alias-check.xml
-rv=$?
-
-assert_status "fail" "$rv"
-
-lnst-ctl -d run taskapi-alias-namespace-check.xml
-rv=$?
-
-assert_status "fail" "$rv"
-
-end_test
diff --git a/regression-tests/tests/13/taskapi-alias-check.py
b/regression-tests/tests/13/taskapi-alias-check.py
deleted file mode 100644
index 422fdd3..0000000
--- a/regression-tests/tests/13/taskapi-alias-check.py
+++ /dev/null
@@ -1,9 +0,0 @@
-import sys
-from lnst.Controller.Task import ctl
-
-m1 = ctl.get_host("m1")
-m2 = ctl.get_host("m2")
-
-m1.run("[ \"%s\" == \"value1\" ]" %
ctl.get_alias("alias1"))
-m2.run("[ \"%s\" == \"value2\" ]" %
ctl.get_alias("alias2"))
-
diff --git a/regression-tests/tests/13/taskapi-alias-check.xml
b/regression-tests/tests/13/taskapi-alias-check.xml
deleted file mode 100644
index 2745c00..0000000
--- a/regression-tests/tests/13/taskapi-alias-check.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<lnstrecipe>
- <define>
- <alias name="alias1" value="value1"/>
- </define>
- <network>
- <define>
- <alias name="m1_addr" value="192.168.111.1/24"/>
- </define>
- <host id="m1">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address>{$m1_addr}</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
-
- <define>
- <alias name="m2_addr" value="192.168.111.2/24"/>
- </define>
- <host id="m2">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address value="{$m1_addr}"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <define>
- <alias name="alias2" value="value2"/>
- </define>
-
- <task python="taskapi-alias-check.py"/>
-</lnstrecipe>
diff --git a/regression-tests/tests/13/taskapi-alias-namespace-check.py
b/regression-tests/tests/13/taskapi-alias-namespace-check.py
deleted file mode 100644
index afed22d..0000000
--- a/regression-tests/tests/13/taskapi-alias-namespace-check.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import sys
-from lnst.Controller.Task import ctl
-
-m1 = ctl.get_host("m1")
-
-# this should fail
-m1.run("[ \"%s\" == \"value1\" ]" %
ctl.get_alias("foo"))
-
diff --git a/regression-tests/tests/13/taskapi-alias-namespace-check.xml
b/regression-tests/tests/13/taskapi-alias-namespace-check.xml
deleted file mode 100644
index 9f9109d..0000000
--- a/regression-tests/tests/13/taskapi-alias-namespace-check.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<lnstrecipe>
- <define>
- <alias name="alias1" value="value1"/>
- </define>
- <network>
- <define>
- <alias name="m1_addr" value="192.168.111.1/24"/>
- </define>
- <host id="m1">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address>{$m1_addr}</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
-
- <define>
- <alias name="m2_addr" value="192.168.111.2/24"/>
- </define>
- <host id="m2">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address value="{$m1_addr}"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <define>
- <alias name="foo" value="bar"/>
- </define>
- </network>
-
- <define>
- <alias name="alias2" value="value2"/>
- </define>
-
- <task python="taskapi-alias-namespace-check.py"/>
-</lnstrecipe>
diff --git a/regression-tests/tests/14/desc b/regression-tests/tests/14/desc
deleted file mode 100644
index b595c43..0000000
--- a/regression-tests/tests/14/desc
+++ /dev/null
@@ -1,3 +0,0 @@
-crash with more than two masters in stack with NetworkManager
-
-https://github.com/jpirko/lnst/issues/70
diff --git a/regression-tests/tests/14/recipe1.xml
b/regression-tests/tests/14/recipe1.xml
deleted file mode 100644
index 9d9d45a..0000000
--- a/regression-tests/tests/14/recipe1.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="slave1">
- <params/>
- <interfaces>
- <eth id="1" label="A"/>
- <team id="team">
- <slaves>
- <slave id="1"/>
- </slaves>
- <options>
- <option name="teamd_config">
- {
- "hwaddr": "00:11:22:33:44:55",
- "runner": {"name": "activebackup"},
- "link_watch": {"name": "ethtool"}
- }
- </option>
- </options>
- <addresses>
- <address value="192.168.100.3/24"/>
- </addresses>
- </team>
- <vlan id="vlan">
- <options>
- <option name="vlan_tci" value="1"/>
- </options>
- <addresses>
- <address value="192.168.101.1/24"/>
- </addresses>
- <slaves>
- <slave id="team"/>
- </slaves>
- </vlan>
- </interfaces>
- </host>
-
- <host id="slave2">
- <params/>
- <interfaces>
- <eth id="2" label="A"/>
- <vlan id="testifc2">
- <options>
- <option name="vlan_tci" value="1"/>
- </options>
- <addresses>
- <address value="192.168.101.2/24"/>
- </addresses>
- <slaves>
- <slave id="2"/>
- </slaves>
- </vlan>
- </interfaces>
- </host>
-
- </network>
-
- <task>
- <run host="slave1" command="ip a"/>
- <run host="slave1" module="IcmpPing">
- <options>
- <option name="addr" value="{ip(slave2,testifc2)}"/>
- <option name="count" value="3"/>
- <option name="iface" value="{devname(slave1, vlan)}"/>
- </options>
- </run>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/14/recipe2.xml
b/regression-tests/tests/14/recipe2.xml
deleted file mode 100644
index 4d165f6..0000000
--- a/regression-tests/tests/14/recipe2.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="slave1">
- <params/>
- <interfaces>
- <eth id="1" label="A"/>
- <vlan id="vlan1">
- <options>
- <option name="vlan_tci" value="1"/>
- </options>
- <addresses>
- <address value="192.168.100.1/24"/>
- </addresses>
- <slaves>
- <slave id="1"/>
- </slaves>
- </vlan>
- <vlan id="vlan2">
- <options>
- <option name="vlan_tci" value="2"/>
- </options>
- <addresses>
- <address value="192.168.101.2/24"/>
- </addresses>
- <slaves>
- <slave id="1"/>
- </slaves>
- </vlan>
- </interfaces>
- </host>
-
- <host id="slave2">
- <params/>
- <interfaces>
- <eth id="2" label="A"/>
- <vlan id="vlan1">
- <options>
- <option name="vlan_tci" value="1"/>
- </options>
- <addresses>
- <address value="192.168.100.3/24"/>
- </addresses>
- <slaves>
- <slave id="2"/>
- </slaves>
- </vlan>
- <vlan id="vlan2">
- <options>
- <option name="vlan_tci" value="2"/>
- </options>
- <addresses>
- <address value="192.168.101.4/24"/>
- </addresses>
- <slaves>
- <slave id="2"/>
- </slaves>
- </vlan>
- </interfaces>
- </host>
-
- </network>
-
- <task>
- <run host="slave1" module="IcmpPing">
- <options>
- <option name="addr" value="{ip(slave2, vlan1)}"/>
- <option name="count" value="3"/>
- <option name="iface" value="{devname(slave1, vlan1)}"/>
- </options>
- </run>
- <run host="slave1" module="IcmpPing">
- <options>
- <option name="addr" value="{ip(slave2, vlan2)}"/>
- <option name="count" value="3"/>
- <option name="iface" value="{devname(slave1, vlan2)}"/>
- </options>
- </run>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/14/run.sh b/regression-tests/tests/14/run.sh
deleted file mode 100755
index 42ccbcc..0000000
--- a/regression-tests/tests/14/run.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run recipe1.xml
-rv=$?
-
-assert_status "pass" "$rv"
-
-lnst-ctl -d run recipe2.xml
-rv=$?
-
-assert_status "pass" "$rv"
-
-end_test
diff --git a/regression-tests/tests/15/desc b/regression-tests/tests/15/desc
deleted file mode 100644
index 29c8517..0000000
--- a/regression-tests/tests/15/desc
+++ /dev/null
@@ -1,3 +0,0 @@
-devname updates not reflected in {Net,Nm}DeviceConfig classes
-
-https://github.com/jpirko/lnst/issues/65
diff --git a/regression-tests/tests/15/recipe.xml b/regression-tests/tests/15/recipe.xml
deleted file mode 100644
index 3225b26..0000000
--- a/regression-tests/tests/15/recipe.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="slave1">
- <params/>
- <interfaces>
- <eth id="1" label="A">
- <addresses>
- <address value="192.168.101.1/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
-
- <host id="slave2">
- <params/>
- <interfaces>
- <eth id="1" label="A">
- <addresses>
- <address value="192.168.101.2/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
-
- </network>
-
- <task>
- <run host="slave1" command="ip link set {devname(slave1, 1)}
down"/>
- <run host="slave1" command="ip link set {devname(slave1, 1)} name
xyz"/>
- <run host="slave1" command="ip link set {devname(slave1, 1)}
up"/>
- <run host="slave1" command="ip a show dev xyz"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/15/run.sh b/regression-tests/tests/15/run.sh
deleted file mode 100755
index 50ab9ce..0000000
--- a/regression-tests/tests/15/run.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run recipe.xml
-rv=$?
-
-assert_status "pass" "$rv"
-
-end_test
diff --git a/regression-tests/tests/16/desc b/regression-tests/tests/16/desc
deleted file mode 100644
index a063e3a..0000000
--- a/regression-tests/tests/16/desc
+++ /dev/null
@@ -1,3 +0,0 @@
-address tag should accept value in the tag contents or the 'value' attribute
-
-https://github.com/jpirko/lnst/issues/31
diff --git a/regression-tests/tests/16/recipe.xml b/regression-tests/tests/16/recipe.xml
deleted file mode 100644
index 3d8887e..0000000
--- a/regression-tests/tests/16/recipe.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="slave1">
- <interfaces>
- <eth id="testifc1" label="A">
- <addresses>
- <address>fd00::1/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
-
- <host id="slave2">
- <interfaces>
- <eth id="testifc3" label="A">
- <addresses>
- <address value="fd00::2/64"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
-
- </network>
-
- <task>
- <ctl_wait seconds="5"/>
- <config host="slave1"
option="/proc/sys/net/ipv4/igmp_max_memberships" value="5"/>
- <run host="slave1" module="Icmp6Ping">
- <options>
- <option name="addr"
value="{ip(slave2,testifc3)}"/>
- <option name="count" value="20"/>
- <option name="interval" value="0"/>
- </options>
- </run>
- </task>
-
-</lnstrecipe>
diff --git a/regression-tests/tests/16/run.sh b/regression-tests/tests/16/run.sh
deleted file mode 100755
index 6b80eb5..0000000
--- a/regression-tests/tests/16/run.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run recipe.xml
-rv=$?
-
-print_separator
-
-assert_status "pass" "$rv"
-
-end_test
diff --git a/regression-tests/tests/17/desc b/regression-tests/tests/17/desc
deleted file mode 100644
index af02d5b..0000000
--- a/regression-tests/tests/17/desc
+++ /dev/null
@@ -1,3 +0,0 @@
-Unknown options to a test module result in a stack trace
-
-https://github.com/jpirko/lnst/issues/38
diff --git a/regression-tests/tests/17/recipe.xml b/regression-tests/tests/17/recipe.xml
deleted file mode 100644
index 56f9216..0000000
--- a/regression-tests/tests/17/recipe.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="slave1">
- <interfaces>
- <eth id="testiface" label="A">
- <addresses>
- <address value="fd00::1/64"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
-
- <host id="slave2">
- <interfaces>
- <eth id="testiface" label="A">
- <addresses>
- <address value="fd00::2/64"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
-
- </network>
-
- <task>
- <ctl_wait seconds="5"/>
- <run module="Icmp6Ping" host="slave1"
timeout="30">
- <options>
- <option name="addre"
value="{ip(slave2,testiface)}"/> <!-- this is wrong -->
- <option name="addr"
value="{ip(slave2,testiface)}"/> <!-- this is correct -->
- <option name="count" value="10"/>
- <option name="interval" value="0.0"/>
- <option name="limit_rate" value="95"/>
- </options>
- </run>
- </task>
-
-</lnstrecipe>
diff --git a/regression-tests/tests/17/run.sh b/regression-tests/tests/17/run.sh
deleted file mode 100755
index 6b80eb5..0000000
--- a/regression-tests/tests/17/run.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run recipe.xml
-rv=$?
-
-print_separator
-
-assert_status "pass" "$rv"
-
-end_test
diff --git a/regression-tests/tests/18/desc b/regression-tests/tests/18/desc
deleted file mode 100644
index bca06cc..0000000
--- a/regression-tests/tests/18/desc
+++ /dev/null
@@ -1,6 +0,0 @@
-Empty task results in uhandled exception
-
-Instead we should require at least one command or end with an error, but not a
-stack trace.
-
-https://github.com/jpirko/lnst/issues/53
diff --git a/regression-tests/tests/18/recipe.xml b/regression-tests/tests/18/recipe.xml
deleted file mode 100644
index 75db68c..0000000
--- a/regression-tests/tests/18/recipe.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="slave1">
- <interfaces>
- <eth id="testiface" label="A">
- <addresses>
- <address value="fd00::1/64"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
-
- <host id="slave2">
- <interfaces>
- <eth id="testiface" label="A">
- <addresses>
- <address value="fd00::2/64"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
-
- </network>
-
- <task/>
-</lnstrecipe>
diff --git a/regression-tests/tests/18/run.sh b/regression-tests/tests/18/run.sh
deleted file mode 100755
index ba19649..0000000
--- a/regression-tests/tests/18/run.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run recipe.xml | tee test.log
-rv=${PIPESTATUS[0]}
-
-log=`cat test.log`
-
-rm -f test.log
-
-print_separator
-
-assert_status "error" "$rv"
-assert_log "ERROR" "Parser error:" "$log"
-
-end_test
diff --git a/regression-tests/tests/19/desc b/regression-tests/tests/19/desc
deleted file mode 100644
index a704a88..0000000
--- a/regression-tests/tests/19/desc
+++ /dev/null
@@ -1,3 +0,0 @@
-undefined interface id in template function
-
-https://github.com/jpirko/lnst/issues/55
diff --git a/regression-tests/tests/19/recipe.xml b/regression-tests/tests/19/recipe.xml
deleted file mode 100644
index 4fa9892..0000000
--- a/regression-tests/tests/19/recipe.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="tm1">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address value="192.168.131.201/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run host="tm1" command="ethtool -i {ip(tm1,nic2)}"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/19/run.sh b/regression-tests/tests/19/run.sh
deleted file mode 100755
index 001c35b..0000000
--- a/regression-tests/tests/19/run.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run recipe.xml | tee test.log
-rv=${PIPESTATUS[0]}
-
-log=`cat test.log`
-
-rm -f test.log
-
-print_separator
-
-assert_status "error" "$rv"
-assert_log "ERROR" "Second parameter of function ip() is invalid"
"$log"
-
-end_test
diff --git a/regression-tests/tests/2/desc b/regression-tests/tests/2/desc
deleted file mode 100644
index 9f606a7..0000000
--- a/regression-tests/tests/2/desc
+++ /dev/null
@@ -1,5 +0,0 @@
-RecipeParser: Lots of comments in a XML
-
-There was a problem with comments at some places in the recipe XML.
-This recipe should cover all the possibilities and make sure they are
-properly ignored.
diff --git a/regression-tests/tests/2/recipe.xml b/regression-tests/tests/2/recipe.xml
deleted file mode 100644
index 0565f47..0000000
--- a/regression-tests/tests/2/recipe.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<!--comment-->
-<lnstrecipe>
- <!--comment-->
- <network>
- <!--comment-->
- <host id="1">
- <!--comment-->
- <params>
- <!--comment-->
- </params>
- <!--comment-->
- <interfaces>
- <!--comment-->
- <eth label="tnet" id="testiface">
- <!--comment-->
- <addresses>
- <!--comment-->
- <address value="192.168.100.10/24"/>
- <!--comment-->
- </addresses>
- <!--comment-->
- </eth>
- <!--comment-->
- </interfaces>
- <!--comment-->
- </host>
- <!--comment-->
- <host id="2">
- <!--comment-->
- <params>
- <!--comment-->
- </params>
- <!--comment-->
- <interfaces>
- <!--comment-->
- <eth label="tnet" id="testiface">
- <!--comment-->
- <addresses>
- <!--comment-->
- <address value="192.168.100.11/24"/>
- <!--comment-->
- </addresses>
- <!--comment-->
- </eth>
- <!--comment-->
- </interfaces>
- <!--comment-->
- </host>
- <!--comment-->
- </network>
- <!--comment-->
-
- <task>
- <!--comment-->
- <run module="IcmpPing" host="1"
timeout="30">
- <!--comment-->
- <options>
- <!--comment-->
- <option name="addr"
value="{ip(2,testiface)}"/>
- <!--comment-->
- <option name="count" value="40"/>
- <!--comment-->
- <option name="interval" value="0.2"/>
- <!--comment-->
- <option name="limit_rate" value="95"/>
- <!--comment-->
- </options>
- <!--comment-->
- </run>
- <!--comment-->
- </task>
- <!--comment-->
-</lnstrecipe>
-<!--comment-->
diff --git a/regression-tests/tests/2/run.sh b/regression-tests/tests/2/run.sh
deleted file mode 100755
index 45e9995..0000000
--- a/regression-tests/tests/2/run.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl run recipe.xml
-rv=$?
-
-assert_status "pass" "$rv"
-
-end_test
diff --git a/regression-tests/tests/20/desc b/regression-tests/tests/20/desc
deleted file mode 100644
index c695ab0..0000000
--- a/regression-tests/tests/20/desc
+++ /dev/null
@@ -1,3 +0,0 @@
-recipe cannot be run after config_only run of recipe with team/bonding
-
-https://github.com/jpirko/lnst/issues/59
diff --git a/regression-tests/tests/20/recipe1.xml
b/regression-tests/tests/20/recipe1.xml
deleted file mode 100644
index 54346e9..0000000
--- a/regression-tests/tests/20/recipe1.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="tm1">
- <interfaces>
- <eth id="nic1" label="testnet"/>
- <bond id="bond">
- <slaves>
- <slave id="nic1"/>
- </slaves>
- <addresses>
- <address value="192.168.131.201/24"/>
- </addresses>
- </bond>
- </interfaces>
- </host>
- <host id="tm2">
- <interfaces>
- <eth id="nic1" label="testnet"/>
- <team id="team">
- <options>
- <option name="teamd_config">
- {
- "runner": {"name":
"activebackup"},
- "link_watch": {"name":
"ethtool"}
- }
- </option>
- </options>
- <slaves>
- <slave id="nic1"/>
- </slaves>
- <addresses>
- <address value="192.168.131.202/24"/>
- </addresses>
- </team>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run host="tm1" module="IcmpPing">
- <options>
- <option name="addr" value="{ip(tm2,team)}"/>
- <option name="count" value="3"/>
- </options>
- </run>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/20/recipe2.xml
b/regression-tests/tests/20/recipe2.xml
deleted file mode 100644
index 327c0f3..0000000
--- a/regression-tests/tests/20/recipe2.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="tm1">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address value="192.168.131.201/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="tm2">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address value="192.168.131.202/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run host="tm1" module="IcmpPing">
- <options>
- <option name="addr" value="{ip(tm2,nic1)}"/>
- <option name="count" value="3"/>
- </options>
- </run>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/20/run.sh b/regression-tests/tests/20/run.sh
deleted file mode 100755
index 8a720f0..0000000
--- a/regression-tests/tests/20/run.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d config_only recipe1.xml | tee test.log
-rv1=${PIPESTATUS[0]}
-
-lnst-ctl -d run recipe2.xml | tee test.log
-rv2=${PIPESTATUS[0]}
-
-
-print_separator
-assert_status "pass" "$rv1"
-assert_status "pass" "$rv2"
-
-rm -f test.log
-
-end_test
diff --git a/regression-tests/tests/21/desc b/regression-tests/tests/21/desc
deleted file mode 100644
index e4f5cbc..0000000
--- a/regression-tests/tests/21/desc
+++ /dev/null
@@ -1,3 +0,0 @@
-broken tool-module dependency during synchronization
-
-https://github.com/jpirko/lnst/issues/71
diff --git a/regression-tests/tests/21/lnst-ctl.conf
b/regression-tests/tests/21/lnst-ctl.conf
deleted file mode 100644
index 9f43732..0000000
--- a/regression-tests/tests/21/lnst-ctl.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-[environment]
-test_tool_dirs = ./test_tools
-test_module_dirs = ./test_modules
diff --git a/regression-tests/tests/21/recipe.xml b/regression-tests/tests/21/recipe.xml
deleted file mode 100644
index ee61de1..0000000
--- a/regression-tests/tests/21/recipe.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="tm1">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address value="192.168.131.201/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="tm2">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address value="192.168.131.202/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <define>
- <alias name="my_range" value="10000-10050" />
- </define>
-
- <define>
- <alias name="debug" value="no"/>
- </define>
-
- <run module="TCPConnection" host="tm2"
bg_id="server">
- <options>
- <option name="mode" value="server"/>
- <option name="address"
value="{ip(tm2,nic1)}"/>
- <option name="portrange" value="{$my_range}"/>
- <option name="continuous" value="yes"/>
- <option name="debug" value="{$debug}"/>
- </options>
- </run>
- <ctl_wait seconds="3"/>
- <run module="TCPConnection" host="tm1"
bg_id="client">
- <options>
- <option name="mode" value="client"/>
- <option name="address"
value="{ip(tm2,nic1)}"/>
- <option name="portrange" value="{$my_range}"/>
- <option name="continuous" value="yes"/>
- <option name="debug" value="{$debug}"/>
- </options>
- </run>
- <ctl_wait seconds="15"/>
- <intr host="tm1" bg_id="client"/>
- <intr host="tm2" bg_id="server"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/21/run.sh b/regression-tests/tests/21/run.sh
deleted file mode 100755
index 07bd6c0..0000000
--- a/regression-tests/tests/21/run.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-touch test_tools/*
-touch test_modules/*
-
-lnst-ctl -c lnst-ctl.conf -d -r run recipe.xml | tee test.log
-rv=${PIPESTATUS[0]}
-
-print_separator
-assert_status "pass" "$rv"
-
-rm -f test.log
-
-end_test
diff --git a/regression-tests/tests/21/test_modules/TCPConnection.py
b/regression-tests/tests/21/test_modules/TCPConnection.py
deleted file mode 100644
index 43b88a9..0000000
--- a/regression-tests/tests/21/test_modules/TCPConnection.py
+++ /dev/null
@@ -1,60 +0,0 @@
-"""
-This module defines TCPConnection test,
-a python wrapper for LNST's tcp_conn test tool
-"""
-
-__author__ = """
-jtluka(a)redhat.com (Jan Tluka)
-"""
-
-import re
-import errno
-import logging
-from lnst.Common.TestsCommon import TestGeneric
-from lnst.Common.Utils import bool_it
-
-class TCPConnection(TestGeneric):
- def run(self):
- mode = self.get_mopt("mode")
- address = self.get_mopt("address")
- portrange = self.get_mopt("portrange")
-
- continuous = self.get_opt("continuous")
- debug = self.get_opt("debug")
- ipv6 = self.get_opt("ipv6")
-
- cmd = ""
- if (mode == "server"):
- logging.debug("TCPConnection: running as server")
- cmd += "./tcp_listen"
- elif (mode == "client"):
- logging.debug("TCPConnection: running as client")
- cmd += "./tcp_connect"
- else:
- raise Exception("Invalid mode value for TCPConnection test
module!")
-
- cmd += " -a %s -p %s" % (address, portrange)
-
- if continuous and bool_it(continuous):
- cmd += " -c"
-
- if debug and bool_it(debug):
- cmd += " -d"
-
- if ipv6 and bool_it(ipv6):
- cmd += " -6"
-
- output = self.exec_from("tcp_conn", cmd, die_on_err=False,
log_outputs=True)[0]
-
- logging.debug("TCPConnection done, inspecting logs ...")
-
- m = None
- if (mode == "client"):
- m = re.search("made [0-9]* connections", output)
- elif (mode == "server"):
- m = re.search("handled [0-9]* connections", output)
-
- if m is None:
- return self.set_fail({'msg': "Unexpected error"})
- else:
- return self.set_pass({'msg': m.group(0)})
diff --git a/regression-tests/tests/21/test_tools/tcp_conn/Makefile
b/regression-tests/tests/21/test_tools/tcp_conn/Makefile
deleted file mode 100644
index a570641..0000000
--- a/regression-tests/tests/21/test_tools/tcp_conn/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-CC=gcc
-
-all: tcp_listen tcp_connect
-
-tcp_listen: tcp_listen.c
- $(CC) -o tcp_listen tcp_listen.c -pthread -lrt
-
-tcp_connect: tcp_connect.c
- $(CC) -o tcp_connect tcp_connect.c -pthread -lrt
-
-clean:
- rm -f tcp_connect tcp_listen
diff --git a/regression-tests/tests/21/test_tools/tcp_conn/lnst-setup.sh
b/regression-tests/tests/21/test_tools/tcp_conn/lnst-setup.sh
deleted file mode 100755
index 2aad486..0000000
--- a/regression-tests/tests/21/test_tools/tcp_conn/lnst-setup.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-make
diff --git a/regression-tests/tests/21/test_tools/tcp_conn/tcp_connect.c
b/regression-tests/tests/21/test_tools/tcp_conn/tcp_connect.c
deleted file mode 100644
index 3bb4597..0000000
--- a/regression-tests/tests/21/test_tools/tcp_conn/tcp_connect.c
+++ /dev/null
@@ -1,281 +0,0 @@
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/wait.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <arpa/inet.h>
-
-#include <errno.h>
-#include <signal.h>
-#include <semaphore.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#define IPCKEY 5678
-
-int connection_handlers[1024];
-int handlers_count;
-int *connection_count;
-
-int debug_on = 0;
-int cont = 0;
-int *term_flag;
-
-sem_t *mutex;
-
-int usage()
-{
- printf("./tcp_connect -p [port_range] -a [ipaddr] [-d] [-c] [-6]\n");
- return 0;
-}
-
-#define MSG_MAX 256
-char msg[MSG_MAX];
-
-void debug(char* msg)
-{
- if (debug_on)
- {
- printf("Debug: %s\n", msg);
- }
-}
-
-void terminate_connections(int p)
-{
- debug("signalled");
- *term_flag = 1;
-}
-
-int handle_connections(char* host, int port, int ipv6)
-{
- int conn_sock;
- struct sockaddr_in my_addr;
- struct sockaddr_in6 my_addr6;
- char data[] = "abcdefghijklmnopqrstuvwxyz0123456789";
- char buf[21*10*strlen(data)+1];
- int family;
-
- snprintf(msg, MSG_MAX, "Starting connection on %s port %i", host, port);
- debug(msg);
-
- if (ipv6)
- {
- family = my_addr6.sin6_family = AF_INET6;
- my_addr6.sin6_port = htons(port);
- if (inet_pton(AF_INET6, host, &my_addr6.sin6_addr) != 1) {
- perror("fail on inet_pton");
- return 1;
- }
- }
- else
- {
- family = my_addr.sin_family = AF_INET;
- my_addr.sin_port = htons(port);
- if (inet_aton(host, &(my_addr.sin_addr)) == 0)
- {
- printf("failed on inet_aton()\n");
- return 1;
- }
- }
-
- do
- {
- conn_sock = socket(family, SOCK_STREAM, 0);
- if (conn_sock == -1)
- {
- perror("fail on socket()");
- return 1;
- }
-
- struct sockaddr* sa;
- socklen_t sa_len;
- if (ipv6)
- {
- sa = (struct sockaddr*) &my_addr6;
- sa_len = sizeof(struct sockaddr_in6);
- }
- else
- {
- sa = (struct sockaddr*) &my_addr;
- sa_len = sizeof(struct sockaddr_in);
- }
-
- if (connect(conn_sock, sa, sa_len) == -1)
- {
- perror("fail on connect");
- return 1;
- }
-
- sem_wait(mutex);
- *connection_count += 1;
- sem_post(mutex);
-
- int bursts = 5*(random() % 10) + 1;
- int b;
- int sum = 0;
-
- for (b=0; b < bursts; b++)
- {
- int parts = 20*(random() % 10) + 1;
- int j;
-
- sum += parts*strlen(data);
- for (j = 0; j < parts; j++)
- {
- strncpy(buf + (j*strlen(data)), data, strlen(data));
- }
-
- if (write(conn_sock, buf, parts * strlen(data)) == -1)
- {
- perror("failed to send data");
- return 1;
- }
- usleep(100*(random()%100));
- }
-
- snprintf(msg, MSG_MAX, "sent %i bytes (bursts: %i)", sum, bursts);
- debug(msg);
- snprintf(msg, MSG_MAX, "closing connection on port %i", port);
- debug(msg);
-
- close(conn_sock);
- } while (cont && (*term_flag) == 0);
-
- return 0;
-}
-
-int main(int argc, char **argv)
-{
- int rc;
- int p;
- char port_str[256];
- char str_port_start[128];
- char str_port_end[128];
- char host_str[16] = "\0";
- int start_port;
- int end_port;
- int opt;
- char *delimiter;
- struct sigaction sa;
- int shm;
- int ipv6 = 0;
-
- term_flag = mmap(NULL, sizeof *term_flag, PROT_READ | PROT_WRITE,
- MAP_SHARED | MAP_ANONYMOUS, -1, 0);
- *term_flag = 0;
-
- connection_count = mmap(NULL, sizeof *connection_count, PROT_READ | PROT_WRITE,
- MAP_SHARED | MAP_ANONYMOUS, -1, 0);
- *connection_count = 0;
-
- /* counter synchronization stuff - semaphore and shared memory */
- if ((shm = shm_open("myshm", O_RDWR | O_CREAT, S_IRWXU)) < 0) {
- perror("shm_open");
- exit(1);
- }
-
- if ( ftruncate(shm, sizeof(sem_t)) < 0 ) {
- perror("ftruncate");
- exit(1);
- }
-
- /* place shared mutex into shared memory */
- if ((mutex = (sem_t*) mmap(NULL, sizeof(sem_t), PROT_READ | PROT_WRITE, MAP_SHARED,
shm, 0)) == MAP_FAILED) {
- perror("mmap");
- exit(1);
- }
-
- if( sem_init(mutex,1,1) < 0)
- {
- perror("semaphore initilization");
- exit(0);
- }
-
- /* signal handling */
- memset(&sa, 0, sizeof(sa));
-
- sa.sa_handler = &terminate_connections;
- sigaction(SIGTERM, &sa, NULL);
- sigaction(SIGINT, &sa, NULL);
-
- handlers_count = 0;
-
- /* collect program args */
- while ((opt = getopt(argc, argv, "p:a:dc6")) != -1) {
- switch (opt) {
- case 'p':
- strncpy(port_str, optarg, 256);
- port_str[256-1]='\0';
- delimiter = strchr(port_str, '-');
- if (delimiter == NULL)
- {
- usage();
- return 1;
- }
- strncpy(str_port_start, port_str, delimiter - port_str);
- str_port_start[delimiter - port_str] = '\0';
- strncpy(str_port_end, delimiter+1, strlen(port_str) -
(delimiter+1-port_str));
- start_port = atoi(str_port_start);
- end_port = atoi(str_port_end);
- break;
- case 'a':
- strncpy(host_str, optarg, 64);
- host_str[16-1] = '\0';
- break;
- case 'd':
- debug_on = 1;
- break;
- case 'c':
- cont = 1;
- break;
- case '6':
- ipv6 = 1;
- break;
- }
- }
-
- if (strlen(host_str) == 0)
- {
- usage();
- return 1;
- }
-
- /* spawn process to handle every port specified */
- for (p = start_port; p < end_port; p++){
- if ((rc = fork()) > 0)
- {
- /* parent, add pid to the list */
- connection_handlers[handlers_count++] = rc;
- }
- else if (rc == 0)
- {
- /* child */
- sa.sa_handler = SIG_DFL;
- sigaction(SIGTERM, &sa, NULL);
- sigaction(SIGINT, &sa, NULL);
- handle_connections(host_str, p, ipv6);
- return 0;
- }
- }
-
- /* gather children */
- int child_status;
- int i;
- for (i=0; i < handlers_count; i++)
- {
- wait(&child_status);
- debug("worker finished");
- }
-
- debug("tcp_connect finished");
-
- printf("made %i connections\n", *connection_count);
-
- return 0;
-}
diff --git a/regression-tests/tests/21/test_tools/tcp_conn/tcp_listen.c
b/regression-tests/tests/21/test_tools/tcp_conn/tcp_listen.c
deleted file mode 100644
index 7a292fe..0000000
--- a/regression-tests/tests/21/test_tools/tcp_conn/tcp_listen.c
+++ /dev/null
@@ -1,330 +0,0 @@
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/wait.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <arpa/inet.h>
-
-#include <errno.h>
-#include <signal.h>
-#include <semaphore.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#define IPCKEY 5678
-
-int listener_count;
-int listeners[1024];
-int *connection_count;
-
-int debug_on = 0;
-int cont = 0;
-int *term_flag;
-
-sem_t *mutex;
-
-int usage()
-{
- printf("./tcp_listen -p [port_range] -a [ipaddr] [-d] [-c] [-6]\n");
- return 0;
-}
-
-void debug(char* msg)
-{
- if (debug_on)
- {
- printf("Debug: %s\n", msg);
- }
-}
-
-#define MSG_MAX 256
-char msg[MSG_MAX];
-
-void terminate_connections(int p)
-{
- debug("signal received, killing servers");
- *term_flag = 1;
-}
-
-int handle_connections(char* host, int port, int ipv6)
-{
- int listen_sock;
- struct sockaddr_in my_addr;
- struct sockaddr_in6 my_addr6;
- socklen_t my_addr_size = sizeof(my_addr);
- socklen_t my_addr6_size = sizeof(my_addr6);
- int remote_sock;
- struct sockaddr_in remote;
- struct sockaddr_in6 remote6;
- socklen_t remote_size = sizeof(remote);
- socklen_t remote6_size = sizeof(remote6);
- char data[256];
- int family;
-
- snprintf(msg, MSG_MAX, "Starting listener on %s port %i", host, port);
- debug(msg);
-
- if (ipv6)
- {
- family = AF_INET6;
- bzero(&my_addr6, my_addr6_size);
- my_addr6.sin6_family = family;
- my_addr6.sin6_port = htons(port);
- if (inet_pton(AF_INET6, host, &(my_addr6.sin6_addr)) != 1)
- {
- printf("failed on inet_pton()\n");
- return 1;
- }
- }
- else
- {
- family = AF_INET;
- bzero(&my_addr, my_addr_size);
- my_addr.sin_family = family;
- my_addr.sin_port = htons(port);
- if (inet_aton(host, &(my_addr.sin_addr)) == 0)
- {
- printf("failed on inet_aton()\n");
- return 1;
- }
- }
-
- if ((listen_sock = socket(family, SOCK_STREAM, 0)) == -1)
- {
- perror("fail on socket creation");
- return 1;
- }
-
- int on = 1;
- if (setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, (const char*) &on,
- sizeof(on)) == -1)
- {
- perror("fail on setsockopt");
- return 1;
- }
-
- struct sockaddr* sa;
- socklen_t sa_len;
- if (ipv6)
- {
- sa = (struct sockaddr*) &my_addr6;
- sa_len = my_addr6_size;
- }
- else
- {
- sa = (struct sockaddr*) &my_addr;
- sa_len = my_addr_size;
- }
-
- if (bind(listen_sock, sa, sa_len))
- {
- perror("fail on bind");
- return 1;
- }
-
- if (listen(listen_sock, 0))
- {
- perror("fail on listen");
- return 1;
- }
-
- do
- {
- struct in_addr ra = remote.sin_addr;
- struct in6_addr ra6 = remote6.sin6_addr;
- char host_address_str[256];
- ssize_t read_rc;
- struct sockaddr* r_sockaddr;
- socklen_t* r_sockaddr_size;
-
- if (ipv6)
- {
- bzero(&remote6, remote6_size);
- r_sockaddr = (struct sockaddr*) &remote6;
- r_sockaddr_size = &remote6_size;
- }
- else
- {
- bzero(&remote, remote_size);
- r_sockaddr = (struct sockaddr*) &remote;
- r_sockaddr_size = &remote_size;
- }
-
- /* handle single connection */
- remote_sock = accept(listen_sock, r_sockaddr, r_sockaddr_size);
- if (remote_sock == -1)
- {
- perror("failure on accept");
- close(listen_sock);
- return 1;
- }
-
- sem_wait(mutex);
- *connection_count += 1;
- sem_post(mutex);
-
- if (ipv6)
- inet_ntop(AF_INET6, &ra6, host_address_str, 255);
- else
- inet_ntop(AF_INET, &ra, host_address_str, 255);
-
- snprintf(msg, MSG_MAX, "accepted connection from host %s port %i",
host_address_str, port);
- debug(msg);
-
- int sum = 0;
- while (read_rc = read(remote_sock, &data, 256))
- {
- sum += read_rc;
- }
-
- snprintf(msg, MSG_MAX, "connection closed, read %d bytes (%i)", sum,
port);
- debug(msg);
- close(remote_sock);
- } while (cont && (*term_flag) == 0);
-
- close(listen_sock);
-
- return 0;
-}
-
-int main(int argc, char **argv)
-{
- int rc;
- int p;
- char port_str[256];
- char str_port_start[128];
- char str_port_end[128];
- char host_str[16] = "\0";
- int start_port;
- int end_port;
- int opt;
- char *delimiter;
- struct sigaction sa;
- struct sigaction sa2;
- int shm;
- int ipv6 = 0;
-
- term_flag = mmap(NULL, sizeof *term_flag, PROT_READ | PROT_WRITE,
- MAP_SHARED | MAP_ANONYMOUS, -1, 0);
- *term_flag = 0;
-
- connection_count = mmap(NULL, sizeof *connection_count, PROT_READ | PROT_WRITE,
- MAP_SHARED | MAP_ANONYMOUS, -1, 0);
- *connection_count = 0;
-
- /* counter synchronization stuff - semaphore and shared memory */
- if ((shm = shm_open("myshm", O_RDWR | O_CREAT, S_IRWXU)) < 0) {
- perror("shm_open");
- exit(1);
- }
-
- if ( ftruncate(shm, sizeof(sem_t)) < 0 ) {
- perror("ftruncate");
- exit(1);
- }
-
- /* place shared mutex into shared memory */
- if ((mutex = (sem_t*) mmap(NULL, sizeof(sem_t), PROT_READ | PROT_WRITE, MAP_SHARED,
shm, 0)) == MAP_FAILED) {
- perror("mmap");
- exit(1);
- }
-
- if( sem_init(mutex,1,1) < 0)
- {
- perror("semaphore initilization");
- exit(0);
- }
-
- /* signal handling */
- memset(&sa, 0, sizeof(sa));
- memset(&sa2, 0, sizeof(sa2));
-
- sa.sa_handler = &terminate_connections;
- sigaction(SIGTERM, &sa, NULL);
- sigaction(SIGINT, &sa, NULL);
-
- /* collect program args */
- while ((opt = getopt(argc, argv, "p:a:dc6")) != -1) {
- switch (opt) {
- case 'p':
- strncpy(port_str, optarg, 256);
- port_str[256-1]='\0';
- delimiter = strchr(port_str, '-');
- if (delimiter == NULL)
- {
- usage();
- return 1;
- }
- strncpy(str_port_start, port_str, delimiter - port_str);
- str_port_start[delimiter - port_str] = '\0';
- strncpy(str_port_end, delimiter+1, strlen(port_str) -
(delimiter+1-port_str));
- start_port = atoi(str_port_start);
- end_port = atoi(str_port_end);
- break;
- case 'a':
- strncpy(host_str, optarg, 64);
- host_str[16-1] = '\0';
- break;
- case 'd':
- debug_on = 1;
- break;
- case 'c':
- cont = 1;
- break;
- case '6':
- ipv6 = 1;
- break;
- }
- }
-
- if (strlen(host_str) == 0)
- {
- usage();
- return 1;
- }
-
- listener_count = 0;
- /* spawn process to handle every port specified */
- for (p = start_port; p < end_port; p++){
- if ((rc = fork()) > 0)
- {
- /* parent, add pid to the list */
- listeners[listener_count++] = rc;
- }
- else if (rc == 0)
- {
- /* child */
- sa.sa_handler = SIG_DFL;
- sigaction(SIGTERM, &sa, NULL);
- sigaction(SIGINT, &sa, NULL);
-
- /* run the main processing loop */
- handle_connections(host_str, p, ipv6);
- return 0;
- }
- }
-
- /* gather children */
- int child_status;
- int i;
- for (i=0; i < listener_count; i++)
- {
- while (wait(&child_status) == -1 && errno == EINTR)
- {
- ;
- }
- debug("worker finished");
- }
-
- debug("tcp_listener finished");
-
- printf("handled %i connections\n", *connection_count);
-
- return 0;
-}
diff --git a/regression-tests/tests/22/desc b/regression-tests/tests/22/desc
deleted file mode 100644
index 0882b9c..0000000
--- a/regression-tests/tests/22/desc
+++ /dev/null
@@ -1,3 +0,0 @@
-Two Slave Machine configs referencing the same machine
-
-https://github.com/jpirko/lnst/issues/32
diff --git a/regression-tests/tests/22/lnst-ctl.conf
b/regression-tests/tests/22/lnst-ctl.conf
deleted file mode 100644
index 9dff9d0..0000000
--- a/regression-tests/tests/22/lnst-ctl.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-[pools]
-lnst = ./pool
diff --git a/regression-tests/tests/22/pool/slave1.xml
b/regression-tests/tests/22/pool/slave1.xml
deleted file mode 100644
index f739d2b..0000000
--- a/regression-tests/tests/22/pool/slave1.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<slavemachine>
- <params>
- <param name="hostname" value="example.com"/>
- <param name="libvirt_domain" value="example"/>
- </params>
-</slavemachine>
diff --git a/regression-tests/tests/22/pool/slave2.xml
b/regression-tests/tests/22/pool/slave2.xml
deleted file mode 100644
index f739d2b..0000000
--- a/regression-tests/tests/22/pool/slave2.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<slavemachine>
- <params>
- <param name="hostname" value="example.com"/>
- <param name="libvirt_domain" value="example"/>
- </params>
-</slavemachine>
diff --git a/regression-tests/tests/22/recipe.xml b/regression-tests/tests/22/recipe.xml
deleted file mode 100644
index 7565af0..0000000
--- a/regression-tests/tests/22/recipe.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="tm1">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address value="192.168.131.201/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="tm2">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address value="192.168.131.202/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run host="tm1" command="ip a"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/22/run.sh b/regression-tests/tests/22/run.sh
deleted file mode 100755
index 14442b2..0000000
--- a/regression-tests/tests/22/run.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -c lnst-ctl.conf -d run recipe.xml | tee test.log
-rv=${PIPESTATUS[0]}
-
-log=`cat test.log`
-
-print_separator
-assert_status "error" "$rv"
-assert_log "error" "You have the same machine listed twice in your
pool" "$log"
-
-rm -f test.log
-
-end_test
diff --git a/regression-tests/tests/23/desc b/regression-tests/tests/23/desc
deleted file mode 100644
index a75ee4d..0000000
--- a/regression-tests/tests/23/desc
+++ /dev/null
@@ -1,3 +0,0 @@
-synced resources not visible in network namespaces
-
-https://github.com/jpirko/lnst/issues/93
diff --git a/regression-tests/tests/23/lnst-ctl.conf
b/regression-tests/tests/23/lnst-ctl.conf
deleted file mode 100644
index a4d654d..0000000
--- a/regression-tests/tests/23/lnst-ctl.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-[environment]
-test_module_dirs = ./test_modules
diff --git a/regression-tests/tests/23/recipe.xml b/regression-tests/tests/23/recipe.xml
deleted file mode 100644
index 1866430..0000000
--- a/regression-tests/tests/23/recipe.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="tm1">
- <interfaces>
- <eth id="nic1" label="testnet"/>
- <veth_pair>
- <veth id="veth1"/>
- <veth id="veth2" netns="test_ns">
- <addresses>
- <address value="192.168.131.201/24"/>
- </addresses>
- </veth>
- </veth_pair>
- <bridge id="br">
- <slaves>
- <slave id="nic1"/>
- <slave id="veth1"/>
- </slaves>
- </bridge>
- </interfaces>
- </host>
- <host id="tm2">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address value="192.168.131.202/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run host="tm1" module="IcmpPing"
netns="test_ns">
- <options>
- <option name="addr" value="{ip(tm2, nic1)}"/>
- <option name="count" value="40"/>
- <option name="interval" value="0"/>
- </options>
- </run>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/23/run.sh b/regression-tests/tests/23/run.sh
deleted file mode 100755
index a972660..0000000
--- a/regression-tests/tests/23/run.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-touch test_modules/*
-
-lnst-ctl -c lnst-ctl.conf -d run recipe.xml | tee test.log
-rv=${PIPESTATUS[0]}
-
-log=`cat test.log`
-
-print_separator
-assert_status "pass" "$rv"
-
-rm -f test.log
-
-end_test
diff --git a/regression-tests/tests/23/test_modules/IcmpPing.py
b/regression-tests/tests/23/test_modules/IcmpPing.py
deleted file mode 100644
index 5b9d888..0000000
--- a/regression-tests/tests/23/test_modules/IcmpPing.py
+++ /dev/null
@@ -1,71 +0,0 @@
-"""
-This module defines icmp ping test
-
-Copyright 2011 Red Hat, Inc.
-Licensed under the GNU General Public License, version 2 as
-published by the Free Software Foundation; see COPYING for details.
-"""
-
-__author__ = """
-jpirko(a)redhat.com (Jiri Pirko)
-"""
-
-import logging
-import re
-from lnst.Common.TestsCommon import TestGeneric
-from lnst.Common.ExecCmd import exec_cmd
-
-class IcmpPing(TestGeneric):
- def _compose_cmd(self):
- addr = self.get_mopt("addr", opt_type="addr")
- cmd = "ping %s" % addr
- count = self.get_opt("count")
- if count:
- cmd += " -c %s" % count
- interval = self.get_opt("interval")
- if interval:
- cmd += " -i %s" % interval
- iface = self.get_opt("iface")
- if iface:
- cmd += " -I %s" % iface
- size = self.get_opt("size")
- if size:
- cmd += " -s %s" % size
- return cmd
-
- def run(self):
- cmd = self._compose_cmd()
- limit_rate = self.get_opt("limit_rate", default=80)
-
- data_stdout = exec_cmd(cmd, die_on_err=False)[0]
- stat_pttr1 = r'(\d+) packets transmitted, (\d+) received'
- stat_pttr2 = r'rtt min/avg/max/mdev =
(\d+\.\d+)/(\d+\.\d+)/(\d+\.\d+)/(\d+\.\d+) ms'
-
- match = re.search(stat_pttr1, data_stdout)
- if not match:
- res_data = {"msg": "expected pattern not found"}
- return self.set_fail(res_data)
-
- trans_pkts, recv_pkts = match.groups()
- rate = int(round((float(recv_pkts) / float(trans_pkts)) * 100))
- logging.debug("Transmitted \"%s\", received \"%s\",
"
- "rate \"%d%%\", limit_rate \"%d%%\""
- % (trans_pkts, recv_pkts, rate, limit_rate))
-
- res_data = {"rate": rate,
- "limit_rate": limit_rate}
-
- match = re.search(stat_pttr2, data_stdout)
- if match:
- tmin, tavg, tmax, tmdev = [float(x) for x in match.groups()]
- logging.debug("rtt min \"%.3f\", avg \"%.3f\", max
\"%.3f\", "
- "mdev \"%.3f\"" % (tmin, tavg, tmax, tmdev))
-
- res_data["rtt_min"] = tmin
- res_data["rtt_max"] = tmax
-
- if rate < limit_rate:
- res_data["msg"] = "rate is lower than limit"
- return self.set_fail(res_data)
-
- return self.set_pass(res_data)
diff --git a/regression-tests/tests/24/desc b/regression-tests/tests/24/desc
deleted file mode 100644
index 5669380..0000000
--- a/regression-tests/tests/24/desc
+++ /dev/null
@@ -1,6 +0,0 @@
-timeout attribute is ignored
-
-This is tested by setting different timeouts to background commands and parsing
-logs to see if the test failed because of a timeout or finished succesfully.
-
-https://github.com/jpirko/lnst/issues/67
diff --git a/regression-tests/tests/24/recipe_fail.xml
b/regression-tests/tests/24/recipe_fail.xml
deleted file mode 100644
index 39bfe3d..0000000
--- a/regression-tests/tests/24/recipe_fail.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="tm1">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address value="192.168.131.201/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="tm2">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address value="192.168.131.202/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run host="tm1" module="IcmpPing" bg_id="test"
timeout="10">
- <options>
- <option name="addr" value="{ip(tm2, nic1)}"/>
- <option name="count" value="70"/>
- <option name="interval" value="1"/>
- </options>
- </run>
- <wait host="tm1" bg_id="test"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/24/recipe_pass.xml
b/regression-tests/tests/24/recipe_pass.xml
deleted file mode 100644
index 5896c33..0000000
--- a/regression-tests/tests/24/recipe_pass.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="tm1">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address value="192.168.131.201/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="tm2">
- <interfaces>
- <eth id="nic1" label="testnet">
- <addresses>
- <address value="192.168.131.202/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run host="tm1" module="IcmpPing" bg_id="test"
timeout="30">
- <options>
- <option name="addr" value="{ip(tm2, nic1)}"/>
- <option name="count" value="10"/>
- <option name="interval" value="1"/>
- </options>
- </run>
- <wait host="tm1" bg_id="test"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/24/run.sh b/regression-tests/tests/24/run.sh
deleted file mode 100755
index 1aff4a3..0000000
--- a/regression-tests/tests/24/run.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run recipe_fail.xml | tee test.log
-rv1=${PIPESTATUS[0]}
-log1=`cat test.log`
-
-lnst-ctl -d run recipe_pass.xml | tee test.log
-rv2=${PIPESTATUS[0]}
-log2=`cat test.log`
-
-print_separator
-assert_status "fail" "$rv1"
-assert_log "INFO" "RPC connection to machine \w* timed out"
"$log1"
-assert_status "pass" "$rv2"
-
-rm -f test.log
-
-end_test
diff --git a/regression-tests/tests/25/desc b/regression-tests/tests/25/desc
deleted file mode 100644
index fd7c6b2..0000000
--- a/regression-tests/tests/25/desc
+++ /dev/null
@@ -1,12 +0,0 @@
-proper signal handling for bg processes in net namespaces
-
-When running a background process in a new network namespace signal handlers
-were inherited from the namespace process lnst-slave which caused issues when
-calling the interrupt command on the background process.
-
-This test uses two recipes - one for run command and one for run test module.
-It also uses a custom IcmpPing test module that runs the ping twice this way we
-can test that the whole background process is interrupted, not just the
-currently running ping process.
-
-https://github.com/jpirko/lnst/issues/99
diff --git a/regression-tests/tests/25/recipe1.xml
b/regression-tests/tests/25/recipe1.xml
deleted file mode 100644
index 276061c..0000000
--- a/regression-tests/tests/25/recipe1.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="tm1">
- <interfaces>
- <eth id="phy1" label="net1"/>
- <veth_pair>
- <veth id="in" netns="in">
- <addresses>
- <address value="192.168.0.3/24"/>
- </addresses>
- </veth>
- <veth id="out"/>
- </veth_pair>
- <bridge id="br">
- <slaves>
- <slave id="out"/>
- <slave id="phy1"/>
- </slaves>
- <addresses>
- <address value="192.168.0.1/24"/>
- </addresses>
- </bridge>
- </interfaces>
- </host>
- <host id="tm2">
- <interfaces>
- <eth id="phy1" label="net1">
- <addresses>
- <address value="192.168.0.10/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
- <task>
- <run command="ping -c 4 {ip(tm2,phy1)}" host="tm1"
netns="in"/>
- <run command="ping {ip(tm2,phy1)}" host="tm1"
netns="in" bg_id="on_bg"/>
- <ctl_wait seconds="2"/>
- <run command="ps aux" host="tm1"
netns="in"/>
- <ctl_wait seconds="2"/>
- <intr host="tm1" bg_id="on_bg"/>
- </task>
-</lnstrecipe>
-
diff --git a/regression-tests/tests/25/recipe2.xml
b/regression-tests/tests/25/recipe2.xml
deleted file mode 100644
index 30452aa..0000000
--- a/regression-tests/tests/25/recipe2.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="tm1">
- <interfaces>
- <eth id="phy1" label="net1"/>
- <veth_pair>
- <veth id="in" netns="in">
- <addresses>
- <address value="192.168.0.3/24"/>
- </addresses>
- </veth>
- <veth id="out"/>
- </veth_pair>
- <bridge id="br">
- <slaves>
- <slave id="out"/>
- <slave id="phy1"/>
- </slaves>
- <addresses>
- <address value="192.168.0.1/24"/>
- </addresses>
- </bridge>
- </interfaces>
- </host>
- <host id="tm2">
- <interfaces>
- <eth id="phy1" label="net1">
- <addresses>
- <address value="192.168.0.10/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
- <task>
- <run module="PktCounter" host="tm1" netns="in"
bg_id="ctr">
- <options>
- <option name="input_netdev_name"
value="{devname(tm1,in)}"/>
- </options>
- </run>
- <run module="PktgenTx" host="tm2">
- <options>
- <option name="netdev_name"
value="{devname(tm2,phy1)}"/>
- <option name="pktgen_option" value="dst {ip(tm1,
in)}"/>
- <option name="pktgen_option" value="dst_mac
{hwaddr(tm1,in)}"/>
- <option name="pktgen_option" value="count
1000"/>
- </options>
- </run>
- <ctl_wait seconds="5"/>
- <intr host="tm1" bg_id="ctr"/>
- </task>
-</lnstrecipe>
-
diff --git a/regression-tests/tests/25/recipe3.xml
b/regression-tests/tests/25/recipe3.xml
deleted file mode 100644
index 4cdb6f4..0000000
--- a/regression-tests/tests/25/recipe3.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="testmachine1">
- <interfaces>
- <eth id="test_if" label="tnet">
- <addresses>
- <address value="192.168.0.1/24" />
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="testmachine2">
- <interfaces>
- <eth id="test_if" label="tnet">
- <addresses>
- <address value="192.168.0.2/24" />
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run command="sleep 120" host="testmachine1"
bg_id="1" timeout="125"/>
- <ctl_wait seconds="5"/>
- <intr host="testmachine1" bg_id="1"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/25/run.sh b/regression-tests/tests/25/run.sh
deleted file mode 100755
index 745a06b..0000000
--- a/regression-tests/tests/25/run.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run recipe1.xml | tee test.log
-rv1=${PIPESTATUS[0]}
-log1=`cat test.log`
-
-lnst-ctl -d run recipe2.xml | tee test.log
-rv2=${PIPESTATUS[0]}
-log2=`cat test.log`
-
-lnst-ctl -d run recipe3.xml | tee test.log
-rv3=${PIPESTATUS[0]}
-log3=`cat test.log`
-
-print_separator
-assert_status "pass" "$rv1"
-assert_status "pass" "$rv2"
-assert_status "pass" "$rv3"
-assert_log "ERROR" "Command execution failed (exited with -2)"
"$log3"
-
-rm -f test.log
-
-end_test
diff --git a/regression-tests/tests/26/desc b/regression-tests/tests/26/desc
deleted file mode 100644
index b4d1721..0000000
--- a/regression-tests/tests/26/desc
+++ /dev/null
@@ -1,7 +0,0 @@
-always call interface deconfiguration if configuration was called
-
-Interface deconfiguration should always be called if configuration was called,
-even if the configuration itself failed. This ensures that all internal data
-structures are cleaned up.
-
-https://github.com/jpirko/lnst/issues/106
diff --git a/regression-tests/tests/26/recipe1.xml
b/regression-tests/tests/26/recipe1.xml
deleted file mode 100644
index 6f71463..0000000
--- a/regression-tests/tests/26/recipe1.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="testmachine1">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet"/>
- <eth id="phy2" label="testnet"/>
- <bond id="nic1">
- <options>
- <option name="mode"
value="alance-rr"/>
- </options>
- <slaves>
- <slave id="phy1"/>
- <slave id="phy2"/>
- </slaves>
- <addresses>
- <address>192.168.100.2/24</address>
- <address>fe01::1/64</address>
- </addresses>
- </bond>
- </interfaces>
- </host>
- <host id="testmachine2">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet"/>
- <eth id="phy2" label="testnet"/>
- <bond id="nic1">
- <options>
- <option name="mode"
value="balance-rr"/>
- </options>
- <slaves>
- <slave id="phy1"/>
- <slave id="phy2"/>
- </slaves>
- <addresses>
- <address>192.168.100.3/24</address>
- <address>fe01::2/64</address>
- </addresses>
- </bond>
- </interfaces>
- </host>
- </network>
-
- <task python="gre.py"/>
-</lnstrecipe>
diff --git a/regression-tests/tests/26/recipe2.xml
b/regression-tests/tests/26/recipe2.xml
deleted file mode 100644
index 7b4cbce..0000000
--- a/regression-tests/tests/26/recipe2.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="testmachine1">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet"/>
- <eth id="phy2" label="testnet"/>
- <bond id="nic1">
- <options>
- <option name="mode"
value="balance-rr"/>
- </options>
- <slaves>
- <slave id="phy1"/>
- <slave id="phy2"/>
- </slaves>
- <addresses>
- <address>192.168.100.2/24</address>
- <address>fe01::1/64</address>
- </addresses>
- </bond>
- </interfaces>
- </host>
- <host id="testmachine2">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet"/>
- <eth id="phy2" label="testnet"/>
- <bond id="nic1">
- <options>
- <option name="mode"
value="balance-rr"/>
- </options>
- <slaves>
- <slave id="phy1"/>
- <slave id="phy2"/>
- </slaves>
- <addresses>
- <address>192.168.100.3/24</address>
- <address>fe01::2/64</address>
- </addresses>
- </bond>
- </interfaces>
- </host>
- </network>
-
- <task python="gre.py"/>
-</lnstrecipe>
diff --git a/regression-tests/tests/26/run.sh b/regression-tests/tests/26/run.sh
deleted file mode 100755
index a961ba5..0000000
--- a/regression-tests/tests/26/run.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d config_only recipe1.xml | tee test.log
-rv1=${PIPESTATUS[0]}
-log1=`cat test.log`
-
-lnst-ctl -d config_only recipe2.xml | tee test.log
-rv2=${PIPESTATUS[0]}
-log2=`cat test.log`
-
-lnst-ctl -d deconfigure
-
-print_separator
-assert_status "error" "$rv1"
-assert_log "ERROR" "CommandException: Slave testmachine1"
"$log1"
-assert_status "pass" "$rv2"
-
-rm -f test.log
-
-end_test
diff --git a/regression-tests/tests/27/desc b/regression-tests/tests/27/desc
deleted file mode 100644
index fb66011..0000000
--- a/regression-tests/tests/27/desc
+++ /dev/null
@@ -1,10 +0,0 @@
-Check timeout handling for commands run in background and foreground.
-
-1. put a command on bg and intr() it before desired timeout
-2. put a command on bg and intr() it after desired timeout
-3. put a command on bg and immediately wait for it's completion before timeout
-4. put a command on bg and immediately wait for it's completion after timeout
-5. put a command on bg and wait for it not earlier after it's completed
-6. put a command on fg and set timeout longer than expected completion
-7. put a command on fg and set timeout shorter than expected completion
-
diff --git a/regression-tests/tests/27/recipe1.xml
b/regression-tests/tests/27/recipe1.xml
deleted file mode 100644
index 56b1ff6..0000000
--- a/regression-tests/tests/27/recipe1.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="testmachine1">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.2/24</address>
- <address>fe01::1/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="testmachine2">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.3/24</address>
- <address>fe01::2/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run command="sleep 10" host="testmachine1"
bg_id="1" timeout="15"/>
- <ctl_wait seconds="2"/>
- <intr host="testmachine1" bg_id="1"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/27/recipe2.xml
b/regression-tests/tests/27/recipe2.xml
deleted file mode 100644
index c7a60dc..0000000
--- a/regression-tests/tests/27/recipe2.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="testmachine1">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.2/24</address>
- <address>fe01::1/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="testmachine2">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.3/24</address>
- <address>fe01::2/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run command="sleep 5" host="testmachine1"
bg_id="2" timeout="5"/>
- <ctl_wait seconds="7"/>
- <intr host="testmachine1" bg_id="2"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/27/recipe3.xml
b/regression-tests/tests/27/recipe3.xml
deleted file mode 100644
index 83510a1..0000000
--- a/regression-tests/tests/27/recipe3.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="testmachine1">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.2/24</address>
- <address>fe01::1/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="testmachine2">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.3/24</address>
- <address>fe01::2/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run command="sleep 5" host="testmachine1"
bg_id="3" timeout="3"/>
- <wait host="testmachine1" bg_id="3"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/27/recipe4.xml
b/regression-tests/tests/27/recipe4.xml
deleted file mode 100644
index b9f1fe2..0000000
--- a/regression-tests/tests/27/recipe4.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="testmachine1">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.2/24</address>
- <address>fe01::1/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="testmachine2">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.3/24</address>
- <address>fe01::2/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run command="sleep 5" host="testmachine1"
bg_id="4" timeout="7"/>
- <wait host="testmachine1" bg_id="4"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/27/recipe5.xml
b/regression-tests/tests/27/recipe5.xml
deleted file mode 100644
index f7ac10c..0000000
--- a/regression-tests/tests/27/recipe5.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="testmachine1">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.2/24</address>
- <address>fe01::1/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="testmachine2">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.3/24</address>
- <address>fe01::2/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run command="sleep 10" host="testmachine1"
bg_id="1"/>
- <ctl_wait seconds="15"/>
- <wait host="testmachine1" bg_id="1"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/27/recipe6.xml
b/regression-tests/tests/27/recipe6.xml
deleted file mode 100644
index 0dac603..0000000
--- a/regression-tests/tests/27/recipe6.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="testmachine1">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.2/24</address>
- <address>fe01::1/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="testmachine2">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.3/24</address>
- <address>fe01::2/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run command="sleep 5" host="testmachine1"
timeout="10"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/27/recipe7.xml
b/regression-tests/tests/27/recipe7.xml
deleted file mode 100644
index bcc8c2c..0000000
--- a/regression-tests/tests/27/recipe7.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="testmachine1">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.2/24</address>
- <address>fe01::1/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="testmachine2">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.3/24</address>
- <address>fe01::2/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run command="sleep 5" host="testmachine1"
timeout="3"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/27/recipe8.xml
b/regression-tests/tests/27/recipe8.xml
deleted file mode 100644
index 9809b17..0000000
--- a/regression-tests/tests/27/recipe8.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="testmachine1">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.2/24</address>
- <address>fe01::1/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="testmachine2">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.3/24</address>
- <address>fe01::2/64</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run command="sleep 10" host="testmachine1"
bg_id="1"/>
- <ctl_wait seconds="2"/>
- <intr host="testmachine1" bg_id="1"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/27/run.sh b/regression-tests/tests/27/run.sh
deleted file mode 100755
index e61da3f..0000000
--- a/regression-tests/tests/27/run.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run recipe1.xml | tee test.log
-rv1=${PIPESTATUS[0]}
-log1=`cat test.log`
-
-lnst-ctl -d run recipe2.xml | tee test.log
-rv2=${PIPESTATUS[0]}
-log2=`cat test.log`
-
-lnst-ctl -d run recipe3.xml | tee test.log
-rv3=${PIPESTATUS[0]}
-log3=`cat test.log`
-
-lnst-ctl -d run recipe4.xml | tee test.log
-rv4=${PIPESTATUS[0]}
-log4=`cat test.log`
-
-lnst-ctl -d run recipe5.xml | tee test.log
-rv5=${PIPESTATUS[0]}
-log5=`cat test.log`
-
-lnst-ctl -d run recipe6.xml | tee test.log
-rv6=${PIPESTATUS[0]}
-log6=`cat test.log`
-
-lnst-ctl -d run recipe7.xml | tee test.log
-rv7=${PIPESTATUS[0]}
-log7=`cat test.log`
-
-print_separator
-assert_status "pass" "$rv1"
-assert_status "pass" "$rv2"
-assert_status "fail" "$rv3"
-assert_log "INFO" "RPC connection to machine testmachine1 timed out"
"$log3"
-assert_status "pass" "$rv4"
-assert_status "pass" "$rv5"
-assert_status "pass" "$rv6"
-assert_status "fail" "$rv7"
-assert_log "INFO" "RPC connection to machine testmachine1 timed out"
"$log7"
-
-rm -f test.log
-
-end_test
diff --git a/regression-tests/tests/28/desc b/regression-tests/tests/28/desc
deleted file mode 100644
index 8d4477b..0000000
--- a/regression-tests/tests/28/desc
+++ /dev/null
@@ -1,6 +0,0 @@
-Check if a user can get result data especially stdout of a background process.
-
-1. by calling intr()
-2. by calling wait()
-3. by calling kill()
-4. when process is not run on background
diff --git a/regression-tests/tests/28/recipe1.py b/regression-tests/tests/28/recipe1.py
deleted file mode 100644
index ed19f23..0000000
--- a/regression-tests/tests/28/recipe1.py
+++ /dev/null
@@ -1,20 +0,0 @@
-from lnst.Controller.Task import ctl
-
-m1 = ctl.get_host("testmachine1")
-
-m1.sync_resources(modules=["Custom"], tools=[])
-
-test = m1.run("while true; do echo test; sleep 1; done", bg=True)
-
-ctl.wait(5)
-
-test.intr()
-
-output = test.get_result()["res_data"]["stdout"]
-
-custom = ctl.get_module("Custom", options={ "fail": True })
-
-if output.find("test") != -1:
- custom.update_options({ "fail": False})
-
-m1.run(custom)
diff --git a/regression-tests/tests/28/recipe1.xml
b/regression-tests/tests/28/recipe1.xml
deleted file mode 100644
index cf6bee0..0000000
--- a/regression-tests/tests/28/recipe1.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="testmachine1">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.2/24</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task python="recipe1.py"/>
-</lnstrecipe>
diff --git a/regression-tests/tests/28/recipe2.py b/regression-tests/tests/28/recipe2.py
deleted file mode 100644
index 7b739bb..0000000
--- a/regression-tests/tests/28/recipe2.py
+++ /dev/null
@@ -1,18 +0,0 @@
-from lnst.Controller.Task import ctl
-
-m1 = ctl.get_host("testmachine1")
-
-m1.sync_resources(modules=["Custom"], tools=[])
-
-test = m1.run("for i in `seq 5`; do echo test; sleep 1; done", bg=True)
-
-test.wait()
-
-output = test.get_result()["res_data"]["stdout"]
-
-custom = ctl.get_module("Custom", options={ "fail": True })
-
-if output.find("test") != -1:
- custom.update_options({ "fail": False})
-
-m1.run(custom)
diff --git a/regression-tests/tests/28/recipe2.xml
b/regression-tests/tests/28/recipe2.xml
deleted file mode 100644
index 1cd8070..0000000
--- a/regression-tests/tests/28/recipe2.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="testmachine1">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.2/24</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task python="recipe2.py"/>
-</lnstrecipe>
diff --git a/regression-tests/tests/28/recipe3.py b/regression-tests/tests/28/recipe3.py
deleted file mode 100644
index 9d9fd9b..0000000
--- a/regression-tests/tests/28/recipe3.py
+++ /dev/null
@@ -1,11 +0,0 @@
-from lnst.Controller.Task import ctl
-
-m1 = ctl.get_host("testmachine1")
-
-m1.sync_resources(modules=["Custom"], tools=[])
-
-test = m1.run("while true; do echo test; sleep 1; done", bg=True)
-
-ctl.wait(5)
-
-test.kill()
diff --git a/regression-tests/tests/28/recipe3.xml
b/regression-tests/tests/28/recipe3.xml
deleted file mode 100644
index 2602c68..0000000
--- a/regression-tests/tests/28/recipe3.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="testmachine1">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.2/24</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task python="recipe3.py"/>
-</lnstrecipe>
diff --git a/regression-tests/tests/28/recipe4.py b/regression-tests/tests/28/recipe4.py
deleted file mode 100644
index ae36c37..0000000
--- a/regression-tests/tests/28/recipe4.py
+++ /dev/null
@@ -1,15 +0,0 @@
-from lnst.Controller.Task import ctl
-
-m1 = ctl.get_host("testmachine1")
-
-m1.sync_resources(modules=["Custom"], tools=[])
-
-test = m1.run("echo test")
-output = test.get_result()["res_data"]["stdout"]
-
-custom = ctl.get_module("Custom", options={ "fail": True })
-
-if output.find("test") != -1:
- custom.update_options({ "fail": False})
-
-m1.run(custom)
diff --git a/regression-tests/tests/28/recipe4.xml
b/regression-tests/tests/28/recipe4.xml
deleted file mode 100644
index fd2452c..0000000
--- a/regression-tests/tests/28/recipe4.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="testmachine1">
- <params/>
- <interfaces>
- <eth id="phy1" label="testnet">
- <addresses>
- <address>192.168.100.2/24</address>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task python="recipe4.py"/>
-</lnstrecipe>
diff --git a/regression-tests/tests/28/run.sh b/regression-tests/tests/28/run.sh
deleted file mode 100755
index 9901282..0000000
--- a/regression-tests/tests/28/run.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run recipe1.xml | tee test.log
-rv1=${PIPESTATUS[0]}
-log1=`cat test.log`
-
-lnst-ctl -d run recipe2.xml | tee test.log
-rv2=${PIPESTATUS[0]}
-log2=`cat test.log`
-
-lnst-ctl -d run recipe3.xml | tee test.log
-rv3=${PIPESTATUS[0]}
-log3=`cat test.log`
-
-lnst-ctl -d run recipe4.xml | tee test.log
-rv4=${PIPESTATUS[0]}
-log4=`cat test.log`
-
-print_separator
-assert_status "pass" "$rv1"
-assert_status "pass" "$rv2"
-assert_status "pass" "$rv3"
-assert_status "pass" "$rv4"
-assert_log "INFO" "stdout:.*test" "$log1"
-assert_log "INFO" "stdout:.*test" "$log2"
-assert_log "INFO" "stdout:.*test" "$log4"
-
-rm -f test.log
-
-end_test
diff --git a/regression-tests/tests/3/desc b/regression-tests/tests/3/desc
deleted file mode 100644
index 8669094..0000000
--- a/regression-tests/tests/3/desc
+++ /dev/null
@@ -1,8 +0,0 @@
-Check corner case in matching algorithm
-
-This test checks that controller fails if it runs a recipe with just one
-machine specified. The controller should fail.
-
-UPDATE:
-This is now supported in new lnst versions, the controller therefore shoudln't
-fail. Changing the recipe.xml and run.sh to reflect this.
diff --git a/regression-tests/tests/3/recipe.xml b/regression-tests/tests/3/recipe.xml
deleted file mode 100644
index 1e7845d..0000000
--- a/regression-tests/tests/3/recipe.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="client">
- <interfaces>
- <eth id="nic1" label="inet">
- <addresses>
- <address value="192.168.200.3/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
- <task>
- <run module="IcmpPing" host="client">
- <options>
- <option name="addr" value="{ip(client,nic1)}"/>
- <option name="count" value="40"/>
- </options>
- </run>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/3/run.sh b/regression-tests/tests/3/run.sh
deleted file mode 100755
index 50ab9ce..0000000
--- a/regression-tests/tests/3/run.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run recipe.xml
-rv=$?
-
-assert_status "pass" "$rv"
-
-end_test
diff --git a/regression-tests/tests/4/desc b/regression-tests/tests/4/desc
deleted file mode 100644
index ad44b34..0000000
--- a/regression-tests/tests/4/desc
+++ /dev/null
@@ -1,3 +0,0 @@
-Aliases resolving
-
-This test aims to verify the correctness of aliases resloving.
diff --git a/regression-tests/tests/4/recipe.xml b/regression-tests/tests/4/recipe.xml
deleted file mode 100644
index bc0c4b4..0000000
--- a/regression-tests/tests/4/recipe.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<lnstrecipe>
- <define>
- <alias name="one" value="192.168.100.10/24"/>
- <alias name="two" value="192.168.100.11/24"/>
- </define>
- <network>
- <host id="1">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="{$one}"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="2">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="{$two}"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <define>
- <alias name="one" value="one"/>
- <alias name="two" value="two"/>
- </define>
-
- <task>
- <run command="echo 1_{$one}_{$two}" host="1"/>
- <define>
- <alias name="one" value="eno"/>
- <alias name="two" value="owt"/>
- </define>
- <run command="echo 2_{$one}_{$two}" host="1"/>
- </task>
- <task>
- <run command="echo 3_{$one}_{$two}" host="1"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/4/run.sh b/regression-tests/tests/4/run.sh
deleted file mode 100755
index f3d8ee2..0000000
--- a/regression-tests/tests/4/run.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-log="`lnst-ctl -d run recipe.xml`"
-rv=$?
-
-echo "$log"
-print_separator
-
-assert_log "DEBUG" "echo 1_one_two" "$log"
-assert_log "DEBUG" "echo 2_eno_owt" "$log"
-assert_log "DEBUG" "echo 3_one_two" "$log"
-
-assert_status "pass" "$rv"
-
-end_test
diff --git a/regression-tests/tests/5/desc b/regression-tests/tests/5/desc
deleted file mode 100644
index 7f3448f..0000000
--- a/regression-tests/tests/5/desc
+++ /dev/null
@@ -1,3 +0,0 @@
-Template functions resolving
-
-This test aims to verify the correctness of template functions resloving.
diff --git a/regression-tests/tests/5/recipe.xml b/regression-tests/tests/5/recipe.xml
deleted file mode 100644
index 1bc9137..0000000
--- a/regression-tests/tests/5/recipe.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="1">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="192.168.100.10/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="2">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="192.168.100.11/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run command="echo ip1_{ip(1,testiface)}_" host="1"/>
- <run command="echo ip2_{ip(1,testiface,0)}_"
host="1"/>
- <run command="echo devname_{devname(1,testiface)}_"
host="1"/>
- <run command="echo hwaddr_{hwaddr(1,testiface)}_"
host="1"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/5/run.sh b/regression-tests/tests/5/run.sh
deleted file mode 100755
index f19786e..0000000
--- a/regression-tests/tests/5/run.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-log="`lnst-ctl -d run recipe.xml`"
-rv=$?
-
-echo "$log"
-print_separator
-
-assert_log "DEBUG" "echo ip1_192.168.100.10_" "$log"
-assert_log "DEBUG" "echo ip2_192.168.100.10_" "$log"
-assert_log "DEBUG" "echo hwaddr_\([a-fA-F0-9]\{2\}:\?\)\{6\}_"
"$log"
-assert_log "DEBUG" "echo devname_[a-zA-Z0-9]\+_" "$log"
-
-assert_status "pass" "$rv"
-
-end_test
diff --git a/regression-tests/tests/6/desc b/regression-tests/tests/6/desc
deleted file mode 100644
index f75fb3d..0000000
--- a/regression-tests/tests/6/desc
+++ /dev/null
@@ -1,4 +0,0 @@
-Dynamic hwaddr updates
-
-This test case can verify whether the dynamic configuration updates are
-propagated to the controller properly.
diff --git a/regression-tests/tests/6/recipe.xml b/regression-tests/tests/6/recipe.xml
deleted file mode 100644
index 1f084d0..0000000
--- a/regression-tests/tests/6/recipe.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="1">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="192.168.100.10/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="2">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="192.168.100.11/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run command="echo `ip link show {devname(1,testiface)} | grep -o '
link/ether \([0-9a-fA-F]\{2\}:\?\)\{6\}' | cut -c 16-` >/tmp/lnst-hwaddr"
host="1"/>
- <run command="echo 1_{hwaddr(1, testiface)}_"
host="1"/>
- <run command="ip l set {devname(1, testiface)} address
52:54:00:12:34:56" host="1"/>
- <ctl_wait seconds="2"/>
- <run command="echo 2_{hwaddr(1, testiface)}_"
host="1"/>
- <run command="ip l set {devname(1, testiface)} address `cat
/tmp/lnst-hwaddr`" host="1"/>
- <ctl_wait seconds="2"/>
- <run command="echo 3_{hwaddr(1, testiface)}_`cat /tmp/lnst-hwaddr | tr
'[:lower:]' '[:upper:]'`_" host="1"/>
- <run command="rm -f /tmp/lnst-hwaddr" host="1"/>
- </task>
-</lnstrecipe>
-
diff --git a/regression-tests/tests/6/run.sh b/regression-tests/tests/6/run.sh
deleted file mode 100755
index 02534e0..0000000
--- a/regression-tests/tests/6/run.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-log=`lnst-ctl -d run recipe.xml`
-rv=$?
-
-echo "$log"
-print_separator
-
-assert_log ".*" "1_\([a-fA-F0-9]\{2\}:\?\)\{6\}_" "$log"
-assert_log ".*" "2_52:54:00:12:34:56_" "$log"
-assert_log ".*" "3_\(\([a-fA-F0-9]\{2\}:\?\)\{6\}\)_\1_"
"$log"
-
-assert_status "pass" "$rv"
-
-end_test
diff --git a/regression-tests/tests/7/desc b/regression-tests/tests/7/desc
deleted file mode 100644
index 4a68dd6..0000000
--- a/regression-tests/tests/7/desc
+++ /dev/null
@@ -1,4 +0,0 @@
-Configuration updates (hwaddr) in python tasks
-
-The purpose of this test is to verify that the configuration updates
-propagate correctly from the slaves back to controller.
diff --git a/regression-tests/tests/7/recipe.xml b/regression-tests/tests/7/recipe.xml
deleted file mode 100644
index 88f26f8..0000000
--- a/regression-tests/tests/7/recipe.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="1">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="192.168.100.10/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="2">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="192.168.100.11/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task python="task.py"/>
-</lnstrecipe>
diff --git a/regression-tests/tests/7/run.sh b/regression-tests/tests/7/run.sh
deleted file mode 100755
index 02534e0..0000000
--- a/regression-tests/tests/7/run.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-log=`lnst-ctl -d run recipe.xml`
-rv=$?
-
-echo "$log"
-print_separator
-
-assert_log ".*" "1_\([a-fA-F0-9]\{2\}:\?\)\{6\}_" "$log"
-assert_log ".*" "2_52:54:00:12:34:56_" "$log"
-assert_log ".*" "3_\(\([a-fA-F0-9]\{2\}:\?\)\{6\}\)_\1_"
"$log"
-
-assert_status "pass" "$rv"
-
-end_test
diff --git a/regression-tests/tests/7/task.py b/regression-tests/tests/7/task.py
deleted file mode 100644
index 640061e..0000000
--- a/regression-tests/tests/7/task.py
+++ /dev/null
@@ -1,23 +0,0 @@
-from lnst.Controller.Task import ctl
-
-m1 = ctl.get_host("1")
-m2 = ctl.get_host("2")
-
-devname = m1.get_devname("testiface")
-hwaddr = m1.get_hwaddr("testiface")
-
-m1.run("echo 1_%s_" % hwaddr)
-
-m1.run("echo `ip link show %s | grep -o ' link/ether
\([0-9a-fA-F]\{2\}:\?\)\{6\}' | cut -c 16-` >/tmp/lnst-hwaddr" % devname)
-m1.run("ip l set %s address 52:54:00:12:34:56" % devname)
-ctl.wait(2)
-
-m1.run("echo 2_%s_" % hwaddr)
-m1.run("ip l set %s address `cat /tmp/lnst-hwaddr`" % devname)
-
-ctl.wait(2)
-
-m1.run("echo 3_%s_`cat /tmp/lnst-hwaddr | tr '[:lower:]'
'[:upper:]'`_" % hwaddr)
-
-m1.run("rm -f /tmp/lnst-hwaddr")
-
diff --git a/regression-tests/tests/8/desc b/regression-tests/tests/8/desc
deleted file mode 100644
index 41c2ca2..0000000
--- a/regression-tests/tests/8/desc
+++ /dev/null
@@ -1,3 +0,0 @@
-Recipe Summary Crashing when Exec fails
-
-Regression test for a bug
diff --git a/regression-tests/tests/8/recipe.xml b/regression-tests/tests/8/recipe.xml
deleted file mode 100644
index dc3a692..0000000
--- a/regression-tests/tests/8/recipe.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="1">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="192.168.100.10/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="2">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="192.168.100.11/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task>
- <run command="eecho weeee" host="1"/>
- </task>
-</lnstrecipe>
diff --git a/regression-tests/tests/8/run.sh b/regression-tests/tests/8/run.sh
deleted file mode 100755
index 1eefc21..0000000
--- a/regression-tests/tests/8/run.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl -d run recipe.xml
-rv=$?
-
-assert_status "fail" "$rv"
-
-end_test
diff --git a/regression-tests/tests/9/desc b/regression-tests/tests/9/desc
deleted file mode 100644
index 2e71f6a..0000000
--- a/regression-tests/tests/9/desc
+++ /dev/null
@@ -1,3 +0,0 @@
-Python Tasks
-
-Basic sanity of python tasks implementation (a simple ping test).
diff --git a/regression-tests/tests/9/recipe.xml b/regression-tests/tests/9/recipe.xml
deleted file mode 100644
index 88f26f8..0000000
--- a/regression-tests/tests/9/recipe.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<lnstrecipe>
- <network>
- <host id="1">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="192.168.100.10/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- <host id="2">
- <interfaces>
- <eth label="tnet" id="testiface">
- <addresses>
- <address value="192.168.100.11/24"/>
- </addresses>
- </eth>
- </interfaces>
- </host>
- </network>
-
- <task python="task.py"/>
-</lnstrecipe>
diff --git a/regression-tests/tests/9/run.sh b/regression-tests/tests/9/run.sh
deleted file mode 100755
index 45e9995..0000000
--- a/regression-tests/tests/9/run.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-. ../lib.sh
-
-init_test
-
-lnst-ctl run recipe.xml
-rv=$?
-
-assert_status "pass" "$rv"
-
-end_test
diff --git a/regression-tests/tests/9/task.py b/regression-tests/tests/9/task.py
deleted file mode 100644
index e718537..0000000
--- a/regression-tests/tests/9/task.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from lnst.Controller.Task import ctl
-
-m1 = ctl.get_host("1")
-m2 = ctl.get_host("2")
-
-ping_mod = ctl.get_module("IcmpPing", options={"addr":
m2.get_ip("testiface", 0),
- "count":40, "interval": 0.2,
"limit_rate": 95})
-
-ping_test = m1.run(ping_mod, timeout=30)
diff --git a/regression-tests/tests/lib.sh b/regression-tests/tests/lib.sh
deleted file mode 100644
index 5286534..0000000
--- a/regression-tests/tests/lib.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/bash
-
-function init_test
-{
- # test status 0 means everything went fine, 1 means there were
- # one or more problems.
- test_status=0
-}
-
-function end_test
-{
- exit "$test_status"
-}
-
-function assert_log
-{
- local level="$1"
- local message_regexp="$2"
- local log="$3"
-
- if [ -z "`echo "$log" | grep "$level" | grep
"$message_regexp"`" ]; then
- echo "assert_log FAILED ($level, $message_regexp)"
- test_status=1
- else
- echo "assert_log PASSED ($level, $message_regexp)"
- fi
-}
-
-function assert_status
-{
- local expect="$1"
- local retval="$2"
-
- case $expect in
- "pass")
- local value=0 ;;
- "fail")
- local value=1 ;;
- "error")
- local value=2 ;;
- *)
- echo "Unknown exit status '$expect'!"
- exit 128
- ;;
- esac
-
- if [ $value -ne $retval ]; then
- test_status=1
- echo "assert_status FAILED (expected: $value, real: $retval)"
- else
- echo "assert_status PASSED (expected: $value, real: $retval)"
- fi
-}
-
-function print_separator
-{
- echo
"--------------------------------------------------------------------------------"
-}
-
-function lnst-ctl
-{
- if [ "$use_user_conf" = "true" ]; then
- command lnst-ctl $@
- else
- command lnst-ctl -c $repo/lnst-ctl.conf $@
- fi
-}
--
2.21.1