[v2,1/5] tests: only wait for the pid we spawned

Submitted by Tycho Andersen on June 29, 2016, 3:53 p.m.

Details

Message ID 1467215605-17604-1-git-send-email-tycho.andersen@canonical.com
State Accepted
Series "Series without cover letter"
Commit f90902e167a8178b8abf9be8e03b0e69c12d6832
Headers show

Commit Message

Tycho Andersen June 29, 2016, 3:53 p.m.
In the next patch, we'll introduce an option to allow for leaving zombie
processes in the pid ns for the test so that we can test the behavior of
zombies. Let's not reap everything after restore, since we'll reap the
restored zombies as well.

v2: restore the old behavior when in reap mode

CC: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
---
 test/zdtm/lib/ns.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/test/zdtm/lib/ns.c b/test/zdtm/lib/ns.c
index b432f54..8c67abe 100644
--- a/test/zdtm/lib/ns.c
+++ b/test/zdtm/lib/ns.c
@@ -338,8 +338,13 @@  int ns_init(int argc, char **argv)
 		kill(pid, SIGTERM);
 
 	ret = 0;
-	while (ret != -1)
-		ret = wait(NULL);
+	if (reap) {
+		while (ret != -1)
+			ret = wait(NULL);
+	} else {
+		waitpid(pid, NULL, 0);
+	}
+
 
 	exit(1);
 }

Comments

Tycho Andersen June 29, 2016, 4:18 p.m.
On Wed, Jun 29, 2016 at 04:00:26PM -0000, Patchwork wrote:
> == Series Details ==
> 
> Series: series starting with [v2,1/5] tests: only wait for the pid we spawned
> URL   : https://zdtm.openvz.org/series/312/
> State : failure
> 
> == Logs ==
> 
> For more details see: https://ci.openvz.org/job/CRIU/job/criu-patchwork/400//console

I think these are all related.

Tycho
Pavel Emelianov July 4, 2016, 6:36 p.m.
On 06/29/2016 07:18 PM, Tycho Andersen wrote:
> On Wed, Jun 29, 2016 at 04:00:26PM -0000, Patchwork wrote:
>> == Series Details ==
>>
>> Series: series starting with [v2,1/5] tests: only wait for the pid we spawned
>> URL   : https://zdtm.openvz.org/series/312/
>> State : failure
>>
>> == Logs ==
>>
>> For more details see: https://ci.openvz.org/job/CRIU/job/criu-patchwork/400//console
> 
> I think these are all related.

So, will there be the v3 set? :)

-- Pavel
Tycho Andersen July 5, 2016, 2:12 p.m.
On Mon, Jul 04, 2016 at 09:36:40PM +0300, Pavel Emelyanov wrote:
> On 06/29/2016 07:18 PM, Tycho Andersen wrote:
> > On Wed, Jun 29, 2016 at 04:00:26PM -0000, Patchwork wrote:
> >> == Series Details ==
> >>
> >> Series: series starting with [v2,1/5] tests: only wait for the pid we spawned
> >> URL   : https://zdtm.openvz.org/series/312/
> >> State : failure
> >>
> >> == Logs ==
> >>
> >> For more details see: https://ci.openvz.org/job/CRIU/job/criu-patchwork/400//console
> > 
> > I think these are all related.
> 
> So, will there be the v3 set? :)

Oh, sorry, I meant that I think they're all *un-*related. I think this
set should be okay.

Tycho
Pavel Emelianov July 13, 2016, 1:47 p.m.
On 07/11/2016 05:12 PM, Tycho Andersen wrote:
> On Tue, Jul 05, 2016 at 08:12:47AM -0600, Tycho Andersen wrote:
>> On Mon, Jul 04, 2016 at 09:36:40PM +0300, Pavel Emelyanov wrote:
>>> On 06/29/2016 07:18 PM, Tycho Andersen wrote:
>>>> On Wed, Jun 29, 2016 at 04:00:26PM -0000, Patchwork wrote:
>>>>> == Series Details ==
>>>>>
>>>>> Series: series starting with [v2,1/5] tests: only wait for the pid we spawned
>>>>> URL   : https://zdtm.openvz.org/series/312/
>>>>> State : failure
>>>>>
>>>>> == Logs ==
>>>>>
>>>>> For more details see: https://ci.openvz.org/job/CRIU/job/criu-patchwork/400//console
>>>>
>>>> I think these are all related.
>>>
>>> So, will there be the v3 set? :)
>>
>> Oh, sorry, I meant that I think they're all *un-*related. I think this
>> set should be okay.
> 
> Ping, should I re-send?

Yes, please :) This looks quite intrusive, so I'd appreciate if patchwork
validates this set.

Sorry for delay.

-- Pavel