tests: Avoid endianness sensitivity in MPLS handling test.
authorBen Pfaff <blp@ovn.org>
Fri, 27 May 2016 00:02:38 +0000 (17:02 -0700)
committerBen Pfaff <blp@ovn.org>
Fri, 3 Jun 2016 20:18:28 +0000 (13:18 -0700)
commit961cf8e090ec977f890df3da1b65b7d94d218cbe
treeff29324f5bfc15686d3e86522dd0d147f43d1a04
parent3a6e67fa5267eed92e351b8da2eb68d0ba71df41
tests: Avoid endianness sensitivity in MPLS handling test.

The test "ofproto-dpif - MPLS handling" included a test of the "multipath"
action whose results depended on the hash function in use.  The OVS hash
function yields different results on little-endian and big-endian systems,
so this caused a failure.

This commit fixes the problem by changing the modulus in the multipath
action from 256 to 1; any (nonnegative) value modulo 1 is 0, so this makes
the results consistent across endianness (and across hash function
changes).  I think that this is still a good enough test.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Gerhard Stenzel <gstenzel@linux.vnet.ibm.com>
tests/ofproto-dpif.at