[lttng-dev] [PATCH] Fix test: ctf writer has too large offset_s

Jérémie Galarneau jeremie.galarneau at efficios.com
Thu Aug 10 19:21:23 UTC 2017


This was fixed as part of a pull request [1] which was merged yesterday.

Thanks!
Jérémie

[1] https://github.com/efficios/babeltrace/pull/75

On 8 August 2017 at 15:18, Michael Jeanson <mjeanson at efficios.com> wrote:
> The offset_s values multiplied by 1000000000 overflows 64-bit.
>
> Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
> ---
>  tests/lib/test_ctf_writer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/lib/test_ctf_writer.c b/tests/lib/test_ctf_writer.c
> index d3c7a96..ccd8a24 100644
> --- a/tests/lib/test_ctf_writer.c
> +++ b/tests/lib/test_ctf_writer.c
> @@ -2830,7 +2830,7 @@ int main(int argc, char **argv)
>         const char *returned_clock_name;
>         const char *returned_clock_description;
>         const uint64_t frequency = 1123456789;
> -       const int64_t offset_s = 1351530929945824323;
> +       const int64_t offset_s = 13515309;
>         const int64_t offset = 1234567;
>         int64_t get_offset_s,
>                 get_offset;
> --
> 2.7.4
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com


More information about the lttng-dev mailing list