summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMaciej Gajdzica <maciejx.t.gajdzica@intel.com>2015-08-12 14:41:27 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-08-17 18:03:40 +0200
commit80ef54b279fc4edde3a91c2a6248f6863c997975 (patch)
tree18f8dd120b45777283ba50038167354cd0383734 /app
parent621389bbbe0860d41538aeac893b6d74e714530c (diff)
downloaddpdk-80ef54b279fc4edde3a91c2a6248f6863c997975.zip
dpdk-80ef54b279fc4edde3a91c2a6248f6863c997975.tar.gz
dpdk-80ef54b279fc4edde3a91c2a6248f6863c997975.tar.xz
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 <maciejx.t.gajdzica@intel.com> Acked-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Diffstat (limited to 'app')
-rw-r--r--app/test/test_table_tables.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c
index 14add77..88bebf8 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;