public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [RFC][PATCH 0/2] Merge runtest files
@ 2025-04-03 10:19 Petr Vorel
  2025-04-03 10:19 ` [LTP] [RFC][PATCH 1/2] runtest/ipc: Enable named pipes on non-blocking IO Petr Vorel
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Petr Vorel @ 2025-04-03 10:19 UTC (permalink / raw)
  To: ltp

Hi,

besides runtest/ipc, there are other small runtest files.  I know we are
slowly working towards removing runtest files, but until it happen we
might want to optimize (=> merge) small runtest files into others.

With this change we have in the runtest files (ignoring comments):

$ for i in runtest/*; do echo "$(grep -v '#' $i | wc -l): $i"; done | sort -rn


$ wc -l runtest/* | sort -nr # not taking into account the comments
1823: runtest/syscalls
392: runtest/controllers
140: runtest/scsi_debug.part1
140: runtest/ltp-aiodio.part1
137: runtest/net.nfs
...
9: runtest/watchqueue
9: runtest/tracing
9: runtest/ima
7: runtest/dma_thread_diotest
7: runtest/cpuhotplug
6: runtest/net.ipv6_lib
6: runtest/input
6: runtest/capability
5: runtest/power_management_tests_exclusive
5: runtest/power_management_tests
5: runtest/kvm
4: runtest/net.multicast
3: runtest/uevent
3: runtest/hyperthreading
3: runtest/crashme
3: runtest/can
2: runtest/nptl
1: runtest/s390x_tests
1: runtest/irq
1: runtest/fcntl-locktests
0: runtest/staging

I would suggest to:

* move runtest/can to runtest/kernel_misc (better
name would be kernel_drivers, but I don't want to do renames, even
merging runtest files will disturb folks testing with LTP.

* move runtest/fcntl-locktests to runtest/net.nfs.

* runtest/nptl is NPTL test for pthread_cond_timedwait(), can this be
  moved to runtest/sched? (there are other pthread_* tests). Not sure if
  tests are relevant now.

* runtest/irq Obviously we would need more IRQ tests (IMHO none even in
  kselftest)

I wonder if runtest/dma_thread_diotest. runtest/crashme,
runtest/power_management_tests and runtest/power_management_tests_exclusive
are still relevant or that much outdated, that it should be removed.

I think vmcp_m.sh (the only one in runtest/s390x_tests) should be removed.

Other should probably be kept separate.

runtest/staging is expected to be often 0.

Kind regards,
Petr

Petr Vorel (2):
  runtest/ipc: Enable named pipes on non-blocking IO
  runtest: Move ipc into syscalls

 runtest/ipc      | 30 ------------------------------
 runtest/syscalls |  9 +++++++++
 2 files changed, 9 insertions(+), 30 deletions(-)
 delete mode 100644 runtest/ipc

-- 
2.49.0


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

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

* [LTP] [RFC][PATCH 1/2] runtest/ipc: Enable named pipes on non-blocking IO
  2025-04-03 10:19 [LTP] [RFC][PATCH 0/2] Merge runtest files Petr Vorel
@ 2025-04-03 10:19 ` Petr Vorel
  2025-04-06  2:55   ` Li Wang via ltp
  2025-04-08 18:37   ` Cyril Hrubis
  2025-04-03 10:19 ` [LTP] [RFC][PATCH 2/2] runtest: Move ipc into syscalls Petr Vorel
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 14+ messages in thread
From: Petr Vorel @ 2025-04-03 10:19 UTC (permalink / raw)
  To: ltp

Tests were disabled from the start (edab67b3a0 in 2001) due EAGAIN.
Tests are working now even on very old SLE12-SP3 based 4.4 kernel,
therefore enable them.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 runtest/ipc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/runtest/ipc b/runtest/ipc
index db7f7bed58..f5cdea1974 100644
--- a/runtest/ipc
+++ b/runtest/ipc
@@ -4,10 +4,9 @@
 pipeio_1 pipeio -T pipeio_1 -c 5 -s 4090 -i 100 -b -f x80
 # spawns 5 children to write 100 chunks of 4090 bytes to a named pipe
 # using blocking I/O
-#pipeio_2 pipeio -T pipeio_2 -c 5 -s 4090 -i 100 -f x80
+pipeio_2 pipeio -T pipeio_2 -c 5 -s 4090 -i 100 -f x80
 # spawns 5 children to write 100 chunks of 4090 bytes to a named pipe
 # using non-blocking I/O
-# This test hits EAGAIN, which pipeio doesn't handle at the moment
 pipeio_3 pipeio -T pipeio_3 -c 5 -s 4090 -i 100 -u -b -f x80
 # spawns 5 children to write 100 chunks of 4090 bytes to an unnamed pipe
 # using blocking I/O
@@ -20,10 +19,9 @@ pipeio_5 pipeio -T pipeio_5 -c 5 -s 5000 -i 10 -b -f x80
 pipeio_6 pipeio -T pipeio_6 -c 5 -s 5000 -i 10 -b -u -f x80
 # spawns 5 children to write 10 chunks of 5000 bytes to an unnamed pipe
 # using blocking I/O
-#pipeio_7 pipeio -T pipeio_7 -c 5 -s 5000 -i 10 -f x80
+pipeio_7 pipeio -T pipeio_7 -c 5 -s 5000 -i 10 -f x80
 # spawns 5 children to write 10 chunks of 5000 bytes to a named pipe
 # using non-blocking I/O
-# This test hits EAGAIN, which pipeio doesn't handle at the moment
 pipeio_8 pipeio -T pipeio_8 -c 5 -s 5000 -i 10 -u -f x80
 # spawns 5 children to write 10 chunks of 5000 bytes to an unnamed pipe
 # using non-blocking I/O
-- 
2.49.0


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

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

* [LTP] [RFC][PATCH 2/2] runtest: Move ipc into syscalls
  2025-04-03 10:19 [LTP] [RFC][PATCH 0/2] Merge runtest files Petr Vorel
  2025-04-03 10:19 ` [LTP] [RFC][PATCH 1/2] runtest/ipc: Enable named pipes on non-blocking IO Petr Vorel
