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

Michael Jeanson mjeanson at efficios.com
Tue Aug 8 19:18:48 UTC 2017


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



More information about the lttng-dev mailing list