[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH0uvoiDqn=2ySAYfn7HsNsnu3W8zED5jFqOPTpjW++pmrbbEg@mail.gmail.com>
Date: Fri, 4 Apr 2025 17:34:11 -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] perf trace: Fix inconsistent failures in perf trace's tests
Hello Namhyung,
On Fri, Apr 4, 2025 at 11:02 AM Namhyung Kim <namhyung@...nel.org> wrote:
>
> On Thu, Apr 03, 2025 at 09:16:52PM -0700, Howard Chu wrote:
> > There are two failures that frequently occur in perf trace's tests. One
> > is the failure of 'perf trace BTF general tests'; The other one is the
> > failure of 'perf trace record and replay', which, when run independently,
> > always succeeds.
> >
> > The root cause of the first failure, is that perf trace may give two types
> > of output, depending on whether the comm of a process can be parsed, for
> > example:
> >
> > mv/312705 renameat2(CWD, "/tmp/file1_VJOT", CWD, "/tmp/file2_VJOT", NOREPLACE) = 0
> > :312774/312774 renameat2(CWD, "/tmp/file1_5YcE", CWD, "/tmp/file2_5YcE", NOREPLACE) = 0
> >
> > In the test, however, grep is always looking for the comm 'mv', which
> > sometimes may not be present.
> >
> > The cause of the second failure is that 'perf trace BTF general tests'
> > modifies the perf config, and because tests are run concurrently,
> > subsequent tests use the modified perf config before the BTF general
> > test can restore the original config. Mark the BTF general tests as
> > exclusive will solve the failure.
>
> I'm not sure if the config is the cause of the failure. Also I don't
> see it restored.
Yeah because (exclusive) got it fixed, I didn't restore the
environment variable, just deleted the config file.
>
> IIUC the export only affects child processes from the current shell.
> So other tests running in parallel won't see the config change.
I'll look into it thanks.
>
> But still, there should be something to affect the behavior. It's
> strange to miss the task name in COMM record.
>
> I also confirm that running the test serially fixes it.
Thanks, do you want a tested-by?
Thanks,
Howard
>
> Thanks,
> Namhyung
Powered by blists - more mailing lists