From: Maciej Gajdzica Date: Wed, 12 Aug 2015 12:41:27 +0000 (+0200) Subject: app/test: fix table alignment check X-Git-Tag: spdx-start~8507 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=80ef54b279fc4edde3a91c2a6248f6863c997975;p=dpdk.git app/test: fix table alignment check In commit: 1129992baa61d72c5 checking for offset alignment was removed. Unit tests wasn't updated to reflect that change. This patch changes checks with unaligned offsets to make tests pass. Fixes: 1129992baa61 ("port: fix unaligned access to metadata") Signed-off-by: Maciej Gajdzica Acked-by: Daniel Mrzyglod --- diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c index 14add77325..88bebf8c73 100644 --- a/app/test/test_table_tables.c +++ b/app/test/test_table_tables.c @@ -226,7 +226,7 @@ test_table_array(void) array_params.offset = 1; table = rte_table_array_ops.f_create(&array_params, 0, 1); - if (table != NULL) + if (table == NULL) return -4; array_params.offset = 32; @@ -652,14 +652,14 @@ test_table_hash_lru_generic(struct rte_table_ops *ops) hash_params.signature_offset = 1; table = ops->f_create(&hash_params, 0, 1); - if (table != NULL) + if (table == NULL) return -2; hash_params.signature_offset = 0; hash_params.key_offset = 1; table = ops->f_create(&hash_params, 0, 1); - if (table != NULL) + if (table == NULL) return -3; hash_params.key_offset = 32; @@ -765,14 +765,14 @@ test_table_hash_ext_generic(struct rte_table_ops *ops) hash_params.n_entries_ext = 1 << 4; hash_params.signature_offset = 1; table = ops->f_create(&hash_params, 0, 1); - if (table != NULL) + if (table == NULL) return -2; hash_params.signature_offset = 0; hash_params.key_offset = 1; table = ops->f_create(&hash_params, 0, 1); - if (table != NULL) + if (table == NULL) return -3; hash_params.key_offset = 32;