Revision cafb67a9

View differences:

.gitignore
1
wcn_emulator/
1
wcn_emulator/
2
*.pyc
3
*~
conf/checkBabel.ini
3 3
testModule = validation
4 4
testClass = ValidationTest
5 5
duration = 30
6
graphDefinition = data/linear.edges
6
graphDefinition = data/linear2.edges
7 7
times = 1
8 8
drawGraph = True
9
link_loss = etx_loss
9

  
10
[linear_pop]
11
testModule = babel
12
testClass = BABELTest
13
graphDefinition = data/linear2.edges
14
duration = 45
15
HelloInterval = 1
16
TcInterval = 2
17
startLog = 10s
18
stopLog = 40s
19
stopList = 2
20
stopTime = 30
21
popRouting = True
22
times = 1
23

  
24
[ninux_pop_unw]
25
testModule = babel
26
testClass = BABELTest
27
graphDefinition = data/ninux9unw.edges
28
duration = 420
29
HelloInterval = 1
30
TcInterval = 2
31
startLog = 300s
32
stopLog = 400s
33
stopList = 102
34
stopTime = 315
35
popRouting = True
36
times = 1
37

  
38
[ninux_NOpop_unw]
39
testModule = babel
40
testClass = BABELTest
41
graphDefinition = data/ninux9unw.edges
42
duration = 420
43
HelloInterval = 1
44
TcInterval = 2
45
startLog = 300s
46
stopLog = 400s
47
stopList = 102
48
stopTime = 315
49
popRouting = False
50
times = 1
conf/weight.ini~
1

  
2
[ninux_pop]
3
testModule = babel
4
testClass = BABELTest
5
graphDefinition = data/ninux9.edges
6
duration = 480
7
HelloInterval = 1
8
TcInterval = 2
9
startLog = 300s
10
stopLog = 460s
11
stopList = 102,9,99,48,120,26,57,17,55,71,15,34,94,79,10,70,77,60,3,22
12
stopTime = 315
13
link_loss = etx_loss
14
times = 1
15
popRouting = True
16

  
17
[ninux_NOpop]
18
testModule = babel
19
testClass = BABELTest
20
graphDefinition = data/ninux9.edges
21
duration = 480
22
HelloInterval = 1
23
TcInterval = 2
24
startLog = 300s
25
stopLog = 460s
26
stopList = 102,9,99,48,120,26,57,17,55,71,15,34,94,79,10,70,77,60,3,22
27
stopTime = 315
28
link_loss = etx_loss
29
times = 1
30
popRouting = False
31

  
32
[graz_pop]
33
testModule = babel
34
testClass = BABELTest
35
graphDefinition = data/Graz9good.edges
36
duration = 480
37
HelloInterval = 1
38
TcInterval = 2
39
startLog = 300s
40
stopLog = 460s
41
stopList = 44,88,15,14,65,3,6,25,107,126,135,69,1,125,134,131,114,78
42
stopTime = 315
43
link_loss = etx_loss
44
times = 1
45
popRouting = True
46

  
47
[graz_NOpop]
48
testModule = babel
49
testClass = BABELTest
50
graphDefinition = data/Graz9good.edges
51
duration = 480
52
HelloInterval = 1
53
TcInterval = 2
54
startLog = 300s
55
stopLog = 460s
56
stopList = 44,88,15,14,65,3,6,25,107,126,135,69,1,125,134,131,114,78
57
stopTime = 315
58
link_loss = etx_loss
59
times = 1
60
popRouting = False
61

  
62
[adorfPOP]
63
testModule = babel
64
testClass = BABELTest
65
graphDefinition = data/weightFF/bigcompoadorf.edges
66
duration = 480
67
HelloInterval = 1
68
TcInterval = 2
69
startLog = 300s
70
stopLog = 460s
71
stopList = 156,95,175,143,97,118,48,6,11,166,168,92,116,71,150,113,35,85,171,190,45,201,130,178,181,53,137,51,110,126,32,148,42
72
stopTime = 315
73
link_loss = etx_loss
74
times = 1
75
popRouting = True
76

  
77
[adorfNOPOP]
78
testModule = babel
79
testClass = BABELTest
80
graphDefinition = data/weightFF/bigcompoadorf.edges
81
duration = 480
82
HelloInterval = 1
83
TcInterval = 2
84
startLog = 300s
85
stopLog = 460s
86
stopList = 156,95,175,143,97,118,48,6,11,166,168,92,116,71,150,113,35,85,171,190,45,201,130,178,181,53,137,51,110,126,32,148,42
87
stopTime = 315
88
link_loss = etx_loss
89
times = 1
90
popRouting = False
91

  
92
[adorfPOP2]
93
testModule = babel
94
testClass = BABELTest
95
graphDefinition = data/weightFF/bigcompoadorf.edges
96
duration = 480
97
HelloInterval = 1
98
TcInterval = 2
99
startLog = 300s
100
stopLog = 460s
101
stopList = 191,47,65,187,103,155,88,89,197,96,200,5,28,7,87,208,56,55,68,144,161,78,159,30,18,146,40,67,33,115,10,125,192,16,43,206,132,179,128,213,13,64,173,172,134,80,26,79,182,3,205
102
stopTime = 315
103
link_loss = etx_loss
104
times = 1
105
popRouting = True
106

  
107
[adorfNOPOP2]
108
testModule = babel
109
testClass = BABELTest
110
graphDefinition = data/weightFF/bigcompoadorf.edges
111
duration = 480
112
HelloInterval = 1
113
TcInterval = 2
114
startLog = 300s
115
stopLog = 460s
116
stopList = 191,47,65,187,103,155,88,89,197,96,200,5,28,7,87,208,56,55,68,144,161,78,159,30,18,146,40,67,33,115,10,125,192,16,43,206,132,179,128,213,13,64,173,172,134,80,26,79,182,3,205
117
stopTime = 315
118
link_loss = etx_loss
119
times = 1
120
popRouting = False
121

  
122
[auerbachPOP]
123
testModule = babel
124
testClass = BABELTest
125
graphDefinition = data/weightFF/bigcompoauerbach.edges
126
duration = 480
127
HelloInterval = 1
128
TcInterval = 2
129
startLog = 300s
130
stopLog = 460s
131
stopList = 9,24,39,113,93,126,17,161,146,138,84,33,47,129,29,110,189,160,185,204,46,76,145,87,66,158,5,7,105,40,135,194,62,153,36
132
stopTime = 315
133
link_loss = etx_loss
134
times = 1
135
popRouting = True
136

  
137
[auerbachNOPOP]
138
testModule = babel
139
testClass = BABELTest
140
graphDefinition = data/weightFF/bigcompoauerbach.edges
141
duration = 480
142
HelloInterval = 1
143
TcInterval = 2
144
startLog = 300s
145
stopLog = 460s
146
stopList = 9,24,39,113,93,126,17,161,146,138,84,33,47,129,29,110,189,160,185,204,46,76,145,87,66,158,5,7,105,40,135,194,62,153,36
147
stopTime = 315
148
link_loss = etx_loss
149
times = 1
150
popRouting = False
151

  
152
[auerbachPOP2]
153
testModule = babel
154
testClass = BABELTest
155
graphDefinition = data/weightFF/bigcompoauerbach.edges
156
duration = 480
157
HelloInterval = 1
158
TcInterval = 2
159
startLog = 300s
160
stopLog = 460s
161
stopList = 187,79,3,45,95,61,134,177,206,15,8,91,154,172,97,140,63,212,35,77,88,108,190,50,30,137,12,188,205,173,144,4,199,49,54,55,74,82,72,117,130,2,13,16,159,139,59,112,104,10,148
162
stopTime = 315
163
link_loss = etx_loss
164
times = 1
165
popRouting = True
166

  
167
[auerbachNOPOP2]
168
testModule = babel
169
testClass = BABELTest
170
graphDefinition = data/weightFF/bigcompoauerbach.edges
171
duration = 480
172
HelloInterval = 1
173
TcInterval = 2
174
startLog = 300s
175
stopLog = 460s
176
stopList = 187,79,3,45,95,61,134,177,206,15,8,91,154,172,97,140,63,212,35,77,88,108,190,50,30,137,12,188,205,173,144,4,199,49,54,55,74,82,72,117,130,2,13,16,159,139,59,112,104,10,148
177
stopTime = 315
178
link_loss = etx_loss
179
times = 1
180
popRouting = False
181

  
182
[weilamrheinPOP]
183
testModule = babel
184
testClass = BABELTest
185
graphDefinition = data/weightFF/bigcompoweil-am-rhein.edges
186
duration = 480
187
HelloInterval = 1
188
TcInterval = 2
189
startLog = 300s
190
stopLog = 460s
191
stopList = 21,48,23,24,44,20,67,68,179,121,89,187,1,206,196,190,85,83,71,188,144,201,183,192,72,91,65,120,141,58,62,46,170,93,195,140,82,119,149
192
stopTime = 315
193
link_loss = etx_loss
194
times = 1
195
popRouting = True
196

  
197
[weilamrheinNOPOP]
198
testModule = babel
199
testClass = BABELTest
200
graphDefinition = data/weightFF/bigcompoweil-am-rhein.edges
201
duration = 480
202
HelloInterval = 1
203
TcInterval = 2
204
startLog = 300s
205
stopLog = 460s
206
stopList = 21,48,23,24,44,20,67,68,179,121,89,187,1,206,196,190,85,83,71,188,144,201,183,192,72,91,65,120,141,58,62,46,170,93,195,140,82,119,149
207
stopTime = 315
208
link_loss = etx_loss
209
times = 1
210
popRouting = False
211

  
212
[weilamrheinPOP2]
213
testModule = babel
214
testClass = BABELTest
215
graphDefinition = data/weightFF/bigcompoweil-am-rhein.edges
216
duration = 480
217
HelloInterval = 1
218
TcInterval = 2
219
startLog = 300s
220
stopLog = 460s
221
stopList = 149,92,122,63,11,17,209,114,176,155,15,52,214,215,99,90,125,88,117,94,116,45,53,51,25,191,64,2,10,146,107,16,80,75,74,73,78,77
222
stopTime = 315
223
link_loss = etx_loss
224
times = 1
225
popRouting = True
226

  
227
[weilamrheinNOPOP2]
228
testModule = babel
229
testClass = BABELTest
230
graphDefinition = data/weightFF/bigcompoweil-am-rhein.edges
231
duration = 480
232
HelloInterval = 1
233
TcInterval = 2
234
startLog = 300s
235
stopLog = 460s
236
stopList = 149,92,122,63,11,17,209,114,176,155,15,52,214,215,99,90,125,88,117,94,116,45,53,51,25,191,64,2,10,146,107,16,80,75,74,73,78,77
237
stopTime = 315
238
link_loss = etx_loss
239
times = 1
240
popRouting = False
241

  
242

  
243

  
244

  
245

  
test_code/babel.py
9 9
import time
10 10
from dummyrouting import dummyRoutingRandomTest
11 11
from compute_theoretical_values import ComputeTheoreticalValues
12
import code
13

  
14 12
import signal
15 13

  
14
import code
15

  
16 16
from test_generic import *
17 17

  
18 18

  
19 19
class BABELTest(dummyRoutingRandomTest):
20
    sigtoname=dict([[v,k] for k,v in signal.__dict__.items()])
