From: Radek Pazdera <rpazdera(a)redhat.com>
Hi,
I'm trying to implement a set of automatic tests for multicast
implementation in kernel using LNST. The thing is, there is only
a little documentation for the interface at the moment, so some of
the features that need test coverage are not implemented Python's
socket module. That's why I need C for writing tests.
I figured that this might be useful also in other areas of network
stack testing and added a few new things into LNST. I'm sending it
here for review.
I created a directory called `test_tools'. That should be a place for
storing non-python tools and utilities for testing, that can be used
from LNST tests. I placed there a first set of tools for multicast.
The communication between the C and LNST is achieved through a test
called `TestMulticast'. This test takes arguments from the XML recipe
file and executes the selected test setup from multicast tools. It also
collects and evaluates results when the test ends.
Additionaly, I added a couple of example command sequences to
`example_recipes/cmd_sequences/multicast'.
These should serve as a-sort-of building blocks for creating test
recipes. Then if you'd like to run tests for IGMPv2 for instance you
can only create netconfigs, include several test cases and run it as
one big recipe.
Example of these tests in practice is in the `rpazdera-multicast.xml'
recipe I added to `example_recipes' directory.
Is this solution acceptable for you to include it into LNST?
Thank you,
Radek Pazdera
Radek Pazdera (3):
TestMulticast.py: Adding test for multicast tools
multicast: Adding new folder for test tools
multicast: Adding example recipe
Tests/TestMulticast.py | 129 +++++++++++++
example_recipes/cmd_sequences/multicast/if.xml | 77 ++++++++
example_recipes/cmd_sequences/multicast/loop.xml | 70 +++++++
example_recipes/cmd_sequences/multicast/simple.xml | 33 ++++
example_recipes/cmd_sequences/multicast/ttl.xml | 112 ++++++++++++
example_recipes/rpazdera-multicast.xml | 39 ++++
test_tools/multicast/Makefile | 22 +++
test_tools/multicast/client/send_simple.c | 59 ++++++
test_tools/multicast/multicast_utils.h | 192 ++++++++++++++++++++
test_tools/multicast/offline/sockopt_if.c | 70 +++++++
test_tools/multicast/offline/sockopt_loop.c | 52 ++++++
test_tools/multicast/offline/sockopt_ttl.c | 79 ++++++++
test_tools/multicast/parameters.h | 152 ++++++++++++++++
test_tools/multicast/server/recv_simple.c | 50 +++++
test_tools/multicast/sockopt_utils.h | 176 ++++++++++++++++++
15 files changed, 1312 insertions(+), 0 deletions(-)
create mode 100644 Tests/TestMulticast.py
create mode 100644 example_recipes/cmd_sequences/multicast/if.xml
create mode 100644 example_recipes/cmd_sequences/multicast/loop.xml
create mode 100644 example_recipes/cmd_sequences/multicast/simple.xml
create mode 100644 example_recipes/cmd_sequences/multicast/ttl.xml
create mode 100644 example_recipes/rpazdera-multicast.xml
create mode 100644 test_tools/multicast/Makefile
create mode 100644 test_tools/multicast/client/send_simple.c
create mode 100644 test_tools/multicast/multicast_utils.h
create mode 100644 test_tools/multicast/offline/sockopt_if.c
create mode 100644 test_tools/multicast/offline/sockopt_loop.c
create mode 100644 test_tools/multicast/offline/sockopt_ttl.c
create mode 100644 test_tools/multicast/parameters.h
create mode 100644 test_tools/multicast/server/recv_simple.c
create mode 100644 test_tools/multicast/sockopt_utils.h
--
1.7.7.6