linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@linaro.org>
To: James Clark <james.clark@arm.com>
Cc: acme@kernel.org, leo.yan@linaro.com,
	linux-perf-users@vger.kernel.org,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] perf tests: Improve temp file cleanup in test_arm_coresight.sh
Date: Thu, 23 Sep 2021 09:18:07 +0800	[thread overview]
Message-ID: <20210923011807.GC400258@leoy-ThinkPad-X240s> (raw)
In-Reply-To: <85c593b5-5348-8e9a-b9e4-bc4d31ffc785@arm.com>

On Wed, Sep 22, 2021 at 05:49:55PM +0100, James Clark wrote:

[...]

> > So below change should be sufficient?
> > 
> > cleanup_files()
> > {
> > 	rm -f ${perfdata}
> > 	rm -f ${file}
> > +       rm -f "${perfdata}.old"
> > +       exit $glb_err
> > }
> > 
> > Sorry if I miss anything at here and cause noise.
> 
> The problem with not re-sending the sigint is that if you want to run the
> script in a bash while loop like:
> 
>   while ! tests/shell/test_arm_coresight.sh; do echo loop; done
> 
> Then it's impossible to exit with Ctrl-C and delete the temp files at the
> same time. It exits if we don't trap sigint like it is at the moment, but
> then it leaves the temporary files. This change is so we can have both
> behaviours of Ctrl-C in a loop and keep the cleanup working.

Okay, I cannot think out better idea to handle this test case;
so current patch is fine for me.  Thanks for explanation.

Thanks,
Leo

  reply	other threads:[~2021-09-23  1:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 13:10 [PATCH 1/3] perf tests: Fix record+script_probe_vfs_getname.sh /tmp cleanup James Clark
2021-09-21 13:10 ` [PATCH 2/3] perf tests: Fix trace+probe_vfs_getname.sh " James Clark
2021-09-21 13:10 ` [PATCH 3/3] perf tests: Improve temp file cleanup in test_arm_coresight.sh James Clark
2021-09-22  6:10   ` Ian Rogers
2021-09-22 11:00   ` Leo Yan
2021-09-22 13:40     ` James Clark
2021-09-22 14:08       ` Leo Yan
2021-09-22 16:49         ` James Clark
2021-09-23  1:18           ` Leo Yan [this message]
     [not found] ` <CAP-5=fU_CSPv2Kry6ObbfYG4rNJpprhBrFUOJsNugM-AqQ3xoA@mail.gmail.com>
2021-10-26 14:18   ` [PATCH 1/3] perf tests: Fix record+script_probe_vfs_getname.sh /tmp cleanup Arnaldo Carvalho de Melo

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=20210923011807.GC400258@leoy-ThinkPad-X240s \
    --to=leo.yan@linaro.org \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@redhat.com \
    --cc=leo.yan@linaro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=namhyung@kernel.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).