@ 2025-04-03 10:19 ` Petr Vorel
  2025-04-06  3:01   ` Li Wang via ltp
  2025-04-17  9:22   ` Cyril Hrubis
  2025-04-03 11:33 ` [LTP] [RFC][PATCH 0/2] Merge runtest files Andrea Cervesato via ltp
  2025-04-06  2:43 ` Li Wang via ltp
  3 siblings, 2 replies; 14+ messages in thread
From: Petr Vorel @ 2025-04-03 10:19 UTC (permalink / raw)
  To: ltp

It's not worth to keep separate runtest file for 8 very quick tests.
syscalls-ipc would be obvious runtest to move, but it contains tests for
message queues, semaphores etc. Other IPC tests are in syscalls runtest,
therefore move tests there.

Remove test description (can be visible from help and the test output,
it was also below the test not above).

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 runtest/ipc      | 28 ----------------------------
 runtest/syscalls |  9 +++++++++
 2 files changed, 9 insertions(+), 28 deletions(-)
 delete mode 100644 runtest/ipc

diff --git a/runtest/ipc b/runtest/ipc
deleted file mode 100644
index f5cdea1974..0000000000
--- a/runtest/ipc
+++ /dev/null
@@ -1,28 +0,0 @@
-#DESCRIPTION:Interprocess communication stress
-# These tests use tests/pipeio to put pipes (named or unnamed) through a workout
-#
-pipeio_1 pipeio -T pipeio_1 -c 5 -s 4090 -i 100 -b -f x80
-# spawns 5 children to write 100 chunks of 4090 bytes to a named pipe
-# using blocking I/O
-pipeio_2 pipeio -T pipeio_2 -c 5 -s 4090 -i 100 -f x80
-# spawns 5 children to write 100 chunks of 4090 bytes to a named pipe
-# using non-blocking I/O
-pipeio_3 pipeio -T pipeio_3 -c 5 -s 4090 -i 100 -u -b -f x80
-# spawns 5 children to write 100 chunks of 4090 bytes to an unnamed pipe
-# using blocking I/O
-pipeio_4 pipeio -T pipeio_4 -c 5 -s 4090 -i 100 -u -f x80
-# spawns 5 children to write 100 chunks of 4090 bytes to an unnamed pipe
-# using non-blocking I/O
-pipeio_5 pipeio -T pipeio_5 -c 5 -s 5000 -i 10 -b -f x80
-# spawns 5 children to write 10 chunks of 5000 bytes to a named pipe
-# using blocking I/O
-pipeio_6 pipeio -T pipeio_6 -c 5 -s 5000 -i 10 -b -u -f x80
-# spawns 5 children to write 10 chunks of 5000 bytes to an unnamed pipe
-# using blocking I/O
-pipeio_7 pipeio -T pipeio_7 -c 5 -s 5000 -i 10 -f x80
-# spawns 5 children to write 10 chunks of 5000 bytes to a named pipe
-# using non-blocking I/O
-pipeio_8 pipeio -T pipeio_8 -c 5 -s 5000 -i 10 -u -f x80
-# spawns 5 children to write 10 chunks of 5000 bytes to an unnamed pipe
-# using non-blocking I/O
-
diff --git a/runtest/syscalls b/runtest/syscalls
index 05b3e0d376..b911aba7b6 100644
--- a/runtest/syscalls
+++ b/runtest/syscalls
@@ -1047,6 +1047,15 @@ pipe2_01 pipe2_01
 pipe2_02 pipe2_02
 pipe2_04 pipe2_04
 
+pipeio_1 pipeio -T pipeio_1 -c 5 -s 4090 -i 100 -b -f x80
+pipeio_2 pipeio -T pipeio_2 -c 5 -s 4090 -i 100 -f x80
+pipeio_3 pipeio -T pipeio_3 -c 5 -s 4090 -i 100 -u -b -f x80
+pipeio_4 pipeio -T pipeio_4 -c 5 -s 4090 -i 100 -u -f x80
+pipeio_5 pipeio -T pipeio_5 -c 5 -s 5000 -i 10 -b -f x80
+pipeio_6 pipeio -T pipeio_6 -c 5 -s 5000 -i 10 -b -u -f x80
+pipeio_7 pipeio -T pipeio_7 -c 5 -s 5000 -i 10 -f x80
+pipeio_8 pipeio -T pipeio_8 -c 5 -s 5000 -i 10 -u -f x80
+
 pivot_root01 pivot_root01
 
 poll01 poll01
-- 
2.49.0


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

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

* Re: [LTP] [RFC][PATCH 0/2] Merge runtest files
  2025-04-03 10:19 [LTP] [RFC][PATCH 0/2] Merge runtest files Petr Vorel
  2025-04-03 10:19 ` [LTP] [RFC][PATCH 1/2] runtest/ipc: Enable named pipes on non-blocking IO Petr Vorel
  2025-04-03 10:19 ` [LTP] [RFC][PATCH 2/2] runtest: Move ipc into syscalls Petr Vorel
@ 2025-04-03 11:33 ` Andrea Cervesato via ltp
  2025-04-03 15:47   ` Cyril Hrubis
  2025-04-06  2:43 ` Li Wang via ltp
  3 siblings, 1 reply; 14+ messages in thread
