From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E1EEF8D3A for ; Wed, 12 Aug 2015 14:44:10 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 12 Aug 2015 05:44:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,660,1432623600"; d="scan'208";a="782664648" Received: from unknown (HELO stargo) ([10.217.248.233]) by orsmga002.jf.intel.com with SMTP; 12 Aug 2015 05:44:07 -0700 Received: by stargo (sSMTP sendmail emulation); Wed, 12 Aug 2015 14:41:40 +0200 From: Maciej Gajdzica To: dev@dpdk.org Date: Wed, 12 Aug 2015 14:41:27 +0200 Message-Id: <1439383287-28447-2-git-send-email-maciejx.t.gajdzica@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1439383287-28447-1-git-send-email-maciejx.t.gajdzica@intel.com> References: <1439383287-28447-1-git-send-email-maciejx.t.gajdzica@intel.com> Subject: [dpdk-dev] [PATCH 1/1] test_table: fixed failing unit tests checking offset X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2015 12:44:11 -0000 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. Signed-off-by: Maciej Gajdzica --- app/test/test_table_tables.c | 10 +++++----- 1 file 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; -- 1.7.9.5