[LTP] [PATCH] flock: Add negative tests for flock

Petr Vorel pvorel@suse.cz
Mon Oct 21 16:28:42 CEST 2024


Hi Yang Xu, Avinesh,

> Hi Yang Xu,


> When I am testing this by running multiple times, EINTR test is getting
> timed out randomly.

> tst_test.c:1625: TINFO: Timeout per run is 0h 00m 30s
> flock07.c:46: TINFO: Got SIGUSR1
> Test timeouted, sending SIGKILL!
> tst_test.c:1673: TINFO: Killed the leftover descendant processes
> tst_test.c:1679: TINFO: If you are running on slow machine, try exporting LTP_TIMEOUT_MUL > 1
> tst_test.c:1681: TBROK: Test killed! (timeout?)

> In these cases I see that there are two locks (held or waiting) by the process
> even after SIGUSER1 signal is delivered, so somehow signal is being ignored.

> flock07         16520  FLOCK        WRITE* 0          0          0 /tmp...
> flock07         16519  FLOCK        WRITE  0          0          0 /tmp...


> And I feel we should add EWOULDBLOCK errno test to flock02.c file,
> and keep only EINTR testcase here. 

There are v2 and v3 sent by Avinesh, therefore I set this in patchwork as
"Changes requested". Please correct me if I'm wrong.

Kind regards,
Petr


More information about the ltp mailing list