lkml.org 
[lkml]   [2021]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] perf tests: Improve temp file cleanup in test_arm_coresight.sh
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

\
 
 \ /
  Last update: 2021-09-23 03:19    [W:0.117 / U:22.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site