3 # Copyright (C) - 2017 Julien Desfossez <jdesfossez@efficios.com>
5 # This program is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License, version 2 only, as
7 # published by the Free Software Foundation.
9 # This program is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 # You should have received a copy of the GNU General Public License along with
15 # this program; if not, write to the Free Software Foundation, Inc., 51
16 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 .
"@abs_top_builddir@/tests/utils/common.sh"
20 TRACE_PATH
="${BT_CTF_TRACES}/succeed/wk-heartbeat-u/"
28 "${BT_BIN}" --clock-gmt --begin 17:48:17.587029529 --end 17:48:17.588680018 \
29 "${TRACE_PATH}" >/dev
/null
2>&1
30 ok $?
"Read a trace with the trimmer enabled (GMT relative timestamps)"
32 "${BT_BIN}" --clock-gmt --begin 17:48:17.587029529 "${TRACE_PATH}" \
33 2>/dev
/null
>"${tmp_out}"
34 ok $?
"Ran successfully with --begin (GMT relative timestamps)"
35 cnt
=$
(wc -l < "${tmp_out}")
37 ok $?
"Received ${cnt}/18 events (GMT relative timestamps)"
39 "${BT_BIN}" --clock-gmt --end 17:48:17.588680018 "${TRACE_PATH}" \
40 2>/dev
/null
>"${tmp_out}"
41 ok $?
"Ran successfully with --end (GMT relative timestamps)"
42 cnt
=$
(wc -l < "${tmp_out}")
44 ok $?
"Received ${cnt}/9 events (GMT relative timestamps)"
46 "${BT_BIN}" --clock-gmt --begin 17:48:17.587029529 --end 17:48:17.588680018 \
47 "${TRACE_PATH}" 2>/dev
/null
>"${tmp_out}"
48 ok $?
"Ran successfully with --begin and --end (GMT relative timestamps)"
49 cnt
=$
(wc -l < "${tmp_out}")
51 ok $?
"Received ${cnt}/7 events (GMT relative timestamps)"
53 "${BT_BIN}" --clock-gmt --begin 18:48:17.587029529 "${TRACE_PATH}" \
54 2>/dev
/null
>"${tmp_out}"
55 ok $?
"Ran successfully with --begin out of range (GMT relative timestamps)"
56 cnt
=$
(wc -l < "${tmp_out}")
58 ok $?
"No events when begin is out of range (GMT relative timestamps)"
60 "${BT_BIN}" --clock-gmt --end 16:48:17.588680018 "${TRACE_PATH}" \
61 2>/dev
/null
>"${tmp_out}"
62 ok $?
"Ran successfully with --end out of range (GMT relative timestamps)"
63 cnt
=$
(wc -l < "${tmp_out}")
65 ok $?
"No events when end is out of range (GMT relative timestamps)"
68 "${BT_BIN}" --clock-gmt --begin "2012-10-29 17:48:17.587029529" --end "2012-10-29 17:48:17.588680018" \
69 "${TRACE_PATH}" >/dev
/null
2>&1
70 ok $?
"Read a trace with the trimmer enabled (GMT absolute timestamps)"
72 "${BT_BIN}" --clock-gmt --begin "2012-10-29 17:48:17.587029529" "${TRACE_PATH}" \
73 2>/dev
/null
>"${tmp_out}"
74 ok $?
"Ran successfully with --begin (GMT absolute timestamps)"
75 cnt
=$
(wc -l < "${tmp_out}")
77 ok $?
"Received ${cnt}/18 events (GMT absolute timestamps)"
79 "${BT_BIN}" --clock-gmt --end "2012-10-29 17:48:17.588680018" "${TRACE_PATH}" \
80 2>/dev
/null
>"${tmp_out}"
81 ok $?
"Ran successfully with --end (GMT absolute timestamps)"
82 cnt
=$
(wc -l < "${tmp_out}")
84 ok $?
"Received ${cnt}/9 events (GMT absolute timestamps)"
86 "${BT_BIN}" --clock-gmt --begin "2012-10-29 17:48:17.587029529" --end "2012-10-29 17:48:17.588680018" \
87 "${TRACE_PATH}" 2>/dev
/null
>"${tmp_out}"
88 ok $?
"Ran successfully with --begin and --end (GMT absolute timestamps)"
89 cnt
=$
(wc -l < "${tmp_out}")
91 ok $?
"Received ${cnt}/7 events (GMT absolute timestamps)"
93 "${BT_BIN}" --clock-gmt --begin "2012-10-29 18:48:17.587029529" "${TRACE_PATH}" \
94 2>/dev
/null
>"${tmp_out}"
95 ok $?
"Ran successfully with --begin out of range (GMT absolute timestamps)"
96 cnt
=$
(wc -l < "${tmp_out}")
98 ok $?
"No events when begin is out of range (GMT absolute timestamps)"
100 "${BT_BIN}" --clock-gmt --end "2012-10-29 16:48:17.588680018" "${TRACE_PATH}" \
101 2>/dev
/null
>"${tmp_out}"
102 ok $?
"Ran successfully with --end out of range (GMT absolute timestamps)"
103 cnt
=$
(wc -l < "${tmp_out}")
105 ok $?
"No events when end is out of range (GMT absolute timestamps)"
110 "${BT_BIN}" --begin "12:48:17.587029529" --end "12:48:17.588680018" \
111 "${TRACE_PATH}" >/dev
/null
2>&1
112 ok $?
"Read a trace with the trimmer enabled (EST relative timestamps)"
114 "${BT_BIN}" --begin "12:48:17.587029529" "${TRACE_PATH}" \
115 2>/dev
/null
>"${tmp_out}"
116 ok $?
"Ran successfully with --begin (EST relative timestamps)"
117 cnt
=$
(wc -l < "${tmp_out}")
119 ok $?
"Received ${cnt}/18 events (EST relative timestamps)"
121 "${BT_BIN}" --end "12:48:17.588680018" "${TRACE_PATH}" \
122 2>/dev
/null
>"${tmp_out}"
123 ok $?
"Ran successfully with --end (EST relative timestamps)"
124 cnt
=$
(wc -l < "${tmp_out}")
126 ok $?
"Received ${cnt}/9 events (EST relative timestamps)"
128 "${BT_BIN}" --begin "12:48:17.587029529" --end "12:48:17.588680018" \
129 "${TRACE_PATH}" 2>/dev
/null
>"${tmp_out}"
130 ok $?
"Ran successfully with --begin and --end (EST relative timestamps)"
131 cnt
=$
(wc -l < "${tmp_out}")
133 ok $?
"Received ${cnt}/7 events (EST relative timestamps)"
135 "${BT_BIN}" --begin "13:48:17.587029529" "${TRACE_PATH}" \
136 2>/dev
/null
>"${tmp_out}"
137 ok $?
"Ran successfully with --begin out of range (EST relative timestamps)"
138 cnt
=$
(wc -l < "${tmp_out}")
140 ok $?
"No events when begin is out of range (EST relative timestamps)"
142 "${BT_BIN}" --end "11:48:17.588680018" "${TRACE_PATH}" \
143 2>/dev
/null
>"${tmp_out}"
144 ok $?
"Ran successfully with --end out of range (EST relative timestamps)"
145 cnt
=$
(wc -l < "${tmp_out}")
147 ok $?
"No events when end is out of range (EST relative timestamps)"
150 "${BT_BIN}" --begin "2012-10-29 12:48:17.587029529" --end "2012-10-29 12:48:17.588680018" \
151 "${TRACE_PATH}" >/dev
/null
2>&1
152 ok $?
"Read a trace with the trimmer enabled (EST absolute timestamps)"
154 "${BT_BIN}" --begin "2012-10-29 12:48:17.587029529" "${TRACE_PATH}" \
155 2>/dev
/null
>"${tmp_out}"
156 ok $?
"Ran successfully with --begin (EST absolute timestamps)"
157 cnt
=$
(wc -l < "${tmp_out}")
159 ok $?
"Received ${cnt}/18 events (EST absolute timestamps)"
161 "${BT_BIN}" --end "2012-10-29 12:48:17.588680018" "${TRACE_PATH}" \
162 2>/dev
/null
>"${tmp_out}"
163 ok $?
"Ran successfully with --end (EST absolute timestamps)"
164 cnt
=$
(wc -l < "${tmp_out}")
166 ok $?
"Received ${cnt}/9 events (EST absolute timestamps)"
168 "${BT_BIN}" --begin "2012-10-29 12:48:17.587029529" --end "2012-10-29 12:48:17.588680018" \
169 "${TRACE_PATH}" 2>/dev
/null
>"${tmp_out}"
170 ok $?
"Ran successfully with --begin and --end (EST absolute timestamps)"
171 cnt
=$
(wc -l < "${tmp_out}")
173 ok $?
"Received ${cnt}/7 events (EST absolute timestamps)"
175 "${BT_BIN}" --begin "2012-10-29 13:48:17.587029529" "${TRACE_PATH}" \
176 2>/dev
/null
>"${tmp_out}"
177 ok $?
"Ran successfully with --begin out of range (EST absolute timestamps)"
178 cnt
=$
(wc -l < "${tmp_out}")
180 ok $?
"No events when begin is out of range (EST absolute timestamps)"
182 "${BT_BIN}" --end "2012-10-29 11:48:17.588680018" "${TRACE_PATH}" \
183 2>/dev
/null
>"${tmp_out}"
184 ok $?
"Ran successfully with --end out of range (EST absolute timestamps)"
185 cnt
=$
(wc -l < "${tmp_out}")
187 ok $?
"No events when end is out of range (EST absolute timestamps)"
This page took 0.054618 seconds and 4 git commands to generate.