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 v3] powerpc: Add tests for __ppc_set_ppr_* functions.


Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com> writes:

> Changes since v2:
>  - Enabled tests on 32-bit PowerPC.
>  - Improved code comments.
>
> --- 8< ---
> The sys/platform/ppc.h header defines a class of __ppc_set_ppr functions
> used to set the Program Priority Register (PPR) in PowerPC.
> This patch implements test cases for these functions.
>
> Tested on ppc64le, ppc64, and ppc.
>
> 2017-02-07  Wainer dos Santos Moschetta  <wainersm@linux.vnet.ibm.com>
>
> 	* sysdeps/powerpc/tst-set_ppr.c: New file.
> 	Implement test cases for __ppc_set_ppr_* functions.
> 	* sysdeps/powerpc/Makefile ($(subdir),misc): Add tst-set_ppr
> 	in the list of tests.
> ...
>
> diff --git a/sysdeps/powerpc/tst-set_ppr.c b/sysdeps/powerpc/tst-set_ppr.c
> new file mode 100644
> index 0000000..a4bf526
> --- /dev/null
> +++ b/sysdeps/powerpc/tst-set_ppr.c
> @@ -0,0 +1,102 @@
> +/* Test the implementation of __ppc_set_ppr_* functions.
> ...
> +/* Check the thread priority bits of PPR are set as expected. */
> +uint8_t
> +check_thread_priority (uint8_t expected)
> +{
> +  ppr_t actual = get_thread_priority ();
> +
> +  if (actual != expected)
> +    {
> +      printf ("FAIL: Expected %"PRIu8" got %"PRIuMAX".\n", expected, (uintmax_t) actual);

This line is too long.

I fixed it and pushed as 6ec4140.

-- 
Tulio Magno


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