Skip to content

Commit

Permalink
tests: add brick bench tests
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Gatto <[email protected]>
  • Loading branch information
outscale-mgo committed Feb 17, 2020
1 parent 1186af6 commit 641438c
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/61_bench_nic_1BT/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

#connect 2 taps together on the same butterfly, and test connection

#
# / ---> [ Bench snd ]
# [Butterfly 0]
# \ ---> [ Bench Rcv ]

BUTTERFLY_BUILD_ROOT=$1
BUTTERFLY_SRC_ROOT=$(cd "$(dirname $0)/../.." && pwd)
source $BUTTERFLY_SRC_ROOT/tests/functions.sh

network_connect 0 1

server_start 0
sg_rule_add_icmp 0 sg-1

bench_lat_rcv_add 0 2 42 sg-1
bench_lat_snd_add 0 1 2 42 sg-1

sleep 0.5

network_disconnect 0 1

server_stop 0

return_result
28 changes: 28 additions & 0 deletions tests/62_bench_nic_2BT/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

#connect 2 taps together on 2 not same butterfly, and test connection

# [ bench snd ] <--> [Butterfly 0] <--> [ Bench Rcv ]

BUTTERFLY_BUILD_ROOT=$1
BUTTERFLY_SRC_ROOT=$(cd "$(dirname $0)/../.." && pwd)
source $BUTTERFLY_SRC_ROOT/tests/functions.sh

network_connect 0 1

server_start 0
server_start 1
sg_rule_add_icmp 0 sg-1
sg_rule_add_icmp 1 sg-1

bench_lat_rcv_add 1 2 42 sg-1
bench_lat_snd_add 0 1 2 42 sg-1

sleep 1

network_disconnect 0 1

server_stop 0
server_stop 1

return_result

0 comments on commit 641438c

Please sign in to comment.