All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v3] doc: update syscalls statistics
@ 2024-04-23  8:21 Andrea Cervesato
  2024-04-25 21:37 ` Petr Vorel
  0 siblings, 1 reply; 6+ messages in thread
From: Andrea Cervesato @ 2024-04-23  8:21 UTC (permalink / raw
  To: ltp

From: Andrea Cervesato <andrea.cervesato@suse.com>

This patch black-list a few syscalls which are not implemented in the
kernel, untestable or either really old (=< 2.6 kernel version), as well
as defining already tested syscalls.
Also fixed an index issue with table generation.

Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
 doc/conf.py | 27 ++++++++++++++++++++++-----
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/doc/conf.py b/doc/conf.py
index 9408ee46e..d0f185b28 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -76,14 +76,31 @@ def generate_syscalls_stats(_):
         'io_uring_register',
         'epoll_pwait2',
         'quotactl_fd',
+        'pread64',
+        'pwrite64',
+        'fadvise64',
+        'getmsg',
+        'getpmsg',
+        'putmsg',
+        'putpmsg',
     ]
 
-    # populate with non-syscalls which are present in the kernel sources
-    # syscalls file
+    # populate with not implemented, reserved, unmaintained syscalls defined
+    # inside the syscalls file
     black_list = [
         'reserved177',
         'reserved193',
-        'rseq'
+        'rseq',
+        '_newselect',
+        '_sysctl',
+        'create_module',
+        'get_kernel_syms',
+        'query_module',
+        'nfsservctl',
+        'afs_syscall',
+        'sysmips',
+        'mq_getsetattr',
+        'vserver',
     ]
 
     # fetch syscalls file
@@ -184,12 +201,12 @@ def generate_syscalls_stats(_):
 
     left = index_tested % 3
     if left > 0:
-        for index in range(0, left + 1):
+        for index in range(0, 3 - left):
             table_tested.append(f'      -\n')
 
     left = index_untest % 3
     if left > 0:
-        for index in range(0, left + 1):
+        for index in range(0, 3 - left):
             table_untest.append(f'      -\n')
 
     text.extend(table_tested)
-- 
2.35.3


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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH v3] doc: update syscalls statistics
  2024-04-23  8:21 [LTP] [PATCH v3] doc: update syscalls statistics Andrea Cervesato
@ 2024-04-25 21:37 ` Petr Vorel
  2024-04-26 10:29   ` Andrea Cervesato via ltp
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2024-04-25 21:37 UTC (permalink / raw
  To: Andrea Cervesato; +Cc: ltp

Hi Andrea,

> This patch black-list a few syscalls which are not implemented in the
> kernel, untestable or either really old (=< 2.6 kernel version), as well
> as defining already tested syscalls.
> Also fixed an index issue with table generation.

Thanks a lot, obvious fix, therefore merged.

I would still consider:

1) Listing also mq_getsetattr().
2) Trying to links syscalls names to the syscalls directory
(e.g. read => read directory in LTP tree[1]) that should not be that hard.
3) Write explanation, that these syscalls are to "some extend tested".
Ideally, I would wish we would transform metadata output generation [2]
to the docs here and enable also LTP latest stable version docs.

Kind regards,
Petr

[1] https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/syscalls/read
[2] https://github.com/linux-test-project/ltp/releases/download/20230516/metadata.20230516.html

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH v3] doc: update syscalls statistics
  2024-04-25 21:37 ` Petr Vorel
@ 2024-04-26 10:29   ` Andrea Cervesato via ltp
  2024-04-26 10:32     ` Andrea Cervesato via ltp
  2024-04-26 18:17     ` Petr Vorel
  0 siblings, 2 replies; 6+ messages in thread
From: Andrea Cervesato via ltp @ 2024-04-26 10:29 UTC (permalink / raw
  To: Petr Vorel, Andrea Cervesato; +Cc: ltp

Hi!

On 4/25/24 23:37, Petr Vorel wrote:
> Hi Andrea,
>
>> This patch black-list a few syscalls which are not implemented in the
>> kernel, untestable or either really old (=< 2.6 kernel version), as well
>> as defining already tested syscalls.
>> Also fixed an index issue with table generation.
> Thanks a lot, obvious fix, therefore merged.
>
> I would still consider:
>
> 1) Listing also mq_getsetattr().
 From manual:

DESCRIPTION
        Do not use this system call.

        This  is  the low-level system call used to implement 
mq_getattr(3) and mq_setattr(3).  For an explanation of how this system 
call operates, see the description
        of mq_setattr(3).

> 2) Trying to links syscalls names to the syscalls directory
> (e.g. read => read directory in LTP tree[1]) that should not be that hard.
It's already like this: we check for syscalls subfolders and compare 
them with syscalls file. If subfolder exists, we suppose to have tests 
for the specific syscall (of course, this doesn't include coverage).
> 3) Write explanation, that these syscalls are to "some extend tested".
> Ideally, I would wish we would transform metadata output generation [2]
> to the docs here and enable also LTP latest stable version docs.
Possible, but it might be a bit challenging
>
> Kind regards,
> Petr
>
> [1] https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/syscalls/read
> [2] https://github.com/linux-test-project/ltp/releases/download/20230516/metadata.20230516.html

Andrea


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH v3] doc: update syscalls statistics
  2024-04-26 10:29   ` Andrea Cervesato via ltp
