On Tue, 2009-07-07 at 01:29 +0200, Jiri Palecek wrote: 
> The failures were caused by strange interpretation of POSIX by the test:
> 
>   - POSIX says CLOCK_THREAD_CPUTIME_ID is an invalid value for the
>     clock_id parameter, and results in an EINVAL
> 
>   - POSIX doesn't specify that the remaining time should be set in any
>     way (eg. zeroed) on successful completion
> 
> Also, the test deletes some of the superfluous uses of the TEST macro.
> 
> Signed-off-by: Jiri Palecek <[email protected]>

Thanks. It solved the problem for me atleast.

Regards--
Subrata

> ---
>  .../syscalls/clock_nanosleep/clock_nanosleep01.c   |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c 
> b/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c
> index 603201c..3c17a5c 100644
> --- a/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c
> +++ b/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c
> @@ -211,7 +211,7 @@ static struct test_case tcase[] = {
>                  .flags          = 0,
>                  .sec            = 0,
>                  .nsec           = 500000000, // 500msec
> -                .ret            = ENOTSUP, // RHEL4U1 + 2.6.18 returns EINVAL
> +                .ret            = EINVAL, // RHEL4U1 + 2.6.18 returns EINVAL
>                  .err            = 0,
>          },
>          { // case05
> @@ -256,8 +256,8 @@ static int chk_difftime(struct timespec *bef, struct 
> timespec *aft,
>                  t.tv_sec -= 1;
>                  t.tv_nsec += 1000000000;
>          }
> -        TEST(expect = (sec * 1000) + (nsec / 1000000));
> -        TEST(result = (t.tv_sec * 1000) + (t.tv_nsec / 1000000));
> +        expect = (sec * 1000) + (nsec / 1000000);
> +        result = (t.tv_sec * 1000) + (t.tv_nsec / 1000000);
>          tst_resm(TINFO,"check sleep time: (min:%ld) < %ld < (max:%ld) 
> (msec)",expect - MAX_MSEC_DIFF, result, expect + MAX_MSEC_DIFF);
>          if (result < expect - MAX_MSEC_DIFF || result > expect + 
> MAX_MSEC_DIFF)
>                  return -1;
> @@ -331,7 +331,7 @@ TEST_END:
>          if (tc->ttype == NORMAL || tc->ttype == SEND_SIGINT) {
>                  tst_resm(TINFO,"remain time: %ld %ld", rm.tv_sec, 
> rm.tv_nsec);
>                  if (tc->ttype == NORMAL)
> -                        remain_ok = rm.tv_sec == 0 && rm.tv_nsec == 0;
> +                        remain_ok = 1;
>                  else
>                          remain_ok = rm.tv_sec != 0 || rm.tv_nsec != 0;
>          }


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to