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 414EA5B20 for ; Mon, 10 Dec 2018 09:44:39 +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 wBA8ZRRR017072; Mon, 10 Dec 2018 00:44:37 -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=ZHR2b7qWqul6xIUVXgUO4zn5xwHfyZOBUTdnM6d2C7l2hiknZSrt8okTpxNSERIODYr+ fI0wVVhDMoVR/GoF3/XTzu/dFyn2ygXWDvv5fP7UxYO1yxs9hw1jRHPsATYlx1m/pXab HHAxLqAEs/13rkEtS7v3LE/GMEzhikWbj4tGJLKmRgRYzKnMV6EfEmmfJcgFpJEEPjVY tMrd4GN7HcO1k5W3ZYFfYxVLJQCwe+PsOcLjoYYYWrMMRULlZFmhkeVsqIX5bJz7zDsA BxtX0F8yLynuZ60518JNmJhn6+W809IVkxmMdfpBzX9G+XGTXwfUPtYT4RxJ0qmVHFAN oA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2p9f9w97ua-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 10 Dec 2018 00:44:36 -0800 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 10 Dec 2018 00:44:34 -0800 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (104.47.49.51) 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:44:34 -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=qHROxDamH7ePAwzDWNNTxCH3bvUpB2r9I6k7q/8auiMW4L5QXQlbKd1slmQ1BUga0K+UeyMTwBdrrV8hmUHgCTMggLsUwoIRV1m2qCXuw6ncg86/qo1JLqVpxfU1ZmqlafX02MHBJBODJCFfmNMXpXUAyYyzeAO/a4P15inr5os= Received: from DM5PR18MB2230.namprd18.prod.outlook.com (52.132.143.153) by DM5PR18MB2328.namprd18.prod.outlook.com (52.132.208.21) 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:44:33 +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:44:33 +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: AQHUkGSSx+ZZ1iB8akS3iIkhHlT9ww== Date: Mon, 10 Dec 2018 08:44:33 +0000 Message-ID: <20181210084416.3283-1-hkalra@marvell.com> References: <71d5a035-1d3b-bd42-59af-70e7932d127d@intel.com> In-Reply-To: <71d5a035-1d3b-bd42-59af-70e7932d127d@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR0101CA0054.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::16) 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; DM5PR18MB2328; 20:y3aocCQy4OfWX/QnPO8TWfF5wgriM2DMQ5/AUW/p9dsDy+w3h4M0czuela9dDPFRjw+VYQgnYHKPOXw4yNYvji/yOrXJBRRdVN7TpgwDWXAVWLp7Lt4yxArEiP+FBBpBNknRvNmKJcI0a1yaoowJC+Ogh4TY3Gq8Q+oisa8styI= x-ms-office365-filtering-correlation-id: 58ba742e-2895-47a1-beab-08d65e7bb535 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:DM5PR18MB2328; x-ms-traffictypediagnostic: DM5PR18MB2328: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231455)(999002)(944501520)(52105112)(3002001)(10201501046)(93006095)(93001095)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:DM5PR18MB2328; BCL:0; PCL:0; RULEID:; SRVR:DM5PR18MB2328; x-forefront-prvs: 08828D20BC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(346002)(39850400004)(376002)(396003)(189003)(199004)(476003)(486006)(11346002)(446003)(2616005)(186003)(478600001)(14454004)(386003)(102836004)(6506007)(55236004)(5640700003)(76176011)(52116002)(6436002)(8936002)(81156014)(81166006)(316002)(6916009)(14444005)(54906003)(256004)(6486002)(26005)(99286004)(66066001)(2501003)(7736002)(107886003)(4326008)(86362001)(2906002)(6116002)(3846002)(36756003)(97736004)(1076002)(53936002)(105586002)(25786009)(8676002)(68736007)(71190400001)(71200400001)(305945005)(2351001)(106356001)(6512007)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR18MB2328; 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: 09pycqa9h9tVmtVENZoVzqMfxAAFIGDxfT+wQk3+CwlYx7BkmW+IaCHFZ54J6LoQlaUuxyGnRLRSLLSO4tD4tyqitVNnrBigJ8W3c0ERzRKy9Frcp+soDKsozZAdpY9fyermQh6AAIebrrHnfcQPsedIokQ5rGNiSI1vAqYBvV5JsyK8j4qJ/bpGMjxIFsINHjyWrZRO+nAAyr6JInMmXDMbdDcrLL6OGNJxP8x/lMGLhW+/xgIrpopZPEBOXS5Sc1L3YDJEK7Pg27r3Xpl/awjTYbFUuMAcRMWVPfcYTJ+d/zicJK3Dd8gOP++JCOlR 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: 58ba742e-2895-47a1-beab-08d65e7bb535 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Dec 2018 08:44:33.7603 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR18MB2328 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:44:39 -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