From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 352F942E9C; Mon, 17 Jul 2023 15:57:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B1BCB40A80; Mon, 17 Jul 2023 15:57:52 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 94B6E40698 for ; Mon, 17 Jul 2023 15:57:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689602270; x=1721138270; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=kNfPy4qC+aPoDVoVZo0qtGsJiJTT3/8igHlv8KRdq3s=; b=Gef5g8VDRCqbOrAM2qO5DurvxxRKfc5dwQdJn4JfeOx3xrTpQ6ApbmHm gQN7j52irPaMhqRVfRm1VzG31Fo9aOAHbslCvkBTUHPipxawLNQOJILaB JfB3gCVn4OktThpzMC6GjumpIBawbCSxgSHPm5M1Zg/c8NU8dj4IgGF7P iFYcmNjcvN+/+yToANh2rbEv6RKIlYbMDCPzl8MLknvSPE+iUMR6UMF+H UF/YvP5xZGHDl0JJSBTWPKAVnDumwbQxmbnTMj6zmyl46+25naTnznMHr 5lY7cStkxX3wXyzGHk8RpL8MS3cYFZn8Q3TFQ3Wp0tkkP77W2HqMWLX67 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10774"; a="429695312" X-IronPort-AV: E=Sophos;i="6.01,211,1684825200"; d="scan'208";a="429695312" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2023 06:57:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10774"; a="813342105" X-IronPort-AV: E=Sophos;i="6.01,211,1684825200"; d="scan'208";a="813342105" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by FMSMGA003.fm.intel.com with ESMTP; 17 Jul 2023 06:57:49 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 17 Jul 2023 06:57:48 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 17 Jul 2023 06:57:48 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Mon, 17 Jul 2023 06:57:48 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.43) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Mon, 17 Jul 2023 06:57:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iJH0ybY5FO5KsPq1U0qBxWr3UXchyatJWGaVTGWwEw5caUQNKHbpsv5Vqr8Hbv0RIl+MJN7Tsyfy56+r4uf7QANravF258jtHcAUgFPv8NY8dv2W8SvMg+5wepS/Qw8/Ok7Lah5HuYwVaRy9zEGIbgtDP5mvCUkLBs+KfbQjenDb6fz8441HE4yXDsK1mhdFT61X0iEuapmQmYs2Ej4ivvrOTwLIq5VD6001actnOv86s6Dgo0ZfrYB2iXBW4f59rUpTNdTqlm2T4R+T3lg0oOPmXlF1oL4MNSATof+K/DZmU6TLDNjjQUlN4i5do8YKgIkKknciL3gPcvKdDcYLcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=B+GfqEabWdlGfmNaIpDwEpdpBB9bwv3wEn4TjJrTHKo=; b=Zogo1i3LgBn7884J/ky21IK6P+sRSwad77pu43RvKs/PBxTtXjbzIeIj9nL/2K+IHDF1p8sVSew3YCbat/XjCnQRSANHR3boqmxGxAo/Cfnzh/kMysf8uZ9aqZffsUEWbuSV3ju7nxUQl7HbEf8a6gM4bSrKsY1Ob9rX/T3E2F2DAhlb8iky+BkeX0RgDUJ+AS/+vy2/30dU0QUTwwnKAyqlq/o01quFfSrIqYcoLtEqD5xj/PURw7dV2tUmnuPk2GBhaX8sQyRsFKVPjigkFxMfFrNcFlLsAJXl7Zh2QPyHeo3OwCHS5GzcXsNBbAs56EU6cLY6wWvQCW51u1Ed6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) by DM4PR11MB5519.namprd11.prod.outlook.com (2603:10b6:5:39e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.31; Mon, 17 Jul 2023 13:57:46 +0000 Received: from DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::d0ad:26fd:7bc2:4487]) by DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::d0ad:26fd:7bc2:4487%3]) with mapi id 15.20.6588.031; Mon, 17 Jul 2023 13:57:45 +0000 Message-ID: <2c75b8f8-d8d9-a396-fd52-90d251e86bae@intel.com> Date: Mon, 17 Jul 2023 14:57:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.13.0 Subject: Re: [PATCH v16 4/6] test/memarea: support alloc and free API test Content-Language: en-US To: Chengwen Feng , , CC: , , , , , References: <20220721044648.6817-1-fengchengwen@huawei.com> <20230710064923.19849-1-fengchengwen@huawei.com> <20230710064923.19849-5-fengchengwen@huawei.com> From: "Burakov, Anatoly" In-Reply-To: <20230710064923.19849-5-fengchengwen@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0467.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1aa::22) To DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB6502:EE_|DM4PR11MB5519:EE_ X-MS-Office365-Filtering-Correlation-Id: d92ee05b-8db4-4232-007f-08db86cdcc48 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dT8EzyAAK53giOu5eY7m34A6n1EfbxffL48+YSwbj54e1+It7hdsDCFpOjy+BH1OYdoKdlQGg9P7TzxdcGtU5Ld34mgFM9GzeFP711wzZar3yaVmWgFQhDO50wTiTMB+gYQjZtkDmcHBoKxNO2HR7fd0PSXYWasSLEZxX5yJ8+9BNHtirs+bnWb62Gd85NWTLpMzhZQUX0JpHV1eYJEEOoOz4fF6XvKilOTYxbeuUSxXwYIbbJehMyZdLwdUUAq4JiXi7qRb0dXRY8AFZJG1K1dCNh4oJeP764o0ifGGRYoTQKgdYJ8mL8WS7sbbnrSUTq6g3DF3KOIp/Ux9EAqXxFAOiWhBdMGAU9gbA/OMuxPogCJ8PepTvSlGcf6YNjEPfKCYBiUrlqfaCughIvxbYDnr0nMKXqzHTNCtPftpEkF6xcGyv4niCchlr/u6sehslYJaURGydB4zGQLEIrpzGZJAoySW6LvQqXJgfEd9EippCmK9/oimYGobeQRSwjiL8nMCLFP7aR2eLNPQ0ttkgtKxzq/YX7FY9JnZ5pVSLMNUfeIqSfq6lDZ0VBuD2FS3p/bnC5tME84H04HnAHug0VNglHOrdusajmE2iY/a22daHwyFm5YAKtXoEwCw4kAynXTvOsWqW1a4Rn4O6lJ8uOcnUyOh7ZMQTxrayKvUatE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB6502.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(346002)(396003)(366004)(39860400002)(136003)(376002)(451199021)(6666004)(82960400001)(38100700002)(6486002)(41300700001)(8676002)(8936002)(478600001)(5660300002)(66476007)(316002)(4326008)(66946007)(66556008)(2616005)(186003)(6512007)(6506007)(26005)(53546011)(86362001)(31696002)(36756003)(2906002)(31686004)(20703003)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?c2d3Zm5QZTZJbmZUc1hBLzFOYXBDNHQ0Y0xmTGlIemxPU0Z4MjZZQThIY1RX?= =?utf-8?B?bHE2NmhKRzBsMEV3WHExVUE0TzkvY2sxbGVWZGdTMDdRWmM4Snc3R2x3WGpO?= =?utf-8?B?TmwrZ3VEOHlpKzRnK1ZOai8wYzVydnVReTFHeEoyREZGakJCUldHbmN0NUFE?= =?utf-8?B?cWhNTEZFL2xFWnRqYWtEKytBaWtzWHV0VmJTcVp2NXFxYlpFOGhJMVAyYU5M?= =?utf-8?B?V1ZwQUdsMThRSEZtYk9lZ3k3W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N3blpm?= =?utf-8?B?QVpiYUxUTHZBcHAraDgrUm5WaTN3WnQwMGc4SFFQZXRPODJ6bU9JcWxPZlF1?= =?utf-8?B?MUFpR1lNeUtlcXU3SDl3eEU2dVNDM3FKdEx0aTFnVlJSZ0JLMVB1UTNMeGtP?= =?utf-8?B?Mnc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: d92ee05b-8db4-4232-007f-08db86cdcc48 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6502.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2023 13:57:45.7947 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2f25VzKatmyFuG1kTJJaKkndoPh56bL6Lx+eHh654Iv4Nr7pbw8Vmk0X7T5g2VMbvws6Dou/z4aXSVjEwQfxkOyvag7BEwMRsaHCLw7SNag= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5519 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 7/10/2023 7:49 AM, Chengwen Feng wrote: > This patch supports rte_memarea_alloc() and rte_memarea_free() API > test. > > Signed-off-by: Chengwen Feng > Reviewed-by: Dongdong Liu > Acked-by: Morten Brørup > --- > +static int > +test_memarea_free_fail(void) > +{ > + struct rte_memarea_param init; > + struct rte_memarea *ma; > + void *ptr; > + > + test_memarea_init_param(&init); > + init.source = RTE_MEMAREA_SOURCE_LIBC; > + init.total_sz = MEMAREA_TEST_DEFAULT_SIZE; > + ma = rte_memarea_create(&init); > + TEST_ASSERT(ma != NULL, "Expected Non-NULL"); > + > + /* test repeat free */ > + rte_errno = 0; > + ptr = rte_memarea_alloc(ma, MEMAREA_TEST_DEFAULT_SIZE >> 1); > + TEST_ASSERT(ptr != NULL, "Expected Non-NULL"); > + test_memarea_fill_region(ptr, MEMAREA_TEST_DEFAULT_SIZE >> 1); > + rte_memarea_free(ma, ptr); > + TEST_ASSERT(rte_errno == 0, "Expected Zero"); > + rte_memarea_free(ma, ptr); > + TEST_ASSERT(rte_errno == EFAULT, "Expected EFAULT"); > + > + rte_memarea_destroy(ma); > + > + return 0; Same as in other, I think TEST_SUCCESS would be more correct (even though DPDK codebase doesn't always follow that convention). Acked-by: Anatoly Burakov -- Thanks, Anatoly