[LTP] [PATCH v2 0/2] Rewrite the gettid() testing suite

Marius Kittler mkittler@suse.de
Thu Oct 5 16:24:25 CEST 2023


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.





More information about the ltp mailing list