blob: 64cf39b031686dfecda122c76504313903dea8fe [file] [log] [blame]
Neels Hofmeyr3531a192017-03-28 14:30:28 +02001- expect solutions:
2[0, 1, 2]
3[0, 1, 2]
4[1, 0, 2]
5[1, 2, 0]
6- expect failure to solve:
7The requested resource requirements are not solvable [[0, 2], [2], [0, 2]]
8- test removing a Resources list from itself
Pau Espin Pedrolafa2fc32020-05-06 17:29:50 +02009ok, caused exception RuntimeError: Refusing to drop a list of resources from itself. This is probably a bug where a list of Resources() should have been copied but is passed as-is. use Resources.clear() instead.
Neels Hofmeyr3531a192017-03-28 14:30:28 +020010- test removing a Resources list from one with the same list in it
11- test resources config and state dir:
Pau Espin Pedrol6c6c0e82020-05-11 18:30:58 +020012cnf -: DBG: Found main configuration file in [PATH]/selftest/resource_test/conf/paths.conf which is [PATH]/selftest/resource_test/conf/paths.conf
13cnf -: DBG: MAIN CONFIG:
14{'default_suites_conf_path': '[PATH]/selftest/resource_test/conf/default-suites.conf',
15 'defaults_conf_path': '[PATH]/selftest/resource_test/conf/defaults.conf',
16 'resource_conf_path': '[PATH]/selftest/resource_test/conf/resources.conf',
Pau Espin Pedrol66ef9452020-05-25 13:26:41 +020017 'scenarios_dir': ['[PATH]/selftest/resource_test/conf/scenarios'],
Pau Espin Pedrol6c6c0e82020-05-11 18:30:58 +020018 'state_dir': '[PATH]/selftest/resource_test/conf/test_work/state_dir',
Pau Espin Pedrol66ef9452020-05-25 13:26:41 +020019 'suites_dir': ['[PATH]/selftest/resource_test/conf/suite_test'],
Pau Espin Pedrole972c9c2020-05-12 15:06:55 +020020 'trial_dir': '[PATH]/selftest/resource_test/conf/trial'}
Neels Hofmeyr3531a192017-03-28 14:30:28 +020021*** all resources:
Neels Hofmeyrecce4022020-11-28 19:54:43 +010022{'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
Neels Hofmeyr3531a192017-03-28 14:30:28 +020023 'addr': '10.42.42.114',
24 'band': 'GSM-1800',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020025 'ciphers': ['a5_0', 'a5_1'],
Pau Espin Pedrolce35d912017-11-23 11:01:24 +010026 'direct_pcu': 'True',
Neels Hofmeyr17c139e2017-04-12 02:42:02 +020027 'ipa_unit_id': '1',
Neels Hofmeyr3531a192017-03-28 14:30:28 +020028 'label': 'sysmoBTS 1002',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020029 'type': 'osmo-bts-sysmo'},
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020030 {'_hash': '2158317d5e0055070e7174c2498dedf53a2957e9',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020031 'addr': '10.42.42.50',
Neels Hofmeyr3531a192017-03-28 14:30:28 +020032 'band': 'GSM-1800',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020033 'ciphers': ['a5_0', 'a5_1'],
34 'ipa_unit_id': '6',
35 'label': 'Ettus B200',
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020036 'osmo_trx': {'clock_reference': 'external', 'launch_trx': 'True'},
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020037 'type': 'osmo-bts-trx'},
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020038 {'_hash': 'f964ba5fe7a37b97ec3e0c4ef21c9231a19de45d',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020039 'addr': '10.42.42.51',
40 'band': 'GSM-1800',
41 'ciphers': ['a5_0', 'a5_1'],
42 'ipa_unit_id': '7',
43 'label': 'sysmoCell 5000',
Pau Espin Pedrol0d455042018-08-27 17:07:41 +020044 'osmo_trx': {'clock_reference': 'external',
45 'launch_trx': 'False',
46 'trx_ip': '10.42.42.112'},
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020047 'type': 'osmo-bts-trx'}],
48 'ip_address': [{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c',
Neels Hofmeyr76d81032017-05-18 18:35:32 +020049 'addr': '10.42.42.2'},
50 {'_hash': '1c614d6210c551d142aadca8f25e1534ebb2a70f',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020051 'addr': '10.42.42.3'},
52 {'_hash': '862b529c701adf302477bc126a8032cfc2ec4753',
53 'addr': '10.42.42.4'},
54 {'_hash': '05feb6e1e24ca4235889eb28d0a8d5cedac6e5d1',
55 'addr': '10.42.42.5'},
56 {'_hash': 'e780ac7581ad29f8f46e637b61d0c38898c4c52c',
57 'addr': '10.42.42.6'}],
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +010058 'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0',
59 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020060 'ciphers': ['a5_0', 'a5_1'],
61 'imsi': '901700000009031',
62 'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD',
63 'label': 'sierra_1',
64 'path': '/sierra_1'},
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +010065 {'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3',
66 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020067 'ciphers': ['a5_0', 'a5_1'],
68 'imsi': '901700000009029',
69 'ki': '00969E283349D354A8239E877F2E0866',
70 'label': 'sierra_2',
71 'path': '/sierra_2'},
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +010072 {'_hash': 'f6ba17db2ad13da5ba5c54b5385a774f5351bb5a',
73 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020074 'ciphers': ['a5_0', 'a5_1'],
75 'imsi': '901700000009030',
76 'ki': 'BB70807226393CDBAC8DD3439FF54252',
77 'label': 'gobi_0',
78 'path': '/gobi_0'},
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +010079 {'_hash': 'fbff2e4f06b727fc8a70da23e1d134f9cd763919',
80 'auth_algo': 'comp128v1',
Pau Espin Pedrol438a3082017-08-28 14:31:28 +020081 'ciphers': ['a5_0', 'a5_1'],
82 'imsi': '901700000009032',
83 'ki': '2F70DCA43C45ACB97E947FDD0C7CA30A',
84 'label': 'gobi_3',
85 'path': '/gobi_3'}]}
Neels Hofmeyr3531a192017-03-28 14:30:28 +020086*** end: all resources
87
88- request some resources
Pau Espin Pedrol600c7992020-11-09 21:17:51 +010089--- testowner: Verifying 2 x bts (candidates: 3)
90--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6
91 addr: 10.42.42.114
92 band: GSM-1800
93 ciphers:
94 - a5_0
95 - a5_1
96 direct_pcu: 'True'
97 ipa_unit_id: '1'
98 label: sysmoBTS 1002
99 type: osmo-bts-sysmo
100- _hash: 2158317d5e0055070e7174c2498dedf53a2957e9
101 addr: 10.42.42.50
102 band: GSM-1800
103 ciphers:
104 - a5_0
105 - a5_1
106 ipa_unit_id: '6'
107 label: Ettus B200
108 osmo_trx:
109 clock_reference: external
110 launch_trx: 'True'
111 type: osmo-bts-trx
112--- testowner: Verifying 1 x ip_address (candidates: 5)
113--- testowner: DBG: Picked - _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
114 addr: 10.42.42.2
115--- testowner: Verifying 2 x modem (candidates: 4)
116--- testowner: DBG: Picked - _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
117 auth_algo: comp128v1
118 ciphers:
119 - a5_0
120 - a5_1
121 imsi: '901700000009031'
122 ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
123 label: sierra_1
124 path: /sierra_1
125- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
126 auth_algo: comp128v1
127 ciphers:
128 - a5_0
129 - a5_1
130 imsi: '901700000009029'
131 ki: 00969E283349D354A8239E877F2E0866
132 label: sierra_2
133 path: /sierra_2
134--- testowner: DBG: FileWatch: scheduling watch for directory [PATH]/selftest/resource_test/conf/test_work/state_dir
Neels Hofmeyrcccbe592017-05-07 01:16:07 +0200135--- testowner: Reserving 2 x bts (candidates: 3)
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100136--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200137 addr: 10.42.42.114
138 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200139 ciphers:
140 - a5_0
141 - a5_1
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100142 direct_pcu: 'True'
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200143 ipa_unit_id: '1'
144 label: sysmoBTS 1002
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200145 type: osmo-bts-sysmo
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200146- _hash: 2158317d5e0055070e7174c2498dedf53a2957e9
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200147 addr: 10.42.42.50
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200148 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200149 ciphers:
150 - a5_0
151 - a5_1
152 ipa_unit_id: '6'
153 label: Ettus B200
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200154 osmo_trx:
155 clock_reference: external
156 launch_trx: 'True'
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200157 type: osmo-bts-trx
158--- testowner: Reserving 1 x ip_address (candidates: 5)
159--- testowner: DBG: Picked - _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
160 addr: 10.42.42.2
161--- testowner: Reserving 2 x modem (candidates: 4)
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100162--- testowner: DBG: Picked - _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
163 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200164 ciphers:
165 - a5_0
166 - a5_1
167 imsi: '901700000009031'
168 ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
169 label: sierra_1
170 path: /sierra_1
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100171- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
172 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200173 ciphers:
174 - a5_0
175 - a5_1
176 imsi: '901700000009029'
177 ki: 00969E283349D354A8239E877F2E0866
178 label: sierra_2
179 path: /sierra_2
Pau Espin Pedrol600c7992020-11-09 21:17:51 +0100180--- testowner: DBG: FileWatch: unscheduling watch <ObservedWatch: path=[PATH]/selftest/resource_test/conf/test_work/state_dir, is_recursive=False>
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200181~~~ currently reserved:
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200182bts:
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100183- _hash: d2aa7c1124943de352351b650ca0c751784da6b6
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200184 _reserved_by: testowner-123-1490837279
185 addr: 10.42.42.114
186 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200187 ciphers:
188 - a5_0
189 - a5_1
Pau Espin Pedrolce35d912017-11-23 11:01:24 +0100190 direct_pcu: 'True'
Neels Hofmeyr17c139e2017-04-12 02:42:02 +0200191 ipa_unit_id: '1'
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200192 label: sysmoBTS 1002
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200193 type: osmo-bts-sysmo
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200194- _hash: 2158317d5e0055070e7174c2498dedf53a2957e9
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200195 _reserved_by: testowner-123-1490837279
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200196 addr: 10.42.42.50
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200197 band: GSM-1800
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200198 ciphers:
199 - a5_0
200 - a5_1
201 ipa_unit_id: '6'
202 label: Ettus B200
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200203 osmo_trx:
204 clock_reference: external
205 launch_trx: 'True'
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200206 type: osmo-bts-trx
Neels Hofmeyr76d81032017-05-18 18:35:32 +0200207ip_address:
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200208- _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
Neels Hofmeyr76d81032017-05-18 18:35:32 +0200209 _reserved_by: testowner-123-1490837279
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200210 addr: 10.42.42.2
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200211modem:
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100212- _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200213 _reserved_by: testowner-123-1490837279
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100214 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200215 ciphers:
216 - a5_0
217 - a5_1
218 imsi: '901700000009031'
219 ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
220 label: sierra_1
221 path: /sierra_1
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100222- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200223 _reserved_by: testowner-123-1490837279
Neels Hofmeyrc6cd68e2017-12-14 15:31:10 +0100224 auth_algo: comp128v1
Pau Espin Pedrol438a3082017-08-28 14:31:28 +0200225 ciphers:
226 - a5_0
227 - a5_1
228 imsi: '901700000009029'
229 ki: 00969E283349D354A8239E877F2E0866
230 label: sierra_2
231 path: /sierra_2
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200232
233~~~ end: currently reserved
234
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200235~~~ with modifiers:
Neels Hofmeyrecce4022020-11-28 19:54:43 +0100236resources(testowner)={'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200237 '_reserved_by': 'testowner-123-1490837279',
238 'addr': '10.42.42.114',
239 'band': 'GSM-1800',
240 'ciphers': ['a5_0', 'a5_1'],
241 'direct_pcu': 'True',
242 'ipa_unit_id': '1',
243 'label': 'sysmoBTS 1002',
244 'type': 'osmo-bts-sysmo'},
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200245 {'_hash': '2158317d5e0055070e7174c2498dedf53a2957e9',
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200246 '_reserved_by': 'testowner-123-1490837279',
247 'addr': '10.42.42.50',
248 'band': 'GSM-1800',
249 'ciphers': ['a5_0', 'a5_1'],
250 'ipa_unit_id': '6',
251 'label': 'Ettus B200',
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200252 'num_trx': 2,
Pau Espin Pedrol0d455042018-08-27 17:07:41 +0200253 'osmo_trx': {'clock_reference': 'external', 'launch_trx': 'True'},
Pau Espin Pedrolaab56922018-08-21 14:58:29 +0200254 'type': 'osmo-bts-trx'}],
255 'ip_address': [{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c',
256 '_reserved_by': 'testowner-123-1490837279',
257 'addr': '10.42.42.2'}],
258 'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0',
259 '_reserved_by': 'testowner-123-1490837279',
260 'auth_algo': 'comp128v1',
261 'ciphers': ['a5_0', 'a5_1'],
262 'imsi': '901700000009031',
263 'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD',
264 'label': 'sierra_1',
265 'path': '/sierra_1'},
266 {'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3',
267 '_reserved_by': 'testowner-123-1490837279',
268 'auth_algo': 'comp128v1',
269 'ciphers': ['a5_0', 'a5_1'],
270 'imsi': '901700000009029',
271 'ki': '00969E283349D354A8239E877F2E0866',
272 'label': 'sierra_2',
273 'path': '/sierra_2'}]}
274~~~ end: with modifiers:
Neels Hofmeyr3531a192017-03-28 14:30:28 +0200275~~~ currently reserved:
276{}
277
278~~~ end: currently reserved
279
Pau Espin Pedrol58475512017-09-14 15:33:15 +0200280- item_matches:
2811st subset matches correctly, pass
2822nd subset matches correctly, pass
2833rd subset should not match, pass
2843rd subset should not match, pass
2854th subset should not match, pass
Pau Espin Pedrol600c7992020-11-09 21:17:51 +0100286*** concurrent allocation:
Pau Espin Pedrol600c7992020-11-09 21:17:51 +0100287--- testowner1: Verifying 2 x bts (candidates: 3)
288--- testowner1: Verifying 1 x ip_address (candidates: 5)
289--- testowner1: Verifying 2 x modem (candidates: 4)
Pau Espin Pedrol600c7992020-11-09 21:17:51 +0100290--- testowner1: Reserving 2 x bts (candidates: 3)
291--- testowner1: Reserving 1 x ip_address (candidates: 5)
292--- testowner1: Reserving 2 x modem (candidates: 4)
293- 2nd instance reserve() start
Pau Espin Pedrol600c7992020-11-09 21:17:51 +0100294--- testowner2: Verifying 2 x bts (candidates: 3)
295--- testowner2: Verifying 1 x ip_address (candidates: 5)
296--- testowner2: Verifying 2 x modem (candidates: 4)
Pau Espin Pedrol600c7992020-11-09 21:17:51 +0100297--- testowner2: Reserving 2 x bts (candidates: 1)
298--- testowner2: Unable to reserve resources, too many currently reserved. Waiting until some are available again
299- 1st instance free()
Pau Espin Pedrol600c7992020-11-09 21:17:51 +0100300--- testowner2: Reserving 2 x bts (candidates: 3)
301--- testowner2: Reserving 1 x ip_address (candidates: 5)
302--- testowner2: Reserving 2 x modem (candidates: 4)
303- 2nd instance reserve() done
304*** end: concurrent allocation