@ 2024-04-26 10:32     ` Andrea Cervesato via ltp
  2024-04-26 18:22       ` Petr Vorel
  2024-04-26 18:17     ` Petr Vorel
  1 sibling, 1 reply; 6+ messages in thread
From: Andrea Cervesato via ltp @ 2024-04-26 10:32 UTC (permalink / raw
  To: Petr Vorel, Andrea Cervesato; +Cc: ltp

I forgot to mention that there are syscalls like "cachectl" which are 
MIPS specific.
At the same time, "restart_syscall" is supposed to be used for internal 
usage only.

I left them there, but maybe they need to be blacklisted as well.

On 4/26/24 12:29, Andrea Cervesato wrote:
> Hi!
>
> On 4/25/24 23:37, Petr Vorel wrote:
>> Hi Andrea,
>>
>>> This patch black-list a few syscalls which are not implemented in the
>>> kernel, untestable or either really old (=< 2.6 kernel version), as 
>>> well
>>> as defining already tested syscalls.
>>> Also fixed an index issue with table generation.
>> Thanks a lot, obvious fix, therefore merged.
>>
>> I would still consider:
>>
>> 1) Listing also mq_getsetattr().
> From manual:
>
> DESCRIPTION
>        Do not use this system call.
>
>        This  is  the low-level system call used to implement 
> mq_getattr(3) and mq_setattr(3).  For an explanation of how this 
> system call operates, see the description
>        of mq_setattr(3).
>
>> 2) Trying to links syscalls names to the syscalls directory
>> (e.g. read => read directory in LTP tree[1]) that should not be that 
>> hard.
> It's already like this: we check for syscalls subfolders and compare 
> them with syscalls file. If subfolder exists, we suppose to have tests 
> for the specific syscall (of course, this doesn't include coverage).
>> 3) Write explanation, that these syscalls are to "some extend tested".
>> Ideally, I would wish we would transform metadata output generation [2]
>> to the docs here and enable also LTP latest stable version docs.
> Possible, but it might be a bit challenging
>>
>> Kind regards,
>> Petr
>>
>> [1] 
>> https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/syscalls/read
>> [2] 
>> https://github.com/linux-test-project/ltp/releases/download/20230516/metadata.20230516.html
>
> Andrea
>


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH v3] doc: update syscalls statistics
  2024-04-26 10:29   ` Andrea Cervesato via ltp
  2024-04-26 10:32     ` Andrea Cervesato via ltp
@ 2024-04-26 18:17     ` Petr Vorel
  1 sibling, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2024-04-26 18:17 UTC (permalink / raw
  To: Andrea Cervesato; +Cc: ltp

> Hi!

> On 4/25/24 23:37, Petr Vorel wrote:
> > Hi Andrea,

> > > This patch black-list a few syscalls which are not implemented in the
> > > kernel, untestable or either really old (=< 2.6 kernel version), as well
> > > as defining already tested syscalls.
> > > Also fixed an index issue with table generation.
> > Thanks a lot, obvious fix, therefore merged.

> > I would still consider:

> > 1) Listing also mq_getsetattr().
> From manual:

> DESCRIPTION
>        Do not use this system call.

>        This  is  the low-level system call used to implement mq_getattr(3)
> and mq_setattr(3).  For an explanation of how this system call operates, see
> the description
>        of mq_setattr(3).


And it continue " Never call it unless you are writing a C library!"

IMHO this is mean to the normal users, because very few people wrote libc.
But we test kernel interface, which include this.

> > 2) Trying to links syscalls names to the syscalls directory
> > (e.g. read => read directory in LTP tree[1]) that should not be that hard.

> It's already like this: we check for syscalls subfolders and compare them
> with syscalls file. If subfolder exists, we suppose to have tests for the
> specific syscall (of course, this doesn't include coverage).

I wrote before, just bool test x not test is IMHO not much helpful. But maybe
others see it differently. That's why I would like at least to add a link so
that reader itself has it easy verify it itself. Ideally all tests would be
listed. I understand if you don't have time to implement it, but IMHO it would
be helpful.

> > 3) Write explanation, that these syscalls are to "some extend tested".
> > Ideally, I would wish we would transform metadata output generation [2]
> > to the docs here and enable also LTP latest stable version docs.
> Possible, but it might be a bit challenging

Yes, but it does not make much sense to keep 2 formats. Again, one question
is whether we agree on it and the other is whether anybody finds time to
implement it.

Kind regards,
Petr

> > Kind regards,
> > Petr

> > [1] https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/syscalls/read
> > [2] https://github.com/linux-test-project/ltp/releases/download/20230516/metadata.20230516.html

> Andrea


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH v3] doc: update syscalls statistics
  2024-04-26 10:32     ` Andrea Cervesato via ltp
@ 2024-04-26 18:22       ` Petr Vorel
  0 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2024-04-26 18:22 UTC (permalink / raw
  To: Andrea Cervesato; +Cc: ltp

Hi Andrea,

> I forgot to mention that there are syscalls like "cachectl" which are MIPS
> specific.

I guess we probably don't care about MIPS, although it's still supported by
kernel.

> At the same time, "restart_syscall" is supposed to be used for internal
> usage only.

We probably don't bother about this one. But again, this warning "There is no
glibc wrapper for this system call, because it is intended for use only by the
kernel and should never be called by applications." does not automatically mean
we should not test it. We don't test just glibc, but also kernel internals,
right? The note is written this way, because man pages aren't meant to be for
LTP developers but for user space application developers.

Kind regards,
Petr

> I left them there, but maybe they need to be blacklisted as well.


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-26 18:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-23  8:21 [LTP] [PATCH v3] doc: update syscalls statistics Andrea Cervesato
2024-04-25 21:37 ` Petr Vorel
2024-04-26 10:29   ` Andrea Cervesato via ltp
2024-04-26 10:32     ` Andrea Cervesato via ltp
2024-04-26 18:22       ` Petr Vorel
2024-04-26 18:17     ` Petr Vorel

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.