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: <77a66e39-7f34-4b3c-ac8d-e48d8c5a2830@collabora.com>
Date: Sun, 21 Jul 2024 21:24:05 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Shuah Khan <skhan@...uxfoundation.org>
Cc: Muhammad Usama Anjum <usama.anjum@...labora.com>, kernel@...labora.com,
 "Chang S . Bae" <chang.seok.bae@...el.com>,
 Binbin Wu <binbin.wu@...ux.intel.com>, Ingo Molnar <mingo@...nel.org>,
 "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
 linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
 Shuah Khan <shuah@...nel.org>
Subject: Re: [PATCH 1/2] selftests: x86: vdso_restorer: remove manual counting
 of pass/fail tests

On 7/19/24 9:40 PM, Shuah Khan wrote:
> On 7/12/24 01:30, Muhammad Usama Anjum wrote:
>> Use kselftest wrapper to mark tests pass/fail instead of manually
>> counting.
> 
> You care combining two changes in the patch.
> 
> This is needed to return correct exit status. This also
>> improves readability and mainability.
> 
> Spelling - "mainability" - checkpatch would have helped you
> catch this.
Sorry I'll fix it after following discussion. I use checkpatch with
spelling checker. I may have missed it for this patch.

> 
> The change to return the correct error fine and but not the
> change thaT ADDS DUPLICATE tap header.
> 
>>
> 
> 
>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
>> ---
>>   tools/testing/selftests/x86/vdso_restorer.c | 20 +++++++-------------
>>   1 file changed, 7 insertions(+), 13 deletions(-)
>>
>> diff --git a/tools/testing/selftests/x86/vdso_restorer.c
>> b/tools/testing/selftests/x86/vdso_restorer.c
>> index fe99f24341554..8e173d71291f6 100644
>> --- a/tools/testing/selftests/x86/vdso_restorer.c
>> +++ b/tools/testing/selftests/x86/vdso_restorer.c
>> @@ -21,6 +21,7 @@
>>   #include <unistd.h>
>>   #include <syscall.h>
>>   #include <sys/syscall.h>
>> +#include "../kselftest.h"
>>     /* Open-code this -- the headers are too messy to easily use them. */
>>   struct real_sigaction {
>> @@ -44,9 +45,10 @@ static void handler_without_siginfo(int sig)
>>     int main()
>>   {
>> -    int nerrs = 0;
>>       struct real_sigaction sa;
>>   +    ksft_print_header();
> 
> The problem with adding this header here is when
> make kselftest TARGETS=vDSO is run there will be
> duplicate TAP 13 headers.
Usually all TAP compliant tests print TAP 13 header at the start. These
tests when run from make run_tests have duplicate TAP 13 headers. I don't
think that this is the issue. Why do you think it is wrong?

For example, I've attached the logs of vDSO test suite. TAP header is
printed at the start. Then it is printed again at the start of the test if
it is TAP compliant e.g., vdso_test_abi and vdso_test_getrandom. These
tests are already TAP compliant. Other tests in this suite aren't TAP
compliant.

-- 
BR,
Muhammad Usama Anjum
View attachment "selftests-vDSO.log" of type "text/x-log" (6523 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