Re: [PATCH v8 2/3] perf tests: avoid storing an absolute path in perf binary

From: Denys Zagorui -X (dzagorui - GLOBALLOGIC INC at Cisco)
Date: Fri May 28 2021 - 07:13:41 EST



> I noticed this is failing the test, nothing is being appended. I'll
> investigate later. Can you try to reproduce this? I build perf with:

Maybe this test should fail. Path is being appended only if perf is invoked from the build directory (basically if there is python dir near perf binary
this path will be added to sys.path)
I'm not sure if install-bin task installs perf.so to system i mean before this patch python binary contains an absolute path to its build directory
and if this build dir is deleted this test also will fail.
Maybe we should use export PYTHONPATH=<build dir>/python for such test

Thanks,
Denys

> alias m='perf stat -e cycles:u,instructions:u make -k CORESIGHT=1 BUILD_BPF_SKEL=1 PYTHON=python3 O=/tmp/build/perf -C tools/perf install-bin && perf test python'
>
>
> ⬢[acme@toolbox perf]$ perf test python
> 19: 'import perf' in python : FAILED!
> ⬢[acme@toolbox perf]$ perf test -v python
> Couldn't bump rlimit(MEMLOCK), failures may take place when creating BPF maps, etc
> 19: 'import perf' in python :