All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 0/2] Rewrite the gettid() testing suite
Date: Thu, 5 Oct 2023 16:39:01 +0200	[thread overview]
Message-ID: <6302bf6a-46b3-47da-aec6-31abd1b498c0@suse.com> (raw)
In-Reply-To: <24951859.XGBpkceEbW@linux-9lzf>

Hi!

On 10/5/23 16:24, Marius Kittler wrote:
> Am Donnerstag, 5. Oktober 2023, 15:49:09 CEST schrieb Andrea Cervesato:
>> From: Andrea Cervesato <andrea.cervesato@suse.com>
>>
>> Rewrite gettid01 and create a new gettid02 test in order to check all
>> gettid() basic functionalities, according with its manual.
>>
>> Andrea Cervesato (2):
>>    Rewrite gettid01 test
>>    Add gettid02 test
>>
>>   runtest/syscalls                            |   1 +
>>   testcases/kernel/syscalls/gettid/.gitignore |   1 +
>>   testcases/kernel/syscalls/gettid/Makefile   |   4 +-
>>   testcases/kernel/syscalls/gettid/gettid01.c | 105 ++++----------------
>>   testcases/kernel/syscalls/gettid/gettid02.c |  68 +++++++++++++
>>   5 files changed, 93 insertions(+), 86 deletions(-)
>>   create mode 100644 testcases/kernel/syscalls/gettid/gettid02.c
> Looks generally good to merge.
>
> I'm only wondering whether the goto in the 2nd test could be avoided. After
> all it might even be a benefit to get an info for all the wrongly equivalent
> thread IDs (and not just the first).
>
> Then it would also make sense to use `int j = i + 1;` in the inner loop to
> avoid duplicate/redundant commutative comparisons. And then you could actually
> also drop the `i == j` check.
>
>
>
>
It makes sense, I update the code.

Andrea


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2023-10-05 14:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05 13:49 [LTP] [PATCH v2 0/2] Rewrite the gettid() testing suite Andrea Cervesato
2023-10-05 13:49 ` [LTP] [PATCH v2 1/2] Rewrite gettid01 test Andrea Cervesato
2023-10-05 13:49 ` [LTP] [PATCH v2 2/2] Add gettid02 test Andrea Cervesato
2023-10-05 14:24 ` [LTP] [PATCH v2 0/2] Rewrite the gettid() testing suite Marius Kittler
2023-10-05 14:39   ` Andrea Cervesato via ltp [this message]

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=6302bf6a-46b3-47da-aec6-31abd1b498c0@suse.com \
    --to=ltp@lists.linux.it \
    --cc=andrea.cervesato@suse.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.