On 07/01/2013 01:55 PM, Wanlong Gao wrote:
> Whether CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID is
> supported or not, they are not setable in Linux. So, we just
> do not set the outside address space tp, they will always return
> EINVAL.
>
> Signed-off-by: Wanlong Gao <[email protected]>
Any objections?
Thanks,
Wanlong Gao
> ---
> .../kernel/timers/clock_settime/clock_settime03.c | 20
> ++------------------
> 1 file changed, 2 insertions(+), 18 deletions(-)
>
> diff --git a/testcases/kernel/timers/clock_settime/clock_settime03.c
> b/testcases/kernel/timers/clock_settime/clock_settime03.c
> index a949303..0b24e6d 100644
> --- a/testcases/kernel/timers/clock_settime/clock_settime03.c
> +++ b/testcases/kernel/timers/clock_settime/clock_settime03.c
> @@ -49,8 +49,8 @@ int testcases[] = {
> EINVAL, /* Invalid timespec */
> EINVAL, /* NSEC_PER_SEC + 1 */
> EPERM, /* non-root user */
> - 0,
> - 0,
> + EINVAL, /* PROCESS_CPUTIME_ID */
> + EINVAL, /* THREAD_CPUTIME_ID */
> };
>
> char *TCID = "clock_settime03";
> @@ -70,17 +70,6 @@ int main(int ac, char **av)
> if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
> tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
>
> - /* PROCESS_CPUTIME_ID & THREAD_CPUTIME_ID are not supported on
> - * kernel versions lower than 2.6.12 and changed back in 2.6.38
> - */
> - if ((tst_kvercmp(2, 6, 12)) < 0 || (tst_kvercmp(2, 6, 38)) >= 0) {
> - testcases[7] = EINVAL;
> - testcases[8] = EINVAL;
> - } else {
> - testcases[7] = EFAULT;
> - testcases[8] = EFAULT;
> - }
> -
> setup();
>
> for (lc = 0; TEST_LOOPING(lc); lc++) {
> @@ -168,11 +157,6 @@ static int setup_test(int option)
> return -1;
> }
> break;
> - case 7:
> - case 8:
> - /* Make tp argument bad pointer */
> - if (tst_kvercmp(2, 6, 12) >= 0)
> - temp = (struct timespec *)-1;
> }
> return 0;
> }
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list