20 21

  
21 22
    def launchBabel(self, runPrefix, host, cmdargs):
22 23

  
......
47 48
        #params['-N'] = neighfile
48 49
        params['-w'] = ""
49 50
        params.update(cmdargs)
50
        info("### Launching babel on "+hostname+" ###\n")
51
        #info("### Launching babel on "+hostname+" ###\n")
51 52
        return self.bgCmd(host, True, cmd,
52 53
            *reduce(lambda x, y: x + y, params.items()) )
53 54

  
......
69 70
        for run_id in run_ids:
70 71
            info("\nStarting run " + str(run_id) + "\n")
71 72
            if self.stopNodeList:
72
                #code.interact(local=dict(globals(), **locals()))
73 73
                self.nodeCrashed = self.stopNodeList.pop(0)
74 74
            else:
75 75
                self.nodeCrashed = None
......
121 121

  
122 122
            for event in eventList:
123 123
                sleep(event[0])
124
                #code.interact(local=dict(globals(), **locals()))
125
                event[2](**event[3])
126 124
                info(event[1] + str(time.time()) + "\n")
125
                event[2](**event[3])
127 126
            sleep(waitTime)
128 127
            for pid in self.pendingProc.keys():
129 128
                self.sendSig(pid, signal.SIGTERM)
