From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1707FA0C43; Mon, 18 Oct 2021 14:54:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F3E5640142; Mon, 18 Oct 2021 14:54:23 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 2BCD440141 for ; Mon, 18 Oct 2021 14:54:22 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19ICWL3S009546; Mon, 18 Oct 2021 05:54:21 -0700 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2177.outbound.protection.outlook.com [104.47.59.177]) by mx0b-0016f401.pphosted.com with ESMTP id 3brt1s2ps4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Oct 2021 05:54:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H6nshk0A0fDIJuu/NhMeRK0xGMEDbD+2+8iho/ygAQFckWSluBw/XZl3Wp7dQ2L9UcFvyi5qAw1QqJw8chej0rUflYdfee5Iwd85ZnkW4RyB2oW/UbgIARc9HAlIbqh9DA0Dg4LxhMLIAFe/tpXdPaM7m81vawC3J0QQ+RcDJne8jfQ6kGgeZ6/O0tQ/q3dL+A4+2iyIW2r+BdZkmCnRDO+maZT6RUjTrwHvHLr+j6Tpbbgp98JvuXuT1/1k/PeYnQoATvM099Pa/QJC591lelRD51maFsRBu8k5fyrtAoUwP6VYW2ysAUJMFsLkTgDWKPXQnvbP50PVR4GBkMoMlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=y3rNa2oqD6m5ZjjgK7hTaPgq/3/xIHgRJgORkDkWLgQ=; b=BLTRXELnRvwZTpzgtCYWtI65aw/CaJnfINfZh2YBuZgUwL/IqfGfWp1emFyI3wtuaNGmEE79gCI6y5BUjF6In8PuBmC5l4g+c6kG1Rf0YJxV6GJ8gTQNG6DvmsDR1ytCT7uGPWL8ZWn5bIB7YeFWUfpiNAabV/ay3BbgpoAnZafm/d4tySyaj5hoFd7cO38ACUgM2cJ92n5CKIrl5hV7FgJaNJsYL38li2VpUERFsFebL9YAMzKAnaHNbndmOYBwqb1BG6xJy2I8BiMrp6CNOhizYnVF/z29Xs+4GQ8kTFACqcjAkM6D0bRqb9LOaVEmX5iY82OcL4gu8gmYADs3gg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y3rNa2oqD6m5ZjjgK7hTaPgq/3/xIHgRJgORkDkWLgQ=; b=s1n4RM4MyzW+gXQ/DXXcttlZXufuBuw+A6M3df/gfaohD9jV47wWp5zM7EtMhEAnIaOw3tcIZJiFqtLsntj2i4MVng4QAhaRhKjBXoNFGtEO4fSudr6G7tSVNScIy/qgH1eNnNJwqNlwQwjPxZtpo6fpBrUqIb46NpjJo3FzD2c= Received: from PH0PR18MB4086.namprd18.prod.outlook.com (2603:10b6:510:3::9) by PH0PR18MB3814.namprd18.prod.outlook.com (2603:10b6:510::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.14; Mon, 18 Oct 2021 12:54:19 +0000 Received: from PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::6012:f5c4:8b1b:5289]) by PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::6012:f5c4:8b1b:5289%8]) with mapi id 15.20.4608.018; Mon, 18 Oct 2021 12:54:19 +0000 From: Pavan Nikhilesh Bhagavatula To: Harry van Haaren , "dev@dpdk.org" Thread-Topic: [EXT] [PATCH] app/test-eventdev: fix terminal colour after control-c exit Thread-Index: AQHXwOGHIcYba/BedU+LUTyO37HzVavYvKfQ Date: Mon, 18 Oct 2021 12:54:19 +0000 Message-ID: References: <20211014095444.630505-1-harry.van.haaren@intel.com> In-Reply-To: <20211014095444.630505-1-harry.van.haaren@intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f57aa38f-240b-451e-9001-08d9923666a7 x-ms-traffictypediagnostic: PH0PR18MB3814: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lMriGhwD7YSyKyxVg6JmvnHem7ngQ6QvXmmvn8wnKN2yV5t8ny/P8OP7HP4v1B7oQwk7Fih9QOkxBisW8cJv/mMjGycah/S5b23Bb9RhW/uewDnztrayUneIEY24kFFseS/rz+4XEPsidGjHUmERWVt39ndA/S0wwFhhepvmfCo5396phhNBy0Lk7RxgEl6t6Csj5WcF17uaHF9STrb+Eiievb+lp3HJasKYl+mzYetX5fkb4BRv+8kOhtptnNszzgmslQBDa/OYJOgL86ANJ+GqqEe7WF+n3GS5C8B/CbeLnA5JQUuso9Q41S67KPHqCVvHIiy9d8smIp+ds+/+KuPomIubPuAed3z7P8ckQ4Hm9AoJAx2kc9wYitLKytsYUrLEVX3IlCNtWpvrSS1rgfcFnpYKJpnbzC9HsggJwA1KK9LtHZ9IEYzhASj0iSxiDlk1ywNpzNPF3ctyw/ARueoN/q1CnUl7AmyuM887T8TH/l/sWVldpBzFKnttByZU9rq1NlxB3ezr69ePi8EeBLKTvVqzeL/LYaACUE5uD9bjl0IhF+BUYqKktRvLo9Ql6U0cBzRwXxXSRN1MviUVLaEGevAaUqEWRoXaCgrfcU3IhFjG14McP7/kSq/qGJDJxubXAbBLUqXz9e92XTS7uXfZ7SwxMoOT3kT2q+VtnxlmhZWA+QxGFHMAaiqEtptuSKnec/ZhqrMpgiHGZfyAMw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4086.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(33656002)(66556008)(508600001)(38070700005)(316002)(64756008)(6506007)(66476007)(86362001)(66946007)(38100700002)(5660300002)(122000001)(55016002)(9686003)(8936002)(186003)(52536014)(71200400001)(76116006)(26005)(66446008)(2906002)(7696005)(110136005)(83380400001)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ZZy+WyQzBIkd2TfG6hK9JAATJI/GMSHtjzDpEmWjUWC0PhRu5aDHvOSJGXCG?= =?us-ascii?Q?z+1rTPtpPJbgtBecdol32/gw5IcR25lqJ+qerrWbKGhCHOi4vFUfbnphKB41?= =?us-ascii?Q?3bf8/Ix2XAH3VE9gaQAqwhBviZIrXblfgFro2W60+RYn4wW/tRZNXuCfxsE2?= =?us-ascii?Q?gWOMCmNSrG4iYQJbxncfzSsXas1iXk3U/sOLNpHWVC4RlhdMxMivHlzWf5qW?= =?us-ascii?Q?uEcxCxqdaXyjTxXdPSAoJjfkLFV5zuxBYi5p0CnZjMeDqtotH3NYXkeACJ9C?= =?us-ascii?Q?/zFOEOpFlR2MD5KE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ILUPCqSzF9?= =?us-ascii?Q?BNYC39CYgzD5+qfihz2/G2EHaLd6N7r1Vcoszi5qnjSEhI+9k1gOoqOPtPcB?= =?us-ascii?Q?Dcgr5oANa0v2epEQyLg1mrd87bvfr4oP7T7Xg1wT2Mw9JbGKzDa4N7ok5QJf?= =?us-ascii?Q?RlJ911qvdoTzlhthlZrMavMU?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4086.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f57aa38f-240b-451e-9001-08d9923666a7 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Oct 2021 12:54:19.6338 (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-CrossTenant-userprincipalname: dvufHv6B9x22/fQM3lrV3y4Njuv7eTygo7iLy3ESUSgbSwL13L9DlXasMsxZ6Idsrc8ZSb+AQYYeUIXh9p8i1Eek204tYaQfXTm+7bSCykw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB3814 X-Proofpoint-ORIG-GUID: ADrh6CKpYv6yc0iQwPhNRqJ17urxkS5K X-Proofpoint-GUID: ADrh6CKpYv6yc0iQwPhNRqJ17urxkS5K X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-18_05,2021-10-14_02,2020-04-07_01 Subject: Re: [dpdk-dev] [EXT] [PATCH] app/test-eventdev: fix terminal colour after control-c exit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" >Before this commit, a Control^C exit of the test-eventdev application >would print the worker packet percentages, and leave the terminal with >a green colour despite the colour reset being issued after the newline. >By moving the colour reset command before the \n the issue is fixed. > >Fixes: 6b1a14a83a06 ("app/eventdev: add packet distribution logs") > >Signed-off-by: Harry van Haaren > Acked-by: Pavan Nikhilesh >--- > >Given this is an aesthetic only fix, I feel its not worth backporting. >Cc: pbhagavatula@marvell.com> > >--- > app/test-eventdev/test_perf_common.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/app/test-eventdev/test_perf_common.c b/app/test- >eventdev/test_perf_common.c >index e0d9f05ecd..a1b8dd72ee 100644 >--- a/app/test-eventdev/test_perf_common.c >+++ b/app/test-eventdev/test_perf_common.c >@@ -19,7 +19,7 @@ perf_test_result(struct evt_test *test, struct >evt_options *opt) > total +=3D t->worker[i].processed_pkts; > for (i =3D 0; i < t->nb_workers; i++) > printf("Worker %d packets: "CLGRN"%"PRIx64" >"CLNRM"percentage:" >- CLGRN" %3.2f\n"CLNRM, i, >+ CLGRN" %3.2f"CLNRM"\n", i, > t->worker[i].processed_pkts, > (((double)t- >>worker[i].processed_pkts)/total) > * 100); >-- >2.30.2