Skip to content

Commit

Permalink
tests: add tcp test on two butterfly
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 18, 2016
1 parent 26cda86 commit 3109f77
Show file tree
Hide file tree
Showing 4 changed files with 105 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 tcp message.
39 changes: 39 additions & 0 deletions tests/scenario_13/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/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 0 1 42
add_nic 0 2 42
add_nic 1 3 42
add_nic 1 4 42
qemu_start 1
qemu_start 2
qemu_start 3
qemu_start 4
ssh_tcp 2 1 1234
ssh_tcp 3 1 5554
ssh_tcp 4 1 4123
ssh_tcp 2 2 3234
ssh_tcp 3 2 5554
ssh_tcp 4 2 4123
ssh_tcp 2 3 1234
ssh_tcp 3 3 5554
ssh_tcp 4 3 4123
ssh_tcp 1 4 5004
ssh_tcp 2 4 5964
ssh_tcp 3 4 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).
39 changes: 39 additions & 0 deletions tests/scenario_14/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/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 0 1 42
add_nic 0 2 1337
add_nic 1 3 1337
add_nic 1 4 42
qemu_start 1
qemu_start 2
qemu_start 3
qemu_start 4
ssh_no_tcp 2 1 5054
ssh_no_tcp 3 1 5034
ssh_tcp 4 1 5050
ssh_no_tcp 1 2 5554
ssh_tcp 3 2 5034
ssh_no_tcp 4 2 5550
ssh_no_tcp 1 3 5554
ssh_tcp 2 3 5034
ssh_no_tcp 4 3 5550
ssh_tcp 1 4 5554
ssh_no_tcp 2 4 5034
ssh_no_tcp 3 4 5550
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 3109f77

Please sign in to comment.