Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: Nathan_Lynch@mentor.com (Nathan Lynch)
Subject: [lttng-dev] [RFC/PATCH 3/3] babeltrace: add simple tests for converter command line options
Date: Wed, 26 Oct 2016 11:29:37 -0500	[thread overview]
Message-ID: <3a353056-a549-b626-fce4-cb09fe11c934@mentor.com> (raw)
In-Reply-To: <1311701030.5606.1477488992406.JavaMail.zimbra@efficios.com>

On 10/26/2016 08:36 AM, Mathieu Desnoyers wrote:
> ----- On Oct 26, 2016, at 3:11 AM, Sebastien Boisvert sboisvert at gydle.com wrote:
> 
>> Hi Nathan,
>>
>>> diff --git a/tests/bin/test_clock_seconds b/tests/bin/test_clock_seconds
>>> +# [s]+.[nnnnnnnnn]
>>> +timestamp_fmt="\["
>>> +timestamp_fmt+="[[:digit:]]+" # [s]+
>>> +timestamp_fmt+="\."
>>> +timestamp_fmt+="[[:digit:]]{9}" # [nnnnnnnnn]
>>> +timestamp_fmt+="\]"
>>> +
>>
>>
>> Is the timestamp 0.123456789 possible ?
>>
>> Is there a minimum for the left part, something like Epoch ?
> 
> We can also have slightly negative timestamps due to support of
> non-GMT timezones. A timezone with a negative offset from GMT with
> an offset 0 (a trace which appears to be taken exactly at epoch)
> ends up at the very end of Dec 31, 1969. It can be represented
> with a negative timestamp with the s.ns notation.
> 
> This mainly happen when a system boots without network connectivity
> and think it is exactly at Epoch. Not that uncommon unfortunately.

I hadn't really intended to make the regexes in these tests rigorous
beyond what was required for the wk-heartbeat-u sample trace but I
suppose I could do so.  Sample traces for this kind of case would be
helpful.

Alternatively, I could test verbatim (no regexes) against the output of:

$ TZ='' babeltrace --clock-seconds \
   tests/ctf-traces/succeed/wk-heartbeat-u

Which should be stable across systems, no?



  reply	other threads:[~2016-10-26 16:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-25 15:34 [lttng-dev] [RFC/PATCH 0/3] babeltrace: test harness improvements + new tests Nathan Lynch
2016-10-25 15:34 ` [lttng-dev] [RFC/PATCH 1/3] babeltrace: use AM_TESTS_ENVIRONMENT for tests Nathan Lynch
2016-10-25 15:34 ` [lttng-dev] [RFC/PATCH 2/3] babeltrace: drop configure-time substitutions in test scripts Nathan Lynch
2016-10-25 15:34 ` [lttng-dev] [RFC/PATCH 3/3] babeltrace: add simple tests for converter command line options Nathan Lynch
2016-10-26  7:11   ` Sebastien Boisvert
2016-10-26 13:36     ` Mathieu Desnoyers
2016-10-26 16:29       ` Nathan Lynch [this message]
2016-10-25 15:50 ` [lttng-dev] [RFC/PATCH 0/3] babeltrace: test harness improvements + new tests Jonathan Rajotte Julien
2016-10-25 16:05   ` Nathan Lynch
2016-10-25 17:43     ` Michael Jeanson
2016-10-25 20:48       ` Nathan Lynch

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

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

  git send-email \
    --in-reply-to=3a353056-a549-b626-fce4-cb09fe11c934@mentor.com \
    --to=nathan_lynch@mentor.com \
    /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