Re: [PATCH v1 2/5] perf test trace: Remove set -e and print trace test's error messages
From: Howard Chu
Date: Sun May 18 2025 - 14:14:55 EST
Hello Namhyung,
On Sun, May 18, 2025 at 10:36 AM Namhyung Kim <namhyung@xxxxxxxxxx> 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