public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Kunwu Chan <chentao@kylinos.cn>,
	Mark Brown <broonie@kernel.org>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>,
	kernel@collabora.com, linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH 1/2] selftests: arm64: tags_test: conform test to TAP output
Date: Wed, 10 Jul 2024 14:35:04 +0500	[thread overview]
Message-ID: <0ce9ef47-a655-492d-b8ae-39341d2ef076@collabora.com> (raw)
In-Reply-To: <599d722c-6d34-42dd-bdfd-5cc862d1c8b4@collabora.com>

Kind reminder.

This two patch series is removing a script which was marking test pass/fail
by adding pass/fail logic inside the test itself.

On 7/1/24 1:40 PM, Muhammad Usama Anjum wrote:
> Soft reminder
> 
> On 6/2/24 6:24 PM, Muhammad Usama Anjum wrote:
>> Conform the layout, informational and status messages to TAP. No
>> functional change is intended other than the layout of output messages.
>>
>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
>> ---
>>  tools/testing/selftests/arm64/tags/tags_test.c | 10 ++++++----
>>  1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/tools/testing/selftests/arm64/tags/tags_test.c b/tools/testing/selftests/arm64/tags/tags_test.c
>> index 955f87c1170d7..8ae26e496c89c 100644
>> --- a/tools/testing/selftests/arm64/tags/tags_test.c
>> +++ b/tools/testing/selftests/arm64/tags/tags_test.c
>> @@ -17,19 +17,21 @@ int main(void)
>>  	static int tbi_enabled = 0;
>>  	unsigned long tag = 0;
>>  	struct utsname *ptr;
>> -	int err;
>> +
>> +	ksft_print_header();
>> +	ksft_set_plan(1);
>>  
>>  	if (prctl(PR_SET_TAGGED_ADDR_CTRL, PR_TAGGED_ADDR_ENABLE, 0, 0, 0) == 0)
>>  		tbi_enabled = 1;
>>  	ptr = (struct utsname *)malloc(sizeof(*ptr));
>>  	if (!ptr)
>> -		ksft_exit_fail_msg("Failed to allocate utsname buffer\n");
>> +		ksft_exit_fail_perror("Failed to allocate utsname buffer");
>>  
>>  	if (tbi_enabled)
>>  		tag = 0x42;
>>  	ptr = (struct utsname *)SET_TAG(ptr, tag);
>> -	err = uname(ptr);
>> +	ksft_test_result(!uname(ptr), "Syscall successful with tagged address\n");
>>  	free(ptr);
>>  
>> -	return err;
>> +	ksft_finished();
>>  }
> 

-- 
BR,
Muhammad Usama Anjum

  reply	other threads:[~2024-07-10  9:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-02 13:24 [PATCH 1/2] selftests: arm64: tags_test: conform test to TAP output Muhammad Usama Anjum
2024-06-02 13:25 ` [PATCH 2/2] selftests: arm64: tags: remove the result script Muhammad Usama Anjum
2024-07-01  8:40 ` [PATCH 1/2] selftests: arm64: tags_test: conform test to TAP output Muhammad Usama Anjum
2024-07-10  9:35   ` Muhammad Usama Anjum [this message]
2024-07-10 11:31 ` Catalin Marinas
2024-07-10 13:10   ` Mark Brown
2024-07-11  6:13   ` Muhammad Usama Anjum
2024-07-11 18:48 ` Catalin Marinas

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=0ce9ef47-a655-492d-b8ae-39341d2ef076@collabora.com \
    --to=usama.anjum@collabora.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=chentao@kylinos.cn \
    --cc=kernel@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=will@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