linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2 2/2] tools build: Remove get_current_dir_name
Date: Fri, 3 Oct 2025 16:48:03 -0300	[thread overview]
Message-ID: <aOAoc0-Oy99l3iQG@x1> (raw)
In-Reply-To: <20251003175613.2512296-2-irogers@google.com>

On Fri, Oct 03, 2025 at 10:56:13AM -0700, Ian Rogers wrote:
> As perf no longer tests for this feature, and it was the only user,
> remove the feature test.

You forgot to remove this:

⬢ [acme@toolbx perf-tools-next]$ git diff
diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c
index 71ba7001dc25c6bb..8a354b81417c6fcc 100644
--- a/tools/build/feature/test-all.c
+++ b/tools/build/feature/test-all.c
@@ -151,7 +151,6 @@ int main(int argc, char *argv[])
        main_test_libpython();
        main_test_hello();
        main_test_libelf();
-       main_test_get_current_dir_name();
        main_test_gettid();
        main_test_glibc();
        main_test_libdw();
⬢ [acme@toolbx perf-tools-next]$ 

That results, when building with this alias:

alias m='rm -rf ~/libexec/perf-core/ ; make CORESIGHT=1 -k O=/tmp/build/$(basename $PWD)/ -C tools/perf install-bin && perf test python && cat /tmp/build/$(basename $PWD)/feature/test-all.make.output'

that needs to be on the makefiles somewhere, shows that test-all.bin is
failing to build:

make: Leaving directory '/home/acme/git/perf-tools-next/tools/perf'
 88: 'import perf' in python                                         : FAILED!
test-all.c: In function ‘main’:
test-all.c:154:9: error: implicit declaration of function ‘main_test_get_current_dir_name’; did you mean ‘get_current_dir_name’? [-Wimplicit-function-declaration]
  154 |         main_test_get_current_dir_name();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         get_current_dir_name
⬢ [acme@toolbx perf-tools-next]$ 

I fixed this up already,

Thanks,

- Arnaldo
 
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/build/Makefile.feature                    |  1 -
>  tools/build/feature/Makefile                    |  4 ----
>  tools/build/feature/test-all.c                  |  4 ----
>  tools/build/feature/test-get_current_dir_name.c | 11 -----------
>  4 files changed, 20 deletions(-)
>  delete mode 100644 tools/build/feature/test-get_current_dir_name.c
> 
> diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
> index 9c1a69d26f51..9399f591bd69 100644
> --- a/tools/build/Makefile.feature
> +++ b/tools/build/Makefile.feature
> @@ -68,7 +68,6 @@ FEATURE_TESTS_BASIC :=                  \
>          libdw                           \
>          eventfd                         \
>          fortify-source                  \
> -        get_current_dir_name            \
>          gettid				\
>          glibc                           \
>          libbfd                          \
> diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> index b41a42818d8a..d13d2a1f44fe 100644
> --- a/tools/build/feature/Makefile
> +++ b/tools/build/feature/Makefile
> @@ -8,7 +8,6 @@ FILES=                                          \
>           test-libdw.bin                         \
>           test-eventfd.bin                       \
>           test-fortify-source.bin                \
> -         test-get_current_dir_name.bin          \
>           test-glibc.bin                         \
>           test-gtk2.bin                          \
>           test-gtk2-infobar.bin                  \
> @@ -147,9 +146,6 @@ $(OUTPUT)test-libelf.bin:
>  $(OUTPUT)test-eventfd.bin:
>  	$(BUILD)
>  
> -$(OUTPUT)test-get_current_dir_name.bin:
> -	$(BUILD)
> -
>  $(OUTPUT)test-glibc.bin:
>  	$(BUILD)
>  
> diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c
> index e1847db6f8e6..778883a32afb 100644
> --- a/tools/build/feature/test-all.c
> +++ b/tools/build/feature/test-all.c
> @@ -22,10 +22,6 @@
>  # include "test-libelf.c"
>  #undef main
>  
> -#define main main_test_get_current_dir_name
> -# include "test-get_current_dir_name.c"
> -#undef main
> -
>  #define main main_test_gettid
>  # include "test-gettid.c"
>  #undef main
> diff --git a/tools/build/feature/test-get_current_dir_name.c b/tools/build/feature/test-get_current_dir_name.c
> deleted file mode 100644
> index c3c201691b4f..000000000000
> --- a/tools/build/feature/test-get_current_dir_name.c
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0
> -#define _GNU_SOURCE
> -#include <unistd.h>
> -#include <stdlib.h>
> -
> -int main(void)
> -{
> -	free(get_current_dir_name());
> -	return 0;
> -}
> -#undef _GNU_SOURCE
> -- 
> 2.51.0.618.g983fd99d29-goog

  reply	other threads:[~2025-10-03 19:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-03 17:56 [PATCH v2 1/2] perf namespaces: Avoid get_current_dir_name dependency Ian Rogers
2025-10-03 17:56 ` [PATCH v2 2/2] tools build: Remove get_current_dir_name Ian Rogers
2025-10-03 19:48   ` Arnaldo Carvalho de Melo [this message]
2025-10-03 21:29     ` Ian Rogers
2025-10-03 18:29 ` [PATCH v2 1/2] perf namespaces: Avoid get_current_dir_name dependency Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aOAoc0-Oy99l3iQG@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).