unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: Joseph Myers <joseph@codesourcery.com>,  libc-alpha@sourceware.org
Subject: Re: [PATCH 2/5] nptl: Convert tst-cond11.c to use libsupport
Date: Fri, 10 May 2019 14:22:19 +0200	[thread overview]
Message-ID: <87zhnujy84.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <73eb7a6c-88d8-fdda-79f0-ac407a29e352@linaro.org> (Adhemerval Zanella's message of "Fri, 10 May 2019 09:20:16 -0300")

* Adhemerval Zanella:

> I will check the following patch to fix it:
>
> ---
> diff --git a/support/timespec.c b/support/timespec.c
> index f1b88c1f4c..653293970a 100644
> --- a/support/timespec.c
> +++ b/support/timespec.c
> @@ -18,6 +18,7 @@
>  
>  #include <support/timespec.h>
>  #include <stdio.h>
> +#include <stdint.h>
>  
>  void
>  test_timespec_before_impl (const char *file, int line,
> @@ -29,12 +30,12 @@ test_timespec_before_impl (const char *file, int line,
>           && left.tv_nsec > right.tv_nsec)) {
>      support_record_failure ();
>      const struct timespec diff = timespec_sub (left, right);
> -    printf ("%s:%d: %ld.%09lds not before %ld.%09lds "
> -           "(difference %ld.%09lds)n",
> +    printf ("%s:%d: %jd.%09jds not before %jd.%09jds "
> +           "(difference %jd.%09jds)n",
>             file, line,
> -           left.tv_sec, left.tv_nsec,
> -           right.tv_sec, right.tv_nsec,
> -           diff.tv_sec, diff.tv_nsec);
> +           (intmax_t) left.tv_sec, (intmax_t) left.tv_nsec,
> +           (intmax_t) right.tv_sec, (intmax_t) right.tv_nsec,
> +           (intmax_t) diff.tv_sec, (intmax_t) diff.tv_nsec);
>    }
>  }
>  
> @@ -48,11 +49,11 @@ test_timespec_equal_or_after_impl (const char *file, int line,
>           && left.tv_nsec < right.tv_nsec)) {
>      support_record_failure ();
>      const struct timespec diff = timespec_sub (right, left);
> -    printf ("%s:%d: %ld.%09lds not after %ld.%09lds "
> -           "(difference %ld.%09lds)n",
> +    printf ("%s:%d: %jd.%09jds not after %jd.%09jds "
> +           "(difference %jd.%09jds)n",
>             file, line,
> -           left.tv_sec, left.tv_nsec,
> -           right.tv_sec, right.tv_nsec,
> -           diff.tv_sec, diff.tv_nsec);
> +           (intmax_t) left.tv_sec, (intmax_t) left.tv_nsec,
> +           (intmax_t) right.tv_sec, (intmax_t) right.tv_nsec,
> +           (intmax_t) diff.tv_sec, (intmax_t) diff.tv_nsec);
>    }

Looks okay to me.

Thanks,
Florian

  reply	other threads:[~2019-05-10 12:22 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02 20:54 [PATCH 0/5] Add new helper functions+macros to libsupport and use them in some nptl tests Mike Crowe
2019-05-02 20:54 ` [PATCH 1/5] support: Add xclock_gettime Mike Crowe
2019-05-08 13:46   ` Florian Weimer
2019-05-08 14:22     ` Mike Crowe
2019-05-08 15:00       ` Florian Weimer
2019-05-08 16:17         ` Mike Crowe
2019-05-08 15:11     ` Adhemerval Zanella
2019-05-02 20:54 ` [PATCH 2/5] nptl: Convert tst-cond11.c to use libsupport Mike Crowe
2019-05-09 16:39   ` Adhemerval Zanella
2019-05-09 17:08     ` Florian Weimer
2019-05-09 17:16       ` Adhemerval Zanella
2019-05-09 23:03         ` Joseph Myers
2019-05-10  9:42           ` Adhemerval Zanella
2019-05-10 12:20             ` Adhemerval Zanella
2019-05-10 12:22               ` Florian Weimer [this message]
2019-05-02 20:54 ` [PATCH 3/5] nptl: Use recent additions to libsupport in tst-sem5 Mike Crowe
2019-05-09 16:55   ` Adhemerval Zanella
2019-05-02 20:54 ` [PATCH 4/5] nptl: Convert some rwlock tests to use libsupport Mike Crowe
2019-05-09 17:25   ` Adhemerval Zanella
2019-05-02 20:54 ` [PATCH 5/5] nptl/tst-abstime: Use libsupport Mike Crowe
2019-05-09 17:26   ` Adhemerval Zanella
2019-05-03 20:38 ` [PATCH 0/5] Add new helper functions+macros to libsupport and use them in some nptl tests Mike Crowe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zhnujy84.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).