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: <41dd9c5a-0e07-4b98-9dfb-fb57eaa74fa2@collabora.com>
Date: Mon, 8 Apr 2024 16:53:11 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Michal Koutný <mkoutny@...e.com>
Cc: Muhammad Usama Anjum <usama.anjum@...labora.com>,
 cgroups@...r.kernel.org, linux-doc@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
 Tejun Heo <tj@...nel.org>, Zefan Li <lizefan.x@...edance.com>,
 Johannes Weiner <hannes@...xchg.org>, Jonathan Corbet <corbet@....net>,
 Shuah Khan <shuah@...nel.org>
Subject: Re: [RFC PATCH v3 6/9] selftests: cgroup: Add basic tests for pids
 controller

On 4/8/24 4:29 PM, Michal Koutný wrote:
> On Sun, Apr 07, 2024 at 02:37:44AM +0500, Muhammad Usama Anjum <usama.anjum@...labora.com> wrote:
>> The
>> 	ksft_print_header();
>> 	ksft_set_plan(total_number_of_tests);
>> are missing. Please use all of the ksft APIs to make the test TAP compliant.
> 
> Will do.
> 
>>> +	for (i = 0; i < ARRAY_SIZE(tests); i++) {
>>> +		switch (tests[i].fn(root)) {
>>> +		case KSFT_PASS:
>>> +			ksft_test_result_pass("%s\n", tests[i].name);
>>> +			break;
>>> +		case KSFT_SKIP:
>>> +			ksft_test_result_skip("%s\n", tests[i].name);
>>> +			break;
>>> +		default:
>>> +			ret = EXIT_FAILURE;
>>> +			ksft_test_result_fail("%s\n", tests[i].name);
>>> +			break;
>> Use ksft_test_result_report() instead of swith-case here.
> 
> Do you mean ksft_test_result()? That one cannot distinguish the
> KSFT_SKIP case.
> Or ksft_test_result_code(tests[i].fn(root), tests[i].name)?
No, this doesn't seem useful here.

> 
> Would the existing ksft_test_resul_*() calls inside switch-case still
> TAP-work?
This part of your switch-case are correct. It just that by using
ksft_test_result_report you can achieve the same thing. It has has SKIP
support.

ksft_test_result_report(tests[i].fn(root), tests[i].name)

> 
> Thanks,
> Michal

-- 
BR,
Muhammad Usama Anjum

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