This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/4] powerpc: Add testcase for static version of __ppc_get_timebase_freq



On 13/06/2019 12:11, Raoni Fassina Firmino wrote:
> The underlying function has different implementations for shared and
> static build.
> 
> ChangeLog:
> 
> 2019-06-13  Raoni Fassina Firmino  <raoni@linux.ibm.com>
> 
> 	* sysdeps/unix/sysv/linux/powerpc/Makefile
> 	(tests-static): Add test-gettimebasefreq-static.
> 	(tests): Likewise.
> 	* sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq-static.c:
> 	New file.

Add this testcase to the patch that fixes BZ#24640 [1].

[1] https://sourceware.org/ml/libc-alpha/2019-06/msg00284.html

> ---
>  sysdeps/unix/sysv/linux/powerpc/Makefile      |  2 ++
>  .../powerpc/test-gettimebasefreq-static.c     | 19 +++++++++++++++++++
>  2 files changed, 21 insertions(+)
>  create mode 100644 sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq-static.c
> 
> diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile
> index 19ac59d862..4b7198dcec 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/Makefile
> +++ b/sysdeps/unix/sysv/linux/powerpc/Makefile
> @@ -25,6 +25,8 @@ endif
>  ifeq ($(subdir),misc)
>  sysdep_headers += bits/ppc.h
>  sysdep_routines += get_timebase_freq
> +tests-static += test-gettimebasefreq-static
> +tests += test-gettimebasefreq-static
>  tests += test-gettimebasefreq
>  tests += test-powerpc-linux-sysconf
>  endif
> diff --git a/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq-static.c b/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq-static.c
> new file mode 100644
> index 0000000000..58b4eee98d
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq-static.c
> @@ -0,0 +1,19 @@
> +/* Check __ppc_get_timebase_freq() for architecture changes

Mising period here.

> +   Copyright (C) 2019 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library; if not, see
> +   <http://www.gnu.org/licenses/>.  */
> +
> +#include "test-gettimebasefreq.c"
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]