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 02B235B16 for ; Mon, 10 Dec 2018 09:39:21 +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 wBA8ZpAQ015365; Mon, 10 Dec 2018 00:39:21 -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=n03sO7EantwROCAIZyzr8arKa7g91Wp8MdmqGMRIzP8=; b=sxYOnjq28f6pV64vzkqiLDjfCFB0YFS4H1q7vwC8H4b7EyEOeTXjBYzKqmLww4ItQ+O2 sirde4KxIsezE+YYlxfNqIEjhdzIyjFmfsJebpxep6AfX3qId6SugJgZTzaI5cWCuBji pdPdjkm53HuZEuZblMQbOs8EofFnmMcFzpZuais3bxB2D/TkUW8g8rBwI36wBnZTpRu0 N2rTlhqgqDbZqB2pbjKm93+1uog2H8QT3C1ie2YiSdMG4QCBLHeWkkXI+x7UNfez4kOB zbmWBGOiWaSR7rRxH2cMN1U23s6KwszqpdLroPP1U0tCXL2BzIOUp3wZE2iCahjtl2lj aQ== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2p8ebpemb4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 10 Dec 2018 00:39:21 -0800 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 10 Dec 2018 00:39:19 -0800 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (104.47.48.57) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Mon, 10 Dec 2018 00:39:19 -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=n03sO7EantwROCAIZyzr8arKa7g91Wp8MdmqGMRIzP8=; b=sT4529PeuyAGJFSs6FBPMbKgKwCf648Y8t+SWkAm6PRKhRSCroRGfaMo2vlMSqKMmMb6fUf7nt1iAM/7OOgl0E+c5k3jEqdIGLUwQIZtjM0h4CZgwdvCntJ/RyU9JV3HP2jctsC3uXXgIB/KLwQKen/47AvQ9GOJ8iARczM0+ew= Received: from DM5PR18MB2230.namprd18.prod.outlook.com (52.132.143.153) by DM5PR18MB1497.namprd18.prod.outlook.com (10.175.219.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.17; Mon, 10 Dec 2018 08:39:15 +0000 Received: from DM5PR18MB2230.namprd18.prod.outlook.com ([fe80::61b8:4771:2189:d61e]) by DM5PR18MB2230.namprd18.prod.outlook.com ([fe80::61b8:4771:2189:d61e%4]) with mapi id 15.20.1404.026; Mon, 10 Dec 2018 08:39:15 +0000 From: Harman Kalra To: "remy.horton@intel.com" CC: "dev@dpdk.org" , "jerin.jacobkollanukkaran@cavium.com" , Harman Kalra Thread-Topic: [PATCH v2] test/metrics: Fixed a negative case to pass Thread-Index: AQHUkGPV7qp25l0aU0aZQ5y62KtCng== Date: Mon, 10 Dec 2018 08:39:15 +0000 Message-ID: <20181210083857.3158-1-hkalra@marvell.com> References: <20181206150106.154090-1-hkalra@marvell.com> In-Reply-To: <20181206150106.154090-1-hkalra@marvell.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PN1PR0101CA0057.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::19) To DM5PR18MB2230.namprd18.prod.outlook.com (2603:10b6:4:b9::25) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR18MB1497; 20:l+GrOg1+48gYeRKegvT3mBSM+BADS0daRuxeKe0BrX/jgzeB+OcZ+NrUAHE+3Y6rU0T/zXXcemSClZ1qz88ejIanNVAQ0FR7l0PRJUXXPi/SgPWcm9u9u7AJmM8eVUQxAbb1txJic4G3QzdKKYFG7Y9jGPxVbgktXvbEXDZLptc= x-ms-office365-filtering-correlation-id: 853f7bc1-2715-45fe-95ad-08d65e7af75d x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:DM5PR18MB1497; x-ms-traffictypediagnostic: DM5PR18MB1497: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231455)(999002)(944501520)(52105112)(3002001)(93006095)(93001095)(148016)(149066)(150057)(6041310)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:DM5PR18MB1497; BCL:0; PCL:0; RULEID:; SRVR:DM5PR18MB1497; x-forefront-prvs: 08828D20BC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39850400004)(396003)(136003)(346002)(376002)(189003)(199004)(5640700003)(102836004)(2616005)(186003)(55236004)(26005)(97736004)(52116002)(8676002)(316002)(86362001)(81156014)(81166006)(54906003)(2501003)(446003)(66066001)(99286004)(386003)(11346002)(8936002)(6506007)(36756003)(3846002)(53936002)(256004)(305945005)(7736002)(2906002)(6436002)(5660300001)(2351001)(486006)(107886003)(71190400001)(6512007)(1076002)(71200400001)(14444005)(6116002)(25786009)(476003)(76176011)(478600001)(14454004)(106356001)(105586002)(6916009)(6486002)(4326008)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR18MB1497; H:DM5PR18MB2230.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 2BvRdZXFbDHHx8eJpfaLVJF35O+L+xfkx+ITQiEQKZw4AjojC44M6oJpHZ7IP7neTxOuvMXO5W1nYNnWyciYCwtVUGA5qPyPRYSX52sbST6P6Cdi0ujaz4Ch4orf31Q81LHleYDYf3KoqZ7toLMwNhDQFT9llsunoNCySPIMna7bHtIz0vZH7dMjSya/LmI/4NG8I5Kj1B9159Tzk2WdreK7/rOd+rejATebml9rbw0dYL0ji0HdoYERLa0yUy87vXYn+Aa6aQYiRjxxBnor6T1JEvs7rrCSZhS3n/O6ANLS25JUQAxdnZqS2QNK5YSH spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 853f7bc1-2715-45fe-95ad-08d65e7af75d X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Dec 2018 08:39:15.4234 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR18MB1497 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-12-10_02:, , 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=926 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812100081 Subject: [dpdk-dev] [PATCH v2] test/metrics: Fixed a negative case to pass 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: Mon, 10 Dec 2018 08:39:22 -0000 Negative test case for passing invalid count size to rte_metrics_update_values() will pass if count value is any value greater than 1 because set size wrt to key id 1 is 1 and passing 0 as no of values to be updated will not hit the ERANGE check. Signed-off-by: Harman Kalra --- Fixed the patch creation issue, now git apply works fine. test/test/test_metrics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test/test_metrics.c b/test/test/test_metrics.c index 94d54d71c..3c2f36b8a 100644 --- a/test/test/test_metrics.c +++ b/test/test/test_metrics.c @@ -154,7 +154,7 @@ test_metrics_update_values(void) =20 /* Failed Test: Invalid count size */ err =3D rte_metrics_update_values(RTE_METRICS_GLOBAL, - KEY, &value[0], 0); + KEY, &value[0], ARRAY_SIZE(value)); TEST_ASSERT(err < 0, "%s, %d", __func__, __LINE__); =20 /* Failed Test: Invalid port_id(lower value) and valid data */ --=20 2.18.0