From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 0A5651B1BC for ; Wed, 24 Jan 2018 16:41:24 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id B140222701; Wed, 24 Jan 2018 10:41:23 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:41:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=FCxprnUbz3iRHBTIJ RLbGD/7pgJXkGBdubsZPXMEInk=; b=QYpAKfxrX7Pt/BMckHYrlZQq75j8bIxyb S1mS+4vAs84+XFVEnt2ECrGzniDharIWZz0Wi1rTWf1o828ech08ZUJJo12tfCJc BZzBAUGhzCGikUl/B7pvL/2o49B7vSTdvglOMvb4lp2fkiihOVKThhLjvQpdgRNB koS2awO6hGs/5jYIWwDs+5Z0fFz46l49IZrxOdi0Vl2ZdE4n9oraNC0bxx4lzhWQ NIutBx4WyBMJY9CZNX23UUJ5g02sozDeXDJp7KxXiwSwZEeIjVFuF0I1DY30HJ+h bp8hUFi53p1CVKC2l4uzEc5QJcbqPVaZdeO41LzQ4vjZ7LigmgCdw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=FCxprnUbz3iRHBTIJRLbGD/7pgJXkGBdubsZPXMEInk=; b=RvBH7TBY XqkcfBjurZ8TV5fvaMeK6EiPln1LqHPQX8dkHZ8wEZ0qajBgFe5iEwRSzB4DrDC5 6x1fMwelwR+6AT1PBOfzsnSFvcRgjz26rPVO0sb02btUyIo89sZd/wvJD6ZjI0wC wWGiFW3G6Osf9PdzQgCEzPZDlcK9ZrXeVSfTVSw9F20agYzQs+Vy6pacR50V9ter cSRllTEPQ/Ub6AiYhR+vB3zVHTAzl8TaqMIK6AUwNw3ce4gHlj2YvG8dW4rmnqMK F0KQz2Dmu5oZG6cGntX2RXXX4lwaDTvI0Y4ufzZWq4hXSYryQjgy1FOV0o0/WIVP BjYufKB2FVMjug== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id F1D857E448; Wed, 24 Jan 2018 10:41:21 -0500 (EST) From: Yuanhan Liu To: Anatoly Burakov Cc: dpdk stable Date: Wed, 24 Jan 2018 23:33:11 +0800 Message-Id: <1516808026-25523-123-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'test/memzone: fix wrong test' has been queued to LTS release 17.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2018 15:41:24 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 58b4dcdf7d6b6a10686ff681773059cae373b5d7 Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Thu, 21 Dec 2017 18:19:44 +0000 Subject: [PATCH] test/memzone: fix wrong test [ upstream commit 82da6af3ca4ad9aa1316792f90b2f88cd3020456 ] When reserving memzones in autotest, it makes no sense to expect a failed memzone reserve when we specify both size flags - instead, we should expect a memzone reserved with one of the two sizes. Fixes: af75078fece3 ("first public release") Signed-off-by: Anatoly Burakov --- test/test/test_memzone.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c index 1cf235a..49b6b68 100644 --- a/test/test/test_memzone.c +++ b/test/test/test_memzone.c @@ -289,10 +289,19 @@ test_memzone_reserve_flags(void) if (hugepage_2MB_avail && hugepage_1GB_avail) { mz = rte_memzone_reserve("flag_zone_2M_HINT", size, SOCKET_ID_ANY, RTE_MEMZONE_2MB|RTE_MEMZONE_1GB); - if (mz != NULL) { + if (mz == NULL) { printf("BOTH SIZES SET\n"); return -1; } + if (mz->hugepage_sz != RTE_PGSIZE_1G && + mz->hugepage_sz != RTE_PGSIZE_2M) { + printf("Wrong size when both sizes set\n"); + return -1; + } + if (rte_memzone_free(mz)) { + printf("Fail memzone free\n"); + return -1; + } } } /* @@ -424,10 +433,19 @@ test_memzone_reserve_flags(void) mz = rte_memzone_reserve("flag_zone_16M_HINT", size, SOCKET_ID_ANY, RTE_MEMZONE_16MB|RTE_MEMZONE_16GB); - if (mz != NULL) { + if (mz == NULL) { printf("BOTH SIZES SET\n"); return -1; } + if (mz->hugepage_sz != RTE_PGSIZE_16G && + mz->hugepage_sz != RTE_PGSIZE_16M) { + printf("Wrong size when both sizes set\n"); + return -1; + } + if (rte_memzone_free(mz)) { + printf("Fail memzone free\n"); + return -1; + } } } return 0; -- 2.7.4