All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: acme@kernel.org, 9erthalion6@gmail.com, adrian.hunter@intel.com,
	james.clark@linaro.org, jolsa@kernel.org, leo.yan@arm.com,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	mingo@redhat.com, peterz@infradead.org
Subject: Re: [PATCH v3 1/2] perf test: Add per-test timeout support
Date: Mon, 5 Oct 2026 15:44:42 -0700	[thread overview]
Message-ID: <asQoWrGYmM-lGx5G@google.com> (raw)
In-Reply-To: <20260929025345.88829-1-irogers@google.com>

On Mon, Sep 28, 2026 at 07:53:44PM -0700, Ian Rogers wrote:
> When a test hangs in 'perf test', the entire test run hangs and makes it
> difficult to inspect output from other tests.
> 
> Add a new TEST_TIMEOUT result category and a per-test timeout (default
> 60 seconds, configurable via '-t'/'--timeout', with 0 to disable). When
> '-F' ('--dont-fork') is specified, timeouts are disabled.
> 
> To enforce the timeout:
> - Place each forked test child into its own process group via
>   setpgid(0, 0) in the child and setpgid(pid, pid) in the parent so any
>   subprocesses spawned by shell or workload tests can be terminated
>   together.
> - Arm an ITIMER_REAL periodic timer with a SIGALRM handler (using
>   SA_RESTART so /proc status reads in check_if_command_finished() are
>   not interrupted by EINTR while poll()/usleep() waits still wake up).

Do we really need this timer?  I think poll() already has a timeout so
it'll wake up on every 100 msec anyway?

Thanks,
Namhyung


> - Check elapsed child runtimes against test_timeout in finish_test() and
>   finish_tests_parallel(), sending SIGTERM first and escalating to
>   SIGKILL after 1 second if the child process group has not exited.
> - Report timed out tests in red ('TIMEOUT!'), track and display them in
>   the test summary, and emit '<error message="TIMEOUT" type="timeout">'
>   counted under the 'errors' attribute in JUnit XML output.
> - Document '-t'/'--timeout' and '-F'/'--dont-fork' in perf-test.txt.
> 
> Assisted-by: Antigravity:gemini-3.1-pro
> Signed-off-by: Ian Rogers <irogers@google.com>

      parent reply	other threads:[~2026-10-05 22:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28 21:01 [PATCH v1 1/2] perf test: Add per-test timeout support Ian Rogers
2026-09-28 21:01 ` [PATCH v1 2/2] perf test: Improve JUnit XML schema compliance and completeness Ian Rogers
2026-09-28 21:08   ` sashiko-bot
2026-09-28 21:14 ` [PATCH v1 1/2] perf test: Add per-test timeout support sashiko-bot
2026-09-29  1:18 ` [PATCH v2 " Ian Rogers
2026-09-29  1:18   ` [PATCH v2 2/2] perf test: Improve JUnit XML schema compliance and completeness Ian Rogers
2026-09-29  1:24     ` sashiko-bot
2026-09-29  1:31   ` [PATCH v2 1/2] perf test: Add per-test timeout support sashiko-bot
2026-09-29  2:53   ` [PATCH v3 " Ian Rogers
2026-09-29  2:53     ` [PATCH v3 2/2] perf test: Improve JUnit XML schema compliance and completeness Ian Rogers
2026-09-29  2:59       ` sashiko-bot
2026-09-29  3:00     ` [PATCH v3 1/2] perf test: Add per-test timeout support sashiko-bot
2026-10-05 22:44     ` Namhyung Kim [this message]

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=asQoWrGYmM-lGx5G@google.com \
    --to=namhyung@kernel.org \
    --cc=9erthalion6@gmail.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=leo.yan@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --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 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.