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 B876E2C38 for ; Fri, 1 Mar 2019 11:00:19 +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 x219tIrh006799 for ; Fri, 1 Mar 2019 02:00:19 -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=e9839PbXcPChRbn+K4sxefFs8Ov/Oca6vog82NPngFVgA5mdNppSLqAVwLOCeMsXHayr 979tcMG1cuiqQVAJ6n1cia/dfL7FWqMI7TfOhUlBSTwF3Qe3M+OigZe6OMU+xjs5cuD8 j+EmRbs48pG/48ASbnZ1fcyEVGJ+tCSZBvS8icVtIf3bL9XwuaY0g0KbyIPagDX90KRF pLDSn7gT5AtTLr3MbD8CBWbxUwLKmNbP+07U4HBADaIpJqYdZtQcX9XQMS3MbNq9v2aS yQkQGOcIZ4jztUIdj7PI9mRI7aZLeJu1YQQgJjz2zoM6kDOLJLc9jyxnN1M5dZ4Y0RHi xA== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2qxce637j5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 01 Mar 2019 02:00:17 -0800 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 1 Mar 2019 02:00:16 -0800 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (104.47.33.54) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Fri, 1 Mar 2019 02:00:16 -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=CPMx2LKY4vvlQKiAEg8BGtvMAJSsiY6G5BPFq8+L1enX0FxSQ7lHzpIORCd1fRBWsKDXKBMdvXWJ4eAN1wKC+hF0bTQgWi7G+Dus0CocFwE1oRMQMsLygIeRLeQ8ZjagC27HtHIWlC6NGlsSvm7sSizlfIXRUf2igfqRZ935aWQ= Received: from SN1PR18MB2237.namprd18.prod.outlook.com (52.132.199.27) by SN1PR18MB2317.namprd18.prod.outlook.com (52.132.199.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.17; Fri, 1 Mar 2019 10:00:11 +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:00:11 +0000 From: Harman Kalra To: Harman Kalra CC: "stable@dpdk.org" Thread-Topic: [PATCH v2 2/2] test/metrics: first test case fails on continuous execution Thread-Index: AQHU0BWP9TUCvcVJgEOtqfQIL8VaUA== Date: Fri, 1 Mar 2019 10:00:11 +0000 Message-ID: <1551434386-31464-2-git-send-email-hkalra@marvell.com> References: <1551434386-31464-1-git-send-email-hkalra@marvell.com> In-Reply-To: <1551434386-31464-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: BM1PR0101CA0069.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::31) 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: 3212737a-6b52-4d8a-b9ba-08d69e2cb1ae x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:SN1PR18MB2317; x-ms-traffictypediagnostic: SN1PR18MB2317: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; SN1PR18MB2317; 23:8KyXQJFgZyZ5eI0KOIls+c1REcHgZsHRiOQOpfD?= =?iso-8859-1?Q?2k0unbEpx3KCP4smuempCqSHBx2hJv7XTJ5M8PQWWRqfNqEXYdSMqFm/Zi?= =?iso-8859-1?Q?xtyfa7GUJ+ekXtfPvjaYx9JT3YMguRqpj9/3w+Q1+CiCFuoDjsCzSQEhla?= =?iso-8859-1?Q?4DYyb54+QPb2eBin10OV8wsnF9trzK36MBHx3ibtV1IJ9bjL02iNf+sBs+?= =?iso-8859-1?Q?hx80Hq61+hHFpRU0HN2jnpqME3lV6Ts2wRdgjTn7vlAmIZKcZJET8Sakyd?= =?iso-8859-1?Q?uVQEXjGyk75F7RbESRy7hiRwQRYY5kW3PsbAlwkJeNRRfwkd/OTLDce5L9?= =?iso-8859-1?Q?PFnUzpwpanr2+Wvdn32O510/+zgN8SiFj8pj391KJwksAEFiayD2FcctfK?= =?iso-8859-1?Q?70LHZjeVghx/OtB+TH9YCQETcgRXtlWgPExF04Fh8UWqLSZb55kZIY1qGQ?= =?iso-8859-1?Q?+dpDUQha8gyBf9u9O5PL93egioDRFo8UzJJ7Lf8VhJQpGC+3OYk/d1Om07?= =?iso-8859-1?Q?KXYdC5h/Rwnz9paARntXKDe56jIIYno7KmCrNnr8lCb+RxwqrpKDoQTlzf?= =?iso-8859-1?Q?Sv9Nv62/E+vJyXmZzN+5aJDSBDik4itTk9wXyT/XWb4BA+420HoY8qb+Zl?= =?iso-8859-1?Q?vc/ZbJWjT1ktUSj4/2FVjzDSh/GOOJZi6nEjm1dTkNwCz/JlhxpGQbmItg?= =?iso-8859-1?Q?+WQmTrHzwVqo1tBwh0yfZ31XYxeGUzwwTCBnQQzPXE+jsUWz/yG8UtjJvE?= =?iso-8859-1?Q?lbt147qo06eaHOrsiMlxnahswyK7Q81nCkYxpXJys41P5pHGfaYtIKhYyk?= =?iso-8859-1?Q?bUGUrJ/55V90CXbZAstQfehyEhbI6xdDsenbg2t+BvvqcOy4xcRwNN1tIT?= =?iso-8859-1?Q?8U35MEw9HTbapqtg+NrK5NbXpioMHU5m2zpvmJGQQ3LUlDs793GLTgpKQW?= =?iso-8859-1?Q?jPOgpoaX0gkjpaPLsYetmXusUPg5UNKF8I+Oq/AvYy7s3N/RaObhwxtwYX?= =?iso-8859-1?Q?uw5mcwX9ANkNdJdAu62qi7JI85tVo+mPBCsIAAQnKZQO4D6FKMCN9T8rci?= =?iso-8859-1?Q?7rw/JDnz5HB3gsrqcq2wFAhYWh9GFv0ZxmudP2rv0UHdNUBjhYEhwbWssL?= =?iso-8859-1?Q?MhRDLjBkCt3TZ5V72DzGU/YhMzMP9Yzuu72A4KTyLBssti/0GqITc5F3WG?= =?iso-8859-1?Q?JYdUC8Fhc0oWa3pKEOPsq33Jcspe2fPPtgu4iJoVUFiIG5A1JtwKlizv+a?= =?iso-8859-1?Q?8ROu4/5u/QaM6G3PkzvMsPvjBKN9sARyCkTzOXL5ADqe9N2/prq2f9x/9L?= =?iso-8859-1?Q?x4=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09634B1196 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(136003)(39860400002)(366004)(376002)(396003)(199004)(189003)(8936002)(6862004)(86362001)(105586002)(386003)(2616005)(2906002)(186003)(97736004)(5660300002)(478600001)(76176011)(71200400001)(256004)(26005)(6506007)(55236004)(6200100001)(102836004)(52116002)(106356001)(99286004)(36756003)(486006)(53936002)(14454004)(81166006)(6486002)(446003)(8676002)(316002)(37006003)(71190400001)(11346002)(6512007)(7049001)(66066001)(6116002)(3846002)(68736007)(81156014)(50226002)(25786009)(6436002)(7736002)(4326008)(305945005)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR18MB2317; 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: AB+Yq3ZI8zDvunsqiQhtozEAufBEgArWhvnxzV1noIPg7QLHCEHFoJUYN8KxvTETWDf7Pkl6DRmGsLmc84LFoW3cJYp/do3maxjhoV/cNSA8YmohU91YBeIbhuNC0/jDsz31e4Hd+c3hvywwWxb/xOBfWNswS07jQAbdgJ146NF66sOFhidB9jFwlgCdlAYqGmFDFPSLC3pu4ZgNAzB5Dk27hKt6C076MFCaYlbssb+FCl03T0Eb6lFWbzIUB1T0JJzqvSOFRUNBFjBTaPAd99qJnjUE7tKyHAk0JprpWJ6547exURyTOLVhOCeraCqAAB0n86s6nvn6wkBxXrC6n3hjyQwGDmVXx3UpjD7OqfFS8384OPOKJfb56t3s648TYJxe0KXMYYEZhe8PN687pPi5OyvcQgTW/JuorSY9UXo= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 3212737a-6b52-4d8a-b9ba-08d69e2cb1ae X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2019 10:00:11.7892 (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: SN1PR18MB2317 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-1903010069 Subject: [dpdk-stable] [PATCH v2 2/2] test/metrics: first test case fails on continuous execution 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: Fri, 01 Mar 2019 10:00:20 -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