Skip to content

tests/test_ftrace: Fix test_get_all_freqs_data()

Darryl Green requested to merge github/fork/valschneider/tests/p3-dict into master

Created by: valschneider

In Python2, iterating over a dict's keys will always give the same sequence (although the ordering is arbitrary). In Python3 that ordering is still abitrary, but to make things even better it can change from one execution to another.

GenericFTrace.get_all_freqs_data() returns a list who's ordering depends on the keys of the input dictionnary. That in itself would need to be changed to a better design, but for the time being we can fix the test and make Trappy pass reliably by using an OrderedDict.

Merge request reports