2017-03-28 12:30:28 +00:00
- expect solutions:
[0, 1, 2]
[0, 1, 2]
[1, 0, 2]
[1, 2, 0]
- expect failure to solve:
The requested resource requirements are not solvable [[0, 2], [2], [0, 2]]
- test removing a Resources list from itself
2020-05-06 15:29:50 +00:00
ok, 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.
2017-03-28 12:30:28 +00:00
- test removing a Resources list from one with the same list in it
- test resources config and state dir:
2020-05-11 16:30:58 +00:00
cnf -: DBG: Found main configuration file in [PATH]/selftest/resource_test/conf/paths.conf which is [PATH]/selftest/resource_test/conf/paths.conf
cnf -: DBG: MAIN CONFIG:
{'default_suites_conf_path': '[PATH]/selftest/resource_test/conf/default-suites.conf',
'defaults_conf_path': '[PATH]/selftest/resource_test/conf/defaults.conf',
'resource_conf_path': '[PATH]/selftest/resource_test/conf/resources.conf',
2020-05-25 11:26:41 +00:00
'scenarios_dir': ['[PATH]/selftest/resource_test/conf/scenarios'],
2020-05-11 16:30:58 +00:00
'state_dir': '[PATH]/selftest/resource_test/conf/test_work/state_dir',
2020-05-25 11:26:41 +00:00
'suites_dir': ['[PATH]/selftest/resource_test/conf/suite_test'],
2020-05-12 13:06:55 +00:00
'trial_dir': '[PATH]/selftest/resource_test/conf/trial'}
2017-03-28 12:30:28 +00:00
*** all resources:
2020-11-28 18:54:43 +00:00
{'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
2017-03-28 12:30:28 +00:00
'addr': '10.42.42.114',
'band': 'GSM-1800',
2017-08-28 12:31:28 +00:00
'ciphers': ['a5_0', 'a5_1'],
2017-11-23 10:01:24 +00:00
'direct_pcu': 'True',
2017-04-12 00:42:02 +00:00
'ipa_unit_id': '1',
2017-03-28 12:30:28 +00:00
'label': 'sysmoBTS 1002',
2017-08-28 12:31:28 +00:00
'type': 'osmo-bts-sysmo'},
2018-08-27 15:07:41 +00:00
{'_hash': '2158317d5e0055070e7174c2498dedf53a2957e9',
2017-08-28 12:31:28 +00:00
'addr': '10.42.42.50',
2017-03-28 12:30:28 +00:00
'band': 'GSM-1800',
2017-08-28 12:31:28 +00:00
'ciphers': ['a5_0', 'a5_1'],
'ipa_unit_id': '6',
'label': 'Ettus B200',
2018-08-27 15:07:41 +00:00
'osmo_trx': {'clock_reference': 'external', 'launch_trx': 'True'},
2017-08-28 12:31:28 +00:00
'type': 'osmo-bts-trx'},
2018-08-27 15:07:41 +00:00
{'_hash': 'f964ba5fe7a37b97ec3e0c4ef21c9231a19de45d',
2017-08-28 12:31:28 +00:00
'addr': '10.42.42.51',
'band': 'GSM-1800',
'ciphers': ['a5_0', 'a5_1'],
'ipa_unit_id': '7',
'label': 'sysmoCell 5000',
2018-08-27 15:07:41 +00:00
'osmo_trx': {'clock_reference': 'external',
'launch_trx': 'False',
'trx_ip': '10.42.42.112'},
2017-08-28 12:31:28 +00:00
'type': 'osmo-bts-trx'}],
'ip_address': [{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c',
2017-05-18 16:35:32 +00:00
'addr': '10.42.42.2'},
{'_hash': '1c614d6210c551d142aadca8f25e1534ebb2a70f',
2017-08-28 12:31:28 +00:00
'addr': '10.42.42.3'},
{'_hash': '862b529c701adf302477bc126a8032cfc2ec4753',
'addr': '10.42.42.4'},
{'_hash': '05feb6e1e24ca4235889eb28d0a8d5cedac6e5d1',
'addr': '10.42.42.5'},
{'_hash': 'e780ac7581ad29f8f46e637b61d0c38898c4c52c',
'addr': '10.42.42.6'}],
2017-12-14 14:31:10 +00:00
'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0',
'auth_algo': 'comp128v1',
2017-08-28 12:31:28 +00:00
'ciphers': ['a5_0', 'a5_1'],
'imsi': '901700000009031',
'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD',
'label': 'sierra_1',
'path': '/sierra_1'},
2017-12-14 14:31:10 +00:00
{'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3',
'auth_algo': 'comp128v1',
2017-08-28 12:31:28 +00:00
'ciphers': ['a5_0', 'a5_1'],
'imsi': '901700000009029',
'ki': '00969E283349D354A8239E877F2E0866',
'label': 'sierra_2',
'path': '/sierra_2'},
2017-12-14 14:31:10 +00:00
{'_hash': 'f6ba17db2ad13da5ba5c54b5385a774f5351bb5a',
'auth_algo': 'comp128v1',
2017-08-28 12:31:28 +00:00
'ciphers': ['a5_0', 'a5_1'],
'imsi': '901700000009030',
'ki': 'BB70807226393CDBAC8DD3439FF54252',
'label': 'gobi_0',
'path': '/gobi_0'},
2017-12-14 14:31:10 +00:00
{'_hash': 'fbff2e4f06b727fc8a70da23e1d134f9cd763919',
'auth_algo': 'comp128v1',
2017-08-28 12:31:28 +00:00
'ciphers': ['a5_0', 'a5_1'],
'imsi': '901700000009032',
'ki': '2F70DCA43C45ACB97E947FDD0C7CA30A',
'label': 'gobi_3',
'path': '/gobi_3'}]}
2017-03-28 12:30:28 +00:00
*** end: all resources
- request some resources
2020-11-09 20:17:51 +00:00
--- testowner: Verifying 2 x bts (candidates: 3)
--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6
addr: 10.42.42.114
band: GSM-1800
ciphers:
- a5_0
- a5_1
direct_pcu: 'True'
ipa_unit_id: '1'
label: sysmoBTS 1002
type: osmo-bts-sysmo
- _hash: 2158317d5e0055070e7174c2498dedf53a2957e9
addr: 10.42.42.50
band: GSM-1800
ciphers:
- a5_0
- a5_1
ipa_unit_id: '6'
label: Ettus B200
osmo_trx:
clock_reference: external
launch_trx: 'True'
type: osmo-bts-trx
--- testowner: Verifying 1 x ip_address (candidates: 5)
--- testowner: DBG: Picked - _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
addr: 10.42.42.2
--- testowner: Verifying 2 x modem (candidates: 4)
--- testowner: DBG: Picked - _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
auth_algo: comp128v1
ciphers:
- a5_0
- a5_1
imsi: '901700000009031'
ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
label: sierra_1
path: /sierra_1
- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
auth_algo: comp128v1
ciphers:
- a5_0
- a5_1
imsi: '901700000009029'
ki: 00969E283349D354A8239E877F2E0866
label: sierra_2
path: /sierra_2
--- testowner: DBG: FileWatch: scheduling watch for directory [PATH]/selftest/resource_test/conf/test_work/state_dir
2017-05-06 23:16:07 +00:00
--- testowner: Reserving 2 x bts (candidates: 3)
2017-11-23 10:01:24 +00:00
--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6
2017-04-12 00:42:02 +00:00
addr: 10.42.42.114
band: GSM-1800
2017-08-28 12:31:28 +00:00
ciphers:
- a5_0
- a5_1
2017-11-23 10:01:24 +00:00
direct_pcu: 'True'
2017-04-12 00:42:02 +00:00
ipa_unit_id: '1'
label: sysmoBTS 1002
2017-08-28 12:31:28 +00:00
type: osmo-bts-sysmo
2018-08-27 15:07:41 +00:00
- _hash: 2158317d5e0055070e7174c2498dedf53a2957e9
2017-08-28 12:31:28 +00:00
addr: 10.42.42.50
2017-04-12 00:42:02 +00:00
band: GSM-1800
2017-08-28 12:31:28 +00:00
ciphers:
- a5_0
- a5_1
ipa_unit_id: '6'
label: Ettus B200
2018-08-27 15:07:41 +00:00
osmo_trx:
clock_reference: external
launch_trx: 'True'
2017-08-28 12:31:28 +00:00
type: osmo-bts-trx
--- testowner: Reserving 1 x ip_address (candidates: 5)
--- testowner: DBG: Picked - _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
addr: 10.42.42.2
--- testowner: Reserving 2 x modem (candidates: 4)
2017-12-14 14:31:10 +00:00
--- testowner: DBG: Picked - _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
auth_algo: comp128v1
2017-08-28 12:31:28 +00:00
ciphers:
- a5_0
- a5_1
imsi: '901700000009031'
ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
label: sierra_1
path: /sierra_1
2017-12-14 14:31:10 +00:00
- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
auth_algo: comp128v1
2017-08-28 12:31:28 +00:00
ciphers:
- a5_0
- a5_1
imsi: '901700000009029'
ki: 00969E283349D354A8239E877F2E0866
label: sierra_2
path: /sierra_2
2020-11-09 20:17:51 +00:00
--- testowner: DBG: FileWatch: unscheduling watch <ObservedWatch: path=[PATH]/selftest/resource_test/conf/test_work/state_dir, is_recursive=False>
2017-03-28 12:30:28 +00:00
~~~ currently reserved:
bts:
2017-11-23 10:01:24 +00:00
- _hash: d2aa7c1124943de352351b650ca0c751784da6b6
2017-03-28 12:30:28 +00:00
_reserved_by: testowner-123-1490837279
addr: 10.42.42.114
band: GSM-1800
2017-08-28 12:31:28 +00:00
ciphers:
- a5_0
- a5_1
2017-11-23 10:01:24 +00:00
direct_pcu: 'True'
2017-04-12 00:42:02 +00:00
ipa_unit_id: '1'
2017-03-28 12:30:28 +00:00
label: sysmoBTS 1002
2017-08-28 12:31:28 +00:00
type: osmo-bts-sysmo
2018-08-27 15:07:41 +00:00
- _hash: 2158317d5e0055070e7174c2498dedf53a2957e9
2017-03-28 12:30:28 +00:00
_reserved_by: testowner-123-1490837279
2017-08-28 12:31:28 +00:00
addr: 10.42.42.50
2017-03-28 12:30:28 +00:00
band: GSM-1800
2017-08-28 12:31:28 +00:00
ciphers:
- a5_0
- a5_1
ipa_unit_id: '6'
label: Ettus B200
2018-08-27 15:07:41 +00:00
osmo_trx:
clock_reference: external
launch_trx: 'True'
2017-08-28 12:31:28 +00:00
type: osmo-bts-trx
2017-05-18 16:35:32 +00:00
ip_address:
2017-08-28 12:31:28 +00:00
- _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
2017-05-18 16:35:32 +00:00
_reserved_by: testowner-123-1490837279
2017-08-28 12:31:28 +00:00
addr: 10.42.42.2
2017-03-28 12:30:28 +00:00
modem:
2017-12-14 14:31:10 +00:00
- _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
2017-03-28 12:30:28 +00:00
_reserved_by: testowner-123-1490837279
2017-12-14 14:31:10 +00:00
auth_algo: comp128v1
2017-08-28 12:31:28 +00:00
ciphers:
- a5_0
- a5_1
imsi: '901700000009031'
ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
label: sierra_1
path: /sierra_1
2017-12-14 14:31:10 +00:00
- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
2017-03-28 12:30:28 +00:00
_reserved_by: testowner-123-1490837279
2017-12-14 14:31:10 +00:00
auth_algo: comp128v1
2017-08-28 12:31:28 +00:00
ciphers:
- a5_0
- a5_1
imsi: '901700000009029'
ki: 00969E283349D354A8239E877F2E0866
label: sierra_2
path: /sierra_2
2017-03-28 12:30:28 +00:00
~~~ end: currently reserved
2018-08-21 12:58:29 +00:00
~~~ with modifiers:
2020-11-28 18:54:43 +00:00
resources(testowner)={'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
2018-08-21 12:58:29 +00:00
'_reserved_by': 'testowner-123-1490837279',
'addr': '10.42.42.114',
'band': 'GSM-1800',
'ciphers': ['a5_0', 'a5_1'],
'direct_pcu': 'True',
'ipa_unit_id': '1',
'label': 'sysmoBTS 1002',
'type': 'osmo-bts-sysmo'},
2018-08-27 15:07:41 +00:00
{'_hash': '2158317d5e0055070e7174c2498dedf53a2957e9',
2018-08-21 12:58:29 +00:00
'_reserved_by': 'testowner-123-1490837279',
'addr': '10.42.42.50',
'band': 'GSM-1800',
'ciphers': ['a5_0', 'a5_1'],
'ipa_unit_id': '6',
'label': 'Ettus B200',
'num_trx': 2,
2018-08-27 15:07:41 +00:00
'osmo_trx': {'clock_reference': 'external', 'launch_trx': 'True'},
2018-08-21 12:58:29 +00:00
'type': 'osmo-bts-trx'}],
'ip_address': [{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c',
'_reserved_by': 'testowner-123-1490837279',
'addr': '10.42.42.2'}],
'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0',
'_reserved_by': 'testowner-123-1490837279',
'auth_algo': 'comp128v1',
'ciphers': ['a5_0', 'a5_1'],
'imsi': '901700000009031',
'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD',
'label': 'sierra_1',
'path': '/sierra_1'},
{'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3',
'_reserved_by': 'testowner-123-1490837279',
'auth_algo': 'comp128v1',
'ciphers': ['a5_0', 'a5_1'],
'imsi': '901700000009029',
'ki': '00969E283349D354A8239E877F2E0866',
'label': 'sierra_2',
'path': '/sierra_2'}]}
~~~ end: with modifiers:
2017-03-28 12:30:28 +00:00
~~~ currently reserved:
{}
~~~ end: currently reserved
2017-09-14 13:33:15 +00:00
- item_matches:
1st subset matches correctly, pass
2nd subset matches correctly, pass
3rd subset should not match, pass
3rd subset should not match, pass
4th subset should not match, pass
2020-11-09 20:17:51 +00:00
*** concurrent allocation:
--- testowner1: Verifying 2 x bts (candidates: 3)
--- testowner1: Verifying 1 x ip_address (candidates: 5)
--- testowner1: Verifying 2 x modem (candidates: 4)
--- testowner1: Reserving 2 x bts (candidates: 3)
--- testowner1: Reserving 1 x ip_address (candidates: 5)
--- testowner1: Reserving 2 x modem (candidates: 4)
- 2nd instance reserve() start
--- testowner2: Verifying 2 x bts (candidates: 3)
--- testowner2: Verifying 1 x ip_address (candidates: 5)
--- testowner2: Verifying 2 x modem (candidates: 4)
--- testowner2: Reserving 2 x bts (candidates: 1)
--- testowner2: Unable to reserve resources, too many currently reserved. Waiting until some are available again
- 1st instance free()
--- testowner2: Reserving 2 x bts (candidates: 3)
--- testowner2: Reserving 1 x ip_address (candidates: 5)
--- testowner2: Reserving 2 x modem (candidates: 4)
- 2nd instance reserve() done
*** end: concurrent allocation