From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 671842BFA for ; Fri, 22 Feb 2019 15:45:14 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1MEYrAI020385; Fri, 22 Feb 2019 06:45:13 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=S8bMeysxGJAKHQ7wFxyQXQhuQhKkpJvUT8vFWFHCJ3Q=; b=tefqYiSv2CycuuWKhIiI6AMrUgyLvs/A2s5rO3XkKT4KG56ag8g6FUH4ZK/jIaLXil9W W30+NCCUFAOs52qxCUvLW994zaudW04IyXekdukAEzoGW7cZUsH/NRmWEPvgIOrcc+wg 1bE6m+B43fPNPnIO1nvhu9gnAQUQGeW8O31WDBTR0BlcLLuLXed/w+MrIZzBK5thNP2M yTW4se8pKPHzWPiibwr32due4xwcPa/jmyP1RQRCuQFWvlCcxK+k6T4KeIcinKhACPTB 1zRyba/tva2JPT8ctkL2/5/yx+nzME4BLg2eMxkCVun6s1jRdTsiV2uapW4bGI4AVLyA lA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2qtdt28qwv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 22 Feb 2019 06:45:13 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 22 Feb 2019 06:45:12 -0800 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.56) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Fri, 22 Feb 2019 06:45:12 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S8bMeysxGJAKHQ7wFxyQXQhuQhKkpJvUT8vFWFHCJ3Q=; b=lqC61B4VSXcgV1xJLgsPHrnB3OBPDbrrfs+pvYECru/sKHLpuAJ3fLoTk7vxE5eIZQtIT2Thw0ew+6UCzEbohoeMhuwaD4y84/GDdd6KRp1x1jTZ5T1/aTSJXRcJAh5Y9GWJHa+FHMnAR/KaSZHLcEW9ry9iwXJgetKW9ImvRkQ= Received: from SN1PR18MB2237.namprd18.prod.outlook.com (52.132.199.27) by SN1PR18MB2303.namprd18.prod.outlook.com (52.132.199.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.15; Fri, 22 Feb 2019 14:45:11 +0000 Received: from SN1PR18MB2237.namprd18.prod.outlook.com ([fe80::54e7:8dc7:8a93:b859]) by SN1PR18MB2237.namprd18.prod.outlook.com ([fe80::54e7:8dc7:8a93:b859%4]) with mapi id 15.20.1643.018; Fri, 22 Feb 2019 14:45:11 +0000 From: Harman Kalra To: "john.mcnamara@intel.com" , "marko.kovacevic@intel.com" , "remy.horton@intel.com" , "anatoly.burakov@intel.com" CC: "dev@dpdk.org" , Harman Kalra Thread-Topic: [PATCH 2/2] test/metrics: first test case fails on continuous execution Thread-Index: AQHUyr02gIp7v4jKz0iD6yvqlcpa8g== Date: Fri, 22 Feb 2019 14:45:10 +0000 Message-ID: <1550846689-6615-2-git-send-email-hkalra@marvell.com> References: <1550846689-6615-1-git-send-email-hkalra@marvell.com> In-Reply-To: <1550846689-6615-1-git-send-email-hkalra@marvell.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR0101CA0002.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:18::12) To SN1PR18MB2237.namprd18.prod.outlook.com (2603:10b6:802:2e::27) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e041505b-5f0f-4604-d86b-08d698d458a8 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:SN1PR18MB2303; x-ms-traffictypediagnostic: SN1PR18MB2303: x-microsoft-exchange-diagnostics: 1; SN1PR18MB2303; 20:CgT2sxhe3ExVcsg5PoIYCUxWv+g//0rntCmOcOVk2G+3Yh0eB0bZ4SHgTlUdzeWkXnEzpvTLpvjWeMX2Gtc887BlBA5HpYUPVabclx3/Mb1cJq9Vf9IVPXmTHEg8kBFOLdOigkK+2CCKDyqLLCDHuUi/VepBJc309fSkydnP5vM= x-microsoft-antispam-prvs: x-forefront-prvs: 09565527D6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(366004)(39850400004)(346002)(396003)(136003)(199004)(189003)(4326008)(107886003)(6116002)(36756003)(478600001)(5660300002)(3846002)(7736002)(25786009)(68736007)(305945005)(6436002)(2501003)(106356001)(256004)(6486002)(6512007)(53936002)(14454004)(110136005)(76176011)(186003)(8936002)(6506007)(2906002)(54906003)(86362001)(2201001)(81156014)(2616005)(11346002)(316002)(486006)(99286004)(446003)(55236004)(102836004)(81166006)(476003)(66066001)(50226002)(71200400001)(97736004)(52116002)(26005)(8676002)(386003)(105586002)(71190400001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR18MB2303; H:SN1PR18MB2237.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: M8boOggn1RTOIQuCASD1ZHScWlZRF9PWWlPBsqxp1Ivi0o+gadlBoGeQZq9gbxzEmIrWqWOM71gkClQ51nGOUiVcvssgRSaMxm/ZhtkIdZKgr2kgEdfuGSXSYY4qJsQYNXAhkVbXn9tzHRNvwC/NPB8+nTjQpvG8it2e+TA0Nams8LS75vJZXWKn1rMlQ+pFlTqaWow3964xYLn4tz7IMu9isFD5GOrIDXde44Ur+kufZTvddXfYwu5gNu/D+ilKe4JgTQL7dv28ut50AEyytfAmkizE7+cXo0i83tRsUzx4xtHkrxa/M3dwEKaNdcHLGjC5p2hqWWaa7RMGA71gO98rrCcop89KbfoDQdAopzzs6hqkL6M8iuThT8SHhtL0t8yOiSGmUxcScDMH3EoxrdQVp+OFSezUJNEcwQwIMMI= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: e041505b-5f0f-4604-d86b-08d698d458a8 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Feb 2019 14:45:08.7839 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR18MB2303 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-02-22_10:, , signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902220104 Subject: [dpdk-dev] [PATCH 2/2] test/metrics: first test case fails on continuous execution 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: , X-List-Received-Date: Fri, 22 Feb 2019 14:45:14 -0000 Issue is observed while running 'metrics_autotest' continuously without quiting. During first execution all test cases pass but second run onwards first test case fails as library is already initialized. To resolve, introduced a new API to deinitialise the library after all test cases are executed. Signed-off-by: Harman Kalra --- test/test/test_metrics.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/test/test_metrics.c b/test/test/test_metrics.c index 3c2f36b8a..78b3936ee 100644 --- a/test/test/test_metrics.c +++ b/test/test/test_metrics.c @@ -28,6 +28,19 @@ test_metrics_init(void) return TEST_SUCCESS; } =20 +/* Deinitialize metric module. This function must be called + * from a primary process after metrics usage is over + */ +static int +test_metrics_deinitialize(void) +{ + int err =3D 0; + err =3D rte_metrics_deinit(); + TEST_ASSERT(err =3D=3D 0, "%s, %d", __func__, __LINE__); + + return TEST_SUCCESS; +} + /* Test Case to check failures when memzone init is not done */ static int test_metrics_without_init(void) @@ -300,6 +313,10 @@ static struct unit_test_suite metrics_testsuite =3D { * arraylist, count size */ TEST_CASE(test_metrics_get_values), + + /* TEST CASE 8: Test to unregister metrics*/ + TEST_CASE(test_metrics_deinitialize), + TEST_CASES_END() } }; --=20 2.18.0