@@ -1212,6 +1212,9 @@ SortTest: Empty input
1212
1212
--- Sorted entities (output):
1213
1213
<empty>
1214
1214
1215
+ --- Non-stable sorted entities (output):
1216
+ <empty>
1217
+
1215
1218
=========================================================================
1216
1219
SortTest: EntryWithOneKey{key-a} -> EntryThatRefersTo{key-a}
1217
1220
=========================================================================
@@ -1260,6 +1263,28 @@ referring_by_action_table_entry {
1260
1263
}
1261
1264
}
1262
1265
1266
+ --- Non-stable sorted entities (output):
1267
+ one_match_field_table_entry {
1268
+ match {
1269
+ id: "key-a"
1270
+ }
1271
+ action {
1272
+ do_thing_4 {
1273
+ }
1274
+ }
1275
+ }
1276
+
1277
+ referring_by_action_table_entry {
1278
+ match {
1279
+ val: "0x001"
1280
+ }
1281
+ action {
1282
+ referring_to_one_match_field_action {
1283
+ referring_id_1: "key-a"
1284
+ }
1285
+ }
1286
+ }
1287
+
1263
1288
=========================================================================
1264
1289
SortTest: EntryWithOneKey{key-a} -> EntryThatRefersTo{key-a, 0x002}
1265
1290
=========================================================================
@@ -1310,6 +1335,29 @@ referring_by_action_table_entry {
1310
1335
}
1311
1336
}
1312
1337
1338
+ --- Non-stable sorted entities (output):
1339
+ one_match_field_table_entry {
1340
+ match {
1341
+ id: "key-a"
1342
+ }
1343
+ action {
1344
+ do_thing_4 {
1345
+ }
1346
+ }
1347
+ }
1348
+
1349
+ referring_by_action_table_entry {
1350
+ match {
1351
+ val: "0x001"
1352
+ }
1353
+ action {
1354
+ referring_to_two_match_fields_action {
1355
+ referring_id_1: "key-a"
1356
+ referring_id_2: "0x002"
1357
+ }
1358
+ }
1359
+ }
1360
+
1313
1361
=========================================================================
1314
1362
SortTest: EntryWithTwoKeys{key-a, 0x002} -> EntryThatRefersTo{key-a, 0x002}
1315
1363
=========================================================================
@@ -1362,6 +1410,30 @@ referring_by_action_table_entry {
1362
1410
}
1363
1411
}
1364
1412
1413
+ --- Non-stable sorted entities (output):
1414
+ two_match_fields_table_entry {
1415
+ match {
1416
+ id_1: "key-a"
1417
+ id_2: "0x002"
1418
+ }
1419
+ action {
1420
+ do_thing_4 {
1421
+ }
1422
+ }
1423
+ }
1424
+
1425
+ referring_by_action_table_entry {
1426
+ match {
1427
+ val: "0x001"
1428
+ }
1429
+ action {
1430
+ referring_to_two_match_fields_action {
1431
+ referring_id_1: "key-a"
1432
+ referring_id_2: "0x002"
1433
+ }
1434
+ }
1435
+ }
1436
+
1365
1437
=========================================================================
1366
1438
SortTest: EntryThatRefersTo{key-a, 0x002} -> EntryWithTwoKeys{key-c, 0x004}
1367
1439
=========================================================================
@@ -1414,6 +1486,30 @@ referring_by_action_table_entry {
1414
1486
}
1415
1487
}
1416
1488
1489
+ --- Non-stable sorted entities (output):
1490
+ two_match_fields_table_entry {
1491
+ match {
1492
+ id_1: "key-c"
1493
+ id_2: "0x004"
1494
+ }
1495
+ action {
1496
+ do_thing_4 {
1497
+ }
1498
+ }
1499
+ }
1500
+
1501
+ referring_by_action_table_entry {
1502
+ match {
1503
+ val: "0x001"
1504
+ }
1505
+ action {
1506
+ referring_to_two_match_fields_action {
1507
+ referring_id_1: "key-a"
1508
+ referring_id_2: "0x002"
1509
+ }
1510
+ }
1511
+ }
1512
+
1417
1513
=========================================================================
1418
1514
SortTest: Entries at same rank should maintain the original order.
1419
1515
=========================================================================
@@ -1470,6 +1566,32 @@ referring_by_action_table_entry {
1470
1566
}
1471
1567
}
1472
1568
1569
+ --- Non-stable sorted entities (output):
1570
+ packet_count_and_meter_table_entry {
1571
+ match {
1572
+ ipv4 {
1573
+ value: "16.36.50.0"
1574
+ prefix_length: 24
1575
+ }
1576
+ }
1577
+ action {
1578
+ packet_count_and_meter {
1579
+ }
1580
+ }
1581
+ }
1582
+
1583
+ referring_by_action_table_entry {
1584
+ match {
1585
+ val: "0x001"
1586
+ }
1587
+ action {
1588
+ referring_to_two_match_fields_action {
1589
+ referring_id_1: "key-a"
1590
+ referring_id_2: "0x002"
1591
+ }
1592
+ }
1593
+ }
1594
+
1473
1595
=========================================================================
1474
1596
SortTest: EntryWithOneKey{key-a} -> EntryThatRefersTo{key-a} , another entry
1475
1597
=========================================================================
@@ -1544,6 +1666,41 @@ referring_by_action_table_entry {
1544
1666
}
1545
1667
}
1546
1668
1669
+ --- Non-stable sorted entities (output):
1670
+ lpm2_table_entry {
1671
+ match {
1672
+ ipv6 {
1673
+ value: "ffff::abcd:0:0"
1674
+ prefix_length: 96
1675
+ }
1676
+ }
1677
+ action {
1678
+ NoAction {
1679
+ }
1680
+ }
1681
+ }
1682
+
1683
+ one_match_field_table_entry {
1684
+ match {
1685
+ id: "key-a"
1686
+ }
1687
+ action {
1688
+ do_thing_4 {
1689
+ }
1690
+ }
1691
+ }
1692
+
1693
+ referring_by_action_table_entry {
1694
+ match {
1695
+ val: "0x001"
1696
+ }
1697
+ action {
1698
+ referring_to_one_match_field_action {
1699
+ referring_id_1: "key-a"
1700
+ }
1701
+ }
1702
+ }
1703
+
1547
1704
=========================================================================
1548
1705
SortTest: EntryWithOneKey{key-a} -> EntryThatRefersTo{key-a} ,EntryWithOneKey{key-b} -> EntryThatRefersTo{key-b}
1549
1706
=========================================================================
@@ -1638,6 +1795,51 @@ referring_by_action_table_entry {
1638
1795
}
1639
1796
}
1640
1797
1798
+ --- Non-stable sorted entities (output):
1799
+ two_match_fields_table_entry {
1800
+ match {
1801
+ id_1: "key-c"
1802
+ id_2: "0x004"
1803
+ }
1804
+ action {
1805
+ do_thing_4 {
1806
+ }
1807
+ }
1808
+ }
1809
+
1810
+ one_match_field_table_entry {
1811
+ match {
1812
+ id: "key-a"
1813
+ }
1814
+ action {
1815
+ do_thing_4 {
1816
+ }
1817
+ }
1818
+ }
1819
+
1820
+ referring_by_action_table_entry {
1821
+ match {
1822
+ val: "0x001"
1823
+ }
1824
+ action {
1825
+ referring_to_two_match_fields_action {
1826
+ referring_id_1: "key-a"
1827
+ referring_id_2: "0x002"
1828
+ }
1829
+ }
1830
+ }
1831
+
1832
+ referring_by_action_table_entry {
1833
+ match {
1834
+ val: "0x001"
1835
+ }
1836
+ action {
1837
+ referring_to_one_match_field_action {
1838
+ referring_id_1: "key-a"
1839
+ }
1840
+ }
1841
+ }
1842
+
1641
1843
=========================================================================
1642
1844
SortTest: two_match_fields_table_entry -> referring_by_match_field_table_entry
1643
1845
=========================================================================
@@ -1688,6 +1890,29 @@ referring_by_match_field_table_entry {
1688
1890
}
1689
1891
}
1690
1892
1893
+ --- Non-stable sorted entities (output):
1894
+ two_match_fields_table_entry {
1895
+ match {
1896
+ id_1: "key-a"
1897
+ id_2: "0x001"
1898
+ }
1899
+ action {
1900
+ do_thing_4 {
1901
+ }
1902
+ }
1903
+ }
1904
+
1905
+ referring_by_match_field_table_entry {
1906
+ match {
1907
+ referring_id_1: "key-a"
1908
+ referring_id_2: "0x001"
1909
+ }
1910
+ action {
1911
+ do_thing_4 {
1912
+ }
1913
+ }
1914
+ }
1915
+
1691
1916
=========================================================================
1692
1917
GetEntriesUnreachableFromRootsTest: Empty input generates no garbage.
1693
1918
=========================================================================
0 commit comments