[PATCH v2] Skip mcount overflow and tunables tests on "--disable-tunables"

DJ Delorie dj@redhat.com
Tue Mar 21 21:48:42 GMT 2023


MAHESH BODAPATI <bmahi496@linux.ibm.com> writes:
> +have-tunables = @have_tunables@

config.make.in already has one of these.

The rest looks OK, but did you test it with tunables disabled vs enabled?

> diff --git a/gmon/Makefile b/gmon/Makefile
> index 213622a7ad..934a2b230d 100644
> --- a/gmon/Makefile
> +++ b/gmon/Makefile
> @@ -26,7 +26,11 @@ include ../Makeconfig
>  headers	:= sys/gmon.h sys/gmon_out.h sys/profil.h
>  routines := gmon mcount profil sprofil prof-freq
>  
> -tests	= tst-sprofil tst-gmon tst-mcount-overflow tst-mcleanup
> +tests	= tst-sprofil tst-gmon tst-mcleanup
> +ifeq ($(have-tunables),yes)
> +tests   += tst-mcount-overflow
> +endif
> +
>  ifeq ($(build-profile),yes)
>  tests	+= tst-profile-static
>  tests-static	+= tst-profile-static
> @@ -57,6 +61,7 @@ ifeq ($(run-built-tests),yes)
>  tests-special += $(objpfx)tst-gmon-gprof.out
>  endif
>  
> +ifeq ($(have-tunables),yes)
>  CFLAGS-tst-mcount-overflow.c := -fno-omit-frame-pointer -pg
>  tst-mcount-overflow-no-pie = yes
>  CRT-tst-mcount-overflow := $(csu-objpfx)g$(start-installed-name)
> @@ -68,6 +73,7 @@ tst-mcount-overflow-ARGS := 2>&1 1>/dev/null | cat
>  ifeq ($(run-built-tests),yes)
>  tests-special += $(objpfx)tst-mcount-overflow-check.out
>  endif
> +endif
>  
>  CFLAGS-tst-mcleanup.c := -fno-omit-frame-pointer -pg
>  tst-mcleanup-no-pie = yes
> @@ -124,6 +130,7 @@ $(objpfx)tst-gmon.out: clean-tst-gmon-data
>  clean-tst-gmon-data:
>  	rm -f $(objpfx)tst-gmon.data.*
>  
> +ifeq ($(have-tunables),yes)
>  $(objpfx)tst-mcount-overflow.o: clean-tst-mcount-overflow-data
>  clean-tst-mcount-overflow-data:
>  	rm -f $(objpfx)tst-mcount-overflow.data.*
> @@ -131,6 +138,7 @@ clean-tst-mcount-overflow-data:
>  $(objpfx)tst-mcount-overflow-check.out: tst-mcount-overflow-check.sh $(objpfx)tst-mcount-overflow.out
>  	$(SHELL) $< $(objpfx)tst-mcount-overflow > $@; \
>  	$(evaluate-test)
> +endif
>  
>  $(objpfx)tst-mcleanup.out: clean-tst-mcleanup-data
>  clean-tst-mcleanup-data:



More information about the Libc-alpha mailing list