-
Bug
-
Resolution: Open
-
Low
-
None
-
None
Some classify tests started to fail when added more tests to classifier test suite. All these tests works well when executed separately. Failing tests are not always the same - it depends on the order of tests execution.
The issue is that there is set incorrect hex mask and match value although the input values to python-api are correct:
- python-api calls from make_test log
API: classify_add_del_table ({'next_table_index': 4294967295, 'is_add': 1, 'memory_size': 2097152, 'table_index': 4294967295, 'skip_n_vectors': 0, 'current_data_flag': 1, 'current_data_offset': 0, 'miss_next_index': 0, 'match_n_vectors': 2, 'mask': '\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff', 'nbuckets': 2})
API: classify_add_del_session ({'advance': 0, 'match': '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00&', 'table_index': 0, 'action': 0, 'is_add': 1, 'opaque_index': 0, 'hit_next_index': 4294967295, 'metadata': 0})
- api call from make_test log
SCRIPT: classify_add_del_table nbuckets 2 memory_size 2097152 skip 0 match 2 next-table -1 miss-next 0 current-data-flag 1 current-data-offset 0 mask hex 000000000000000000ff00000000000000000000ffff65722d4b506b5168712f
SCRIPT: classify_add_del_session table_index 0 hit_next_index -1 opaque_index 0 advance 0 action 0 match hex 00000000000000000011000000000000000000000026000000ff00000000000000000000ffff65722d4b506b5168712f7067305f696e2e7063617020736f7572636520706730206e616d652070636170
- resulting table
CLI: show classify table verbose
TableIdx Sessions NextTbl NextNode
0 1 -1 0
Heap: 3 objects, 212 of 2k used, 68 free, 0 reclaimed, 1k overhead, 2044k capacity
nbuckets 2, skip 0 match 2 flag 1 offset 0
mask 000000000000000000ff00000000000000000000ffff436c6173736966696572
linear-search buckets 0
[1]: heap offset 192, elts 2, normal
0: [192]: next_index -1 advance 0 opaque 0 action 0 metadata 0
k: 0000000000000000001100000000000000000000002640602171626964606572
hits 0, last_heard 0.00
1 active elements
1 free lists
0 linear-search buckets
Tests fail in case that classify tables are not deleted (e.i. TableIdx is increasing) as well as in case that classify table is deleted after test (e.i. always created classify table with TableIdx=0). The only working workaround is splitting tests to more tests classes (vpp started per test class).
There is make_test log extraction from run with deleting classify table after test in the attachment.