> On 12 Sep 2018, at 16:06, Ben Pfaff <b...@ovn.org> wrote: > >> On Wed, Sep 12, 2018 at 01:11:03AM +0200, Daniel Alvarez Sanchez wrote: >> I noticed that we're doing a lot of sorting in the JSON code which is not >> needed except for testing. Problem is that if I remove the sorting, then >> most of the tests break. I spent a fair amount of time trying to fix them >> but it's getting harder and harder. >> >> Possibly, the best way to fix it would be to rewrite the tests in some >> other way but I'd like to get your feedback. > > Is it just a matter of the tests expecting JSON to be output in sorted > order? If so, we can pipe output through "ovstest test-json -" to sort > it, e.g.: I don’t think that works. For example:
https://github.com/openvswitch/ovs/blob/master/tests/ovsdb-data.at#L353 We would get the set in different order and the test fails. > > $ echo '{"b":1, "a": 0}' | tests/ovstest test-json - > {"a":0,"b":1}
_______________________________________________ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss