From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 632032B9E; Fri, 1 Mar 2019 11:07:49 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x21A2Q9T012794; Fri, 1 Mar 2019 02:07:48 -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=cCpvJUTGt1oghhhaNNtzjmSIyz/t3vOsugaAfjqXZCs=; b=qyFJzJSYhEaAZmz+MrzQQZBA/JqtuVebeNicXMsdFT39JbadUQ7nmFazb25ehsqpieyT JnMBlwoWqlqX4sCgMHcZhWKGi93vVb0mRnpYjJ3EFBYDbNLhli8uJkWuNLtl6O8dipSV JfiwgeA/WOU9ntcSBgxEqbBNRZ26ZHSHRmxTL1InhfB5AMyyPq47P9Rs2lhsFTiXRPjs dAUqg11OUf3VuSf86ooLrXjIRp2D8Trkq0D+Uh0xfaWzjPvlRLySym2Y887UYBrIKepx l+u6BMAfieqNMfbPddlEWDeN8vlkZZg3IoCRGexU14PEBcx2dgATPf7o7soteAh+5o9n /w== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2qxce638ax-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 01 Mar 2019 02:07:47 -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, 1 Mar 2019 02:07:45 -0800 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (104.47.44.52) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Fri, 1 Mar 2019 02:07:45 -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=cCpvJUTGt1oghhhaNNtzjmSIyz/t3vOsugaAfjqXZCs=; b=oPRjjgr+r7J+WzcJ9mTwzYYpotDA6rIdnLtSybSDNI2y/F3ES61zMep8vyFwzqcwu4iD5NlyRQDq7oMEzDuT5tVgw2JQhmzujtD74feOSUkOsMmNraxDaucV3LRDwUVPD+187LKaQGErgPqsNIQMIbok6QRHB51IpOKtY8A9qPY= Received: from SN1PR18MB2237.namprd18.prod.outlook.com (52.132.199.27) by SN1PR18MB2126.namprd18.prod.outlook.com (52.132.196.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.18; Fri, 1 Mar 2019 10:07:41 +0000 Received: from SN1PR18MB2237.namprd18.prod.outlook.com ([fe80::ad6a:84a9:7b19:f901]) by SN1PR18MB2237.namprd18.prod.outlook.com ([fe80::ad6a:84a9:7b19:f901%2]) with mapi id 15.20.1665.015; Fri, 1 Mar 2019 10:07:41 +0000 From: Harman Kalra To: "remy.horton@intel.com" , "anatoly.burakov@intel.com" , "marko.kovacevic@intel.com" , "john.mcnamara@intel.com" CC: "dev@dpdk.org" , "stable@dpdk.org" , "Harman Kalra" Thread-Topic: [PATCH v2 2/2] test/metrics: first test case fails on continuous Thread-Index: AQHU0Babr6KeaxMwp06ThyLiSBGbVQ== Date: Fri, 1 Mar 2019 10:07:41 +0000 Message-ID: <1551434828-3518-2-git-send-email-hkalra@marvell.com> References: <1551264691-26353-1-git-send-email-hkalra@marvell.com> <1551434828-3518-1-git-send-email-hkalra@marvell.com> In-Reply-To: <1551434828-3518-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: BM1PR0101CA0064.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::26) 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: 117e42f3-46ae-4c65-8b9b-08d69e2dbdbb x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:SN1PR18MB2126; x-ms-traffictypediagnostic: SN1PR18MB2126: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; SN1PR18MB2126; 23:5TQZ+zCQh1baxv9nLslLnoUjQoSd8dOVLO7GU65?= =?iso-8859-1?Q?NBBIgQhOcW5CxDunnWosNsK6dj/c4znbOyLypA5X0v0/8pSuwFxDAE5leC?= =?iso-8859-1?Q?dk8qXlH4n1yudFl8gz8j3icWZoTlkmV7mR25CPCm8GEZGGArzBTFlrnLtT?= =?iso-8859-1?Q?h1bRlto2mIB8wRbrskq4X6Vj3n4yWluRFbMwB00gRR7zc+ktw3btLKT88D?= =?iso-8859-1?Q?SXln5sRcks2b8VFKcVsrE77YVQgMSIUPtgMtd5/jejeAFKeqjeC1L2ycbj?= =?iso-8859-1?Q?HQYZUZrgY2pwi/+DM4+Rh3VA/2861FydUeEOMeROWTInK2DF2uLF3rkg3e?= =?iso-8859-1?Q?wj1aoiUovv5aCT9oP+hhXR+thZHgHO2NuvenwCDkQEVIq3so4wus1a3ysT?= =?iso-8859-1?Q?g6CssZh6MSoIctcuxyxySM6b5kKgIh4/CEmlaXg1EyDYPof4Drq9WsURZp?= =?iso-8859-1?Q?9AJ6YnNCnwxUoOjVx/nRyrzyERVJMs4McUQ44VsQOd6ZREYERRWYY5yJuf?= =?iso-8859-1?Q?UkM86qKetpiTqDHsakENvouwubvylZaEgyW8Z4OPAUeXLiQ1lJ7zMPKLnn?= =?iso-8859-1?Q?7iZ29qHPBoXEUqn0Hm0dWKUa75/HmX8F4vvB14uasGGtHS8rdN/1TDHI4Q?= =?iso-8859-1?Q?l/Y+80ChW1gocdsfSDG+Ms2gfFFDUChnrmjTqwl7oU4Ye5o7yqEmvYQet0?= =?iso-8859-1?Q?AIjs9VrRPvT2iKnOvoqOGOAoDBqdzVcgvn+Sn4TqBopGVUVu/pHZ9z+EL2?= =?iso-8859-1?Q?du79oPcJc7DSKabWIy/hNWHM16IEKqPo+NMUZ3WgniNvnPHuMVKNJvP9G7?= =?iso-8859-1?Q?h3rZ/sbqwzr6hDhnaNW0Qgen23UTL+ueRG1Z1znG5oGZqLL9ENt96PfgcC?= =?iso-8859-1?Q?8mFtjosoguPLm025/UC5tbjzvT2O4kilehpRUoINM/GkwRYv3gC701nmsC?= =?iso-8859-1?Q?iMkCECNIV297Kn8AwtjZK/0mhpJ+podsFOnIBz0DMR6Or2/Egxh9od3iLN?= =?iso-8859-1?Q?uiBjYSvBH1i2+Gmt7gdyPBU0NW8gRicdqCTR/dVBOC6V1QLYo8qU+ft978?= =?iso-8859-1?Q?SAKo605db35+CV4XozNEW808F6KcxxM2iJ0gbo7m0qFG9OsoY0THioPw0b?= =?iso-8859-1?Q?/oDyTufvhvw4+40rpJp29xU8UoVZrOjYqdJEqdPCTpQn5tNgqhGN94df8s?= =?iso-8859-1?Q?G04tQ/m9TdXoRtBLh/whUn80BOj7TgNUquTAVM+cXZYzb6LXFBtZpi9q+I?= =?iso-8859-1?Q?Pb8Y7aGvufe/5LVJwOmKE8VMXZz3R9q/6BzTevrfXT/JuzBN7FnQq8A37o?= =?iso-8859-1?Q?pAqbHbCrpm/mDZvUfmuATU/?= x-microsoft-antispam-prvs: x-forefront-prvs: 09634B1196 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(346002)(366004)(376002)(396003)(39860400002)(199004)(189003)(106356001)(305945005)(68736007)(86362001)(50226002)(36756003)(8936002)(105586002)(7736002)(6486002)(107886003)(97736004)(66066001)(5660300002)(3846002)(76176011)(478600001)(2906002)(6116002)(316002)(2501003)(25786009)(386003)(6506007)(186003)(14454004)(6436002)(256004)(53936002)(81166006)(71200400001)(71190400001)(4326008)(2201001)(110136005)(486006)(8676002)(11346002)(446003)(81156014)(102836004)(26005)(54906003)(6512007)(52116002)(55236004)(2616005)(476003)(99286004); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR18MB2126; 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: JIUJp2+M6wpf11dOsyg5t95N+43Ridld0S2AjO3jwKhj6W7L/zWoufryfVk/UZToeENalRVvr2SKCxi08czrbK7ky/ElVVSr8VBhPFudAUon2b52o6uG/INkQ5x3l0liuQ+HapbMkt0SvKHwM7Mv6UpyJjTbM+OPIENUV3LrZhUoQWGa0QXxEZ3hoA/E/Wd43fxl7u1zyan/rrwnHjeF1RB+XmXvhxb/dkW60Mlvae8DGQ2jIVjn3uKbosEQ9hNsBJD3TKl5aa5LYU/1bCZU7K0vd/SmSRim+hHnH+MUUyjK52nnv2jyStYTIU5mYwlC5RbCltM5DROkXln82qswtbK9ifWd36W1hcDCDqnac3u+lj8QvUBfv1Kv+ey008u2cDCKJIx88VdyqWvuz1ydrWD9o5aEvi4FS5Q0zBvQCxc= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 117e42f3-46ae-4c65-8b9b-08d69e2dbdbb X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2019 10:07:41.8709 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR18MB2126 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-01_08:, , 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-1903010070 Subject: [dpdk-dev] [PATCH v2 2/2] test/metrics: first test case fails on continuous 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, 01 Mar 2019 10:07:49 -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. Cc: stable@dpdk.org Signed-off-by: Harman Kalra --- v2: * Adding stable@dpdk.org into cc as patch 1/2 of same patchset falls between bug fix and new feature. app/test/test_metrics.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/test/test_metrics.c b/app/test/test_metrics.c index 3c2f36b8a..78b3936ee 100644 --- a/app/test/test_metrics.c +++ b/app/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