From: Andrea Cervesato via ltp @ 2025-04-03 11:33 UTC (permalink / raw)
  To: Petr Vorel, ltp

Hi Petr,

this is a _huge_ topic that might affect LTP automation configurations.

It's a job that IMHO should be done, but it makes more sense to wait for 
testing suites definition in metadata, as well as a total refactoring of 
old LTP tests.

The reason of my statements is not only that runtest files should be 
removed one day, but also that known issues inside products which are 
tested, often require years of analysis of the runtest files and their 
executions. By shuffling tests around will create issues where there's 
no need due to a small logical improvement.

I think we should start to push more on testing suites definition inside 
metadata and to refactor tests as fast as possible. So we will be free 
from runtest files, leading to a more coherent structure of the tests 
organization.

- Andrea

On 4/3/25 12:19, Petr Vorel wrote:
> Hi,
>
> besides runtest/ipc, there are other small runtest files.  I know we are
> slowly working towards removing runtest files, but until it happen we
> might want to optimize (=> merge) small runtest files into others.
>
> With this change we have in the runtest files (ignoring comments):
>
> $ for i in runtest/*; do echo "$(grep -v '#' $i | wc -l): $i"; done | sort -rn
>
>
> $ wc -l runtest/* | sort -nr # not taking into account the comments
> 1823: runtest/syscalls
> 392: runtest/controllers
> 140: runtest/scsi_debug.part1
> 140: runtest/ltp-aiodio.part1
> 137: runtest/net.nfs
> ...
> 9: runtest/watchqueue
> 9: runtest/tracing
> 9: runtest/ima
> 7: runtest/dma_thread_diotest
> 7: runtest/cpuhotplug
> 6: runtest/net.ipv6_lib
> 6: runtest/input
> 6: runtest/capability
> 5: runtest/power_management_tests_exclusive
> 5: runtest/power_management_tests
> 5: runtest/kvm
> 4: runtest/net.multicast
> 3: runtest/uevent
> 3: runtest/hyperthreading
> 3: runtest/crashme
> 3: runtest/can
> 2: runtest/nptl
> 1: runtest/s390x_tests
> 1: runtest/irq
> 1: runtest/fcntl-locktests
> 0: runtest/staging
>
> I would suggest to:
>
> * move runtest/can to runtest/kernel_misc (better
> name would be kernel_drivers, but I don't want to do renames, even
> merging runtest files will disturb folks testing with LTP.
>
> * move runtest/fcntl-locktests to runtest/net.nfs.
>
> * runtest/nptl is NPTL test for pthread_cond_timedwait(), can this be
>    moved to runtest/sched? (there are other pthread_* tests). Not sure if
>    tests are relevant now.
>
> * runtest/irq Obviously we would need more IRQ tests (IMHO none even in
>    kselftest)
>
> I wonder if runtest/dma_thread_diotest. runtest/crashme,
> runtest/power_management_tests and runtest/power_management_tests_exclusive
> are still relevant or that much outdated, that it should be removed.
>
> I think vmcp_m.sh (the only one in runtest/s390x_tests) should be removed.
>
> Other should probably be kept separate.
>
> runtest/staging is expected to be often 0.
>
> Kind regards,
> Petr
>
> Petr Vorel (2):
>    runtest/ipc: Enable named pipes on non-blocking IO
>    runtest: Move ipc into syscalls
>
>   runtest/ipc      | 30 ------------------------------
>   runtest/syscalls |  9 +++++++++
>   2 files changed, 9 insertions(+), 30 deletions(-)
>   delete mode 100644 runtest/ipc
>

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

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

* Re: [LTP] [RFC][PATCH 0/2] Merge runtest files
  2025-04-03 11:33 ` [LTP] [RFC][PATCH 0/2] Merge runtest files Andrea Cervesato via ltp
@ 2025-04-03 15:47   ` Cyril Hrubis
  2025-04-06  2:52     ` Li Wang via ltp
  0 siblings, 1 reply; 14+ messages in thread
From: Cyril Hrubis @ 2025-04-03 15:47 UTC (permalink / raw)
  To: Andrea Cervesato; +Cc: ltp

Hi!
> this is a _huge_ topic that might affect LTP automation configurations.
> 
> It's a job that IMHO should be done, but it makes more sense to wait for 
> testing suites definition in metadata, as well as a total refactoring of 
> old LTP tests.

For a bigger changes yes. I would say that eliminating runtest files
with a single test could be done sooner.

> The reason of my statements is not only that runtest files should be 
> removed one day, but also that known issues inside products which are 
> tested, often require years of analysis of the runtest files and their 
> executions. By shuffling tests around will create issues where there's 
> no need due to a small logical improvement.

I do not think that it's as severe as you describe it. We change runtest
files a lot in each release and additions to runtest/syscall are the most
frequent.

> I think we should start to push more on testing suites definition inside 
> metadata and to refactor tests as fast as possible. So we will be free 
> from runtest files, leading to a more coherent structure of the tests 
> organization.

We are getting there slowly, but I'm afraid that it will take years to
get there.

-- 
Cyril Hrubis
chrubis@suse.cz

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

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

* Re: [LTP] [RFC][PATCH 0/2] Merge runtest files
  2025-04-03 10:19 [LTP] [RFC][PATCH 0/2] Merge runtest files Petr Vorel
                   ` (2 preceding siblings ...)
  2025-04-03 11:33 ` [LTP] [RFC][PATCH 0/2] Merge runtest files Andrea Cervesato via ltp
@ 2025-04-06  2:43 ` Li Wang via ltp
  3 siblings, 0 replies; 14+ messages in thread
From: Li Wang via ltp @ 2025-04-06  2:43 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

On Thu, Apr 3, 2025 at 6:19 PM Petr Vorel <pvorel@suse.cz> wrote:

> Hi,
>
> besides runtest/ipc, there are other small runtest files.  I know we are
> slowly working towards removing runtest files, but until it happen we
> might want to optimize (=> merge) small runtest files into others.
>

I agree with optimizing the runtest file to organize cases better.
Since we now mainly rely on the runtest files to triage test categories.



> With this change we have in the runtest files (ignoring comments):
>
> $ for i in runtest/*; do echo "$(grep -v '#' $i | wc -l): $i"; done | sort
> -rn
>
>
> $ wc -l runtest/* | sort -nr # not taking into account the comments
> 1823: runtest/syscalls
> 392: runtest/controllers
> 140: runtest/scsi_debug.part1
> 140: runtest/ltp-aiodio.part1
> 137: runtest/net.nfs
> ...
> 9: runtest/watchqueue
> 9: runtest/tracing
> 9: runtest/ima
> 7: runtest/dma_thread_diotest
> 7: runtest/cpuhotplug
> 6: runtest/net.ipv6_lib
> 6: runtest/input
> 6: runtest/capability
> 5: runtest/power_management_tests_exclusive
> 5: runtest/power_management_tests
> 5: runtest/kvm
> 4: runtest/net.multicast
> 3: runtest/uevent
> 3: runtest/hyperthreading
> 3: runtest/crashme
> 3: runtest/can
> 2: runtest/nptl
> 1: runtest/s390x_tests
> 1: runtest/irq
> 1: runtest/fcntl-locktests
> 0: runtest/staging
>
> I would suggest to:
>
> * move runtest/can to runtest/kernel_misc (better
> name would be kernel_drivers, but I don't want to do renames, even
> merging runtest files will disturb folks testing with LTP.
>
> * move runtest/fcntl-locktests to runtest/net.nfs.
>
> * runtest/nptl is NPTL test for pthread_cond_timedwait(), can this be
>   moved to runtest/sched? (there are other pthread_* tests). Not sure if
>   tests are relevant now.
>
> * runtest/irq Obviously we would need more IRQ tests (IMHO none even in
>   kselftest)
>
> I wonder if runtest/dma_thread_diotest. runtest/crashme,
> runtest/power_management_tests and runtest/power_management_tests_exclusive
> are still relevant or that much outdated, that it should be removed.
>
> I think vmcp_m.sh (the only one in runtest/s390x_tests) should be removed.
>
> Other should probably be kept separate.
>
> runtest/staging is expected to be often 0.
>

Sounds good to me, above.

-- 
Regards,
Li Wang

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

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

* Re: [LTP] [RFC][PATCH 0/2] Merge runtest files
  2025-04-03 15:47   ` Cyril Hrubis
@ 2025-04-06  2:52     ` Li Wang via ltp
  0 siblings, 0 replies; 14+ messages in thread
From: Li Wang via ltp @ 2025-04-06  2:52 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: ltp

On Thu, Apr 3, 2025 at 11:47 PM Cyril Hrubis <chrubis@suse.cz> wrote:

> Hi!
> > this is a _huge_ topic that might affect LTP automation configurations.
> >
> > It's a job that IMHO should be done, but it makes more sense to wait for
> > testing suites definition in metadata, as well as a total refactoring of
> > old LTP tests.
>
> For a bigger changes yes. I would say that eliminating runtest files
> with a single test could be done sooner.
>
+1.

Even if metadata is used to organize cases in an automated way in the
future,
runtest files will still be a readable and straightforward way to
categorize.
They can be used as independent ways to help organizations IMO.



>
> > The reason of my statements is not only that runtest files should be
> > removed one day, but also that known issues inside products which are
> > tested, often require years of analysis of the runtest files and their
> > executions. By shuffling tests around will create issues where there's
> > no need due to a small logical improvement.
>
> I do not think that it's as severe as you describe it. We change runtest
> files a lot in each release and additions to runtest/syscall are the most
> frequent.
>
> > I think we should start to push more on testing suites definition inside
> > metadata and to refactor tests as fast as possible. So we will be free
> > from runtest files, leading to a more coherent structure of the tests
> > organization.
>
> We are getting there slowly, but I'm afraid that it will take years to
> get there.
>
> --
> Cyril Hrubis
> chrubis@suse.cz
>
>

-- 
Regards,
Li Wang

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

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

* Re: [LTP] [RFC][PATCH 1/2] runtest/ipc: Enable named pipes on non-blocking IO
  2025-04-03 10:19 ` [LTP] [RFC][PATCH 1/2] runtest/ipc: Enable named pipes on non-blocking IO Petr Vorel
@ 2025-04-06  2:55   ` Li Wang via ltp
  2025-04-08 18:37   ` Cyril Hrubis
  1 sibling, 0 replies; 14+ messages in thread
From: Li Wang via ltp @ 2025-04-06  2:55 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

On Thu, Apr 3, 2025 at 6:19 PM Petr Vorel <pvorel@suse.cz> wrote:

> Tests were disabled from the start (edab67b3a0 in 2001) due EAGAIN.
> Tests are working now even on very old SLE12-SP3 based 4.4 kernel,
> therefore enable them.
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
>
Tested-by: Li Wang <liwang@redhat.com>
Reviewed-by: Li Wang <liwang@redhat.com>


---
>  runtest/ipc | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/runtest/ipc b/runtest/ipc
> index db7f7bed58..f5cdea1974 100644
> --- a/runtest/ipc
> +++ b/runtest/ipc
> @@ -4,10 +4,9 @@
>  pipeio_1 pipeio -T pipeio_1 -c 5 -s 4090 -i 100 -b -f x80
>  # spawns 5 children to write 100 chunks of 4090 bytes to a named pipe
>  # using blocking I/O
> -#pipeio_2 pipeio -T pipeio_2 -c 5 -s 4090 -i 100 -f x80
> +pipeio_2 pipeio -T pipeio_2 -c 5 -s 4090 -i 100 -f x80
>  # spawns 5 children to write 100 chunks of 4090 bytes to a named pipe
>  # using non-blocking I/O
> -# This test hits EAGAIN, which pipeio doesn't handle at the moment
>  pipeio_3 pipeio -T pipeio_3 -c 5 -s 4090 -i 100 -u -b -f x80
>  # spawns 5 children to write 100 chunks of 4090 bytes to an unnamed pipe
>  # using blocking I/O
> @@ -20,10 +19,9 @@ pipeio_5 pipeio -T pipeio_5 -c 5 -s 5000 -i 10 -b -f x80
>  pipeio_6 pipeio -T pipeio_6 -c 5 -s 5000 -i 10 -b -u -f x80
>  # spawns 5 children to write 10 chunks of 5000 bytes to an unnamed pipe
>  # using blocking I/O
> -#pipeio_7 pipeio -T pipeio_7 -c 5 -s 5000 -i 10 -f x80
> +pipeio_7 pipeio -T pipeio_7 -c 5 -s 5000 -i 10 -f x80
>  # spawns 5 children to write 10 chunks of 5000 bytes to a named pipe
>  # using non-blocking I/O
> -# This test hits EAGAIN, which pipeio doesn't handle at the moment
>  pipeio_8 pipeio -T pipeio_8 -c 5 -s 5000 -i 10 -u -f x80
>  # spawns 5 children to write 10 chunks of 5000 bytes to an unnamed pipe
>  # using non-blocking I/O
> --
> 2.49.0
>
>

-- 
Regards,
Li Wang

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

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

* Re: [LTP] [RFC][PATCH 2/2] runtest: Move ipc into syscalls
  2025-04-03 10:19 ` [LTP] [RFC][PATCH 2/2] runtest: Move ipc into syscalls Petr Vorel
@ 2025-04-06  3:01   ` Li Wang via ltp
  2025-04-07 12:15     ` Petr Vorel
  2025-04-07 12:19     ` Petr Vorel
  2025-04-17  9:22   ` Cyril Hrubis
  1 sibling, 2 replies; 14+ messages in thread
From: Li Wang via ltp @ 2025-04-06  3:01 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

On Thu, Apr 3, 2025 at 6:19 PM Petr Vorel <pvorel@suse.cz> wrote:

> It's not worth to keep separate runtest file for 8 very quick tests.
> syscalls-ipc would be obvious runtest to move, but it contains tests for
> message queues, semaphores etc. Other IPC tests are in syscalls runtest,
> therefore move tests there.
>
> Remove test description (can be visible from help and the test output,
> it was also below the test not above).
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>

---
>  runtest/ipc      | 28 ----------------------------
>  runtest/syscalls |  9 +++++++++
>  2 files changed, 9 insertions(+), 28 deletions(-)
>  delete mode 100644 runtest/ipc
>
> diff --git a/runtest/ipc b/runtest/ipc
> deleted file mode 100644
> index f5cdea1974..0000000000
> --- a/runtest/ipc
> +++ /dev/null
> @@ -1,28 +0,0 @@
>


> -#DESCRIPTION:Interprocess communication stress
> -# These tests use tests/pipeio to put pipes (named or unnamed) through a
> workout
>


> -#
> -pipeio_1 pipeio -T pipeio_1 -c 5 -s 4090 -i 100 -b -f x80
> -# spawns 5 children to write 100 chunks of 4090 bytes to a named pipe
> -# using blocking I/O
> -pipeio_2 pipeio -T pipeio_2 -c 5 -s 4090 -i 100 -f x80
> -# spawns 5 children to write 100 chunks of 4090 bytes to a named pipe
> -# using non-blocking I/O
> -pipeio_3 pipeio -T pipeio_3 -c 5 -s 4090 -i 100 -u -b -f x80
> -# spawns 5 children to write 100 chunks of 4090 bytes to an unnamed pipe
> -# using blocking I/O
> -pipeio_4 pipeio -T pipeio_4 -c 5 -s 4090 -i 100 -u -f x80
> -# spawns 5 children to write 100 chunks of 4090 bytes to an unnamed pipe
> -# using non-blocking I/O
> -pipeio_5 pipeio -T pipeio_5 -c 5 -s 5000 -i 10 -b -f x80
> -# spawns 5 children to write 10 chunks of 5000 bytes to a named pipe
> -# using blocking I/O
> -pipeio_6 pipeio -T pipeio_6 -c 5 -s 5000 -i 10 -b -u -f x80
> -# spawns 5 children to write 10 chunks of 5000 bytes to an unnamed pipe
> -# using blocking I/O
> -pipeio_7 pipeio -T pipeio_7 -c 5 -s 5000 -i 10 -f x80
> -# spawns 5 children to write 10 chunks of 5000 bytes to a named pipe
> -# using non-blocking I/O
> -pipeio_8 pipeio -T pipeio_8 -c 5 -s 5000 -i 10 -u -f x80
> -# spawns 5 children to write 10 chunks of 5000 bytes to an unnamed pipe
> -# using non-blocking I/O
> -
> diff --git a/runtest/syscalls b/runtest/syscalls
> index 05b3e0d376..b911aba7b6 100644
> --- a/runtest/syscalls
> +++ b/runtest/syscalls
> @@ -1047,6 +1047,15 @@ pipe2_01 pipe2_01
>  pipe2_02 pipe2_02
>  pipe2_04 pipe2_04
>
>
Maybe we can add one-line comments here to explain that these are
Interprocess communication stress test?

Since syscalls is a large file (containing so many tests), it makes sense
to comment on something there to explain the subtest blocks.


+pipeio_1 pipeio -T pipeio_1 -c 5 -s 4090 -i 100 -b -f x80
> +pipeio_2 pipeio -T pipeio_2 -c 5 -s 4090 -i 100 -f x80
> +pipeio_3 pipeio -T pipeio_3 -c 5 -s 4090 -i 100 -u -b -f x80
> +pipeio_4 pipeio -T pipeio_4 -c 5 -s 4090 -i 100 -u -f x80
> +pipeio_5 pipeio -T pipeio_5 -c 5 -s 5000 -i 10 -b -f x80
> +pipeio_6 pipeio -T pipeio_6 -c 5 -s 5000 -i 10 -b -u -f x80
> +pipeio_7 pipeio -T pipeio_7 -c 5 -s 5000 -i 10 -f x80
> +pipeio_8 pipeio -T pipeio_8 -c 5 -s 5000 -i 10 -u -f x80
>


Reviewed-by: Li Wang <liwang@redhat.com>


-- 
Regards,
Li Wang

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

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

* Re: [LTP] [RFC][PATCH 2/2] runtest: Move ipc into syscalls
  2025-04-06  3:01   ` Li Wang via ltp
@ 2025-04-07 12:15     ` Petr Vorel
  2025-04-07 12:19     ` Petr Vorel
  1 sibling, 0 replies; 14+ messages in thread
From: Petr Vorel @ 2025-04-07 12:15 UTC (permalink / raw)
  To: Li Wang; +Cc: ltp

Hi,

> On Thu, Apr 3, 2025 at 6:19 PM Petr Vorel <pvorel@suse.cz> wrote:

> > It's not worth to keep separate runtest file for 8 very quick tests.
> > syscalls-ipc would be obvious runtest to move, but it contains tests for
> > message queues, semaphores etc. Other IPC tests are in syscalls runtest,
> > therefore move tests there.

> > Remove test description (can be visible from help and the test output,
> > it was also below the test not above).

> > Signed-off-by: Petr Vorel <pvorel@suse.cz>

> ---
> >  runtest/ipc      | 28 ----------------------------
> >  runtest/syscalls |  9 +++++++++
> >  2 files changed, 9 insertions(+), 28 deletions(-)
> >  delete mode 100644 runtest/ipc

> > diff --git a/runtest/ipc b/runtest/ipc
> > deleted file mode 100644
> > index f5cdea1974..0000000000
> > --- a/runtest/ipc
> > +++ /dev/null
> > @@ -1,28 +0,0 @@



> > -#DESCRIPTION:Interprocess communication stress
> > -# These tests use tests/pipeio to put pipes (named or unnamed) through a
> > workout



> > -#
> > -pipeio_1 pipeio -T pipeio_1 -c 5 -s 4090 -i 100 -b -f x80
> > -# spawns 5 children to write 100 chunks of 4090 bytes to a named pipe
> > -# using blocking I/O
> > -pipeio_2 pipeio -T pipeio_2 -c 5 -s 4090 -i 100 -f x80
> > -# spawns 5 children to write 100 chunks of 4090 bytes to a named pipe
> > -# using non-blocking I/O
> > -pipeio_3 pipeio -T pipeio_3 -c 5 -s 4090 -i 100 -u -b -f x80
> > -# spawns 5 children to write 100 chunks of 4090 bytes to an unnamed pipe
> > -# using blocking I/O
> > -pipeio_4 pipeio -T pipeio_4 -c 5 -s 4090 -i 100 -u -f x80
> > -# spawns 5 children to write 100 chunks of 4090 bytes to an unnamed pipe
> > -# using non-blocking I/O
> > -pipeio_5 pipeio -T pipeio_5 -c 5 -s 5000 -i 10 -b -f x80
> > -# spawns 5 children to write 10 chunks of 5000 bytes to a named pipe
> > -# using blocking I/O
> > -pipeio_6 pipeio -T pipeio_6 -c 5 -s 5000 -i 10 -b -u -f x80
> > -# spawns 5 children to write 10 chunks of 5000 bytes to an unnamed pipe
> > -# using blocking I/O
> > -pipeio_7 pipeio -T pipeio_7 -c 5 -s 5000 -i 10 -f x80
> > -# spawns 5 children to write 10 chunks of 5000 bytes to a named pipe
> > -# using non-blocking I/O
> > -pipeio_8 pipeio -T pipeio_8 -c 5 -s 5000 -i 10 -u -f x80
> > -# spawns 5 children to write 10 chunks of 5000 bytes to an unnamed pipe
> > -# using non-blocking I/O
> > -
> > diff --git a/runtest/syscalls b/runtest/syscalls
> > index 05b3e0d376..b911aba7b6 100644
> > --- a/runtest/syscalls
> > +++ b/runtest/syscalls
> > @@ -1047,6 +1047,15 @@ pipe2_01 pipe2_01
> >  pipe2_02 pipe2_02
> >  pipe2_04 pipe2_04


> Maybe we can add one-line comments here to explain that these are
> Interprocess communication stress test?

> Since syscalls is a large file (containing so many tests), it makes sense
> to comment on something there to explain the subtest blocks.

Hi Li,

sure, I can add "# Interprocess communication stress tests" before merge.
Because change is trivial, instead of resending v2 I just post a diff below.

Kind regards,
Petr

> > +pipeio_1 pipeio -T pipeio_1 -c 5 -s 4090 -i 100 -b -f x80
> > +pipeio_2 pipeio -T pipeio_2 -c 5 -s 4090 -i 100 -f x80
> > +pipeio_3 pipeio -T pipeio_3 -c 5 -s 4090 -i 100 -u -b -f x80
> > +pipeio_4 pipeio -T pipeio_4 -c 5 -s 4090 -i 100 -u -f x80
> > +pipeio_5 pipeio -T pipeio_5 -c 5 -s 5000 -i 10 -b -f x80
> > +pipeio_6 pipeio -T pipeio_6 -c 5 -s 5000 -i 10 -b -u -f x80
> > +pipeio_7 pipeio -T pipeio_7 -c 5 -s 5000 -i 10 -f x80
> > +pipeio_8 pipeio -T pipeio_8 -c 5 -s 5000 -i 10 -u -f x80



> Reviewed-by: Li Wang <liwang@redhat.com>

diff --git runtest/syscalls runtest/syscalls
index a5ee1aa06c..7719cb2075 100644
--- runtest/syscalls
+++ runtest/syscalls
@@ -1049,6 +1049,7 @@ pipe2_01 pipe2_01
 pipe2_02 pipe2_02
 pipe2_04 pipe2_04
 
+# Interprocess communication stress tests
 pipeio_1 pipeio -T pipeio_1 -c 5 -s 4090 -i 100 -b -f x80
 pipeio_2 pipeio -T pipeio_2 -c 5 -s 4090 -i 100 -f x80
 pipeio_3 pipeio -T pipeio_3 -c 5 -s 4090 -i 100 -u -b -f x80

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

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

* Re: [LTP] [RFC][PATCH 2/2] runtest: Move ipc into syscalls
  2025-04-06  3:01   ` Li Wang via ltp
  2025-04-07 12:15     ` Petr Vorel
@ 2025-04-07 12:19     ` Petr Vorel
  1 sibling, 0 replies; 14+ messages in thread
From: Petr Vorel @ 2025-04-07 12:19 UTC (permalink / raw)
  To: Li Wang; +Cc: ltp, automated-testing

Hi

[ Cc automated-testing, Tim and Anders: FYI disruptive change,
content of runtest/ipc is moved into runtest/syscalls ]

Kind regards,
Petr

> On Thu, Apr 3, 2025 at 6:19 PM Petr Vorel <pvorel@suse.cz> wrote:

> > It's not worth to keep separate runtest file for 8 very quick tests.
> > syscalls-ipc would be obvious runtest to move, but it contains tests for
> > message queues, semaphores etc. Other IPC tests are in syscalls runtest,
> > therefore move tests there.

> > Remove test description (can be visible from help and the test output,
> > it was also below the test not above).

> > Signed-off-by: Petr Vorel <pvorel@suse.cz>

> ---
> >  runtest/ipc      | 28 ----------------------------
> >  runtest/syscalls |  9 +++++++++
> >  2 files changed, 9 insertions(+), 28 deletions(-)
> >  delete mode 100644 runtest/ipc

> > diff --git a/runtest/ipc b/runtest/ipc
> > deleted file mode 100644
> > index f5cdea1974..0000000000
> > --- a/runtest/ipc
> > +++ /dev/null
> > @@ -1,28 +0,0 @@



> > -#DESCRIPTION:Interprocess communication stress
> > -# These tests use tests/pipeio to put pipes (named or unnamed) through a
> > workout



> > -#
> > -pipeio_1 pipeio -T pipeio_1 -c 5 -s 4090 -i 100 -b -f x80
> > -# spawns 5 children to write 100 chunks of 4090 bytes to a named pipe
> > -# using blocking I/O
> > -pipeio_2 pipeio -T pipeio_2 -c 5 -s 4090 -i 100 -f x80
> > -# spawns 5 children to write 100 chunks of 4090 bytes to a named pipe
> > -# using non-blocking I/O
> > -pipeio_3 pipeio -T pipeio_3 -c 5 -s 4090 -i 100 -u -b -f x80
> > -# spawns 5 children to write 100 chunks of 4090 bytes to an unnamed pipe
> > -# using blocking I/O
> > -pipeio_4 pipeio -T pipeio_4 -c 5 -s 4090 -i 100 -u -f x80
> > -# spawns 5 children to write 100 chunks of 4090 bytes to an unnamed pipe
> > -# using non-blocking I/O
> > -pipeio_5 pipeio -T pipeio_5 -c 5 -s 5000 -i 10 -b -f x80
> > -# spawns 5 children to write 10 chunks of 5000 bytes to a named pipe
> > -# using blocking I/O
> > -pipeio_6 pipeio -T pipeio_6 -c 5 -s 5000 -i 10 -b -u -f x80
> > -# spawns 5 children to write 10 chunks of 5000 bytes to an unnamed pipe
> > -# using blocking I/O
> > -pipeio_7 pipeio -T pipeio_7 -c 5 -s 5000 -i 10 -f x80
> > -# spawns 5 children to write 10 chunks of 5000 bytes to a named pipe
> > -# using non-blocking I/O
> > -pipeio_8 pipeio -T pipeio_8 -c 5 -s 5000 -i 10 -u -f x80
> > -# spawns 5 children to write 10 chunks of 5000 bytes to an unnamed pipe
> > -# using non-blocking I/O
> > -
> > diff --git a/runtest/syscalls b/runtest/syscalls
> > index 05b3e0d376..b911aba7b6 100644
> > --- a/runtest/syscalls
> > +++ b/runtest/syscalls
> > @@ -1047,6 +1047,15 @@ pipe2_01 pipe2_01
> >  pipe2_02 pipe2_02
> >  pipe2_04 pipe2_04


> Maybe we can add one-line comments here to explain that these are
> Interprocess communication stress test?

> Since syscalls is a large file (containing so many tests), it makes sense
> to comment on something there to explain the subtest blocks.


> +pipeio_1 pipeio -T pipeio_1 -c 5 -s 4090 -i 100 -b -f x80
> > +pipeio_2 pipeio -T pipeio_2 -c 5 -s 4090 -i 100 -f x80
> > +pipeio_3 pipeio -T pipeio_3 -c 5 -s 4090 -i 100 -u -b -f x80
> > +pipeio_4 pipeio -T pipeio_4 -c 5 -s 4090 -i 100 -u -f x80
> > +pipeio_5 pipeio -T pipeio_5 -c 5 -s 5000 -i 10 -b -f x80
> > +pipeio_6 pipeio -T pipeio_6 -c 5 -s 5000 -i 10 -b -u -f x80
> > +pipeio_7 pipeio -T pipeio_7 -c 5 -s 5000 -i 10 -f x80
> > +pipeio_8 pipeio -T pipeio_8 -c 5 -s 5000 -i 10 -u -f x80



> Reviewed-by: Li Wang <liwang@redhat.com>

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

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

* Re: [LTP] [RFC][PATCH 1/2] runtest/ipc: Enable named pipes on non-blocking IO
  2025-04-03 10:19 ` [LTP] [RFC][PATCH 1/2] runtest/ipc: Enable named pipes on non-blocking IO Petr Vorel
  2025-04-06  2:55   ` Li Wang via ltp
@ 2025-04-08 18:37   ` Cyril Hrubis
  1 sibling, 0 replies; 14+ messages in thread
From: Cyril Hrubis @ 2025-04-08 18:37 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Hi!
> Tests were disabled from the start (edab67b3a0 in 2001) due EAGAIN.
> Tests are working now even on very old SLE12-SP3 based 4.4 kernel,
> therefore enable them.

My guess is that it much more depends on number of CPUs. It's more
likely that reader/write would starve on single CPU system.

But I've spend quite a bit of time reading the tlibio.c code (after I've
cleaned up the messy ifdefs) and the test (by default) passes method =
0. Which means that for write we do:

                while (1) {
                        if (((ret = write(fd, buffer, size)) == -1)
                            && errno != EAGAIN && errno != EINTR) {
                                sprintf(Errormsg,
                                        "%s/%d write(%d, buf, %d) ret:-1, errno=%d %s",
                                        __FILE__, __LINE__, fd, size, errno,
                                        strerror(errno));
                                return -errno;
                        }

                        if (ret != -1) {
                                if (ret != size) {
                                        sprintf(Errormsg,
                                                "%s/%d write(%d, buf, %d) returned=%d",
                                                __FILE__, __LINE__,
                                                fd, size, ret);
                                        size -= ret;
                                        buffer += ret;
                                        totally_written += ret;
                                } else {
                                        if (Debug_level > 1)
                                                printf
                                                    ("DEBUG %s/%d: write completed without error (ret %d)\n",
                                                     __FILE__, __LINE__, ret);

                                        return totally_written + ret;
                                }
                        }
                        wait4sync_io(fd, 0);
                }


And wait4sync_io() does select() to wait for the file descriptor to
became ready for reading. The corresponding part that reads look
similar. So it at least looks like the code properly handles the EAGAIN
case in the tlibio.c library and that it should be safe to enable the
non-blocking case.

Acked-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

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

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

* Re: [LTP] [RFC][PATCH 2/2] runtest: Move ipc into syscalls
  2025-04-03 10:19 ` [LTP] [RFC][PATCH 2/2] runtest: Move ipc into syscalls Petr Vorel
  2025-04-06  3:01   ` Li Wang via ltp
@ 2025-04-17  9:22   ` Cyril Hrubis
  2025-04-17 11:14     ` Petr Vorel
  1 sibling, 1 reply; 14+ messages in thread
From: Cyril Hrubis @ 2025-04-17  9:22 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Hi!
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

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

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

* Re: [LTP] [RFC][PATCH 2/2] runtest: Move ipc into syscalls
  2025-04-17  9:22   ` Cyril Hrubis
@ 2025-04-17 11:14     ` Petr Vorel
  0 siblings, 0 replies; 14+ messages in thread
From: Petr Vorel @ 2025-04-17 11:14 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: ltp

Hi Cyril,

thanks a lot, merged!

Kind regards,
Petr

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

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

end of thread, other threads:[~2025-04-17 11:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-03 10:19 [LTP] [RFC][PATCH 0/2] Merge runtest files Petr Vorel
2025-04-03 10:19 ` [LTP] [RFC][PATCH 1/2] runtest/ipc: Enable named pipes on non-blocking IO Petr Vorel
2025-04-06  2:55   ` Li Wang via ltp
2025-04-08 18:37   ` Cyril Hrubis
2025-04-03 10:19 ` [LTP] [RFC][PATCH 2/2] runtest: Move ipc into syscalls Petr Vorel
2025-04-06  3:01   ` Li Wang via ltp
2025-04-07 12:15     ` Petr Vorel
2025-04-07 12:19     ` Petr Vorel
2025-04-17  9:22   ` Cyril Hrubis
2025-04-17 11:14     ` Petr Vorel
2025-04-03 11:33 ` [LTP] [RFC][PATCH 0/2] Merge runtest files Andrea Cervesato via ltp
2025-04-03 15:47   ` Cyril Hrubis
2025-04-06  2:52     ` Li Wang via ltp
2025-04-06  2:43 ` Li Wang via ltp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox