linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Namhyung Kim <namhyung@kernel.org>,
	linux-kernel@vger.kernel.org,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 3/3] perf test: Add 30s timeout for wait for daemon start.
Date: Thu, 11 Mar 2021 11:37:43 +0100	[thread overview]
Message-ID: <YEny9zLCRxEKzuDm@krava> (raw)
In-Reply-To: <20210310204118.711514-3-irogers@google.com>

On Wed, Mar 10, 2021 at 12:41:18PM -0800, Ian Rogers wrote:
> Retry the ping loop upto 600 times, or approximately 30 seconds, to make
> sure the test does hang at start up.
> 
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/tests/shell/daemon.sh | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/tools/perf/tests/shell/daemon.sh b/tools/perf/tests/shell/daemon.sh
> index a02cedc76de6..cb831ff2c185 100755
> --- a/tools/perf/tests/shell/daemon.sh
> +++ b/tools/perf/tests/shell/daemon.sh
> @@ -127,9 +127,16 @@ daemon_start()
>  
>  	# wait for the session to ping
>  	local state="FAIL"
> +	local retries=0
>  	while [ "${state}" != "OK" ]; do
>  		state=`perf daemon ping --config ${config} --session ${session} | awk '{ print $1 }'`
>  		sleep 0.05
> +		retries=$((${retries} +1))
> +		if [ ${retries} -ge 600 ]; then
> +			echo "Timeout waiting for daemon to ping"
> +			daemon_exit ${config}
> +			exit 62
> +		fi

so it broke in here for you? ;-) makes sense, please keep
the 'FAILED: ...' prefix so it's obvious it's an error

thanks,
jirka

>  	done
>  }
>  
> -- 
> 2.30.1.766.gb4fecdf3b7-goog
> 


  reply	other threads:[~2021-03-11 10:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 20:41 [PATCH 1/3] perf test: Remove unused argument Ian Rogers
2021-03-10 20:41 ` [PATCH 2/3] perf test: Cleanup daemon if test is interrupted Ian Rogers
2021-03-11 10:37   ` Jiri Olsa
2021-03-11 16:18     ` Ian Rogers
2021-03-11 19:03       ` Jiri Olsa
2021-03-10 20:41 ` [PATCH 3/3] perf test: Add 30s timeout for wait for daemon start Ian Rogers
2021-03-11 10:37   ` Jiri Olsa [this message]
2021-03-11 10:38 ` [PATCH 1/3] perf test: Remove unused argument Jiri Olsa

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=YEny9zLCRxEKzuDm@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).