diff options
author | Alex Wang <alexw@nicira.com> | 2015-02-27 09:07:18 -0800 |
---|---|---|
committer | Alex Wang <alexw@nicira.com> | 2015-02-27 09:07:18 -0800 |
commit | 2a638b8d22be66bb631b2273a72cd4c8451de065 (patch) | |
tree | 4007bc15b1de16f71abe8824cc4a7b87fcb5824d /tests/test-hash.c | |
parent | 135fec593706a47dad4a9debdd50e6c13aa06f86 (diff) | |
download | openvswitch-2a638b8d22be66bb631b2273a72cd4c8451de065.tar.gz |
test-hash: Remove the check_word_hash() for hash_bytes128_cb.
The original test fails on big-endian system due to the hash function
performing not as well when input is uint32_t. In reality, users should
only use hash_bytes128() to hash words larger than 128 bits (e.g. struct
flow). Besides, we do check the 1-bit set case for 16 128-bit words in
following test case. Therefore, the cleanest way to fix the failure
in big-endian system seems to be just removing the check_word_hash()
test for hash_bytes128_cb.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'tests/test-hash.c')
-rw-r--r-- | tests/test-hash.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/tests/test-hash.c b/tests/test-hash.c index fee6a5c3b..5032d323b 100644 --- a/tests/test-hash.c +++ b/tests/test-hash.c @@ -69,15 +69,6 @@ hash_int_cb(uint32_t input) return hash_int(input, 0); } -static uint32_t -hash_bytes128_cb(uint32_t input) -{ - ovs_u128 hash; - - hash_bytes128(&input, sizeof input, 0, &hash); - return hash.u64.lo; -} - static void check_word_hash(uint32_t (*hash)(uint32_t), const char *name, int min_unique) @@ -249,7 +240,6 @@ test_hash_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) * function. */ check_word_hash(hash_int_cb, "hash_int", 12); - check_word_hash(hash_bytes128_cb, "hash_bytes128", 12); /* Check that all hashes computed with hash_bytes128 with 1-bit (or no * 1-bits) set within 16 128-bit words have different values in their |