From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0A1CDA057B; Wed, 1 Apr 2020 15:16:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C4D841BEA3; Wed, 1 Apr 2020 15:16:08 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5C0FCF12 for ; Wed, 1 Apr 2020 15:16:07 +0200 (CEST) IronPort-SDR: 1dyqNgLostWacUclDQVNY/nPOZBw6qxB1SDpNcQZ5m211SUAmEAD8Or+C9kwJRHxhIULOv6nUZ fDvPna09LPTQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2020 06:16:05 -0700 IronPort-SDR: GazVwRE9M+HJG7Swih/eOh2U5B154HfhYR4rN50mjYaz1SogducdJgv+1mc1AM+Sx4oWWlI7Yk M9sBLajjIEdA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,331,1580803200"; d="scan'208";a="240508887" Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.222.52]) by fmsmga007.fm.intel.com with ESMTP; 01 Apr 2020 06:16:04 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: drc@linux.vnet.ibm.com Date: Wed, 1 Apr 2020 14:11:01 +0100 Message-Id: <4e6d9f131c31f1b9d7fcac58c245225350e87a8b.1585746650.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <156a0627fb472087aad43d9279ab0f684a2367ce.1585746650.git.anatoly.burakov@intel.com> References: <156a0627fb472087aad43d9279ab0f684a2367ce.1585746650.git.anatoly.burakov@intel.com> In-Reply-To: <156a0627fb472087aad43d9279ab0f684a2367ce.1585746650.git.anatoly.burakov@intel.com> References: <156a0627fb472087aad43d9279ab0f684a2367ce.1585746650.git.anatoly.burakov@intel.com> Subject: [dpdk-dev] [PATCH 2/2] test/malloc: add bad parameter tests for realloc X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Realloc did not have bad parameter autotest. Add them. Signed-off-by: Anatoly Burakov --- app/test/test_malloc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c index 3a45a00406..788595ead7 100644 --- a/app/test/test_malloc.c +++ b/app/test/test_malloc.c @@ -826,6 +826,11 @@ test_malloc_bad_params(void) if (bad_ptr != NULL) goto err_return; + /* rte_realloc expected to return null with inappropriate size */ + bad_ptr = rte_realloc(NULL, size, align); + if (bad_ptr != NULL) + goto err_return; + /* rte_malloc expected to return null with inappropriate alignment */ align = 17; size = 1024; @@ -834,6 +839,11 @@ test_malloc_bad_params(void) if (bad_ptr != NULL) goto err_return; + /* rte_realloc expected to return null with inappropriate alignment */ + bad_ptr = rte_realloc(NULL, size, align); + if (bad_ptr != NULL) + goto err_return; + return 0; err_return: -- 2.17.1