lp:~lttng/babeltrace/trunk
- Get this branch:
- bzr branch lp:~lttng/babeltrace/trunk
Branch merges
Branch information
Import details
This branch is an import of the HEAD branch of the Git repository at git://git.efficios.com/babeltrace.git.
Last successful import was .
Updating branch...
Launchpad is processing new changes to this branch which will be available in a few minutes. Reload to see the changes.
Recent revisions
- 4595. By Simon Marchi <email address hidden>
-
lib: validate iterator message sequence
Validate that the sequence of messages produced by iterators respects
the sequence defined by the Message Interchange Protocol (MIP) [1].Without packets
SB (E | DE)* SEWith packets
SB ((PB (E | DE)* PE) | DE | DP)* SEValidate that when an iterator returns
BT_MESSAGE_ITERATOR_ CLASS_NEXT_ METHOD_ STATUS_ END, all streams are
properly ended (we have received a stream end message for all streams).Add an expected_msg_types field to the iterator's per_stream_state
structure, which holds a bit mask of the message types the iterator is
allowed to emit next.Use the cur_packet field that is maintained by
message_packet_ is_valid when processing a discarded events message. We
need to know if we are in a packet or not to determine the following
valid message types (DE appears twice in the "With packets" sequence
above, once within a packet and once outside a packet).It doesn't matter in which order the two assertions are placed, since
the "sequence is as expected" assertion doesn't use the cur_packet field
when handling the "packet beginning" and "packet end" messages.
However, I think that it is more useful to have the "sequence is as
expected" first. Some mistakes, like the following sequence where a
packet beginning message is forgotten:... PB E E PE E E PE ...
... would cause both assertions to fail. But the "sequence is as
expected" assertion points closer to the root cause of the problem than
the "packet is expected" one, which points more to a symptom. So, if
both assertions would fail, I prefer that we show the "sequence is
as expected" one.Here's an example of the error message that is printed when an error is
detected. In this case, a packet beginning message was forgotten.Babeltrace 2 library postcondition not satisfied.
---------- ------- ------- ------- ------- ------- ------- ------- ------- ------
Condition ID: `post:message-iterator- class-next- method: mip-message- sequence- is-expected` .
Function: bt_message_iterator_ class_next_ method( ).
---------- ------- ------- ------- ------- ------- ------- ------- ------- ------
Error is:
MIP message sequence is not expected: stream-addr=0x60d00000 1d80, stream-id=0, iterator- addr=0x61100000 4c80, iterator- upstream- comp-name= "source. gpx.GpxSource" , iterator- upstream- comp-log- level=WARNING, iterator- upstream- comp-class- type=SOURCE, iterator- upstream- comp-class- name="GpxSource ", iterator- upstream- comp-class- partial- descr=" ", message- addr=0x60700000 4540, message-type=EVENT, expected- msg-types= STREAM_ END|PACKET_ BEGINNING
Aborting...[1] https:/
/babeltrace. org/docs/ v2.0/libbabeltr ace2/group_ _api-msg. html#api- msg-seq Change-Id: I25d3ff9b87c551
dcced1ba25e0a85 25f316a8050
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review. lttng.org/ c/babeltrace/ +/10450
Tested-by: jenkins <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden> - 4594. By Simon Marchi <email address hidden>
-
lib: validate iterator message packets
Validate that messages coming out of iterators have sensible packet
values. This applies to event and packet end messages: their packet
must match the packet of the previous packet beginning message.Add a hash table to hold per-stream state, inside the
bt_message_iterator structure. Since this state will only be used for
dev assertions, for the moment, only create it if BT_DEV_MODE is
defined.Discard the per-stream state when the iterator seeks (after which the
iterator is expected to produce a new message sequence, starting from
scratch).If the iterator uses auto-seek to implement "seek ns from origin", we
need to discard the per-stream state twice: once after seeking the
beginning, and once after consuming messages until the desired point.When a wrong packet is detected, print an error logging message with
some details, before the failed assertion message:Babeltrace 2 library postcondition not satisfied.
---------- ------- ------- ------- ------- ------- ------- ------- ------- ------
Condition ID: `post:message-iterator- class-next- method: message- packet- is-expected` .
Function: bt_message_iterator_ class_next_ method( ).
---------- ------- ------- ------- ------- ------- ------- ------- ------- ------
Error is:
Message's packet is not expected: stream-addr=0x60d00000 1d80, stream-id=0, iterator- addr=0x61100000 4c80, iterator- upstream- comp-name= "source. gpx.GpxSource" , iterator- upstream- comp-log- level=WARNING, iterator- upstream- comp-class- type=SOURCE, iterator- upstream- comp-class- name="GpxSource ", iterator- upstream- comp-class- partial- descr=" ", message- addr=0x60700000 4540, message-type=EVENT, received- packet- addr=0x60700000 4310, expected- packet- addr=(nil)
Aborting...The particular structure of the code is explained by the following
patch, which adds verification that the message sequence is as expected.
Both assertions (packet is expected, and message sequence is as
expected) need to know about the current packet (this state is
maintained by message_packet_ is_valid) , so must be in the same "for all
messages" loop. Alternatively, they could both track the current packet
independently, but that would be redundant.But this form also allows putting more info about the problematic
message in the abort notice, which I think is nice.Change-Id: I176417d9ae7b04
a9c16ff975e008e 208b173e3d2
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review. lttng.org/ c/babeltrace/ +/10448
Tested-by: jenkins <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden> - 4593. By .eepp
-
Fix REUSE licensing/copyright issues in `tests/utils`
This patch makes `reuse lint` happy for the files in `tests/utils`.
Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: I472089852d8840653c0a4a2350a4d 4981329f43e
Reviewed-on: https://review. lttng.org/ c/babeltrace/ +/11385
Tested-by: jenkins <email address hidden>
CI-Build: Michael Jeanson <email address hidden>
Reviewed-by: Michael Jeanson <email address hidden> - 4592. By .eepp
-
Fix REUSE licensing/copyright issues in `src`
This patch makes `reuse lint` happy for the files in `src`.
Putting the info into a separate `.license` file for
`src/cpp-common/ optional. hpp` to avoid modifying the original file which
comes from an external project.Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: I073afa1b5de0906f4f9f2a809ef38 7c05833ca17
Reviewed-on: https://review. lttng.org/ c/babeltrace/ +/11384
Reviewed-by: Michael Jeanson <email address hidden> - 4591. By .eepp
-
Add SPDX info for `tests/
utils/python/ typing/ typing. py` Putting the info in a separate `.license` file to avoid modifying the
original one (which comes from the CPython project).Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: If183d9662f239da27a00b7f8ba888 7eaec489270
Reviewed-on: https://review. lttng.org/ c/babeltrace/ +/11383
Reviewed-by: Michael Jeanson <email address hidden> - 4590. By .eepp
-
Add SPDX info to Python bindings documentation
The text and images have the `CC-BY-SA-4.0` license.
`LICENSES/
CC-BY-SA- 4.0.txt` already exists, but wasn't used. Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: I66428778d69cc4b44816cb6588283 984d16f3d78
Reviewed-on: https://review. lttng.org/ c/babeltrace/ +/11382
Reviewed-by: Michael Jeanson <email address hidden> - 4589. By .eepp
-
Add missing REUSE licenses
`reuse lint` says:
# MISSING LICENSES
'FSFAP' found in:
* m4/ax_append_compile_ flags.m4
* m4/ax_append_flag.m4
* m4/ax_check_compile_ flag.m4
* m4/ax_cxx_compile_ stdcxx. m4
* m4/ax_require_defined. m4
'FSFULLR' found in:
* m4/ae_python_modules. m4
'GPL-2.0-or- later' found in:
* m4/ax_c___attribute_ _.m4
* m4/ax_pthread.m4
* tests/utils/tap-driver. sh
'LicenseRef-Autoconf- exception- macro' found in:
* m4/ax_c___attribute_ _.m4
* m4/ax_pthread.m4Download and add them.
Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: I71576e2ed2281a1890a49a5cb9261 c11fe30706e
Reviewed-on: https://review. lttng.org/ c/babeltrace/ +/11381
Reviewed-by: Michael Jeanson <email address hidden> - 4588. By .eepp
-
LICENSES: add `.txt` extension to license files
`reuse lint` says:
# LICENSES WITHOUT FILE EXTENSION
The following licenses have no file extension:
* BSD-2-Clause
* BSD-4-Clause
* BSL-1.0
* CC-BY-SA-4.0
* GPL-2.0-only
* GPL-3.0-or-later
* LGPL-2.1-only
* MIT
* PSF-2.0Make it happy.
Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: I6c06d74c37fe4230e5c3027831832 11eeff2b8a5
Reviewed-on: https://review. lttng.org/ c/babeltrace/ +/11379
Reviewed-by: Michael Jeanson <email address hidden>
Tested-by: jenkins <email address hidden>
CI-Build: Michael Jeanson <email address hidden> - 4587. By .eepp
-
Use `LICENSES/
GPL-3.0- or-later` (`GPL-3.0` is deprecated) As of this date, the SPDX website says [1] about "GNU General Public
License v3.0 only":> This license identifier has been deprecated since license list
> version 3.0.Therefore, use `GPL-3.0-or-later`.
That's already the short ID we use in `tests/
utils/tap/ tap.sh` , not
`GPL-3.0`.[1]: https:/
/spdx.org/ licenses/ GPL-3.0. html Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: I72349b1631cabfa16a59e02288712 05978d5dd91
Reviewed-on: https://review. lttng.org/ c/babeltrace/ +/11378
Reviewed-by: Michael Jeanson <email address hidden>
Tested-by: jenkins <email address hidden> - 4586. By .eepp
-
Use `LICENSES/
GPL-2.0- only` (`GPL-2.0` is deprecated) As of this date, the SPDX website says [1] about "GNU General Public
License v2.0 only":> This license identifier has been deprecated since license list
> version 3.0.Therefore, use `GPL-2.0-only`.
That's already the short ID we use everywhere, not `GPL-2.0`.
[1]: https:/
/spdx.org/ licenses/ GPL-2.0. html Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: Ifa073ef2a833f5bc6fb1051d50146 ca352965688
Reviewed-on: https://review. lttng.org/ c/babeltrace/ +/11377
Tested-by: jenkins <email address hidden>
Reviewed-by: Michael Jeanson <email address hidden>
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)