Mailing List Archive

答复: Re: ocft updated (test tool of resource-agnets)
Done.

>>> Dejan Muhamedagic <dejan@suse.de> 2013-1-22 上午 4:20 >>>
Hi John,

On Sun, Jan 20, 2013 at 09:23:05AM -0700, John Shi wrote:
> Medium: tools: ocft: update to version 0.44
>
> Added "incremental" mode (ocft test -i) , cache results and
> not repeatedly rerun those cases which succeeded.
>
> Improved *ocft make*, the ocft will only make the updated test-case file.
>
> The ocft test prints the actual case names instead of just case numbers.

Can you please split the patch into several self-contained
patches, each of which fixes a single issue.

Great work!

Thanks,

Dejan


> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
答复: Re: ocft updated (test tool of resource-agnets) [ In reply to ]
Hi Lars,

Because I found setsid have a different behavior between interactive shell and non-interactive shell.

I show the command first:

see@linux-ub7v:~> setsid sleep 5 & echo "$! setsid"; sleep 1; ps -eo pid,args | grep sleep | grep -v grep
12498 setsid
12502 sleep 5

see@linux-ub7v:~> killall sleep

see@linux-ub7v:~> bash -c 'setsid sleep 5 & echo "$! setsid"; sleep 1; ps -eo pid,args | grep sleep | grep -v grep'
12507 setsid
12507 sleep 5

see@linux-ub7v:~> setsid --version
setsid from util-linux 2.21.2
The first commands were executed by an interactive shell, we can see there are the different pid between setsid and sleep,

but the third commands, I put them into a non-interactive shell, and
then, we can see there are the same pid of setsid and sleep.

I guess setsid in first command may be "fork -> exec sleep by child
-> parent exit" and setsid in third command just do "exec sleep"
directly.

If I am right, why does setsid have a different behavior between interactive shell and non-interactive shell ?

So I am not sure the setsid have a same behavior on each LINUXs, can you point me ?
Thanks in advance!

Best regards,
John

>>> Lars Ellenberg <lars.ellenberg@linbit.com> 2013-1-21 下午 18:44 >>>
On Sun, Jan 20, 2013 at 09:23:05AM -0700, John Shi wrote:
> Medium: tools: ocft: update to version 0.44
>
> Added "incremental" mode (ocft test -i) , cache results and
> not repeatedly rerun those cases which succeeded.
>
> Improved *ocft make*, the ocft will only make the updated test-case file.
>
> The ocft test prints the actual case names instead of just case numbers.
>
>

> From efaeb8c675c8dfbbeb2e6c6068a281f2ce53bf22 Mon Sep 17 00:00:00 2001
> From: John Shi <jshi@suse.com>
> Date: Sun, 20 Jan 2013 23:35:00 +0800
> Subject: [PATCH] Medium: tools: ocft: update to version 0.44
>
> Added "incremental" mode (ocft test -i) , cache results and
> not repeatedly rerun those cases which succeeded.
>
> Improved *ocft make*, the ocft will only make the updated test-case file.
>
> The ocft test prints the actual case names instead of just case numbers.

There is nothing in the commit message about changed "kill" behaviour.

And I don't think I understand nor like that change.

You do:

> - setsid $aroot/$agent $cmd >/tmp/.ocft_runlog 2>&1 &
> + $aroot/$agent $cmd >/tmp/.ocft_runlog 2>&1 &
> pid=$!
>
> i=0
> @@ -111,9 +111,9 @@ agent_run()
> done
>
> if [ $i -ge $timeout ]; then
> - kill -SIGTERM -$pid >/dev/null 2>&1
> + kill -SIGTERM $pid >/dev/null 2>&1
> sleep 3
> - kill -SIGKILL -$pid >/dev/null 2>&1
> + kill -SIGKILL $pid >/dev/null 2>&1


The setsid and "kill -SIG -$pid" was intentional,
to be sure to kill the process group.
Agents may spawn childs, killing
the agent should cleanup those childs as well.

Why did you change that?

Did it not work?
Break something?

Thanks,

--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: 答复: Re: ocft updated (test tool of resource-agnets) [ In reply to ]
On Tue, Jan 22, 2013 at 02:21:37AM -0700, John Shi wrote:
> Done.

Applied now.

Many thanks for the contribution!

Cheers,

Dejan

> >>> Dejan Muhamedagic <dejan@suse.de> 2013-1-22 上午 4:20 >>>
> Hi John,
>
> On Sun, Jan 20, 2013 at 09:23:05AM -0700, John Shi wrote:
> > Medium: tools: ocft: update to version 0.44
> >
> > Added "incremental" mode (ocft test -i) , cache results and
> > not repeatedly rerun those cases which succeeded.
> >
> > Improved *ocft make*, the ocft will only make the updated test-case file.
> >
> > The ocft test prints the actual case names instead of just case numbers.
>
> Can you please split the patch into several self-contained
> patches, each of which fixes a single issue.
>
> Great work!
>
> Thanks,
>
> Dejan
>
>
> > _______________________________________________________
> > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> > Home Page: http://linux-ha.org/
>
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
>
>
>




_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/