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 D44095587 for ; Thu, 6 Dec 2018 16:02:25 +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 wB6F20WA015727; Thu, 6 Dec 2018 07:02:21 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=9Pw4pgLnrm4g2+0zJC37d8n67yQzVqStAPoTaxQWhpg=; b=fFjJPWGdswzoxLBwPJm/RnSV5DIa0G9VsN9Tb6RXyycXvdr9IRz/ueNQCZ8yNreVqPmn 3On+mLfslZ2Wcvaa8mGGZHBeYhMPcLJPb2nOE2zjX3kQivFwFdEBzwUBNMsL4w/yBOcS H/ONmtBDjXhyvyTsct6PbbIAiIrWVbSzbOh9zhPJ0ZHLHCj4ZWaVOJ9rnPqzpBm2gRKU ae8g2nffq9nn3SQwZpNywfd7Q7OD5PDjz/KKKKxOgF0mPcJ9Yqysf56a+J/AbdaLRwuT aCpl6p6VGsZ4X88ggsKI7jvUMZSN6yajgpUII1K+P5MfM+o2jQNrMrotsWzmxgGQVSBZ MA== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2p6vcxjhdm-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 06 Dec 2018 07:02:20 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 6 Dec 2018 07:01:26 -0800 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (104.47.48.56) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 6 Dec 2018 07:01:26 -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=9Pw4pgLnrm4g2+0zJC37d8n67yQzVqStAPoTaxQWhpg=; b=POzDroXKdc9dDLHojZGXPIo73lKbtIWRmojL0rrAhATTHHg4JHBmj06k35ORZsXfsYOEiPJULFBZdqWjvmPlSLJjC9mmU4Fon+5esraavW7wDHD8j+8BFJFRfUjn2JNZr/9s/F3HgF+VcBxbx46KyZdGeiHJ9swIGnx0e1Ocnq0= Received: from SN1PR18MB2237.namprd18.prod.outlook.com (52.132.199.27) by SN1PR18MB0366.namprd18.prod.outlook.com (10.163.225.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.19; Thu, 6 Dec 2018 15:01:22 +0000 Received: from SN1PR18MB2237.namprd18.prod.outlook.com ([fe80::2d78:28a3:ee7b:9b57]) by SN1PR18MB2237.namprd18.prod.outlook.com ([fe80::2d78:28a3:ee7b:9b57%2]) with mapi id 15.20.1382.023; Thu, 6 Dec 2018 15:01:22 +0000 From: Harman Kalra To: "remy.horton@intel.com" CC: "dev@dpdk.org" , "jerin.jacobkollanukkaran@cavium.com" , Harman Kalra Thread-Topic: [PATCH] test/metrics: Fixed a negative case to pass Thread-Index: AQHUjXSNbJrzBYkHgUuovA7TMz8Pcw== Date: Thu, 6 Dec 2018 15:01:22 +0000 Message-ID: <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: BM1PR01CA0134.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:40::28) To SN1PR18MB2237.namprd18.prod.outlook.com (2603:10b6:802:2e::27) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; SN1PR18MB0366; 20:nUpPJ5MiZ4KbCea4n/e8RMU0iodgvrfQVKM5i4+JwtuWNS/lDnHmR06Z2Kl0pP/ANWXpBFddftYQTn7d0alcHq0MUwQwPxFtgo/Eow0YStNKskOigBHBCRVN23eMq2EO5cIxjomkYS6AWcNZDqaAonLEcqVtCXMHJ7KzrmkZGEw= x-ms-office365-filtering-correlation-id: d1d659d7-966f-4901-95c4-08d65b8baf2a x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN1PR18MB0366; x-ms-traffictypediagnostic: SN1PR18MB0366: 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)(944501493)(52105112)(3002001)(93006095)(93001095)(148016)(149066)(150057)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:SN1PR18MB0366; BCL:0; PCL:0; RULEID:; SRVR:SN1PR18MB0366; x-forefront-prvs: 087894CD3C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39850400004)(376002)(366004)(346002)(136003)(189003)(199004)(7736002)(53936002)(486006)(2501003)(52116002)(25786009)(107886003)(316002)(102836004)(86362001)(1076002)(6512007)(386003)(54906003)(3846002)(6116002)(68736007)(5640700003)(476003)(2616005)(6916009)(99286004)(4326008)(97736004)(81166006)(81156014)(26005)(305945005)(55236004)(2906002)(478600001)(8936002)(8676002)(6436002)(14454004)(6506007)(256004)(2351001)(36756003)(106356001)(71200400001)(71190400001)(66066001)(6486002)(5660300001)(186003)(14444005)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR18MB0366; H:SN1PR18MB2237.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: DhBoqYVJp5TTevuvDAevsQX7xgii1a1KvmDg+GbDWoXOPR+kaGS6lOi1hbIv7T/LlX8QHyA8HNdBKAwQCiFh4yc4DAkggnGCnyohM2SSvJ8gapKOQ1NlWvq5jm8hwti6Ih2bDhBMJT7dJEWYB63VvpxadFwSQFyaEuUok5Y7kvoDBDL9ODGMI1I/c0mVhciibY2cVfOJEgjAGNSbhRhjEsV2tAh8ZrxKK7PzOQa6Wa2FOvaByhoZ21JaWE4dF76hAYxGkkdp/9y48G1UE6wnFJi26nUUejgblI1V5H4UbehWMm/fqz0dsrQJVX90nxAXgE5touFdC8ZjHsjtDfRmld3OB5nzFPkF/dvHil0iGb4= 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: d1d659d7-966f-4901-95c4-08d65b8baf2a X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Dec 2018 15:01:22.2973 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR18MB0366 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-12-06_05:, , 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=840 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812060129 Subject: [dpdk-dev] [PATCH] 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: Thu, 06 Dec 2018 15:02:26 -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 --- test/test/test_metrics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git test/test/test_metrics.c test/test/test_metrics.c index 94d54d71c..3c2f36b8a 100644 --- test/test/test_metrics.c +++ 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