* [LTP] [PATCH] syscalls/fcntl33.c: fix test for fuse fs again
@ 2019-04-09 12:02 Alexey Kodanev
2019-04-09 13:53 ` Cyril Hrubis
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Kodanev @ 2019-04-09 12:02 UTC (permalink / raw)
To: ltp
The previous fix commit 7703cb3e10ea ("syscall/fcntl33.c: fix test on FUSE
fs") moved open() (can sleep on fuse fs) before fork()/do_child(). But the
fix was removed by commit e5c990c5c55b ("Convert fcntl33 to newlib").
In this patch, instead of moving open(), use LTP checkpoints: wake the
child only after setting the lease in a parent process.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/kernel/syscalls/fcntl/fcntl33.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/testcases/kernel/syscalls/fcntl/fcntl33.c b/testcases/kernel/syscalls/fcntl/fcntl33.c
index 35eebb5..43dc5a2 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl33.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl33.c
@@ -124,6 +124,7 @@ static void do_test(unsigned int i)
goto exit;
}
+ TST_CHECKPOINT_WAKE(0);
/* Wait for SIGIO caused by lease breaker. */
TEST(sigtimedwait(&newset, NULL, &timeout));
if (TST_RET == -1) {
@@ -174,7 +175,7 @@ static void do_child(unsigned int i)
{
long long elapsed_ms;
- TST_PROCESS_STATE_WAIT(getppid(), 'S');
+ TST_CHECKPOINT_WAIT(0);
tst_timer_start(CLOCK_MONOTONIC);
@@ -225,6 +226,7 @@ static struct tst_test test = {
.forks_child = 1,
.needs_root = 1,
.needs_tmpdir = 1,
+ .needs_checkpoints = 1,
.tcnt = ARRAY_SIZE(test_cases),
.setup = setup,
.test = do_test,
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [LTP] [PATCH] syscalls/fcntl33.c: fix test for fuse fs again
2019-04-09 12:02 [LTP] [PATCH] syscalls/fcntl33.c: fix test for fuse fs again Alexey Kodanev
@ 2019-04-09 13:53 ` Cyril Hrubis
2019-04-09 15:23 ` Alexey Kodanev
0 siblings, 1 reply; 3+ messages in thread
From: Cyril Hrubis @ 2019-04-09 13:53 UTC (permalink / raw)
To: ltp
Hi!
> The previous fix commit 7703cb3e10ea ("syscall/fcntl33.c: fix test on FUSE
> fs") moved open() (can sleep on fuse fs) before fork()/do_child(). But the
> fix was removed by commit e5c990c5c55b ("Convert fcntl33 to newlib").
>
> In this patch, instead of moving open(), use LTP checkpoints: wake the
> child only after setting the lease in a parent process.
Looks good to me, acked.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 3+ messages in thread
* [LTP] [PATCH] syscalls/fcntl33.c: fix test for fuse fs again
2019-04-09 13:53 ` Cyril Hrubis
@ 2019-04-09 15:23 ` Alexey Kodanev
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Kodanev @ 2019-04-09 15:23 UTC (permalink / raw)
To: ltp
Hi Cyril,
On 09.04.2019 16:53, Cyril Hrubis wrote:
> Hi!
>> The previous fix commit 7703cb3e10ea ("syscall/fcntl33.c: fix test on FUSE
>> fs") moved open() (can sleep on fuse fs) before fork()/do_child(). But the
>> fix was removed by commit e5c990c5c55b ("Convert fcntl33 to newlib").
>>
>> In this patch, instead of moving open(), use LTP checkpoints: wake the
>> child only after setting the lease in a parent process.
>
> Looks good to me, acked.
Thanks for review!
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-09 15:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-09 12:02 [LTP] [PATCH] syscalls/fcntl33.c: fix test for fuse fs again Alexey Kodanev
2019-04-09 13:53 ` Cyril Hrubis
2019-04-09 15:23 ` Alexey Kodanev
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.