[PATCH libevdev 5/5] Remove wrong libevdev clock test

David Herrmann dh.herrmann at gmail.com
Fri Oct 4 11:40:06 PDT 2013


Hi

On Fri, Oct 4, 2013 at 8:37 PM, David Herrmann <dh.herrmann at gmail.com> wrote:
> We can rely on CLOCK_MONOTONIC and CLOCK_REALTIME to be different at any
> time. However, this does not apply to the ms/us/ns parts of the current
> time. Both may be in sync regarding the current micro-seconds state. So
> remove the wrong clock us-comparison.
>
> I was able to trigger this on my machine. Chances that both are in sync
> are very low so I assume my RTC only provides low granularity and thus
> both clocks are sync during boot for higher granularity.
>
> Signed-off-by: David Herrmann <dh.herrmann at gmail.com>

Whoops, this one doesn't belong to the series. Please pick it up independently.

Thanks
David

> ---
>  test/test-libevdev-init.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/test/test-libevdev-init.c b/test/test-libevdev-init.c
> index 7d4376d..c6adc40 100644
> --- a/test/test-libevdev-init.c
> +++ b/test/test-libevdev-init.c
> @@ -343,7 +343,6 @@ START_TEST(test_clock_id_events)
>         ck_assert_int_eq(ev1.value, ev2.value);
>
>         ck_assert_int_ne(ev1.time.tv_sec, ev2.time.tv_sec);
> -       ck_assert_int_ne(ev1.time.tv_usec, ev2.time.tv_usec);
>
>         ck_assert_int_ge(ev1.time.tv_sec, t1_real.tv_sec);
>         ck_assert_int_ge(ev1.time.tv_usec, t1_real.tv_nsec/1000);
> --
> 1.8.4
>


More information about the Input-tools mailing list