From: chrubis@suse.cz
To: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Cc: vasily isaenko <vasily.isaenko@oracle.com>,
ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH V2 2/2] setpgid03: use SIGUSR1 instead of sleep
Date: Thu, 7 Nov 2013 12:30:29 +0100 [thread overview]
Message-ID: <20131107113029.GB28246@rei> (raw)
In-Reply-To: <527B7485.2030809@oracle.com>
Hi!
> > I've overlooked the second case, however checkpoint works for this one
> > as well. You need to build a helper binary setpgid03_child.c that would
> > call the signal function and then do the wait.
> >
> > The checkpoint interface is build on the top of unix sockets so it does
> > not matter whether the process was forked, execed or started from
> > termial. All that is needed is correct CWD (which is inherited both on
> > fork and exec) so that the socked special file is found.
> >
> There is one issue.
>
> Look at lib/tests/tst_checkpoint_parent.c.
>
> If the child exits before calling TST_CHECKPOINT_CHILD_WAIT(&checkpoint)
> (for example, if it gets a signal), the parent
> will wait at TST_CHECKPOINT_SIGNAL_CHILD(NULL, &checkpoint) (blocking at
> open(O_WRONLY)) until we kill it manually.
Yes, it will hang. Feel free to send a patch with a timeout.
> I don't think that such situation can occur in this particular test case
> but if we had more activity (like function calls and some logic) before
> execution of TST_CHECKPOINT_CHILD_WAIT in the child, we would have troubles.
It's unlikely situation but it may happen. Generally any of the tests
may hang (due to bug in libc or kernel for example) and ideally the test
driver (ltp-pan currently) should watch for timeouts and kill such
tests, which is not implemented currently.
I'm working on replacement testdriver when my time allows, I have most
of the major parts working and hope to have working prototype soon
(hopefully till the end of the year).
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2013-11-07 11:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-29 7:55 [LTP] [PATCH] setpgid03: use SIGUSR1 instead of sleep Stanislav Kholmanskikh
2013-10-29 10:30 ` Jan Stancek
2013-10-29 11:54 ` Stanislav Kholmanskikh
2013-10-30 9:07 ` [LTP] [PATCH SERIES V2] " Stanislav Kholmanskikh
2013-10-30 9:07 ` [LTP] [PATCH V2 1/2] setpgid03: handle children errors and cleanup Stanislav Kholmanskikh
2013-10-30 9:07 ` [LTP] [PATCH V2 2/2] setpgid03: use SIGUSR1 instead of sleep Stanislav Kholmanskikh
2013-10-30 13:45 ` Jan Stancek
2013-10-31 7:54 ` Stanislav Kholmanskikh
2013-10-31 15:06 ` chrubis
[not found] ` <52727305.5070806@oracle.com>
2013-10-31 16:29 ` chrubis
[not found] ` <527B7485.2030809@oracle.com>
2013-11-07 11:30 ` chrubis [this message]
2013-11-13 7:52 ` [LTP] [RFC PATCH] tst_checkpoint_signal_child: implemented timeout Stanislav Kholmanskikh
2013-11-13 8:46 ` Jan Stancek
2013-11-13 8:58 ` Stanislav Kholmanskikh
2013-11-13 9:15 ` [LTP] [RFC PATCH V2] " Stanislav Kholmanskikh
2013-11-13 17:50 ` chrubis
2013-11-14 6:37 ` [LTP] [PATCH V3 1/2] tst_res: added ETIME, ETIMEDOUT errno values Stanislav Kholmanskikh
2013-11-14 14:19 ` chrubis
2013-11-14 6:37 ` [LTP] [PATCH V3 2/2] tst_checkpoint_signal_child: implemented timeout Stanislav Kholmanskikh
2013-11-14 9:05 ` Jan Stancek
2013-11-14 14:33 ` chrubis
2013-12-12 9:21 ` [LTP] [PATCH V3 1/2] setpgid03: handle children errors and cleanup Stanislav Kholmanskikh
2013-12-12 9:21 ` [LTP] [PATCH V3 2/2] setpgid03: use tst_checkpoint interface Stanislav Kholmanskikh
2014-01-20 16:09 ` chrubis
[not found] ` <52DE7063.8070305@oracle.com>
2014-01-21 13:20 ` chrubis
2013-10-30 2:25 ` [LTP] [PATCH] setpgid03: use SIGUSR1 instead of sleep Wanlong Gao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131107113029.GB28246@rei \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
--cc=stanislav.kholmanskikh@oracle.com \
--cc=vasily.isaenko@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox