[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH0uvojxBvx0KC5xVem59zD8Uu8A883GA98uT1_tGdyYk1tqig@mail.gmail.com>
Date: Sun, 18 May 2025 11:14:33 -0700
From: Howard Chu <howardchu95@...il.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: acme@...nel.org, mingo@...hat.com, mark.rutland@....com,
alexander.shishkin@...ux.intel.com, jolsa@...nel.org, irogers@...gle.com,
adrian.hunter@...el.com, peterz@...radead.org, kan.liang@...ux.intel.com,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 2/5] perf test trace: Remove set -e and print trace
test's error messages
Hello Namhyung,
On Sun, May 18, 2025 at 10:36 AM Namhyung Kim <namhyung@...nel.org> wrote:
>
> Hi Howard,
>
> On Sat, May 17, 2025 at 09:32:27AM -0700, Howard Chu wrote:
> > Currently perf test utilizes the set -e option in shell that exit
> > immediately if a command exits with a non-zero status, this prevents
> > further error handling and introduces ambiguity. This patch removes set
> > -e and prints the error message after invoking perf trace during perf
> > tests.
>
> I think it's fine to exits with non-zero inside 'if' statements. But
> it won't work if you want to move it out of the 'if' statements. I'm
> not sure how it'd work in a subshll for the assignment. But it'd be ok
> to remove 'set -e' anyway since the test checks the result manually.
Yeah it won't exit from the non-zero status from the if statement. Thanks.
Thanks,
Howard
Powered by blists - more mailing lists