Message ID | 20231215150515.36983-4-ilpo.jarvinen@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-1156-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp9348493dys; Fri, 15 Dec 2023 07:14:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGTDsDD/uR1dJMdsRsqumRezmQXsEWUg+muaVSeGSk40I/fVuxAmq2NE0rZPJU8J3WJMDU0 X-Received: by 2002:a05:6a21:7887:b0:191:2c21:8355 with SMTP id bf7-20020a056a21788700b001912c218355mr9415270pzc.6.1702653296041; Fri, 15 Dec 2023 07:14:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702653296; cv=none; d=google.com; s=arc-20160816; b=qjXZ389YovQGvm2jpJVzgqyNRDmw3lU/f5+c1OUY7ib6S375v8vwB682ptMcuOUrCO Hha2NqsZqJDwAkQ7F3xi8gfK+9jXj7RN4N3b4inGbiGFqEMpe0d1tpK6pj3f0ZcdsFle OhrQj2/W1UJl2JGAGEL26H38iOvIUM7tTf1rZzT7fI3sa/sEfI1VxHIQx4JoIKNFoMHs 3YeM+wdEyr6qQlf4zkOjkjjT0M1MulN0xvITFaPVYt4h3/2C+Ox6xut0yAPfQPOviyMm 6sBd8Cm4UKgnria2Z65p1HMlPq+AukYonaEr1XHW5fBJLYD+7v7dWUutPTLx8mK7d93g 885A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Gk7GIXriunfwvTXhUUlAVTozahWyOFGVI5h5+ze+rw4=; fh=gPQ6jqLSfsDb5bE3yrtO+AlT5R4d75RXkjC5xckz7Dk=; b=C06XzG4Yljm6CWqf2xHYi1SfmHOe0c+Z2f9U916I/djxzC7K7vJydDJKFvWfWiSeMk aYjBxE+RM1aoCzwl7b79UJSyo6fWDzRY52Lc727ZusUeJ1G0Mgy/vLBBrJN0lu8CNVb2 vysS6dkvZZb8VEEJnIto8HsGmYbBxXXsH0AXtRl45wyPC8YPXzqAbUdJ9EeQRSJiCjKD fDMZQOrXCjfL/h/hOj62leHIqOWvHFFwaqo1z5dmadAsP62k4zoFhop93TOTzkUm5zF0 zK2f4jA39prjEfzoqbqaEc7fH1+wrJie2uSFqpGn9YV2/9l7nmMLEvGB0z8cm+gzt0VA y5kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KCsckUSF; spf=pass (google.com: domain of linux-kernel+bounces-1156-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1156-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id o62-20020a634141000000b005c6b955fb89si13293397pga.204.2023.12.15.07.14.55 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 07:14:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1156-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KCsckUSF; spf=pass (google.com: domain of linux-kernel+bounces-1156-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1156-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B5432287B11 for <ouuuleilei@gmail.com>; Fri, 15 Dec 2023 15:07:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 237293AC01; Fri, 15 Dec 2023 15:06:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KCsckUSF" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00EF435F03; Fri, 15 Dec 2023 15:06:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702652764; x=1734188764; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4CfsvVmXuEt7o9BsBWAlVT1iOHdDJykjEbaX1Jbwtjg=; b=KCsckUSFl4eoPxnqOdqPQQuptUsCtBCwVOp/LA73wc9QCotVdGqMPMFY KQKgtr99xEdpB5GtaAnbchRwYMCRAav4DjP+pjo7YiEJ0yJLS2ZlfqUUU NfdGuA+4RKDY9d/xcSFxsKAkarKr/Q2Mk0QTx06csW+c02/jqg0QHfoWV Xp7tVTasxqlGcJIWYdsDrdxwPfG8zJubiIgzFnVmg3Igml+4sapU03JSP 8EFqOPbs19k69RD/VP9fzBxM07zQqXE5zIL/XAiSjDFRlQT/T9JK7MU4N 6wpjDsHuhkGcnEWREU2nOgKaRqVvktxIZ4e9hdgLBigAXBfZrlti0BK7W Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="392461478" X-IronPort-AV: E=Sophos;i="6.04,279,1695711600"; d="scan'208";a="392461478" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2023 07:05:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="1106150924" X-IronPort-AV: E=Sophos;i="6.04,279,1695711600"; d="scan'208";a="1106150924" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.246.49.116]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2023 07:05:51 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com> To: linux-kselftest@vger.kernel.org, Reinette Chatre <reinette.chatre@intel.com>, Shuah Khan <shuah@kernel.org>, Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>, =?utf-8?q?Maciej_Wiecz=C3=B3r-R?= =?utf-8?q?etman?= <maciej.wieczor-retman@intel.com>, Fenghua Yu <fenghua.yu@intel.com> Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com> Subject: [PATCH v4 03/29] selftests/resctrl: Don't use ctrlc_handler() outside signal handling Date: Fri, 15 Dec 2023 17:04:49 +0200 Message-Id: <20231215150515.36983-4-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231215150515.36983-1-ilpo.jarvinen@linux.intel.com> References: <20231215150515.36983-1-ilpo.jarvinen@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785361382514192943 X-GMAIL-MSGID: 1785361382514192943 |
Series |
selftests/resctrl: CAT test improvements & generalized test framework
|
|
Commit Message
Ilpo Järvinen
Dec. 15, 2023, 3:04 p.m. UTC
perf_event_open_llc_miss() calls ctrlc_handler() to cleanup if perf_event_open() returns an error. Those cleanups, however, are not the responsibility of perf_event_open_llc_miss() and it thus interferes unnecessarily with the usual cleanup pattern. Worse yet, ctrlc_handler() calls exit() in the end preventing the ordinary cleanup done in the calling function from executing. ctrlc_handler() should only be used as a signal handler, not during normal error handling. Remove call to ctrlc_handler() from perf_event_open_llc_miss(). As unmounting resctrlfs and test cleanup are already handled properly by error rollbacks in the calling functions, no other changes are necessary. Suggested-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> --- v3: - Corrected typo in the changelog --- tools/testing/selftests/resctrl/cache.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/resctrl/cache.c b/tools/testing/selftests/resctrl/cache.c index 1fa4b86e1459..6d60a2f1b3aa 100644 --- a/tools/testing/selftests/resctrl/cache.c +++ b/tools/testing/selftests/resctrl/cache.c @@ -41,7 +41,6 @@ static int perf_event_open_llc_miss(pid_t pid, int cpu_no) PERF_FLAG_FD_CLOEXEC); if (fd_lm == -1) { ksft_perror("Error opening leader"); - ctrlc_handler(0, NULL, NULL); return -1; }