mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>,
	Fenghua Yu <fenghua.yu@intel.com>, Shuah Khan <shuah@kernel.org>
Cc: <ilpo.jarvinen@linux.intel.com>, <linux-kernel@vger.kernel.org>,
	<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH v3 3/3] selftests/resctrl: Move cleanups out of individual tests
Date: Fri, 23 Feb 2024 13:18:32 -0800	[thread overview]
Message-ID: <8caed6ce-808a-4d25-823a-fc4d6b56268d@intel.com> (raw)
In-Reply-To: <bc4a4fec20420fb792612be024473f31f40d7bca.1708599491.git.maciej.wieczor-retman@intel.com>

Hi Maciej,

On 2/22/2024 4:07 AM, Maciej Wieczor-Retman wrote:
> diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c
> index 161f5365b4f0..bae08d1221ec 100644
> --- a/tools/testing/selftests/resctrl/resctrl_tests.c
> +++ b/tools/testing/selftests/resctrl/resctrl_tests.c
> @@ -134,6 +134,8 @@ static void run_single_test(const struct resctrl_test *test, const struct user_p
>  	}
>  
>  	ret = test->run_test(test, uparams);
> +	if (test->cleanup)
> +		test->cleanup();
>  	ksft_test_result(!ret, "%s: test\n", test->name);
>  
>  cleanup:

I think this can be potentially confusing to do cleanup here and
then follow it with a test_cleanup(). Could this test specific
cleanup perhaps be called from the general test_cleanup() instead?

Reinette

  reply	other threads:[~2024-02-23 21:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22 12:06 [PATCH v3 0/3] selftests/resctrl: Simplify test cleanup functions Maciej Wieczor-Retman
2024-02-22 12:07 ` [PATCH v3 1/3] selftests/resctrl: Add cleanup function to test framework Maciej Wieczor-Retman
2024-02-22 12:07 ` [PATCH v3 2/3] selftests/resctrl: Simplify cleanup in ctrl-c handler Maciej Wieczor-Retman
2024-02-23 21:18   ` Reinette Chatre
2024-02-26  9:43     ` Maciej Wieczor-Retman
2024-02-22 12:07 ` [PATCH v3 3/3] selftests/resctrl: Move cleanups out of individual tests Maciej Wieczor-Retman
2024-02-23 21:18   ` Reinette Chatre [this message]
2024-02-26  9:42     ` Maciej Wieczor-Retman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8caed6ce-808a-4d25-823a-fc4d6b56268d@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=maciej.wieczor-retman@intel.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®