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 3A654A0C47; Thu, 14 Oct 2021 11:54:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2AB36411FC; Thu, 14 Oct 2021 11:54:50 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 2EFB540041 for ; Thu, 14 Oct 2021 11:54:48 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10136"; a="208447925" X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="208447925" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2021 02:54:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="525002464" Received: from silpixa00401089.ir.intel.com ([10.55.128.47]) by orsmga001.jf.intel.com with ESMTP; 14 Oct 2021 02:54:46 -0700 From: Harry van Haaren To: dev@dpdk.org Cc: Harry van Haaren , pbhagavatula@marvell.com Date: Thu, 14 Oct 2021 09:54:44 +0000 Message-Id: <20211014095444.630505-1-harry.van.haaren@intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [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 --- 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 += t->worker[i].processed_pkts; for (i = 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