lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <sryavktjx6eqavjseo7ktii3v2g7opfodsv42fdlsy4dm3dwy4@algmgqcm6m35>
Date: Mon, 26 Feb 2024 10:42:44 +0100
From: Maciej Wieczor-Retman <maciej.wieczor-retman@...el.com>
To: Reinette Chatre <reinette.chatre@...el.com>
CC: Fenghua Yu <fenghua.yu@...el.com>, Shuah Khan <shuah@...nel.org>,
	<ilpo.jarvinen@...ux.intel.com>, <linux-kernel@...r.kernel.org>,
	<linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH v3 3/3] selftests/resctrl: Move cleanups out of
 individual tests

On 2024-02-23 at 13:18:32 -0800, Reinette Chatre wrote:
>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?

Sure, that should look nicer, thanks!

>
>Reinette

-- 
Kind regards
Maciej Wieczór-Retman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