......
233 232
        dest_ip = d.intfList()[0].ip
234 233
        return dest_ip
235 234

  
235
    def number_to_host(self, host_number):
236
        host_list = self.getAllHosts()
237
        for host in host_list:
238
            number = int(host.name.split("_")[0][1:])
239
            if host_number == number:
240
                return host
241
        print "ERROR: no host number:", number, "in host_list:"
242
        print "  ", self.getAllHosts() 
243
        return None
244

  
236 245
    def sendSignal(self, sig, hostName=""):
237 246
        strsig="uknown signal"
238
        if (sig == signal.SIGUSR1):
247
        '''if (sig == signal.SIGUSR1):
239 248
            strsig="SIGUSR1"
240 249
        if (sig == signal.SIGQUIT):
241 250
            strsig="SIGQUIT"
242 251
        elif (sig == signal.SIGTERM):
243 252
            strsig="SIGTERM"
244 253
        elif (sig == signal.SIGKILL):
245
            strsig="SIGKILL"
246
        for pid, h in self.pendingProc.items():
247
            if hostName:
248
                if h.name == hostName:
249
                    print "sending signal to host:", h.name, ", pid", pid
254
            strsig="SIGKILL"'''
255
        strsig = BABELTest.sigtoname[sig]
256
        if hostName:
257
            #code.interact(local=dict(globals(), **locals()))
258
            for pid, h in self.pendingProc.items():
259
                if h == hostName:
260
                    print "sending " + strsig + " to host:", h.name, ", pid", pid
250 261
                    self.sendSig(pid, sig)
251
            # send to all
252
            else:
253
                print "sending signal to all hosts:", strsig
262
        # send to all
263
        else:
264
            print "sending " + strsig + " to all hosts"
265
            for pid, h in self.pendingProc.items():
254 266
                self.sendSig(pid, sig)
255 267

  
256 268
    def __init__(self, mininet, name, args):
test_code/dummyrouting.py
9 9
import time
10 10
import ast
11 11
import networkx as nx
12
import code
12 13

  
13 14
import signal
14 15

  
......
395 396

  
396 397
        super(dummyRoutingRandomTest, self).__init__(mininet, duration)
397 398
        self.localPrefix = os.path.basename(os.path.splitext(
398
            mininet.gg_name)[0])
399
        self.setPrefix(name + self.localPrefix)
399
            mininet.gg.name)[0])
400
        self.setPrefix(name)
400 401

  
401 402

  
test_code/validation.py
101 101
        info("Waiting completion...\n")
102 102
        #self.wait(self.duration, log_resources={'net': 'netusage.csv'})
103 103
        self.wait(self.duration)
104
        self.killAll(graceful=True)
104
        self.killAll()
105 105
        #sleep(1)
106 106
        #self.killAll(sig=signal.SIGKILL)

Also available in: Unified diff