Multicast tests were moved from exmaples to more appropriate location in the newly created recipes directory.
Signed-off-by: Radek Pazdera rpazdera@redhat.com --- .../cmd_sequences/multicast/block_source.xml | 77 -------------- example_recipes/cmd_sequences/multicast/if.xml | 75 ------------- example_recipes/cmd_sequences/multicast/loop.xml | 69 ------------ .../cmd_sequences/multicast/max_groups.xml | 22 ---- .../cmd_sequences/multicast/membership.xml | 47 --------- example_recipes/cmd_sequences/multicast/simple.xml | 31 ------ .../cmd_sequences/multicast/source_membership.xml | 82 --------------- example_recipes/cmd_sequences/multicast/ttl.xml | 110 -------------------- example_recipes/rpazdera-multicast.xml | 54 ---------- recipes/multicast/cmd_sequences/block_source.xml | 77 ++++++++++++++ recipes/multicast/cmd_sequences/if.xml | 75 +++++++++++++ recipes/multicast/cmd_sequences/loop.xml | 69 ++++++++++++ recipes/multicast/cmd_sequences/max_groups.xml | 22 ++++ recipes/multicast/cmd_sequences/membership.xml | 47 +++++++++ recipes/multicast/cmd_sequences/simple.xml | 31 ++++++ .../multicast/cmd_sequences/source_membership.xml | 82 +++++++++++++++ recipes/multicast/cmd_sequences/ttl.xml | 110 ++++++++++++++++++++ recipes/multicast/multicast-all.xml | 72 +++++++++++++ 18 files changed, 585 insertions(+), 567 deletions(-) delete mode 100644 example_recipes/cmd_sequences/multicast/block_source.xml delete mode 100644 example_recipes/cmd_sequences/multicast/if.xml delete mode 100644 example_recipes/cmd_sequences/multicast/loop.xml delete mode 100644 example_recipes/cmd_sequences/multicast/max_groups.xml delete mode 100644 example_recipes/cmd_sequences/multicast/membership.xml delete mode 100644 example_recipes/cmd_sequences/multicast/simple.xml delete mode 100644 example_recipes/cmd_sequences/multicast/source_membership.xml delete mode 100644 example_recipes/cmd_sequences/multicast/ttl.xml delete mode 100644 example_recipes/rpazdera-multicast.xml create mode 100644 recipes/multicast/cmd_sequences/block_source.xml create mode 100644 recipes/multicast/cmd_sequences/if.xml create mode 100644 recipes/multicast/cmd_sequences/loop.xml create mode 100644 recipes/multicast/cmd_sequences/max_groups.xml create mode 100644 recipes/multicast/cmd_sequences/membership.xml create mode 100644 recipes/multicast/cmd_sequences/simple.xml create mode 100644 recipes/multicast/cmd_sequences/source_membership.xml create mode 100644 recipes/multicast/cmd_sequences/ttl.xml create mode 100644 recipes/multicast/multicast-all.xml
diff --git a/example_recipes/cmd_sequences/multicast/block_source.xml b/example_recipes/cmd_sequences/multicast/block_source.xml deleted file mode 100644 index f351a79..0000000 --- a/example_recipes/cmd_sequences/multicast/block_source.xml +++ /dev/null @@ -1,77 +0,0 @@ -<!-- IP_BLOCK/UNBLOCK_SOURCE test --> -<!-- Requires: 2 hosts with one interface each --> -<!-- NOTICE: IGMP packets must be forwarded through the network! - In kvm/libvirt environment, iptables on host must be off or - configured to forward igmp traffic through the bridge --> -<command_sequence> - <!-- IP_BLOCK/UNBLOCK_SOURCE sockopt conformance test --> - <command machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="sockopt_block_source"/> - <option name="condition" value="status == 'pass'"/> - </options> - </command> - - <!-- Block source in the middle of ongoing communication --> - <command machine_id="1" type="exec" value="sleep 1"/> - <command machine_id="2" type="exec" value="sleep 1"/> - - <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="send_simple"/> - <option name="address" value="238.0.0.1"/> - <option name="port" value="1337"/> - <option name="duration" value="10"/> - <option name="delay" value="0.1"/> - <option name="ttl" value="1"/> - <option name="interface" value="{ip(1,1)}"/> - </options> - </command> - - <command machine_id="2" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="recv_block_source"/> - <option name="address" value="238.0.0.1"/> - <option name="port" value="1337"/> - <option name="duration" value="10"/> - <option name="interface" value="{ip(2,1)}"/> - <option name="source" value="{ip(1,1)}"/> - - <option name="condition" value="packets_received > 0"/> - <option name="condition" value="packets_received_while_blocking == 0"/> - </options> - </command> - <command machine_id="1" type="wait" value="1"/> - - <!-- Nonexistent source --> - <command machine_id="1" type="exec" value="sleep 1"/> - <command machine_id="2" type="exec" value="sleep 1"/> - - <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="send_simple"/> - <option name="address" value="238.0.0.1"/> - <option name="port" value="1337"/> - <option name="duration" value="10"/> - <option name="delay" value="0.1"/> - <option name="ttl" value="1"/> - <option name="interface" value="{ip(1,1)}"/> - </options> - </command> - - <command machine_id="2" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="recv_block_source"/> - <option name="address" value="238.0.0.1"/> - <option name="port" value="1337"/> - <option name="duration" value="10"/> - <option name="interface" value="{ip(2,1)}"/> - <option name="source" value="127.0.0.200"/> - - <option name="condition" value="packets_received > 0"/> - <option name="condition" value="packets_received_while_blocking > 0"/> - </options> - </command> - <command machine_id="1" type="wait" value="1"/> - -</command_sequence> diff --git a/example_recipes/cmd_sequences/multicast/if.xml b/example_recipes/cmd_sequences/multicast/if.xml deleted file mode 100644 index dfd1108..0000000 --- a/example_recipes/cmd_sequences/multicast/if.xml +++ /dev/null @@ -1,75 +0,0 @@ -<!-- IP_MULTICAST_IF test --><!-- Requires: 2 hosts - - [1] with one interface - - [2] with one interface - - --> -<command_sequence> - <!-- IP_MULTICAST_IF sockopt conformance test --> - <command machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="sockopt_if"/> - - <!-- This condition doesn't pass yet because of a - bug in the syscal. #803202 on RedHat Bugzilla --> - <!-- <option name="condition" value="status == 'pass'" /> --> - </options> - </command> - - <!-- IP_MULTICAST_IF correct interfaces set --> - <command machine_id="1" type="exec" value="sleep 1"/> - <command machine_id="2" type="exec" value="sleep 1"/> - - <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="send_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="delay" value="{$send_delay}"/> - <option name="ttl" value="1"/> - <option name="interface" value="{ip(1,1)}"/> - </options> - </command> - - <command machine_id="2" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="recv_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="interface" value="{ip(2,1)}"/> - - <option name="condition" value="packets_received > 0"/> - </options> - </command> - - <command machine_id="1" type="wait" value="1"/> - - <!-- IP_MULTICAST_IF incorrect interfaces set --> - <command machine_id="1" type="exec" value="sleep 1"/> - - <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="send_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="delay" value="{$send_delay}"/> - <option name="ttl" value="1"/> - <option name="interface" value="{ip(1,1)}"/> - </options> - </command> - - <command machine_id="2" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="recv_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="interface" value="127.0.0.1"/> - - <option name="condition" value="packets_received == 0"/> - </options> - </command> - - <command machine_id="1" type="wait" value="1"/> -</command_sequence> diff --git a/example_recipes/cmd_sequences/multicast/loop.xml b/example_recipes/cmd_sequences/multicast/loop.xml deleted file mode 100644 index d4b57d6..0000000 --- a/example_recipes/cmd_sequences/multicast/loop.xml +++ /dev/null @@ -1,69 +0,0 @@ -<!-- Offline IP_MULTICAST_LOOP test --> -<!-- Requires: 1 hosts with at least two interfaces --> -<command_sequence> - <!-- IP_MULTICAST_LOOP sockopt conformance test --> - <command machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="sockopt_loop"/> - <option name="condition" value="status == 'pass'"/> - </options> - </command> - - <!-- IP_MULTICAST_LOOP enabled --> - <command machine_id="1" type="exec" value="sleep 1"/> - - <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="send_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="delay" value="{$send_delay}"/> - <option name="loop" value="1"/> - <option name="interface" value="{ip(1,1)}"/> - </options> - </command> - - <command machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="recv_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="interface" value="{ip(1,1)}"/> - - <option name="condition" value="packets_received > 0"/> - </options> - </command> - - <command machine_id="1" type="wait" value="1"/> - - <!-- IP_MULTICAST_LOOP disabled --> - <command machine_id="1" type="exec" value="sleep 1"/> - - <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="send_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="delay" value="{$send_delay}"/> - <option name="loop" value="0"/> - <option name="interface" value="{ip(1,1)}"/> - </options> - </command> - - <command machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="recv_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="interface" value="{ip(1,1)}"/> - - <option name="condition" value="packets_received == 0"/> - </options> - </command> - - <command machine_id="1" type="wait" value="1"/> -</command_sequence> diff --git a/example_recipes/cmd_sequences/multicast/max_groups.xml b/example_recipes/cmd_sequences/multicast/max_groups.xml deleted file mode 100644 index a27197f..0000000 --- a/example_recipes/cmd_sequences/multicast/max_groups.xml +++ /dev/null @@ -1,22 +0,0 @@ -<!-- Offline maximum number of groups test --> -<!-- Requires: 1 host with one interface --> -<command_sequence> - <!-- With a specific interface --> - <command machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="max_groups"/> - <option name="interface" value="{ip(1,1)}"/> - <option name="condition" value="max_groups > 0"/> - </options> - </command> - - <!-- Change default max_memberhsips --> - <command machine_id="1" option="/proc/sys/net/ipv4/igmp_max_memberships" type="system_config" value="5"/> - <command machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="max_groups"/> - <option name="interface" value="{ip(1,1)}"/> - <option name="condition" value="max_groups == 5"/> - </options> - </command> -</command_sequence> diff --git a/example_recipes/cmd_sequences/multicast/membership.xml b/example_recipes/cmd_sequences/multicast/membership.xml deleted file mode 100644 index b4c63be..0000000 --- a/example_recipes/cmd_sequences/multicast/membership.xml +++ /dev/null @@ -1,47 +0,0 @@ -<!-- IP_ADD/DROP_MEMBERSHIP test --> -<!-- Requires: 2 hosts - - [1] with one interface - - [2] with one interface - - --> -<command_sequence> - <!-- IP_ADD/DROP_MEMBERSHIP sockopt conformance test --> - <command machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="sockopt_membership"/> - <option name="condition" value="status == 'pass'"/> - </options> - </command> - - <!-- This simple test case verifies that if one side leaves multicast group - - in the middle of ongoing communication, no further packets are delivered - - to the process. --> - <command machine_id="1" type="exec" value="sleep 1"/> - <command machine_id="2" type="exec" value="sleep 1"/> - - <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="send_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="delay" value="{$send_delay}"/> - <option name="ttl" value="1"/> - <option name="interface" value="{ip(1,1)}"/> - </options> - </command> - - <command machine_id="2" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="recv_membership"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="interface" value="{ip(2,1)}"/> - - <option name="condition" value="packets_received > 0"/> - <option name="condition" value="packets_received_after_drop == 0"/> - </options> - </command> - - <command machine_id="1" type="wait" value="1"/> -</command_sequence> diff --git a/example_recipes/cmd_sequences/multicast/simple.xml b/example_recipes/cmd_sequences/multicast/simple.xml deleted file mode 100644 index 88cddd1..0000000 --- a/example_recipes/cmd_sequences/multicast/simple.xml +++ /dev/null @@ -1,31 +0,0 @@ -<!-- Requires: 2 hosts with at least one interface --> -<!-- ['machines'][2]['netconfig'][1]['addresses'][0] --> -<command_sequence> - <command machine_id="1" type="exec" value="sleep 1"/> - <command machine_id="2" type="exec" value="sleep 1"/> - - <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="send_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="delay" value="{$send_delay}"/> - <option name="interface" value="{ip(1,1)}"/> - </options> - </command> - - <command machine_id="2" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="recv_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="interface" value="{ip(2,1)}"/> - - <option name="condition" value="packets_received > 0"/> - </options> - </command> - - <command machine_id="1" type="wait" value="1"/> -</command_sequence> diff --git a/example_recipes/cmd_sequences/multicast/source_membership.xml b/example_recipes/cmd_sequences/multicast/source_membership.xml deleted file mode 100644 index a659e74..0000000 --- a/example_recipes/cmd_sequences/multicast/source_membership.xml +++ /dev/null @@ -1,82 +0,0 @@ -<!-- IP_ADD/DROP_SOURCE_MEMBERSHIP test --> -<!-- Requires: 2 hosts - - [1] with one interface - - [2] with one interface - - --> -<!-- NOTICE: IGMP packets must be forwarded through the network! - In kvm/libvirt environment, iptables on host must be off or - configured to forward igmp traffic through the bridge --> -<command_sequence> - <!-- IP_ADD/DROP_MEMBERSHIP sockopt conformance test --> - <command machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="sockopt_source_membership"/> - <option name="condition" value="status == 'pass'"/> - </options> - </command> - - <!-- This simple test case verifies that if one side leaves multicast group - - in the middle of ongoing communication, no further packets are delivered - - to the process. --> - <command machine_id="1" type="exec" value="sleep 1"/> - <command machine_id="2" type="exec" value="sleep 1"/> - - <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="send_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="delay" value="{$send_delay}"/> - <option name="ttl" value="1"/> - <option name="interface" value="{ip(1,1)}"/> - </options> - </command> - - <command machine_id="2" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="recv_source_membership"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="interface" value="{ip(2,1)}"/> - <option name="source" value="{ip(1,1)}"/> - - <option name="condition" value="packets_received > 0"/> - <option name="condition" value="packets_received_after_drop == 0"/> - </options> - </command> - <command machine_id="1" type="wait" value="1"/> - - <!-- Nonexistent source --> - <command machine_id="1" type="exec" value="sleep 1"/> - <command machine_id="2" type="exec" value="sleep 1"/> - - <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="send_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="delay" value="{$send_delay}"/> - <option name="ttl" value="1"/> - <option name="interface" value="{ip(1,1)}"/> - </options> - </command> - - <command machine_id="2" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="recv_source_membership"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="interface" value="{ip(2,1)}"/> - <option name="source" value="127.0.0.200"/> - - <option name="condition" value="packets_received == 0"/> - <option name="condition" value="packets_received_after_drop == 0"/> - </options> - </command> - <command machine_id="1" type="wait" value="1"/> - -</command_sequence> diff --git a/example_recipes/cmd_sequences/multicast/ttl.xml b/example_recipes/cmd_sequences/multicast/ttl.xml deleted file mode 100644 index 72d0759..0000000 --- a/example_recipes/cmd_sequences/multicast/ttl.xml +++ /dev/null @@ -1,110 +0,0 @@ -<!-- Offline IP_MULTICAST_TTL test --><!-- Requires: 2 hosts - - [1] with one interface - - [2] with one interface - - --> -<command_sequence> - <!-- IP_MULTICAST_TTL sockopt conformance test --> - <command machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="sockopt_ttl"/> - <option name="condition" value="status == 'pass'"/> - </options> - </command> - - <!-- IP_MULTICAST_TTL = 0, looped on one host --> - <command machine_id="1" type="exec" value="sleep 1"/> - - <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="send_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="delay" value="{$send_delay}"/> - <option name="ttl" value="0"/> - <option name="loop" value="1"/> - <option name="interface" value="{ip(1,1)}"/> - </options> - </command> - - <command machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="recv_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="interface" value="{ip(1,1)}"/> - - <option name="condition" value="packets_received > 0"/> - </options> - </command> - - <command machine_id="1" type="wait" value="1"/> - - <!-- IP_MULTICAST_TTL = 0 between 2 hosts --> - <!-- KNOWN BUG: according to the specs, packets - with TTL=0 should not leave the host. - - Well it does, it's an intentional hack for some - apps [1]. - - http://www.spinics.net/lists/netdev/msg183704.html - --> - <command machine_id="1" type="exec" value="sleep 1"/> - <command machine_id="2" type="exec" value="sleep 1"/> - - <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="send_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="delay" value="{$send_delay}"/> - <option name="ttl" value="0"/> - <option name="interface" value="{ip(1,1)}"/> - </options> - </command> - - <command machine_id="2" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="recv_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="interface" value="{ip(2,1)}"/> - - <option name="condition" value="packets_received > 0"/> - </options> - </command> - - <command machine_id="1" type="wait" value="1"/> - - <!-- IP_MULTICAST_TTL = 1 between 2 hosts --> - <command machine_id="1" type="exec" value="sleep 1"/> - - <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="send_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="delay" value="{$send_delay}"/> - <option name="ttl" value="1"/> - <option name="interface" value="{ip(1,1)}"/> - </options> - </command> - - <command machine_id="2" timeout="30" type="test" value="Multicast"> - <options> - <option name="setup" value="recv_simple"/> - <option name="address" value="{$multicast_group}"/> - <option name="port" value="{$port}"/> - <option name="duration" value="{$test_duration}"/> - <option name="interface" value="{ip(2,1)}"/> - - <option name="condition" value="packets_received > 0"/> - </options> - </command> - - <command machine_id="1" type="wait" value="1"/> -</command_sequence> diff --git a/example_recipes/rpazdera-multicast.xml b/example_recipes/rpazdera-multicast.xml deleted file mode 100644 index 9f1d68c..0000000 --- a/example_recipes/rpazdera-multicast.xml +++ /dev/null @@ -1,54 +0,0 @@ -<!-- Example test scenario using multicast test tools --> -<nettestrecipe> - <machines> - <machine id="1"> - <netmachineconfig> - <info hostname="10.34.1.120" rootpass="redhat"/> - <netdevice hwaddr="52:54:00:2E:D5:A8" id="1" phys_id="1" type="eth"/> - <netdevice hwaddr="52:54:00:90:23:0B" id="2" phys_id="2" type="eth"/> - </netmachineconfig> - <netconfig> - <interface id="1" phys_id="1" type="eth"> - <addresses> - <address value="192.168.122.225/24"/> - </addresses> - </interface> - <interface id="2" phys_id="2" type="eth"> - <addresses> - <address value="192.168.122.239/24"/> - </addresses> - </interface> - </netconfig> - </machine> - <machine id="2"> - <netmachineconfig> - <info hostname="10.34.1.171" rootpass="redhat"/> - <netdevice hwaddr="52:54:00:12:DF:5A" id="1" phys_id="1" type="eth"/> - </netmachineconfig> - <netconfig> - <interface id="1" phys_id="1" type="eth"> - <addresses> - <address value="192.168.122.200/24"/> - </addresses> - </interface> - </netconfig> - </machine> - </machines> - - <define> - <alias name="multicast_group" value="239.1.2.3"/> - <alias name="port" value="1337"/> - <alias name="test_duration" value="10"/> - <alias name="send_delay" value="0.1"/> - <alias name="nonexistent_ip" value="127.0.0.200"/> - </define> - - <command_sequence source="cmd_sequences/multicast/max_groups.xml"/> - <command_sequence source="cmd_sequences/multicast/block_source.xml"/> - <command_sequence source="cmd_sequences/multicast/source_membership.xml"/> - <command_sequence source="cmd_sequences/multicast/membership.xml"/> - <command_sequence source="cmd_sequences/multicast/if.xml"/> - <command_sequence source="cmd_sequences/multicast/ttl.xml"/> - <command_sequence source="cmd_sequences/multicast/loop.xml"/> - <command_sequence source="cmd_sequences/multicast/simple.xml"/> -</nettestrecipe> diff --git a/recipes/multicast/cmd_sequences/block_source.xml b/recipes/multicast/cmd_sequences/block_source.xml new file mode 100644 index 0000000..f351a79 --- /dev/null +++ b/recipes/multicast/cmd_sequences/block_source.xml @@ -0,0 +1,77 @@ +<!-- IP_BLOCK/UNBLOCK_SOURCE test --> +<!-- Requires: 2 hosts with one interface each --> +<!-- NOTICE: IGMP packets must be forwarded through the network! + In kvm/libvirt environment, iptables on host must be off or + configured to forward igmp traffic through the bridge --> +<command_sequence> + <!-- IP_BLOCK/UNBLOCK_SOURCE sockopt conformance test --> + <command machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="sockopt_block_source"/> + <option name="condition" value="status == 'pass'"/> + </options> + </command> + + <!-- Block source in the middle of ongoing communication --> + <command machine_id="1" type="exec" value="sleep 1"/> + <command machine_id="2" type="exec" value="sleep 1"/> + + <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="send_simple"/> + <option name="address" value="238.0.0.1"/> + <option name="port" value="1337"/> + <option name="duration" value="10"/> + <option name="delay" value="0.1"/> + <option name="ttl" value="1"/> + <option name="interface" value="{ip(1,1)}"/> + </options> + </command> + + <command machine_id="2" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="recv_block_source"/> + <option name="address" value="238.0.0.1"/> + <option name="port" value="1337"/> + <option name="duration" value="10"/> + <option name="interface" value="{ip(2,1)}"/> + <option name="source" value="{ip(1,1)}"/> + + <option name="condition" value="packets_received > 0"/> + <option name="condition" value="packets_received_while_blocking == 0"/> + </options> + </command> + <command machine_id="1" type="wait" value="1"/> + + <!-- Nonexistent source --> + <command machine_id="1" type="exec" value="sleep 1"/> + <command machine_id="2" type="exec" value="sleep 1"/> + + <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="send_simple"/> + <option name="address" value="238.0.0.1"/> + <option name="port" value="1337"/> + <option name="duration" value="10"/> + <option name="delay" value="0.1"/> + <option name="ttl" value="1"/> + <option name="interface" value="{ip(1,1)}"/> + </options> + </command> + + <command machine_id="2" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="recv_block_source"/> + <option name="address" value="238.0.0.1"/> + <option name="port" value="1337"/> + <option name="duration" value="10"/> + <option name="interface" value="{ip(2,1)}"/> + <option name="source" value="127.0.0.200"/> + + <option name="condition" value="packets_received > 0"/> + <option name="condition" value="packets_received_while_blocking > 0"/> + </options> + </command> + <command machine_id="1" type="wait" value="1"/> + +</command_sequence> diff --git a/recipes/multicast/cmd_sequences/if.xml b/recipes/multicast/cmd_sequences/if.xml new file mode 100644 index 0000000..dfd1108 --- /dev/null +++ b/recipes/multicast/cmd_sequences/if.xml @@ -0,0 +1,75 @@ +<!-- IP_MULTICAST_IF test --><!-- Requires: 2 hosts + - [1] with one interface + - [2] with one interface + - --> +<command_sequence> + <!-- IP_MULTICAST_IF sockopt conformance test --> + <command machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="sockopt_if"/> + + <!-- This condition doesn't pass yet because of a + bug in the syscal. #803202 on RedHat Bugzilla --> + <!-- <option name="condition" value="status == 'pass'" /> --> + </options> + </command> + + <!-- IP_MULTICAST_IF correct interfaces set --> + <command machine_id="1" type="exec" value="sleep 1"/> + <command machine_id="2" type="exec" value="sleep 1"/> + + <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="send_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="delay" value="{$send_delay}"/> + <option name="ttl" value="1"/> + <option name="interface" value="{ip(1,1)}"/> + </options> + </command> + + <command machine_id="2" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="recv_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="interface" value="{ip(2,1)}"/> + + <option name="condition" value="packets_received > 0"/> + </options> + </command> + + <command machine_id="1" type="wait" value="1"/> + + <!-- IP_MULTICAST_IF incorrect interfaces set --> + <command machine_id="1" type="exec" value="sleep 1"/> + + <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="send_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="delay" value="{$send_delay}"/> + <option name="ttl" value="1"/> + <option name="interface" value="{ip(1,1)}"/> + </options> + </command> + + <command machine_id="2" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="recv_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="interface" value="127.0.0.1"/> + + <option name="condition" value="packets_received == 0"/> + </options> + </command> + + <command machine_id="1" type="wait" value="1"/> +</command_sequence> diff --git a/recipes/multicast/cmd_sequences/loop.xml b/recipes/multicast/cmd_sequences/loop.xml new file mode 100644 index 0000000..d4b57d6 --- /dev/null +++ b/recipes/multicast/cmd_sequences/loop.xml @@ -0,0 +1,69 @@ +<!-- Offline IP_MULTICAST_LOOP test --> +<!-- Requires: 1 hosts with at least two interfaces --> +<command_sequence> + <!-- IP_MULTICAST_LOOP sockopt conformance test --> + <command machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="sockopt_loop"/> + <option name="condition" value="status == 'pass'"/> + </options> + </command> + + <!-- IP_MULTICAST_LOOP enabled --> + <command machine_id="1" type="exec" value="sleep 1"/> + + <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="send_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="delay" value="{$send_delay}"/> + <option name="loop" value="1"/> + <option name="interface" value="{ip(1,1)}"/> + </options> + </command> + + <command machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="recv_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="interface" value="{ip(1,1)}"/> + + <option name="condition" value="packets_received > 0"/> + </options> + </command> + + <command machine_id="1" type="wait" value="1"/> + + <!-- IP_MULTICAST_LOOP disabled --> + <command machine_id="1" type="exec" value="sleep 1"/> + + <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="send_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="delay" value="{$send_delay}"/> + <option name="loop" value="0"/> + <option name="interface" value="{ip(1,1)}"/> + </options> + </command> + + <command machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="recv_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="interface" value="{ip(1,1)}"/> + + <option name="condition" value="packets_received == 0"/> + </options> + </command> + + <command machine_id="1" type="wait" value="1"/> +</command_sequence> diff --git a/recipes/multicast/cmd_sequences/max_groups.xml b/recipes/multicast/cmd_sequences/max_groups.xml new file mode 100644 index 0000000..a27197f --- /dev/null +++ b/recipes/multicast/cmd_sequences/max_groups.xml @@ -0,0 +1,22 @@ +<!-- Offline maximum number of groups test --> +<!-- Requires: 1 host with one interface --> +<command_sequence> + <!-- With a specific interface --> + <command machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="max_groups"/> + <option name="interface" value="{ip(1,1)}"/> + <option name="condition" value="max_groups > 0"/> + </options> + </command> + + <!-- Change default max_memberhsips --> + <command machine_id="1" option="/proc/sys/net/ipv4/igmp_max_memberships" type="system_config" value="5"/> + <command machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="max_groups"/> + <option name="interface" value="{ip(1,1)}"/> + <option name="condition" value="max_groups == 5"/> + </options> + </command> +</command_sequence> diff --git a/recipes/multicast/cmd_sequences/membership.xml b/recipes/multicast/cmd_sequences/membership.xml new file mode 100644 index 0000000..b4c63be --- /dev/null +++ b/recipes/multicast/cmd_sequences/membership.xml @@ -0,0 +1,47 @@ +<!-- IP_ADD/DROP_MEMBERSHIP test --> +<!-- Requires: 2 hosts + - [1] with one interface + - [2] with one interface + - --> +<command_sequence> + <!-- IP_ADD/DROP_MEMBERSHIP sockopt conformance test --> + <command machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="sockopt_membership"/> + <option name="condition" value="status == 'pass'"/> + </options> + </command> + + <!-- This simple test case verifies that if one side leaves multicast group + - in the middle of ongoing communication, no further packets are delivered + - to the process. --> + <command machine_id="1" type="exec" value="sleep 1"/> + <command machine_id="2" type="exec" value="sleep 1"/> + + <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="send_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="delay" value="{$send_delay}"/> + <option name="ttl" value="1"/> + <option name="interface" value="{ip(1,1)}"/> + </options> + </command> + + <command machine_id="2" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="recv_membership"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="interface" value="{ip(2,1)}"/> + + <option name="condition" value="packets_received > 0"/> + <option name="condition" value="packets_received_after_drop == 0"/> + </options> + </command> + + <command machine_id="1" type="wait" value="1"/> +</command_sequence> diff --git a/recipes/multicast/cmd_sequences/simple.xml b/recipes/multicast/cmd_sequences/simple.xml new file mode 100644 index 0000000..88cddd1 --- /dev/null +++ b/recipes/multicast/cmd_sequences/simple.xml @@ -0,0 +1,31 @@ +<!-- Requires: 2 hosts with at least one interface --> +<!-- ['machines'][2]['netconfig'][1]['addresses'][0] --> +<command_sequence> + <command machine_id="1" type="exec" value="sleep 1"/> + <command machine_id="2" type="exec" value="sleep 1"/> + + <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="send_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="delay" value="{$send_delay}"/> + <option name="interface" value="{ip(1,1)}"/> + </options> + </command> + + <command machine_id="2" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="recv_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="interface" value="{ip(2,1)}"/> + + <option name="condition" value="packets_received > 0"/> + </options> + </command> + + <command machine_id="1" type="wait" value="1"/> +</command_sequence> diff --git a/recipes/multicast/cmd_sequences/source_membership.xml b/recipes/multicast/cmd_sequences/source_membership.xml new file mode 100644 index 0000000..a659e74 --- /dev/null +++ b/recipes/multicast/cmd_sequences/source_membership.xml @@ -0,0 +1,82 @@ +<!-- IP_ADD/DROP_SOURCE_MEMBERSHIP test --> +<!-- Requires: 2 hosts + - [1] with one interface + - [2] with one interface + - --> +<!-- NOTICE: IGMP packets must be forwarded through the network! + In kvm/libvirt environment, iptables on host must be off or + configured to forward igmp traffic through the bridge --> +<command_sequence> + <!-- IP_ADD/DROP_MEMBERSHIP sockopt conformance test --> + <command machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="sockopt_source_membership"/> + <option name="condition" value="status == 'pass'"/> + </options> + </command> + + <!-- This simple test case verifies that if one side leaves multicast group + - in the middle of ongoing communication, no further packets are delivered + - to the process. --> + <command machine_id="1" type="exec" value="sleep 1"/> + <command machine_id="2" type="exec" value="sleep 1"/> + + <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="send_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="delay" value="{$send_delay}"/> + <option name="ttl" value="1"/> + <option name="interface" value="{ip(1,1)}"/> + </options> + </command> + + <command machine_id="2" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="recv_source_membership"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="interface" value="{ip(2,1)}"/> + <option name="source" value="{ip(1,1)}"/> + + <option name="condition" value="packets_received > 0"/> + <option name="condition" value="packets_received_after_drop == 0"/> + </options> + </command> + <command machine_id="1" type="wait" value="1"/> + + <!-- Nonexistent source --> + <command machine_id="1" type="exec" value="sleep 1"/> + <command machine_id="2" type="exec" value="sleep 1"/> + + <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="send_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="delay" value="{$send_delay}"/> + <option name="ttl" value="1"/> + <option name="interface" value="{ip(1,1)}"/> + </options> + </command> + + <command machine_id="2" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="recv_source_membership"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="interface" value="{ip(2,1)}"/> + <option name="source" value="127.0.0.200"/> + + <option name="condition" value="packets_received == 0"/> + <option name="condition" value="packets_received_after_drop == 0"/> + </options> + </command> + <command machine_id="1" type="wait" value="1"/> + +</command_sequence> diff --git a/recipes/multicast/cmd_sequences/ttl.xml b/recipes/multicast/cmd_sequences/ttl.xml new file mode 100644 index 0000000..72d0759 --- /dev/null +++ b/recipes/multicast/cmd_sequences/ttl.xml @@ -0,0 +1,110 @@ +<!-- Offline IP_MULTICAST_TTL test --><!-- Requires: 2 hosts + - [1] with one interface + - [2] with one interface + - --> +<command_sequence> + <!-- IP_MULTICAST_TTL sockopt conformance test --> + <command machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="sockopt_ttl"/> + <option name="condition" value="status == 'pass'"/> + </options> + </command> + + <!-- IP_MULTICAST_TTL = 0, looped on one host --> + <command machine_id="1" type="exec" value="sleep 1"/> + + <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="send_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="delay" value="{$send_delay}"/> + <option name="ttl" value="0"/> + <option name="loop" value="1"/> + <option name="interface" value="{ip(1,1)}"/> + </options> + </command> + + <command machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="recv_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="interface" value="{ip(1,1)}"/> + + <option name="condition" value="packets_received > 0"/> + </options> + </command> + + <command machine_id="1" type="wait" value="1"/> + + <!-- IP_MULTICAST_TTL = 0 between 2 hosts --> + <!-- KNOWN BUG: according to the specs, packets + with TTL=0 should not leave the host. + + Well it does, it's an intentional hack for some + apps [1]. + + http://www.spinics.net/lists/netdev/msg183704.html + --> + <command machine_id="1" type="exec" value="sleep 1"/> + <command machine_id="2" type="exec" value="sleep 1"/> + + <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="send_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="delay" value="{$send_delay}"/> + <option name="ttl" value="0"/> + <option name="interface" value="{ip(1,1)}"/> + </options> + </command> + + <command machine_id="2" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="recv_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="interface" value="{ip(2,1)}"/> + + <option name="condition" value="packets_received > 0"/> + </options> + </command> + + <command machine_id="1" type="wait" value="1"/> + + <!-- IP_MULTICAST_TTL = 1 between 2 hosts --> + <command machine_id="1" type="exec" value="sleep 1"/> + + <command bg_id="1" machine_id="1" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="send_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="delay" value="{$send_delay}"/> + <option name="ttl" value="1"/> + <option name="interface" value="{ip(1,1)}"/> + </options> + </command> + + <command machine_id="2" timeout="30" type="test" value="Multicast"> + <options> + <option name="setup" value="recv_simple"/> + <option name="address" value="{$multicast_group}"/> + <option name="port" value="{$port}"/> + <option name="duration" value="{$test_duration}"/> + <option name="interface" value="{ip(2,1)}"/> + + <option name="condition" value="packets_received > 0"/> + </options> + </command> + + <command machine_id="1" type="wait" value="1"/> +</command_sequence> diff --git a/recipes/multicast/multicast-all.xml b/recipes/multicast/multicast-all.xml new file mode 100644 index 0000000..f4dc82c --- /dev/null +++ b/recipes/multicast/multicast-all.xml @@ -0,0 +1,72 @@ +<!-- Execute all tests for multicast --> +<nettestrecipe> + <!-- Change these parameters to match your test environment setup --> + <define> + <alias name="hostname1" value="192.168.122.11"/> + <alias name="virtdomain1" value="RHEL6"/> + + <alias name="hostname2" value="192.168.122.10"/> + <alias name="virtdomain2" value="Fedora16-clone"/> + </define> + <machines> + <machine id="1"> + <netmachineconfig> + <info hostname="{$hostname1}" libvirt_domain="{$virtdomain1}" + rootpass="redhat"/> + <netdevices> + <libvirt_create> + <netdevice network="tnet" phys_id="1" type="eth"/> + <netdevice network="tnet" phys_id="2" type="eth"/> + </libvirt_create> + </netdevices> + </netmachineconfig> + <netconfig> + <interface id="1" phys_id="1" type="eth"> + <addresses> + <address value="192.168.100.226/24"/> + </addresses> + </interface> + <interface id="2" phys_id="2" type="eth"> + <addresses> + <address value="192.168.100.240/24"/> + </addresses> + </interface> + </netconfig> + </machine> + <machine id="2"> + <netmachineconfig> + <info hostname="{$hostname2}" libvirt_domain="{$virtdomain2}" + rootpass="redhat"/> + <netdevices> + <libvirt_create> + <netdevice network="tnet" phys_id="1" type="eth"/> + </libvirt_create> + </netdevices> + </netmachineconfig> + <netconfig> + <interface id="1" phys_id="1" type="eth"> + <addresses> + <address value="192.168.100.215/24"/> + </addresses> + </interface> + </netconfig> + </machine> + </machines> + + <define> + <alias name="multicast_group" value="239.1.2.3"/> + <alias name="port" value="1337"/> + <alias name="test_duration" value="10"/> + <alias name="send_delay" value="0.1"/> + <alias name="nonexistent_ip" value="127.0.0.200"/> + </define> + + <command_sequence source="cmd_sequences/multicast/max_groups.xml"/> + <command_sequence source="cmd_sequences/multicast/block_source.xml"/> + <command_sequence source="cmd_sequences/multicast/source_membership.xml"/> + <command_sequence source="cmd_sequences/multicast/membership.xml"/> + <command_sequence source="cmd_sequences/multicast/if.xml"/> + <command_sequence source="cmd_sequences/multicast/ttl.xml"/> + <command_sequence source="cmd_sequences/multicast/loop.xml"/> + <command_sequence source="cmd_sequences/multicast/simple.xml"/> +</nettestrecipe>
lnst-developers@lists.fedorahosted.org