Skip to content

Commit

Permalink
tests: add tcp test on two butterflies
Browse files Browse the repository at this point in the history
closed outscale#34

Signed-off-by: Thiery Ouattara <thiery.ouattara@outscale.com>
  • Loading branch information
outscale-toa committed Jul 11, 2016
1 parent d21df17 commit 6b7e922
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/scenario_13/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Description

```
+-----------+ +-----------+
(vni 42) [ VM 1 ]-----| | | |-----[ VM 3 ] (vni 42)
| Butterfly +======+ Butterfly |
(vni 42) [ VM 2 ]-----| | | |-----[ VM 4 ] (vni 42)
+-----------+ +-----------+
```

This scenario connects four virtual machines through two butterfly.
Each VM are in the same network (VNI) and can send udp message.
33 changes: 33 additions & 0 deletions tests/scenario_13/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

BUTTERFLY_SRC_ROOT=$1
BUTTERFLY_BUILD_ROOT=$2

source $BUTTERFLY_SRC_ROOT/tests/functions.sh

network_connect 0 1
server_start 0
server_start 1
add_nic_full_open 0 1 42
add_nic_full_open 0 2 42
add_nic_full_open 1 3 42
add_nic_full_open 1 4 42
qemu_start 1
qemu_start 2
qemu_start 3
qemu_start 4
ssh_tcp 1 2 1234
ssh_tcp 1 3 5554
ssh_tcp 1 4 4123
ssh_tcp 4 1 5004
ssh_tcp 4 2 5964
ssh_tcp 4 3 5554
qemu_stop 1
qemu_stop 2
qemu_stop 3
qemu_stop 4
server_stop 0
server_stop 1
network_disconnect 0 1
return_result

14 changes: 14 additions & 0 deletions tests/scenario_14/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Description

```
+-----------+ +-----------+
(vni 42) [ VM 1 ]-----| | | |-----[ VM 3 ] (vni 1337)
| Butterfly +======+ Butterfly |
(vni 1337) [ VM 2 ]-----| | | |-----[ VM 4 ] (vni 42)
+-----------+ +-----------+
```

This scenario connects four virtual machines through two butterfly.
VM 1 & VM 4 are on the same VNI (42).
VM 2 & VM 3 are on the same VNI (1337).
33 changes: 33 additions & 0 deletions tests/scenario_14/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

BUTTERFLY_SRC_ROOT=$1
BUTTERFLY_BUILD_ROOT=$2

source $BUTTERFLY_SRC_ROOT/tests/functions.sh

network_connect 0 1
server_start 0
server_start 1
add_nic_full_open 0 1 42
add_nic_full_open 0 2 1337
add_nic_full_open 1 3 1337
add_nic_full_open 1 4 42
qemu_start 1
qemu_start 2
qemu_start 3
qemu_start 4
ssh_tcp 1 4 4445
ssh_tcp 4 1 4335
ssh_no_tcp 1 2 5445
ssh_no_tcp 1 3 1545
ssh_no_tcp 4 2 2905
ssh_no_tcp 4 3 1250
qemu_stop 1
qemu_stop 2
qemu_stop 3
qemu_stop 4
server_stop 0
server_stop 1
network_disconnect 0 1
return_result

0 comments on commit 6b7e922

Please sign in to comment.