This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3] powerpc: Add tests for __ppc_set_ppr_* functions.
- From: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- To: Wainer dos Santos Moschetta <wainersm at linux dot vnet dot ibm dot com>, libc-alpha at sourceware dot org
- Cc:
- Date: Tue, 21 Feb 2017 14:06:47 -0300
- Subject: Re: [PATCH v3] powerpc: Add tests for __ppc_set_ppr_* functions.
- Authentication-results: sourceware.org; auth=none
- References: <20170207174304.19075-1-wainersm@linux.vnet.ibm.com>
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