]> git.ipfire.org Git - thirdparty/util-linux.git/commit
tests: (lsfd::option-inet) get child-processes' pids via fifo
authorMasatake YAMATO <yamato@redhat.com>
Mon, 31 Jul 2023 11:32:18 +0000 (20:32 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Mon, 31 Jul 2023 11:41:29 +0000 (20:41 +0900)
commiteaa3870880aaa8d3d6b1aa8ea6bb19a717708b8e
tree2871d03ae1e4649c16d03c1b6cffc4ba915ab336
parent1a9a6a642cea1510020220676c8c9a1714aa2ae7
tests: (lsfd::option-inet) get child-processes' pids via fifo

Close #2399.

The original code assumes the background processes prepare sockets enough
fast. #2399 showed the assumption was wrong; lsfd reported half-cooked
sockets.

To avoid the timing issue, the test case with this change uses a fifo
to receive pids from the child test_mkfds processes. test_mkfds reports
its pid after cooking the sockets. When the option-inet script recives the pid,
we can expect the sockets are ready.

Note: bash's coproc cannot be used here; it supports only one co-process at
once.

Analysed-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
tests/ts/lsfd/option-inet