- Timestamp:
- May 29, 2015, 5:51:08 PM (9 years ago)
- Location:
- branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/broadcast_check.sh
r996 r997 10 10 last=0 11 11 failure=0 12 min=99999999 13 max=0 12 14 } 13 15 # Parse coordinates of routers … … 36 38 } 37 39 else { 38 # store the number of received packets of a router that actually 39 # received packets. 40 if (last == 0) { 41 last=$6 40 # store the min and max number of received packets 41 if ($6 < min) { 42 min=$6; 42 43 } 43 # test if the error is too important. The error is defined as 44 # difference between the number of packets received by different 45 # routers. 46 error=last - $6 47 if ((error > 20) || (error < -20)) { 48 failure=1 49 exit; 44 if ($6 > max) { 45 max=$6; 50 46 } 51 47 } … … 54 50 # Validate the file 55 51 END { 56 # an error was too important57 if (failure == 1) {58 exit 159 }60 61 52 # it should be only two routers that do not receive the broadcast: 62 53 # the source and the faulty router. 63 if (zero != 2) { 54 if (zero > 2) { 55 print "error: some routers did not received broadcasts\n"; 64 56 exit 1; 65 57 } 66 58 67 # test if the error is too important 68 error=last - sent 69 if ((error > 20) || (error < -20)) { 59 if (max > sent) { 60 print "error: at least a router received a number of broadcast greater" 61 print "than the number of broadcast sent\n"; 62 exit 1; 63 } 64 65 if (zero == 1) { 66 print "error: the broadcast source received broadcasts\n"; 67 exit 1; 68 } 69 70 error=sent - min 71 if (error > 20) { 72 print "error: the number of broadcast received by a router is inferior " 73 print "to the error threshold\n"; 70 74 exit 1; 71 75 } -
branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/run_broadcast_check.sh
r996 r997 1 1 #!/usr/bin/env sh 2 2 LOGDIR=logs 3 COMMON="-X 5 -Y 5 -N 3000"3 COMMON="-X 5 -Y 5 -N 10000" 4 4 5 5 mkdir -p $LOGDIR
Note: See TracChangeset
for help on using the changeset viewer.