Ignore:
Timestamp:
May 29, 2015, 5:51:08 PM (9 years ago)
Author:
cfuguet
Message:

reconf: improve the recovery broadcast replication policy

  • Improve the validation scripts for this replication policy.
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  
    1010        last=0
    1111        failure=0
     12        min=99999999
     13        max=0
    1214}
    1315#   Parse coordinates of routers
     
    3638        }
    3739        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;
    4243                }
    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;
    5046                }
    5147        }
     
    5450#   Validate the file
    5551END {
    56         # an error was too important
    57         if (failure == 1) {
    58                 exit 1
    59         }
    60 
    6152        # it should be only two routers that do not receive the broadcast:
    6253        # the source and the faulty router.
    63         if (zero != 2) {
     54        if (zero > 2) {
     55                print "error: some routers did not received broadcasts\n";
    6456                exit 1;
    6557        }
    6658
    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";
    7074                exit 1;
    7175        }
  • branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/run_broadcast_check.sh

    r996 r997  
    11#!/usr/bin/env sh
    22LOGDIR=logs
    3 COMMON="-X 5 -Y 5 -N 3000"
     3COMMON="-X 5 -Y 5 -N 10000"
    44
    55mkdir -p $LOGDIR
Note: See TracChangeset for help on using the changeset viewer.