All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Goulet <dgoulet@efficios.com>
To: Christian Babeux <christian.babeux@efficios.com>
Cc: lttng-dev@lists.lttng.org
Subject: Re: [PATCH lttng-tools] Tests: Fix nprocesses applications shutdown
Date: Tue, 19 Mar 2013 12:05:43 -0400	[thread overview]
Message-ID: <51488CD7.5050200__23610.4389223785$1363709201$gmane$org@efficios.com> (raw)
In-Reply-To: <1363633209-7528-1-git-send-email-christian.babeux@efficios.com>

I have a problem with that. This gets printed for every application:

./test_nprocesses: line 80: 30283 Terminated
./$CURDIR/$TEST_BIN_NAME 1000 > /dev/null 2>&1

The output is not pretty :P

I'm having overall problem with this test for two reasons. First, with
the new changes, registering an application takes a bit longer because
of the back and forth notification event to register events and
channels. This makes the "list application validation" fail most of the
time. Increasing the sleep time helps but it is VERY ARBITRARY.

The second thing is that running this test with a normal user, too many
open files is hit in the consumer and the test of course fails.

So, I think I'll have to find a clever way to validate applications so
not to wait an arbitrary amount of time and probably drop the
applications from 100 to 50.

David

Christian Babeux:
> The nprocesses test is using the SIGPIPE signal to shutdown the
> spawned child applications. This is done in order to silence
> the shell message such as this one:
> 
> "nprocesses/test_nprocesses: line 79: 26458 Terminated"
> 
> This mechanism is broken on systems where the SIGPIPE default handler
> is overriden (thus no application shutdown occurs) in the executing
> environment. This could lead to stale applications polluting the system
> and causing heratic behavior in subsequent tests.
> 
> This commit add a loop and check that all the spawned applications have
> been successfully killed.
> 
> Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
> ---
>  tests/regression/ust/nprocesses/test_nprocesses | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/regression/ust/nprocesses/test_nprocesses b/tests/regression/ust/nprocesses/test_nprocesses
> index e89d02e..23d9a0a 100755
> --- a/tests/regression/ust/nprocesses/test_nprocesses
> +++ b/tests/regression/ust/nprocesses/test_nprocesses
> @@ -74,8 +74,10 @@ destroy_lttng_session $SESSION_NAME
>  
>  rm -rf $TRACE_PATH
>  
> -# Send SIGPIPE to 'silence' bash process status such as "Process as terminated"
> -killall -s PIPE -q $TEST_BIN_NAME >/dev/null 2>&1
> +while [ -n "$(pidof $TEST_BIN_NAME)" ]; do
> +	killall -q $TEST_BIN_NAME >/dev/null 2>&1
> +	sleep 0.5
> +done
>  
>  pass "Kill all spawned applications"
>  

       reply	other threads:[~2013-03-19 16:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1363633209-7528-1-git-send-email-christian.babeux@efficios.com>
2013-03-19 16:05 ` David Goulet [this message]
2013-03-18 19:00 [PATCH lttng-tools] Tests: Fix nprocesses applications shutdown Christian Babeux

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='51488CD7.5050200__23610.4389223785$1363709201$gmane$org@efficios.com' \
    --to=dgoulet@efficios.com \
    --cc=christian.babeux@efficios.com \
    --cc=lttng-dev@lists.lttng.org \
    /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 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.