pax_global_header00006660000000000000000000000064144310120170014503gustar00rootroot0000000000000052 comment=a3ccab79d8fc99c90403adcc33aa2e6ba4878b84 barectf-3.1.2/000077500000000000000000000000001443101201700131145ustar00rootroot00000000000000barectf-3.1.2/.gitignore000066400000000000000000000002631443101201700151050ustar00rootroot00000000000000# cache __pycache__/ *.py[cod] .*cache/ .tox/ # C objects and libraries *.o *.a *.so *.so.* # distribution/build /build/ /dist/ *.egg-info/ # generated HTML README README.html barectf-3.1.2/.gitreview000066400000000000000000000001701443101201700151200ustar00rootroot00000000000000[gerrit] host=review.lttng.org port=29418 project=barectf.git defaultbranch=master defaultremote=review defaultrebase=0 barectf-3.1.2/LICENSE000066400000000000000000000021361443101201700141230ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) 2014-2020 Philippe Proulx Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. barectf-3.1.2/README.adoc000066400000000000000000000047131443101201700147060ustar00rootroot00000000000000// Render with Asciidoctor :version: 3.1 ifndef::env-github[] :toc: left endif::env-github[] = barectf 8 March 2022 Philippe Proulx image::https://barectf.org/barectf-logo.svg[{nbsp}] https://pypi.python.org/pypi/barectf[image:https://img.shields.io/pypi/v/barectf.svg[]] https://ci.lttng.org/job/barectf_stable-{version}_build[image:https://img.shields.io/jenkins/s/https/ci.lttng.org/barectf_stable-{version}_build.svg[]] [.lead] https://barectf.org/[**_barectf_**] (from _bare_ metal and _CTF_) is a generator of https://en.wikipedia.org/wiki/Tracing_(software)[tracers] that produce https://diamon.org/ctf/[CTF] data streams. [NOTE] ==== This README mostly documents barectf development. To learn how to use barectf, read its https://barectf.org/docs/barectf/{version}/[documentation]. ==== == Install barectf See the barectf documentation's https://barectf.org/docs/barectf/{version}/install.html[Install barectf] page. == Build barectf barectf is a https://python-poetry.org/[Poetry] project. To build barectf from this repository: . https://python-poetry.org/docs/#installation[Install Poetry]. . Build the project: + ---- $ poetry build ---- + The `dist` directory contains the distribution archives. == Build the barectf documentation This repository contains an https://docs.antora.org/antora/latest/component-version/[Antora documentation component version] under the `docs` directory. This component version is the source of the https://barectf.org/docs/{version}/[barectf documentation website] (version{nbsp}{version}). You can refer to this component version in your https://docs.antora.org/antora/latest/playbook/[Antora playbook file], for example: [source,yaml] ---- site: # ... content: sources: - url: https://github.com/efficios/barectf branches: [stable-3.1] start_path: docs # ... ui: # ... ---- == Test barectf To run the barectf tests: . Make sure you have the testing requirements: ** A little-endian architecture. + YAML configuration files of tracing tests use a little-endian native byte order. ** https://tox.wiki/en/latest/installation.html[tox] ** A C{nbsp}compiler. + If your C{nbsp}compiler is not the command `cc`, then set the `CC` environment variable to your compiler's path and export it to run the barectf tests. ** https://www.gnu.org/software/make/[GNU Make] . Run the tests: + ---- $ tox ---- == Get help See the barectf documentation's https://barectf.org/docs/barectf/{version}/get-help.html[Get help] page. barectf-3.1.2/barectf/000077500000000000000000000000001443101201700145225ustar00rootroot00000000000000barectf-3.1.2/barectf/__init__.py000066400000000000000000000113241443101201700166340ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2014-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import barectf.config_parse_common as barectf_config_parse_common import barectf.version as barectf_version import barectf.config as barectf_config import barectf.config_file as barectf_config_file import barectf.codegen as barectf_codegen import barectf.typing as barectf_typing # version API __major_version__ = barectf_version.__major_version__ __minor_version__ = barectf_version.__minor_version__ __patch_version__ = barectf_version.__patch_version__ __pre_version__ = barectf_version.__pre_version__ __version__ = barectf_version.__version__ # common typing API Index = barectf_typing.Index Count = barectf_typing.Count Id = barectf_typing.Id Alignment = barectf_typing.Alignment VersionNumber = barectf_typing.VersionNumber # configuration API _ArrayFieldType = barectf_config._ArrayFieldType _BitArrayFieldType = barectf_config._BitArrayFieldType _ConfigurationParseError = barectf_config_parse_common._ConfigurationParseError _EnumerationFieldType = barectf_config._EnumerationFieldType _FieldType = barectf_config._FieldType _IntegerFieldType = barectf_config._IntegerFieldType ByteOrder = barectf_config.ByteOrder ClockType = barectf_config.ClockType ClockTypeCTypes = barectf_config.ClockTypeCTypes ClockTypeOffset = barectf_config.ClockTypeOffset Configuration = barectf_config.Configuration ConfigurationCodeGenerationHeaderOptions = barectf_config.ConfigurationCodeGenerationHeaderOptions ConfigurationCodeGenerationOptions = barectf_config.ConfigurationCodeGenerationOptions ConfigurationOptions = barectf_config.ConfigurationOptions DEFAULT_FIELD_TYPE = barectf_config.DEFAULT_FIELD_TYPE DisplayBase = barectf_config.DisplayBase DynamicArrayFieldType = barectf_config.DynamicArrayFieldType EnumerationFieldTypeMapping = barectf_config.EnumerationFieldTypeMapping EnumerationFieldTypeMappingRange = barectf_config.EnumerationFieldTypeMappingRange EnumerationFieldTypeMappings = barectf_config.EnumerationFieldTypeMappings EventRecordType = barectf_config.EventRecordType LogLevel = barectf_config.LogLevel RealFieldType = barectf_config.RealFieldType SignedEnumerationFieldType = barectf_config.SignedEnumerationFieldType SignedIntegerFieldType = barectf_config.SignedIntegerFieldType StaticArrayFieldType = barectf_config.StaticArrayFieldType DataStreamType = barectf_config.DataStreamType DataStreamTypeEventRecordFeatures = barectf_config.DataStreamTypeEventRecordFeatures DataStreamTypeFeatures = barectf_config.DataStreamTypeFeatures DataStreamTypePacketFeatures = barectf_config.DataStreamTypePacketFeatures StringFieldType = barectf_config.StringFieldType StructureFieldType = barectf_config.StructureFieldType StructureFieldTypeMember = barectf_config.StructureFieldTypeMember StructureFieldTypeMembers = barectf_config.StructureFieldTypeMembers Trace = barectf_config.Trace TraceEnvironment = barectf_config.TraceEnvironment TraceType = barectf_config.TraceType TraceTypeWithUnknownNativeByteOrder = barectf_config.TraceTypeWithUnknownNativeByteOrder TraceTypeFeatures = barectf_config.TraceTypeFeatures UnsignedEnumerationFieldType = barectf_config.UnsignedEnumerationFieldType UnsignedIntegerFieldType = barectf_config.UnsignedIntegerFieldType # configuration file API configuration_file_major_version = barectf_config_file.configuration_file_major_version configuration_from_file = barectf_config_file.configuration_from_file effective_configuration_file = barectf_config_file.effective_configuration_file # code generation API CodeGenerator = barectf_codegen.CodeGenerator # remove local names del barectf_config_parse_common del barectf_version del barectf_config del barectf_config_file del barectf_codegen del barectf_typing barectf-3.1.2/barectf/argpar.py000066400000000000000000000325151443101201700163560ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import re import typing from typing import Optional, List, Iterable from barectf.typing import Index, _OptStr __all__ = ['OptDescr', '_OptItem', '_NonOptItem', '_Error', 'parse', 'OrigArgs'] # types OrigArgs = List[str] # Option descriptor. class OptDescr: # Builds an option descriptor having the short name `short_name` # (without the leading `-`) and/or the long name `long_name` # (without the leading `--`). # # If `has_arg` is `True`, then it is expected that such an option # has an argument. def __init__(self, short_name: _OptStr = None, long_name: _OptStr = None, has_arg: bool = False): assert short_name is not None or long_name is not None self._short_name = short_name self._long_name = long_name self._has_arg = has_arg @property def short_name(self) -> _OptStr: return self._short_name @property def long_name(self) -> _OptStr: return self._long_name @property def has_arg(self) -> Optional[bool]: return self._has_arg class _Item: pass # Parsed option argument item. class _OptItem(_Item): def __init__(self, descr: OptDescr, arg_text: _OptStr = None): self._descr = descr self._arg_text = arg_text @property def descr(self) -> OptDescr: return self._descr @property def arg_text(self) -> _OptStr: return self._arg_text # Parsed non-option argument item. class _NonOptItem(_Item): def __init__(self, text: str, orig_arg_index: Index, non_opt_index: Index): self._text = text self._orig_arg_index = orig_arg_index self._non_opt_index = non_opt_index @property def text(self) -> str: return self._text @property def orig_arg_index(self) -> Index: return self._orig_arg_index @property def non_opt_index(self) -> Index: return self._non_opt_index # Results of parse(). class _ParseRes: def __init__(self, items: List[_Item], ingested_orig_args: OrigArgs, remaining_orig_args: OrigArgs): self._items = items self._ingested_orig_args = ingested_orig_args self._remaining_orig_args = remaining_orig_args @property def items(self) -> List[_Item]: return self._items @property def ingested_orig_args(self) -> OrigArgs: return self._ingested_orig_args @property def remaining_orig_args(self) -> OrigArgs: return self._remaining_orig_args # Parsing error. class _Error(Exception): def __init__(self, orig_arg_index: Index, orig_arg: str, msg: str): super().__init__(msg) self._orig_arg_index = orig_arg_index self._orig_arg = orig_arg self._msg = msg @property def orig_arg_index(self) -> Index: return self._orig_arg_index @property def orig_arg(self) -> str: return self._orig_arg @property def msg(self) -> str: return self._msg # Results of parse_short_opts() and parse_long_opt(); internal. class _OptParseRes(typing.NamedTuple): items: List[_Item] orig_arg_index_incr: int # Parses the original arguments `orig_args` (list of strings), # considering the option descriptors `opt_descrs` (set of `OptDescr` # objects), and returns a corresponding `_ParseRes` object. # # This function considers ALL the elements of `orig_args`, including the # first one, so that you would typically pass `sys.argv[1:]` to exclude # the program/script name. # # This argument parser supports: # # * Short options without an argument, possibly tied together: # # -f -auf -n # # * Short options with arguments: # # -b 45 -f/mein/file -xyzhello # # * Long options without an argument: # # --five-guys --burger-king --pizza-hut --subway # # * Long options with arguments: # # --security enable --time=18.56 # # * Non-option arguments (anything else). # # This function does NOT accept `--` as an original argument; while it # means "end of options" for many command-line tools, this function is # all about keeping the order of the arguments, so it doesn't mean much # to put them at the end. This has the side effect that a non-option # argument cannot have the form of an option, for example if you need to # pass the exact relative path `--lentil-soup`. In that case, you would # need to pass `./--lentil-soup`. # # This function accepts duplicate options (the resulting list of items # contains one entry for each instance). # # On success, this function returns a `_ParseRes` object which contains # a list of items as its `items` property. Each item is either an # option item or a non-option item. # # The returned list contains the items in the same order that the # original arguments `orig_args` were parsed, including non-option # arguments. This means, for example, that for # # --hello --meow=23 /path/to/file -b # # the function creates a list of four items: two options, one # non-option, and one option. # # In the returned object, `ingested_orig_args` is the list of ingested # original arguments to produce the resulting items, while `remaining_orig_args` # is the list of remaining original arguments (not parsed because an # unknown option was found and `fail_on_unknown_opt` was `False`). # # For example, with # # --great --white contact nuance --shark nuclear # # if `--shark` is not described within `opt_descrs` and # `fail_on_unknown_opt` is `False`, then `ingested_orig_args` contains # `--great`, `--white`, `contact`, and `nuance` (two options, two # non-options), whereas `remaining_orig_args` contains `--shark` and # `nuclear`. # # This makes it possible to know where a command name is, for example. # With those arguments: # # --verbose --stuff=23 do-something --specific-opt -f -b # # and the option descriptors for `--verbose` and `--stuff` only, the # function returns the `--verbose` and `--stuff` option items, the # `do-something` non-option item, three ingested original arguments, and # three remaining original arguments. This means you can start the next # argument parsing stage, with option descriptors depending on the # command name, with the remaining original arguments. # # Note that `len(ingested_orig_args)` is NOT always equal to the number # of returned items, as # # --hello -fdw # # for example contains two ingested original arguments, but four # resulting option items. # # On failure, this function raises an `_Error` object. def parse(orig_args: OrigArgs, opt_descrs: Iterable[OptDescr], fail_on_unknown_opt: bool = True) -> _ParseRes: # Finds and returns an option description amongst `opt_descrs` # having the short option name `short_name` OR the long option name # `long_name` (not both). def find_opt_descr(short_name: _OptStr = None, long_name: _OptStr = None) -> Optional[OptDescr]: for opt_descr in opt_descrs: if short_name is not None and short_name == opt_descr.short_name: return opt_descr if long_name is not None and long_name == opt_descr.long_name: return opt_descr return None # Parses a short option original argument, returning an # `_OptParseRes` object. # # `orig_arg` can contain more than one short options, for example: # # -xzv # # Moreover, `orig_arg` can contain the argument of a short option, # for example: # # -xzvflol.mp3 # # (`lol.mp3` is the argument of short option `-f`). # # If this function expects an argument for the last short option of # `orig_arg`, then it must be `next_orig_arg`, for example: # # -xzvf lol.mp3 # # If any of the short options of `orig_arg` is unknown, then this # function raises an error if `fail_on_unknown_opt` is `True`, or # returns `None` otherwise. def parse_short_opts() -> Optional[_OptParseRes]: short_opts = orig_arg[1:] items: List[_Item] = [] done = False index = 0 orig_arg_index_incr = 1 while not done: short_opt = short_opts[index] opt_descr = find_opt_descr(short_name=short_opt) if opt_descr is None: # unknown option if fail_on_unknown_opt: raise _Error(orig_arg_index, orig_arg, f'Unknown short option `-{short_opt}`') # discard collected arguments return None opt_arg = None if opt_descr.has_arg: if index == len(short_opts) - 1: # last short option: use the next original argument if next_orig_arg is None: raise _Error(orig_arg_index, orig_arg, f'Expecting an argument for short option `-{short_opt}`') opt_arg = next_orig_arg orig_arg_index_incr += 1 else: # use remaining original argument's text opt_arg = short_opts[index + 1:] done = True items.append(_OptItem(opt_descr, opt_arg)) index += 1 if index == len(short_opts): done = True return _OptParseRes(items, orig_arg_index_incr) # Parses a long option original argument, returning an # `_OptParseRes` object. # # `orig_arg` can contain a single long option, for example: # # --header-dir # # Moreover, `orig_arg` can contain the long option's argument, for # example: # # --header-dir=/path/to/dir # # If this function expects an argument for the long option, then it # must be `next_orig_arg`, for example: # # --header-dir /path/to/dir # # If the long option is unknown, then this function raises an error # if `fail_on_unknown_opt` is `True`, or returns `None` otherwise. def parse_long_opt() -> Optional[_OptParseRes]: long_opt = orig_arg[2:] m = re.match(r'--([^=]+)=(.*)', orig_arg) if m: # `--long-opt=arg` form: isolate option name long_opt = m.group(1) opt_descr = find_opt_descr(long_name=long_opt) if opt_descr is None: # unknown option if fail_on_unknown_opt: raise _Error(orig_arg_index, orig_arg, f'Unknown long option `--{long_opt}`') # discard return None orig_arg_index_incr = 1 if opt_descr.has_arg: if m: item = _OptItem(opt_descr, m.group(2)) else: if next_orig_arg is None: raise _Error(orig_arg_index, orig_arg, f'Expecting an argument for long option `--{long_opt}`') item = _OptItem(opt_descr, next_orig_arg) orig_arg_index_incr += 1 else: # no option argument item = _OptItem(opt_descr, None) return _OptParseRes([item], orig_arg_index_incr) # parse original arguments items: List[_Item] = [] orig_arg_index = Index(0) non_opt_index = Index(0) while orig_arg_index < len(orig_args): orig_arg = orig_args[orig_arg_index] # keep next original argument, if any next_orig_arg = None if orig_arg_index < len(orig_args) - 1: next_orig_arg = orig_args[orig_arg_index + 1] if orig_arg.startswith('-') and len(orig_arg) >= 2: # option if orig_arg[1] == '-': if orig_arg == '--': raise _Error(orig_arg_index, orig_arg, 'Invalid `--` argument') # long option res = parse_long_opt() else: # short option(s) res = parse_short_opts() if res is None: # unknown option assert not fail_on_unknown_opt return _ParseRes(items, orig_args[:orig_arg_index], orig_args[orig_arg_index:]) items += res.items orig_arg_index = Index(orig_arg_index + res.orig_arg_index_incr) else: # non-option items.append(_NonOptItem(orig_arg, orig_arg_index, non_opt_index)) non_opt_index = Index(non_opt_index + 1) orig_arg_index = Index(orig_arg_index + 1) return _ParseRes(items, orig_args, []) barectf-3.1.2/barectf/cgen.py000066400000000000000000001004541443101201700160140ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2014-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import barectf.template as barectf_template import barectf.config as barectf_config import collections import copy from typing import List, Optional, Mapping, Callable, Any, Set, Tuple import typing from barectf.typing import Count, Alignment # A tuple containing serialization and size computation function # templates for a given operation. _OpTemplates = collections.namedtuple('_OpTemplates', ['serialize', 'size']) # Abstract base class of any operation within source code. # # Any operation has: # # * A field type. # # * A list of names which, when joined with `_`, form the generic # C source variable name. # # * A level: how deep this operation is within the operation tree. # # * Serialization and size computation templates to generate the # operation's source code for those functions. class _Op: def __init__(self, ft: barectf_config._FieldType, names: List[str], level: Count, templates: _OpTemplates): self._ft = ft self._names = copy.copy(names) self._level = level self._templates = templates @property def ft(self) -> barectf_config._FieldType: return self._ft @property def names(self) -> List[str]: return self._names @property def level(self) -> Count: return self._level @property def top_name(self) -> str: return self._names[-1] def _render_template(self, templ: barectf_template._Template, **kwargs) -> str: return templ.render(op=self, root_ft_prefixes=_RootFtPrefixes, root_ft_prefix_names=_ROOT_FT_PREFIX_NAMES, **kwargs) def serialize_str(self, **kwargs) -> str: return self._render_template(self._templates.serialize, **kwargs) def size_str(self, **kwargs) -> str: return self._render_template(self._templates.size, **kwargs) # Compound operation. # # A compound operation contains a list of suboperations (leaf or # compound). # # Get the suboperations of a compound operation with its `subops` # property. # # The templates of a compound operation handles its suboperations. class _CompoundOp(_Op): def __init__(self, ft: barectf_config._FieldType, names: List[str], level: Count, templates: _OpTemplates, subops: List[Any] = None): super().__init__(ft, names, level, templates) self._subops = subops @property def subops(self): return self._subops # Leaf operation (abstract class). class _LeafOp(_Op): pass # An "align" operation. class _AlignOp(_LeafOp): def __init__(self, ft: barectf_config._FieldType, names: List[str], level: Count, templates: _OpTemplates, value: Alignment): super().__init__(ft, names, level, templates) self._value = value @property def value(self) -> Alignment: return self._value # A "write" operation. class _WriteOp(_LeafOp): def __init__(self, ft: barectf_config._FieldType, names: List[str], level: Count, templates: _OpTemplates, offset_in_byte: Optional[Count]): super().__init__(ft, names, level, templates) assert offset_in_byte is None or (offset_in_byte >= 0 and offset_in_byte < 8) self._offset_in_byte = offset_in_byte @property def offset_in_byte(self) -> Optional[Count]: return self._offset_in_byte _SpecSerializeWriteTemplates = Mapping[str, barectf_template._Template] # An operation builder. # # Such a builder is closely connected to a `_CodeGen` object using it to # find generic templates. # # Call build_for_root_ft() to make an operation builder create a # compound operation for a given root structure field type, recursively, # and return it. class _OpBuilder: def __init__(self, cg: '_CodeGen'): self._names: List[str] = [] self._level = Count(0) self._offset_in_byte: Optional[Count] = None self._cg = cg # Whether or not we're within an array operation. @property def _in_array(self): return self._level > 0 # Creates and returns an operation for the root structure field type # `ft` named `name`. # # `spec_serialize_write_templates` is a mapping of first level # member names to specialized serialization "write" templates. def build_for_root_ft(self, ft: barectf_config.StructureFieldType, name: str, spec_serialize_write_templates: Optional[_SpecSerializeWriteTemplates] = None) -> _CompoundOp: assert ft is not None if spec_serialize_write_templates is None: spec_serialize_write_templates = {} assert type(ft) is barectf_config.StructureFieldType assert len(self._names) == 0 assert self._level == 0 ops = self._build_for_ft(ft, name, spec_serialize_write_templates) assert len(ops) == 1 assert type(ops[0]) is _CompoundOp return typing.cast(_CompoundOp, ops[0]) # Creates and returns the operation(s) for a given field type `ft` # named `name`. # # See build_for_root_ft() for `spec_serialize_write_templates`. def _build_for_ft(self, ft: barectf_config._FieldType, name: str, spec_serialize_write_templates: _SpecSerializeWriteTemplates) -> List[_Op]: def top_name() -> str: return self._names[-1] # Creates and returns a "write" operation for the field type # `ft`. # # This function considers `spec_serialize_write_templates` to # override generic templates. def create_write_op(ft: barectf_config._FieldType) -> _WriteOp: assert type(ft) is not barectf_config.StructureFieldType offset_in_byte = self._offset_in_byte if isinstance(ft, barectf_config._BitArrayFieldType) and self._offset_in_byte is not None: self._offset_in_byte = Count((self._offset_in_byte + ft.size) % 8) serialize_write_templ: Optional[barectf_template._Template] = None if len(self._names) == 2: serialize_write_templ = spec_serialize_write_templates.get(top_name()) if serialize_write_templ is None: if isinstance(ft, barectf_config._IntegerFieldType): serialize_write_templ = self._cg._serialize_write_int_statements_templ elif type(ft) is barectf_config.RealFieldType: serialize_write_templ = self._cg._serialize_write_real_statements_templ else: assert type(ft) is barectf_config.StringFieldType serialize_write_templ = self._cg._serialize_write_string_statements_templ size_write_templ = None if isinstance(ft, barectf_config._BitArrayFieldType): size_write_templ = self._cg._size_write_bit_array_statements_templ elif type(ft) is barectf_config.StringFieldType: size_write_templ = self._cg._size_write_string_statements_templ return _WriteOp(ft, self._names, self._level, _OpTemplates(serialize_write_templ, size_write_templ), offset_in_byte) # Creates and returns an "align" operation for the field type # `ft` if needed. # # This function updates the builder's state. def try_create_align_op(alignment: Alignment, ft: barectf_config._FieldType) -> Optional[_AlignOp]: def align(v: Count, alignment: Alignment) -> Count: return Count((v + (alignment - 1)) & -alignment) if self._offset_in_byte is None and alignment % 8 == 0: self._offset_in_byte = Count(0) else: if self._in_array: self._offset_in_byte = None elif self._offset_in_byte is not None: self._offset_in_byte = Count(align(self._offset_in_byte, alignment) % 8) if alignment > 1: return _AlignOp(ft, self._names, self._level, _OpTemplates(self._cg._serialize_align_statements_templ, self._cg._size_align_statements_templ), alignment) return None # Returns whether or not `ft` is a compound field type. def ft_is_compound(ft: barectf_config._FieldType) -> bool: return isinstance(ft, (barectf_config.StructureFieldType, barectf_config.StaticArrayFieldType)) # push field type's name to the builder's name stack initially self._names.append(name) # operations to return ops: List[_Op] = [] if type(ft) is barectf_config.StringFieldType or self._names == [_RootFtPrefixes.PH, 'uuid']: # strings and UUID array are always byte-aligned op = try_create_align_op(Alignment(8), ft) if op is not None: ops.append(op) ops.append(create_write_op(ft)) else: if ft_is_compound(ft): self._offset_in_byte = None init_align_op = try_create_align_op(ft.alignment, ft) subops: List[_Op] = [] if type(ft) is barectf_config.StructureFieldType: ft = typing.cast(barectf_config.StructureFieldType, ft) if init_align_op is not None: # Append structure field's alignment as a # suboperation. # # This is not strictly needed (could be appended to # `ops`), but the properties of `_DsOps` and # `_ErOps` offer a single (structure field type) # operation. subops.append(init_align_op) # append suboperations for each member for member_name, member in ft.members.items(): subops += self._build_for_ft(member.field_type, member_name, spec_serialize_write_templates) # create structure field's compound operation ops.append(_CompoundOp(ft, self._names, self._level, _OpTemplates(self._cg._serialize_write_struct_statements_templ, self._cg._size_write_struct_statements_templ), subops)) elif isinstance(ft, barectf_config._ArrayFieldType): ft = typing.cast(barectf_config._ArrayFieldType, ft) assert ft.alignment == 1 or init_align_op is not None if init_align_op is not None: ops.append(init_align_op) # append element's suboperations self._level = Count(self._level + 1) subops += self._build_for_ft(ft.element_field_type, f'[{_loop_var_name(Count(self._level - 1))}]', spec_serialize_write_templates) self._level = Count(self._level - 1) # select the right templates if type(ft) is barectf_config.StaticArrayFieldType: templates = _OpTemplates(self._cg._serialize_write_static_array_statements_templ, self._cg._size_write_static_array_statements_templ) else: assert type(ft) is barectf_config.DynamicArrayFieldType templates = _OpTemplates(self._cg._serialize_write_dynamic_array_statements_templ, self._cg._size_write_dynamic_array_statements_templ) # create array field's compound operation ops.append(_CompoundOp(ft, self._names, self._level, templates, subops)) else: # leaf field: align + write if init_align_op is not None: ops.append(init_align_op) ops.append(create_write_op(ft)) # exiting for this field type: pop its name del self._names[-1] return ops _OptCompoundOp = Optional[_CompoundOp] # The operations for an event record. # # The available operations are: # # * Specific context operation. # * Payload operation. class _ErOps: def __init__(self, spec_ctx_op: _OptCompoundOp, payload_op: _OptCompoundOp): self._spec_ctx_op = spec_ctx_op self._payload_op = payload_op @property def spec_ctx_op(self) -> _OptCompoundOp: return self._spec_ctx_op @property def payload_op(self) -> _OptCompoundOp: return self._payload_op _ErOpsMap = Mapping[barectf_config.EventRecordType, _ErOps] # The operations for a data stream. # # The available operations are: # # * Packet header operation. # * Packet context operation. # * Event record header operation. # * Event record common context operation. # * Event record operations (`_ErOps`). class _DsOps: def __init__(self, pkt_header_op: _OptCompoundOp, pkt_ctx_op: _CompoundOp, er_header_op: _OptCompoundOp, er_common_ctx_op: _OptCompoundOp, er_ops: _ErOpsMap): self._pkt_header_op = pkt_header_op self._pkt_ctx_op = pkt_ctx_op self._er_header_op = er_header_op self._er_common_ctx_op = er_common_ctx_op self._er_ops = er_ops @property def pkt_header_op(self) -> _OptCompoundOp: return self._pkt_header_op @property def pkt_ctx_op(self) -> _CompoundOp: return self._pkt_ctx_op @property def er_header_op(self) -> _OptCompoundOp: return self._er_header_op @property def er_common_ctx_op(self) -> _OptCompoundOp: return self._er_common_ctx_op @property def er_ops(self) -> _ErOpsMap: return self._er_ops # The C variable name prefixes for the six kinds of root field types. class _RootFtPrefixes: PH = 'ph' PC = 'pc' ERH = 'h' ERCC = 'cc' ERSC = 'sc' ERP = 'p' # The human-readable names of the `_RootFtPrefixes` members. _ROOT_FT_PREFIX_NAMES = { _RootFtPrefixes.PH: 'packet header', _RootFtPrefixes.PC: 'packet context', _RootFtPrefixes.ERH: 'header', _RootFtPrefixes.ERCC: 'common context', _RootFtPrefixes.ERSC: 'specific context', _RootFtPrefixes.ERP: 'payload', } # A named function parameter for a given field type. _FtParam = collections.namedtuple('_FtParam', ['ft', 'name']) # C type abstract base class. class _CType: def __init__(self, is_const: bool): self._is_const = is_const @property def is_const(self) -> bool: return self._is_const # Arithmetic C type. class _ArithCType(_CType): def __init__(self, name: str, is_const: bool): super().__init__(is_const) self._name = name @property def name(self) -> str: return self._name def __str__(self) -> str: return f'{"const " if self._is_const else ""}{self._name}' # Pointer C type. class _PointerCType(_CType): def __init__(self, pointed_c_type: _CType, is_const: bool): super().__init__(is_const) self._pointed_c_type = pointed_c_type @property def pointed_c_type(self) -> _CType: return self._pointed_c_type def __str__(self) -> str: s = str(self._pointed_c_type) if not s.endswith('*'): s += ' ' s += '*' if self._is_const: s += ' const' return s # Returns the name of a loop variable given a nesting level `level`. def _loop_var_name(level: Count) -> str: if level < 3: return 'ijk'[level] return f'k{level - 2}' # A C code generator. # # Such a code generator can generate: # # * The bitfield header (gen_bitfield_header()). # * The public header (gen_header()). # * The source code (gen_src()). class _CodeGen: def __init__(self, cfg: barectf_config.Configuration): self._cfg = cfg self._iden_prefix = cfg.options.code_generation_options.identifier_prefix self._templ_filters: Mapping[str, Callable[..., Any]] = { 'ft_c_type': self._ft_c_type, 'open_func_params_str': self._open_func_params_str, 'trace_func_params_str': self._trace_func_params_str, 'serialize_er_common_ctx_func_params_str': self._serialize_er_common_ctx_func_params_str, 'loop_var_name': _loop_var_name, 'op_src_var_name': self._op_src_var_name, } self._func_proto_params_templ = self._create_template('func-proto-params.j2') self._serialize_align_statements_templ = self._create_template('serialize-align-statements.j2') self._serialize_write_int_statements_templ = self._create_template('serialize-write-int-statements.j2') self._serialize_write_real_statements_templ = self._create_template('serialize-write-real-statements.j2') self._serialize_write_string_statements_templ = self._create_template('serialize-write-string-statements.j2') self._serialize_write_struct_statements_templ = self._create_template('serialize-write-struct-statements.j2') self._serialize_write_static_array_statements_templ = self._create_template('serialize-write-static-array-statements.j2') self._serialize_write_dynamic_array_statements_templ = self._create_template('serialize-write-dynamic-array-statements.j2') self._serialize_write_magic_statements_templ = self._create_template('serialize-write-magic-statements.j2') self._serialize_write_uuid_statements_templ = self._create_template('serialize-write-uuid-statements.j2') self._serialize_write_dst_id_statements_templ = self._create_template('serialize-write-dst-id-statements.j2') self._serialize_write_timestamp_statements_templ = self._create_template('serialize-write-timestamp-statements.j2') self._serialize_write_packet_size_statements_templ = self._create_template('serialize-write-packet-size-statements.j2') self._serialize_write_seq_num_statements_templ = self._create_template('serialize-write-seq-num-statements.j2') self._serialize_write_skip_save_statements_templ = self._create_template('serialize-write-skip-save-statements.j2') self._serialize_write_ert_id_statements_templ = self._create_template('serialize-write-ert-id-statements.j2') self._size_align_statements_templ = self._create_template('size-align-statements.j2') self._size_write_bit_array_statements_templ = self._create_template('size-write-bit-array-statements.j2') self._size_write_string_statements_templ = self._create_template('size-write-string-statements.j2') self._size_write_struct_statements_templ = self._create_template('size-write-struct-statements.j2') self._size_write_static_array_statements_templ = self._create_template('size-write-static-array-statements.j2') self._size_write_dynamic_array_statements_templ = self._create_template('size-write-dynamic-array-statements.j2') # Creates and returns a template named `name` which is a file # template if `is_file_template` is `True`. # # `name` is the file name, including the `.j2` extension, within the # `c` directory. # # Such a template has the filters custom filters # `self._templ_filters`. def _create_template_base(self, name: str, is_file_template: bool) -> barectf_template._Template: return barectf_template._Template(f'c/{name}', is_file_template, self._cfg, self._templ_filters) # Creates and returns a non-file template named `name`. # # See _create_template_base() for `name`. def _create_template(self, name: str) -> barectf_template._Template: return self._create_template_base(name, False) # Creates and returns a file template named `name`. # # See _create_template_base() for `name`. def _create_file_template(self, name: str) -> barectf_template._Template: return self._create_template_base(name, True) # Trace type of this code generator's barectf configuration. @property def _trace_type(self) -> barectf_config._TraceType: return self._cfg.trace.type # Returns the name of a source variable for the operation `op`. def _op_src_var_name(self, op: _LeafOp) -> str: s = '' for index, name in enumerate(op.names): if index > 0 and not name.startswith('['): s += '_' s += name return s # Returns the C type for the field type `ft`, making it `const` if # `is_const` is `True`. def _ft_c_type(self, ft: barectf_config._FieldType, is_const: bool = False): if isinstance(ft, barectf_config._IntegerFieldType): ft = typing.cast(barectf_config._IntegerFieldType, ft) sign_prefix = 'u' if isinstance(ft, barectf_config.UnsignedIntegerFieldType) else '' if ft.size <= 8: sz = 8 elif ft.size <= 16: sz = 16 elif ft.size <= 32: sz = 32 else: assert ft.size <= 64 sz = 64 return _ArithCType(f'{sign_prefix}int{sz}_t', is_const) elif type(ft) is barectf_config.RealFieldType: ft = typing.cast(barectf_config.RealFieldType, ft) if ft.size == 32 and ft.alignment == 32: s = 'float' elif ft.size == 64 and ft.alignment == 64: s = 'double' else: s = 'uint64_t' return _ArithCType(s, is_const) elif type(ft) is barectf_config.StringFieldType: return _PointerCType(_ArithCType('char', True), is_const) else: assert isinstance(ft, barectf_config._ArrayFieldType) ft = typing.cast(barectf_config._ArrayFieldType, ft) return _PointerCType(self._ft_c_type(ft.element_field_type, True), is_const) # Returns the function prototype parameters for the members of the # root structure field type `root_ft`. # # Each parameter has the prefix `name_prefix` followed with `_`. # # Members of which the name is in `exclude_set` are excluded. def _proto_params_str(self, root_ft: Optional[barectf_config.StructureFieldType], name_prefix: str, const_params: bool, exclude_set: Optional[Set[str]] = None, only_dyn: bool = False) -> str: if root_ft is None: return '' if exclude_set is None: exclude_set = set() params = [] for member_name, member in root_ft.members.items(): if member_name in exclude_set: continue is_dyn = member.field_type.size_is_dynamic if isinstance(member.field_type, barectf_config.UnsignedIntegerFieldType): ft = typing.cast(barectf_config.UnsignedIntegerFieldType, member.field_type) is_dyn = is_dyn or ft._is_len if only_dyn and not is_dyn: continue params.append(_FtParam(member.field_type, member_name)) return self._func_proto_params_templ.render(params=params, prefix=name_prefix, const_params=const_params) # Returns the packet opening function prototype parameters for the # data stream type `dst`. def _open_func_params_str(self, dst: barectf_config.DataStreamType, const_params: bool) -> str: parts = [] parts.append(self._proto_params_str(self._trace_type._pkt_header_ft, _RootFtPrefixes.PH, const_params, {'magic', 'stream_id', 'uuid'})) exclude_set = { 'timestamp_begin', 'timestamp_end', 'packet_size', 'content_size', 'events_discarded', 'packet_seq_num', } parts.append(self._proto_params_str(dst._pkt_ctx_ft, _RootFtPrefixes.PC, const_params, exclude_set)) return ''.join(parts) # Returns the tracing function prototype parameters for the data # stream and event record types `ds_er_types`. def _trace_func_params_str(self, ds_er_types: Tuple[barectf_config.DataStreamType, barectf_config.EventRecordType], const_params: bool, only_dyn: bool = False): dst = ds_er_types[0] ert = ds_er_types[1] parts = [] if dst._er_header_ft is not None: parts.append(self._proto_params_str(dst._er_header_ft, _RootFtPrefixes.ERH, const_params, {'id', 'timestamp'}, only_dyn=only_dyn)) if dst.event_record_common_context_field_type is not None: parts.append(self._proto_params_str(dst.event_record_common_context_field_type, _RootFtPrefixes.ERCC, const_params, only_dyn=only_dyn)) if ert.specific_context_field_type is not None: parts.append(self._proto_params_str(ert.specific_context_field_type, _RootFtPrefixes.ERSC, const_params, only_dyn=only_dyn)) if ert.payload_field_type is not None: parts.append(self._proto_params_str(ert.payload_field_type, _RootFtPrefixes.ERP, const_params, only_dyn=only_dyn)) return ''.join(parts) # Returns the event record common context serialization function # prototype parameters for the data stream type `dst`. def _serialize_er_common_ctx_func_params_str(self, dst: barectf_config.DataStreamType, const_params: bool) -> str: return self._proto_params_str(dst.event_record_common_context_field_type, _RootFtPrefixes.ERCC, const_params) # Generates the bitfield header file contents. def gen_bitfield_header(self) -> str: return self._create_file_template('bitfield.h.j2').render() # Generates the public header file contents. def gen_header(self) -> str: return self._create_file_template('barectf.h.j2').render(root_ft_prefixes=_RootFtPrefixes) # Generates the source code file contents. def gen_src(self, header_file_name: str, bitfield_header_file_name: str) -> str: # Creates and returns the operations for all the data stream and # for all their event records. def create_ds_ops() -> Mapping[barectf_config.DataStreamType, _DsOps]: ds_ops = {} for dst in self._trace_type.data_stream_types: pkt_header_op = None builder = _OpBuilder(self) pkt_header_ft = self._trace_type._pkt_header_ft # packet header operations if pkt_header_ft is not None: spec_serialize_write_templates = { 'magic': self._serialize_write_magic_statements_templ, 'uuid': self._serialize_write_uuid_statements_templ, 'stream_id': self._serialize_write_dst_id_statements_templ, } pkt_header_op = builder.build_for_root_ft(pkt_header_ft, _RootFtPrefixes.PH, spec_serialize_write_templates) # packet context operation spec_serialize_write_templates = { 'timestamp_begin': self._serialize_write_timestamp_statements_templ, 'packet_size': self._serialize_write_packet_size_statements_templ, 'timestamp_end': self._serialize_write_skip_save_statements_templ, 'events_discarded': self._serialize_write_skip_save_statements_templ, 'content_size': self._serialize_write_skip_save_statements_templ, 'packet_seq_num': self._serialize_write_seq_num_statements_templ, } pkt_ctx_op = builder.build_for_root_ft(dst._pkt_ctx_ft, _RootFtPrefixes.PC, spec_serialize_write_templates) # event record header operation builder = _OpBuilder(self) er_header_op = None if dst._er_header_ft is not None: spec_serialize_write_templates = { 'timestamp': self._serialize_write_timestamp_statements_templ, 'id': self._serialize_write_ert_id_statements_templ, } er_header_op = builder.build_for_root_ft(dst._er_header_ft, _RootFtPrefixes.ERH, spec_serialize_write_templates) # event record common context operation er_common_ctx_op = None if dst.event_record_common_context_field_type is not None: er_common_ctx_op = builder.build_for_root_ft(dst.event_record_common_context_field_type, _RootFtPrefixes.ERCC) # operations specific to each event record type er_ops = {} for ert in dst.event_record_types: ev_builder = copy.copy(builder) # specific context operation spec_ctx_op = None if ert.specific_context_field_type is not None: spec_ctx_op = ev_builder.build_for_root_ft(ert.specific_context_field_type, _RootFtPrefixes.ERSC) # payload operation payload_op = None if ert.payload_field_type is not None: payload_op = ev_builder.build_for_root_ft(ert.payload_field_type, _RootFtPrefixes.ERP) er_ops[ert] = _ErOps(spec_ctx_op, payload_op) ds_ops[dst] = _DsOps(pkt_header_op, pkt_ctx_op, er_header_op, er_common_ctx_op, er_ops) return ds_ops # Returns the "write" operation for the packet context member # named `member_name` within the data stream type `dst`. def ds_op_pkt_ctx_op(dst: barectf_config.DataStreamType, member_name: str) -> _Op: ret_op = None for op in ds_ops[dst].pkt_ctx_op.subops: if op.top_name == member_name and type(op) is _WriteOp: ret_op = op break assert ret_op is not None return typing.cast(_Op, ret_op) ds_ops = create_ds_ops() return self._create_file_template('barectf.c.j2').render(header_file_name=header_file_name, bitfield_header_file_name=bitfield_header_file_name, root_ft_prefixes=_RootFtPrefixes, root_ft_prefix_names=_ROOT_FT_PREFIX_NAMES, ds_ops=ds_ops, ds_op_pkt_ctx_op=ds_op_pkt_ctx_op) barectf-3.1.2/barectf/cli.py000066400000000000000000000526311443101201700156520ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2014-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import termcolor import os.path import barectf import barectf.config_parse_common as barectf_config_parse_common import barectf.argpar as barectf_argpar from typing import Any, List, Iterable, NoReturn import typing from barectf.typing import Index, Count import sys import os # Colors and prints the error message `msg` and exits with status code # 1. def _print_error(msg: str) -> NoReturn: termcolor.cprint('Error: ', 'red', end='', file=sys.stderr) termcolor.cprint(msg, 'red', attrs=['bold'], file=sys.stderr) sys.exit(1) # Pretty-prints the barectf configuration error `exc` and exits with # status code 1. def _print_config_error(exc: barectf._ConfigurationParseError) -> NoReturn: # reverse: most precise message comes last for ctx in reversed(exc.context): msg = '' if ctx.message is not None: msg = f' {ctx.message}' color = 'red' termcolor.cprint(f'{ctx.name}', color, attrs=['bold'], file=sys.stderr, end='') termcolor.cprint(':', color, file=sys.stderr, end='') termcolor.cprint(msg, color, file=sys.stderr) sys.exit(1) # Pretty-prints the unknown exception `exc`. def _print_unknown_exc(exc: Exception) -> NoReturn: import traceback traceback.print_exc() _print_error(f'Unknown exception: {exc}') # Finds and returns all the option items in `items` having the long name # `long_name`. def _find_opt_items(items: Iterable[barectf_argpar._Item], long_name: str) -> List[barectf_argpar._OptItem]: ret_items: List[barectf_argpar._OptItem] = [] for item in items: if type(item) is barectf_argpar._OptItem: item = typing.cast(barectf_argpar._OptItem, item) if item.descr.long_name == long_name: ret_items.append(item) return ret_items # Returns: # # For an option item without an argument: # `True`. # # For an option item with an argument: # Its argument. # # Uses the last option item having the long name `long_name` found in # `items`. # # Returns `default` if there's no such option item. def _opt_item_val(items: Iterable[barectf_argpar._Item], long_name: str, default: Any = None) -> Any: opt_items = _find_opt_items(items, long_name) if len(opt_items) == 0: return default opt_item = opt_items[-1] if opt_item.descr.has_arg: return opt_item.arg_text return True class _CliError(Exception): pass def _cfg_file_path_from_parse_res(parse_res: barectf_argpar._ParseRes) -> str: cfg_file_path = None for item in parse_res.items: if type(item) is barectf_argpar._NonOptItem: if cfg_file_path is not None: raise _CliError('Multiple configuration file paths provided') cfg_file_path = typing.cast(barectf_argpar._NonOptItem, item).text if cfg_file_path is None: raise _CliError('Missing configuration file path') if not os.path.isfile(cfg_file_path): raise _CliError(f'`{cfg_file_path}` is not an existing, regular file') return cfg_file_path # Returns a `_CfgCmdCfg` object from the command-line parsing results # `parse_res`. def _cfg_cmd_cfg_from_parse_res(parse_res: barectf_argpar._ParseRes) -> '_CfgCmdCfg': # check configuration file path cfg_file_path = _cfg_file_path_from_parse_res(parse_res) # inclusion directories (`--include-dir` option needs an argument) inclusion_dirs = typing.cast(List[str], [item.arg_text for item in _find_opt_items(parse_res.items, 'include-dir')]) for dir in inclusion_dirs: if not os.path.isdir(dir): raise _CliError(f'`{dir}` is not an existing directory') inclusion_dirs.append(os.getcwd()) # other options ignore_inclusion_file_not_found = _opt_item_val(parse_res.items, 'ignore-include-not-found', False) return _CfgCmdCfg(cfg_file_path, inclusion_dirs, ignore_inclusion_file_not_found) def _print_gen_cmd_usage(): print('''Usage: barectf generate [--code-dir=DIR] [--headers-dir=DIR] [--metadata-dir=DIR] [--prefix=PREFIX] [--include-dir=DIR]... [--ignore-include-not-found] CONFIG-FILE-PATH barectf generate --help Generate the C source and CTF metadata stream files of a tracer from the configuration file CONFIG-FILE-PATH. Options: -c DIR, --code-dir=DIR Write C source files to DIR instead of the CWD -H DIR, --headers-dir=DIR Write C header files to DIR instead of the CWD -h, --help Show this help and quit --ignore-include-not-found Continue to process the configuration file when included files are not found -I DIR, --include-dir=DIR Add DIR to the list of directories to be searched for inclusion files -m DIR, --metadata-dir=DIR Write the metadata stream file to DIR instead of the CWD -p PREFIX, --prefix=PREFIX Set the configuration prefix to PREFIX''') # Returns a source and metadata stream file generating command object # from the specific command-line arguments `orig_args`. def _gen_cmd_cfg_from_args(orig_args: barectf_argpar.OrigArgs) -> '_GenCmd': # parse original arguments opt_descrs = [ barectf_argpar.OptDescr('h', 'help'), barectf_argpar.OptDescr('c', 'code-dir', True), barectf_argpar.OptDescr('H', 'headers-dir', True), barectf_argpar.OptDescr('I', 'include-dir', True), barectf_argpar.OptDescr('m', 'metadata-dir', True), barectf_argpar.OptDescr('p', 'prefix', True), barectf_argpar.OptDescr(long_name='dump-config'), barectf_argpar.OptDescr(long_name='ignore-include-not-found'), ] res = barectf_argpar.parse(orig_args, opt_descrs) assert len(res.ingested_orig_args) == len(orig_args) # command help? if len(_find_opt_items(res.items, 'help')) > 0: _print_gen_cmd_usage() sys.exit() # get common configuration file command CLI configuration cfg_cmd_cfg = _cfg_cmd_cfg_from_parse_res(res) # directories c_source_dir = _opt_item_val(res.items, 'code-dir', os.getcwd()) c_header_dir = _opt_item_val(res.items, 'headers-dir', os.getcwd()) metadata_stream_dir = _opt_item_val(res.items, 'metadata-dir', os.getcwd()) for dir in [c_source_dir, c_header_dir, metadata_stream_dir]: if not os.path.isdir(dir): raise _CliError(f'`{dir}` is not an existing directory') # other options dump_config = _opt_item_val(res.items, 'dump-config', False) v2_prefix = _opt_item_val(res.items, 'prefix') return _GenCmd(_GenCmdCfg(cfg_cmd_cfg.cfg_file_path, c_source_dir, c_header_dir, metadata_stream_dir, cfg_cmd_cfg.inclusion_dirs, cfg_cmd_cfg.ignore_inclusion_file_not_found, dump_config, v2_prefix)) def _show_effective_cfg_cmd_usage(): print('''Usage: barectf show-effective-configuration [--include-dir=DIR]... [--ignore-include-not-found] [--indent-spaces=COUNT] CONFIG-FILE-PATH barectf show-effective-configuration --help Print the effective configuration file for a the configuration file CONFIG-FILE-PATH. Options: -h, --help Show this help and quit --ignore-include-not-found Continue to process the configuration file when included files are not found -I DIR, --include-dir=DIR Add DIR to the list of directories to be searched for inclusion files --indent-spaces=COUNT Use COUNT spaces at a time to indent YAML lines instead of 2''') # Returns an effective configuration showing command object from the # specific command-line arguments `orig_args`. def _show_effective_cfg_cfg_from_args(orig_args: barectf_argpar.OrigArgs) -> '_ShowEffectiveCfgCmd': # parse original arguments opt_descrs = [ barectf_argpar.OptDescr('h', 'help'), barectf_argpar.OptDescr('I', 'include-dir', True), barectf_argpar.OptDescr(long_name='indent-spaces', has_arg=True), barectf_argpar.OptDescr(long_name='ignore-include-not-found'), ] res = barectf_argpar.parse(orig_args, opt_descrs) assert len(res.ingested_orig_args) == len(orig_args) # command help? if len(_find_opt_items(res.items, 'help')) > 0: _show_effective_cfg_cmd_usage() sys.exit() # get common configuration command CLI configuration cfg_cmd_cfg = _cfg_cmd_cfg_from_parse_res(res) # other options indent_space_count = _opt_item_val(res.items, 'indent-spaces', 2) try: indent_space_count = int(indent_space_count) except (ValueError, TypeError): raise _CliError(f'Invalid `--indent-spaces` option argument: `{indent_space_count}`') if indent_space_count < 1 or indent_space_count > 8: raise _CliError(f'Invalid `--indent-spaces` option argument (`{indent_space_count}`): expecting a value in [1, 8]') return _ShowEffectiveCfgCmd(_ShowEffectiveCfgCmdCfg(cfg_cmd_cfg.cfg_file_path, cfg_cmd_cfg.inclusion_dirs, cfg_cmd_cfg.ignore_inclusion_file_not_found, Count(indent_space_count))) def _show_cfg_version_cmd_usage(): print('''Usage: barectf show-configuration-version CONFIG-FILE-PATH barectf show-configuration-version --help Print the major version (2 or 3) of the configuration file CONFIG-FILE-PATH. Options: -h, --help Show this help and quit''') # Returns a configuration version showing command object from the # specific command-line arguments `orig_args`. def _show_cfg_version_cfg_from_args(orig_args: barectf_argpar.OrigArgs) -> '_ShowCfgVersionCmd': # parse original arguments opt_descrs = [ barectf_argpar.OptDescr('h', 'help'), ] res = barectf_argpar.parse(orig_args, opt_descrs) assert len(res.ingested_orig_args) == len(orig_args) # command help? if len(_find_opt_items(res.items, 'help')) > 0: _show_cfg_version_cmd_usage() sys.exit() # check configuration file path cfg_file_path = _cfg_file_path_from_parse_res(res) return _ShowCfgVersionCmd(_ShowCfgVersionCmdCfg(cfg_file_path)) def _print_general_usage(): print('''Usage: barectf COMMAND COMMAND-ARGS barectf --help barectf --version General options: -h, --help Show this help and quit -V, --version Show version and quit Available commands: gen: generate: Generate the C source and CTF metadata stream files of a tracer from a configuration file. show-effective-configuration: show-effective-config: show-effective-cfg: Print the effective configuration file for a given configuration file and inclusion directories. show-configuration-version: show-config-version: show-cfg-version Print the major version of a given configuration file. Run `barectf COMMAND --help` to show the help of COMMAND.''') # Returns a command object from the command-line arguments `orig_args`. # # All the `orig_args` elements are considered. def _cmd_from_args(orig_args: barectf_argpar.OrigArgs) -> '_Cmd': # We use our `argpar` module here instead of Python's `argparse` # because we need to support the two following use cases: # # $ barectf config.yaml # $ barectf generate config.yaml # # In other words, the default command is `generate` (for backward # compatibility reasons). The argument parser must not consider # `config.yaml` as being a command name. general_opt_descrs = [ barectf_argpar.OptDescr('V', 'version'), barectf_argpar.OptDescr('h', 'help'), ] res = barectf_argpar.parse(orig_args, general_opt_descrs, False) # find command name, collecting preceding (common) option items cmd_from_args_funcs = { 'generate': _gen_cmd_cfg_from_args, 'gen': _gen_cmd_cfg_from_args, 'show-effective-configuration': _show_effective_cfg_cfg_from_args, 'show-effective-config': _show_effective_cfg_cfg_from_args, 'show-effective-cfg': _show_effective_cfg_cfg_from_args, 'show-configuration-version': _show_cfg_version_cfg_from_args, 'show-config-version': _show_cfg_version_cfg_from_args, 'show-cfg-version': _show_cfg_version_cfg_from_args, } general_opt_items: List[barectf_argpar._OptItem] = [] cmd_first_orig_arg_index = None cmd_from_args_func = None for item in res.items: if type(item) is barectf_argpar._NonOptItem: item = typing.cast(barectf_argpar._NonOptItem, item) cmd_from_args_func = cmd_from_args_funcs.get(item.text) if cmd_from_args_func is None: cmd_first_orig_arg_index = item.orig_arg_index else: cmd_first_orig_arg_index = Index(item.orig_arg_index + 1) break else: assert type(item) is barectf_argpar._OptItem general_opt_items.append(typing.cast(barectf_argpar._OptItem, item)) # general help? if len(_find_opt_items(general_opt_items, 'help')) > 0: _print_general_usage() sys.exit() # version? if len(_find_opt_items(general_opt_items, 'version')) > 0: print(f'barectf {barectf.__version__}') sys.exit() # create command object cmd_orig_args = orig_args[cmd_first_orig_arg_index:] if cmd_from_args_func is None: # default `generate` command return _gen_cmd_cfg_from_args(cmd_orig_args) else: return cmd_from_args_func(cmd_orig_args) class _CmdCfg: pass class _CfgCmdCfg(_CmdCfg): def __init__(self, cfg_file_path: str, inclusion_dirs: List[str], ignore_inclusion_file_not_found: bool): self._cfg_file_path = cfg_file_path self._inclusion_dirs = inclusion_dirs self._ignore_inclusion_file_not_found = ignore_inclusion_file_not_found @property def cfg_file_path(self) -> str: return self._cfg_file_path @property def inclusion_dirs(self) -> List[str]: return self._inclusion_dirs @property def ignore_inclusion_file_not_found(self) -> bool: return self._ignore_inclusion_file_not_found class _Cmd: def __init__(self, cfg: _CmdCfg): self._cfg = cfg @property def cfg(self) -> _CmdCfg: return self._cfg def exec(self): raise NotImplementedError class _GenCmdCfg(_CfgCmdCfg): def __init__(self, cfg_file_path: str, c_source_dir: str, c_header_dir: str, metadata_stream_dir: str, inclusion_dirs: List[str], ignore_inclusion_file_not_found: bool, dump_config: bool, v2_prefix: str): super().__init__(cfg_file_path, inclusion_dirs, ignore_inclusion_file_not_found) self._c_source_dir = c_source_dir self._c_header_dir = c_header_dir self._metadata_stream_dir = metadata_stream_dir self._dump_config = dump_config self._v2_prefix = v2_prefix @property def c_source_dir(self) -> str: return self._c_source_dir @property def c_header_dir(self) -> str: return self._c_header_dir @property def metadata_stream_dir(self) -> str: return self._metadata_stream_dir @property def dump_config(self) -> bool: return self._dump_config @property def v2_prefix(self) -> str: return self._v2_prefix # Source and metadata stream file generating command. class _GenCmd(_Cmd): def exec(self): # create configuration try: with open(self.cfg.cfg_file_path) as f: if self.cfg.dump_config: # print effective configuration file print(barectf.effective_configuration_file(f, True, self.cfg.inclusion_dirs, self.cfg.ignore_inclusion_file_not_found)) # barectf.configuration_from_file() reads the file again # below: rewind. f.seek(0) config = barectf.configuration_from_file(f, True, self.cfg.inclusion_dirs, self.cfg.ignore_inclusion_file_not_found) except barectf._ConfigurationParseError as exc: _print_config_error(exc) except Exception as exc: _print_unknown_exc(exc) if self.cfg.v2_prefix is not None: # Override prefixes. # # For historical reasons, the `--prefix` option applies the # barectf 2 configuration prefix rules. Therefore, get the # equivalent barectf 3 prefixes first. v3_prefixes = barectf_config_parse_common._v3_prefixes_from_v2_prefix(self.cfg.v2_prefix) cg_opts = config.options.code_generation_options cg_opts = barectf.ConfigurationCodeGenerationOptions(v3_prefixes.identifier, v3_prefixes.file_name, cg_opts.default_data_stream_type, cg_opts.header_options, cg_opts.clock_type_c_types) config = barectf.Configuration(config.trace, barectf.ConfigurationOptions(cg_opts)) # create a barectf code generator code_gen = barectf.CodeGenerator(config) def write_file(dir, file): with open(os.path.join(dir, file.name), 'w') as f: f.write(file.contents) def write_files(dir, files): for file in files: write_file(dir, file) try: # generate and write metadata stream file write_file(self.cfg.metadata_stream_dir, code_gen.generate_metadata_stream()) # generate and write C header files write_files(self.cfg.c_header_dir, code_gen.generate_c_headers()) # generate and write C source files write_files(self.cfg.c_source_dir, code_gen.generate_c_sources()) except Exception as exc: # We know `config` is valid, therefore the code generator cannot # fail for a reason known to barectf. _print_unknown_exc(exc) class _ShowEffectiveCfgCmdCfg(_CfgCmdCfg): def __init__(self, cfg_file_path: str, inclusion_dirs: List[str], ignore_inclusion_file_not_found: bool, indent_space_count: Count): super().__init__(cfg_file_path, inclusion_dirs, ignore_inclusion_file_not_found) self._indent_space_count = indent_space_count @property def indent_space_count(self) -> Count: return self._indent_space_count # Effective configuration showing command. class _ShowEffectiveCfgCmd(_Cmd): def exec(self): try: with open(self.cfg.cfg_file_path) as f: print(barectf.effective_configuration_file(f, True, self.cfg.inclusion_dirs, self.cfg.ignore_inclusion_file_not_found, self.cfg.indent_space_count)) except barectf._ConfigurationParseError as exc: _print_config_error(exc) except Exception as exc: _print_unknown_exc(exc) class _ShowCfgVersionCmdCfg(_CmdCfg): def __init__(self, cfg_file_path: str): self._cfg_file_path = cfg_file_path @property def cfg_file_path(self) -> str: return self._cfg_file_path class _ShowCfgVersionCmd(_Cmd): def exec(self): try: with open(self.cfg.cfg_file_path) as f: print(barectf.configuration_file_major_version(f)) except barectf._ConfigurationParseError as exc: _print_config_error(exc) except Exception as exc: _print_unknown_exc(exc) def _run(): # create command from arguments try: cmd = _cmd_from_args(sys.argv[1:]) except barectf_argpar._Error as exc: _print_error(f'Command-line: For argument `{exc.orig_arg}`: {exc.msg}') except _CliError as exc: _print_error(f'Command-line: {exc}') # execute command cmd.exec() barectf-3.1.2/barectf/codegen.py000066400000000000000000000071401443101201700165020ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2014-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import barectf.tsdl182gen as barectf_tsdl182gen import barectf.config as barectf_config import barectf.cgen as barectf_cgen from typing import List, Optional # A file generated by a `CodeGenerator` object. # # A generated file has a name (influenced by the configuration's # file name prefix option) and contents. class _GeneratedFile: def __init__(self, name: str, contents: str): self._name = name self._contents = contents @property def name(self) -> str: return self._name @property def contents(self) -> str: return self._contents # A barectf code generator. # # Build a code generator with a barectf configuration. # # A code generator can generate the TSDL `metadata` file and C source # and header files. class CodeGenerator: def __init__(self, configuration: barectf_config.Configuration): self._config = configuration self._file_name_prefix = configuration.options.code_generation_options.file_name_prefix self._c_code_gen = barectf_cgen._CodeGen(configuration) self._c_headers: Optional[List[_GeneratedFile]] = None self._c_sources: Optional[List[_GeneratedFile]] = None self._metadata_stream: Optional[_GeneratedFile] = None @property def _barectf_header_name(self) -> str: return f'{self._file_name_prefix}.h' @property def _bitfield_header_name(self) -> str: return f'{self._file_name_prefix}-bitfield.h' def generate_c_headers(self) -> List[_GeneratedFile]: if self._c_headers is None: self._c_headers = [ _GeneratedFile(self._barectf_header_name, self._c_code_gen.gen_header()), _GeneratedFile(self._bitfield_header_name, self._c_code_gen.gen_bitfield_header()), ] return self._c_headers def generate_c_sources(self) -> List[_GeneratedFile]: if self._c_sources is None: self._c_sources = [ _GeneratedFile(f'{self._file_name_prefix}.c', self._c_code_gen.gen_src(self._barectf_header_name, self._bitfield_header_name)) ] return self._c_sources def generate_metadata_stream(self) -> _GeneratedFile: if self._metadata_stream is None: self._metadata_stream = _GeneratedFile('metadata', barectf_tsdl182gen._from_config(self._config)) return self._metadata_stream barectf-3.1.2/barectf/config.py000066400000000000000000000775321443101201700163570ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2015-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import barectf.version as barectf_version from typing import Optional, Any, FrozenSet, Mapping, Iterator, Set, Union, Callable import typing from barectf.typing import Count, Alignment, _OptStr, Id import collections.abc import collections import datetime import enum import uuid as uuidp @enum.unique class ByteOrder(enum.Enum): LITTLE_ENDIAN = 'le' BIG_ENDIAN = 'be' class _FieldType: @property def alignment(self) -> Alignment: raise NotImplementedError @property def size_is_dynamic(self): return False class _BitArrayFieldType(_FieldType): def __init__(self, size: Count, alignment: Alignment = Alignment(1)): self._size = size self._alignment = alignment @property def size(self) -> Count: return self._size @property def alignment(self) -> Alignment: return self._alignment class DisplayBase(enum.Enum): BINARY = 2 OCTAL = 8 DECIMAL = 10 HEXADECIMAL = 16 class _IntegerFieldType(_BitArrayFieldType): def __init__(self, size: Count, alignment: Optional[Alignment] = None, preferred_display_base: DisplayBase = DisplayBase.DECIMAL): if alignment is None: alignment = Alignment(8 if size % 8 == 0 else 1) super().__init__(size, alignment) self._preferred_display_base = preferred_display_base @property def preferred_display_base(self) -> DisplayBase: return self._preferred_display_base class UnsignedIntegerFieldType(_IntegerFieldType): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._mapped_clk_type_name = None self._is_len = False class SignedIntegerFieldType(_IntegerFieldType): pass class EnumerationFieldTypeMappingRange: def __init__(self, lower: int, upper: int): self._lower = lower self._upper = upper @property def lower(self) -> int: return self._lower @property def upper(self) -> int: return self._upper def __eq__(self, other: Any) -> bool: if type(other) is not type(self): return False return (self._lower, self._upper) == (other._lower, other._upper) def __hash__(self) -> int: return hash((self._lower, self._upper)) def contains(self, value: int) -> bool: return self._lower <= value <= self._upper class EnumerationFieldTypeMapping: def __init__(self, ranges: Set[EnumerationFieldTypeMappingRange]): self._ranges = frozenset(ranges) @property def ranges(self) -> FrozenSet[EnumerationFieldTypeMappingRange]: return self._ranges def ranges_contain_value(self, value: int) -> bool: return any([rg.contains(value) for rg in self._ranges]) _EnumFtMappings = Mapping[str, EnumerationFieldTypeMapping] class EnumerationFieldTypeMappings(collections.abc.Mapping): def __init__(self, mappings: _EnumFtMappings): self._mappings = {label: mapping for label, mapping in mappings.items()} def __getitem__(self, key: str) -> EnumerationFieldTypeMapping: return self._mappings[key] def __iter__(self) -> Iterator[str]: return iter(self._mappings) def __len__(self) -> int: return len(self._mappings) class _EnumerationFieldType(_IntegerFieldType): def __init__(self, size: Count, alignment: Optional[Alignment] = None, preferred_display_base: DisplayBase = DisplayBase.DECIMAL, mappings: Optional[_EnumFtMappings] = None): super().__init__(size, alignment, preferred_display_base) self._mappings = EnumerationFieldTypeMappings({}) if mappings is not None: self._mappings = EnumerationFieldTypeMappings(mappings) @property def mappings(self) -> EnumerationFieldTypeMappings: return self._mappings def labels_for_value(self, value: int) -> Set[str]: labels = set() for label, mapping in self._mappings.items(): if mapping.ranges_contain_value(value): labels.add(label) return labels class UnsignedEnumerationFieldType(_EnumerationFieldType, UnsignedIntegerFieldType): pass class SignedEnumerationFieldType(_EnumerationFieldType, SignedIntegerFieldType): pass class RealFieldType(_BitArrayFieldType): pass class StringFieldType(_FieldType): @property def alignment(self) -> Alignment: return Alignment(8) @property def size_is_dynamic(self): return True class _ArrayFieldType(_FieldType): def __init__(self, element_field_type: _FieldType): self._element_field_type = element_field_type @property def element_field_type(self) -> _FieldType: return self._element_field_type @property def alignment(self) -> Alignment: return self._element_field_type.alignment @property def size_is_dynamic(self): return self._element_field_type.size_is_dynamic class StaticArrayFieldType(_ArrayFieldType): def __init__(self, length: Count, element_field_type: _FieldType): super().__init__(element_field_type) self._length = length @property def length(self) -> Count: return self._length class DynamicArrayFieldType(_ArrayFieldType): def __init__(self, length_field_type: UnsignedIntegerFieldType, element_field_type: _FieldType): super().__init__(element_field_type) self._length_field_type = length_field_type self._length_ft_member_name: Optional[str] = None @property def length_field_type(self): return self._length_field_type @property def size_is_dynamic(self): return True class StructureFieldTypeMember: def __init__(self, field_type: _FieldType): self._field_type = field_type @property def field_type(self) -> _FieldType: return self._field_type _StructFtMembers = Mapping[str, StructureFieldTypeMember] class StructureFieldTypeMembers(collections.abc.Mapping): def __init__(self, members: _StructFtMembers): self._members = collections.OrderedDict() for name, member in members.items(): assert type(member) is StructureFieldTypeMember self._members[name] = member def __getitem__(self, key: str) -> StructureFieldTypeMember: return self._members[key] def __iter__(self) -> Iterator[str]: return iter(self._members) def __len__(self) -> int: return len(self._members) class StructureFieldType(_FieldType): def __init__(self, minimum_alignment: Alignment = Alignment(1), members: Optional[_StructFtMembers] = None): self._minimum_alignment = minimum_alignment self._members = StructureFieldTypeMembers({}) if members is not None: self._members = StructureFieldTypeMembers(members) self._set_alignment() self._set_dyn_array_ft_length_ft_member_names() def _set_alignment(self): self._alignment: Alignment = self._minimum_alignment for member in self._members.values(): if member.field_type.alignment > self._alignment: self._alignment = member.field_type.alignment def _set_dyn_array_ft_length_ft_member_names(self): for member in self._members.values(): if type(member.field_type) is DynamicArrayFieldType: # Find length field type member name within the same # structure field type members. for len_name, len_member in self._members.items(): if member.field_type.length_field_type is len_member.field_type: member.field_type._length_ft_member_name = len_name len_member.field_type._is_len = True break if member.field_type.alignment > self._alignment: self._alignment = member.field_type.alignment @property def minimum_alignment(self) -> Alignment: return self._minimum_alignment @property def alignment(self) -> Alignment: return self._alignment @property def size_is_dynamic(self): return any([member.field_type.size_is_dynamic for member in self.members.values()]) @property def members(self) -> StructureFieldTypeMembers: return self._members class _UniqueByName: _name: str def __eq__(self, other: Any) -> bool: if type(other) is not type(self): return False return self._name == other._name def __lt__(self, other: '_UniqueByName'): assert type(self) is type(other) return self._name < other._name def __hash__(self) -> int: return hash(self._name) _OptFt = Optional[_FieldType] _OptStructFt = Optional[StructureFieldType] LogLevel = typing.NewType('LogLevel', int) class EventRecordType(_UniqueByName): def __init__(self, name: str, log_level: Optional[LogLevel] = None, specific_context_field_type: _OptStructFt = None, payload_field_type: _OptStructFt = None): self._id: Optional[Id] = None self._name = name self._log_level = log_level self._specific_context_field_type = specific_context_field_type self._payload_field_type = payload_field_type @property def id(self) -> Optional[Id]: return self._id @property def name(self) -> str: return self._name @property def log_level(self) -> Optional[LogLevel]: return self._log_level @property def specific_context_field_type(self) -> _OptStructFt: return self._specific_context_field_type @property def payload_field_type(self) -> _OptStructFt: return self._payload_field_type class ClockTypeOffset: def __init__(self, seconds: int = 0, cycles: Count = Count(0)): self._seconds = seconds self._cycles = cycles @property def seconds(self) -> int: return self._seconds @property def cycles(self) -> Count: return self._cycles _OptUuid = Optional[uuidp.UUID] class ClockType(_UniqueByName): def __init__(self, name: str, frequency: Count = Count(int(1e9)), uuid: _OptUuid = None, description: _OptStr = None, precision: Count = Count(0), offset: Optional[ClockTypeOffset] = None, origin_is_unix_epoch: bool = False): self._name = name self._frequency = frequency self._uuid = uuid self._description = description self._precision = precision self._offset = ClockTypeOffset() if offset is not None: self._offset = offset self._origin_is_unix_epoch = origin_is_unix_epoch @property def name(self) -> str: return self._name @property def frequency(self) -> Count: return self._frequency @property def uuid(self) -> _OptUuid: return self._uuid @property def description(self) -> _OptStr: return self._description @property def precision(self) -> Count: return self._precision @property def offset(self) -> ClockTypeOffset: return self._offset @property def origin_is_unix_epoch(self) -> bool: return self._origin_is_unix_epoch DEFAULT_FIELD_TYPE = 'default' _DefaultableUIntFt = Union[str, UnsignedIntegerFieldType] _OptDefaultableUIntFt = Optional[_DefaultableUIntFt] _OptUIntFt = Optional[UnsignedIntegerFieldType] class DataStreamTypePacketFeatures: def __init__(self, total_size_field_type: _DefaultableUIntFt = DEFAULT_FIELD_TYPE, content_size_field_type: _DefaultableUIntFt = DEFAULT_FIELD_TYPE, beginning_timestamp_field_type: _OptDefaultableUIntFt = None, end_timestamp_field_type: _OptDefaultableUIntFt = None, discarded_event_records_snapshot_counter_field_type: _OptDefaultableUIntFt = DEFAULT_FIELD_TYPE, sequence_number_field_type: _OptDefaultableUIntFt = None): def get_ft(user_ft: _OptDefaultableUIntFt) -> _OptUIntFt: if user_ft == DEFAULT_FIELD_TYPE: return UnsignedIntegerFieldType(64) return typing.cast(_OptUIntFt, user_ft) self._total_size_field_type = get_ft(total_size_field_type) self._content_size_field_type = get_ft(content_size_field_type) self._beginning_timestamp_field_type = get_ft(beginning_timestamp_field_type) self._end_timestamp_field_type = get_ft(end_timestamp_field_type) self._discarded_event_records_snapshot_counter_field_type = get_ft(discarded_event_records_snapshot_counter_field_type) self._sequence_number_field_type = get_ft(sequence_number_field_type) @property def sequence_number_field_type(self) -> _OptUIntFt: return self._sequence_number_field_type @property def total_size_field_type(self) -> _OptUIntFt: return self._total_size_field_type @property def content_size_field_type(self) -> _OptUIntFt: return self._content_size_field_type @property def beginning_timestamp_field_type(self) -> _OptUIntFt: return self._beginning_timestamp_field_type @property def end_timestamp_field_type(self) -> _OptUIntFt: return self._end_timestamp_field_type @property def discarded_event_records_snapshot_counter_field_type(self) -> _OptUIntFt: return self._discarded_event_records_snapshot_counter_field_type class DataStreamTypeEventRecordFeatures: def __init__(self, type_id_field_type: _OptDefaultableUIntFt = DEFAULT_FIELD_TYPE, timestamp_field_type: _OptDefaultableUIntFt = None): def get_ft(user_ft: _OptDefaultableUIntFt) -> _OptUIntFt: if user_ft == DEFAULT_FIELD_TYPE: return UnsignedIntegerFieldType(64) return typing.cast(_OptUIntFt, user_ft) self._type_id_field_type = get_ft(type_id_field_type) self._timestamp_field_type = get_ft(timestamp_field_type) @property def type_id_field_type(self) -> _OptUIntFt: return self._type_id_field_type @property def timestamp_field_type(self) -> _OptUIntFt: return self._timestamp_field_type class DataStreamTypeFeatures: def __init__(self, packet_features: Optional[DataStreamTypePacketFeatures] = None, event_record_features: Optional[DataStreamTypeEventRecordFeatures] = None): if packet_features is None: self._packet_features = DataStreamTypePacketFeatures() else: self._packet_features = packet_features if event_record_features is None: self._event_record_features = DataStreamTypeEventRecordFeatures() else: self._event_record_features = event_record_features @property def packet_features(self) -> DataStreamTypePacketFeatures: return self._packet_features @property def event_record_features(self) -> DataStreamTypeEventRecordFeatures: return self._event_record_features class DataStreamType(_UniqueByName): def __init__(self, name: str, event_record_types: Set[EventRecordType], default_clock_type: Optional[ClockType] = None, features: Optional[DataStreamTypeFeatures] = None, packet_context_field_type_extra_members: Optional[_StructFtMembers] = None, event_record_common_context_field_type: _OptStructFt = None): self._id: Optional[Id] = None self._name = name self._default_clock_type = default_clock_type self._event_record_common_context_field_type = event_record_common_context_field_type self._event_record_types = frozenset(event_record_types) # assign unique IDs for index, ert in enumerate(sorted(self._event_record_types, key=lambda evt: evt.name)): assert ert._id is None ert._id = Id(index) self._set_features(features) self._packet_context_field_type_extra_members = StructureFieldTypeMembers({}) if packet_context_field_type_extra_members is not None: self._packet_context_field_type_extra_members = StructureFieldTypeMembers(packet_context_field_type_extra_members) self._set_pkt_ctx_ft() self._set_er_header_ft() def _set_features(self, features: Optional[DataStreamTypeFeatures]): if features is not None: self._features = features return None er_ts_ft = None pkt_beginning_ts_ft = None pkt_end_ts_ft = None if self._default_clock_type is not None: # Automatic timestamp field types because the data stream # type has a default clock type. er_ts_ft = DEFAULT_FIELD_TYPE pkt_beginning_ts_ft = DEFAULT_FIELD_TYPE pkt_end_ts_ft = DEFAULT_FIELD_TYPE self._features = DataStreamTypeFeatures(DataStreamTypePacketFeatures(beginning_timestamp_field_type=pkt_beginning_ts_ft, end_timestamp_field_type=pkt_end_ts_ft), DataStreamTypeEventRecordFeatures(timestamp_field_type=er_ts_ft)) def _set_ft_mapped_clk_type_name(self, ft: Optional[UnsignedIntegerFieldType]): if ft is None: return if self._default_clock_type is not None: assert isinstance(ft, UnsignedIntegerFieldType) ft._mapped_clk_type_name = self._default_clock_type.name def _set_pkt_ctx_ft(self): members = None def add_member_if_exists(name: str, ft: _FieldType, set_mapped_clk_type_name: bool = False): nonlocal members if ft is not None: if set_mapped_clk_type_name: self._set_ft_mapped_clk_type_name(typing.cast(UnsignedIntegerFieldType, ft)) members[name] = StructureFieldTypeMember(ft) members = collections.OrderedDict([ ( 'packet_size', StructureFieldTypeMember(self._features.packet_features.total_size_field_type) ), ( 'content_size', StructureFieldTypeMember(self._features.packet_features.content_size_field_type) ) ]) add_member_if_exists('timestamp_begin', self._features.packet_features.beginning_timestamp_field_type, True) add_member_if_exists('timestamp_end', self._features.packet_features.end_timestamp_field_type, True) add_member_if_exists('events_discarded', self._features.packet_features.discarded_event_records_snapshot_counter_field_type) add_member_if_exists('packet_seq_num', self._features.packet_features.sequence_number_field_type) if self._packet_context_field_type_extra_members is not None: for name, field_type in self._packet_context_field_type_extra_members.items(): assert name not in members members[name] = field_type self._pkt_ctx_ft = StructureFieldType(8, members) def _set_er_header_ft(self): members = collections.OrderedDict() if self._features.event_record_features.type_id_field_type is not None: members['id'] = StructureFieldTypeMember(self._features.event_record_features.type_id_field_type) if self._features.event_record_features.timestamp_field_type is not None: ft = self._features.event_record_features.timestamp_field_type self._set_ft_mapped_clk_type_name(ft) members['timestamp'] = StructureFieldTypeMember(ft) self._er_header_ft = StructureFieldType(8, members) @property def id(self) -> Optional[Id]: return self._id @property def name(self) -> str: return self._name @property def default_clock_type(self) -> Optional[ClockType]: return self._default_clock_type @property def features(self) -> DataStreamTypeFeatures: return self._features @property def packet_context_field_type_extra_members(self) -> StructureFieldTypeMembers: return self._packet_context_field_type_extra_members @property def event_record_common_context_field_type(self) -> _OptStructFt: return self._event_record_common_context_field_type @property def event_record_types(self) -> FrozenSet[EventRecordType]: return self._event_record_types _OptUuidFt = Optional[Union[str, StaticArrayFieldType]] class TraceTypeFeatures: def __init__(self, magic_field_type: _OptDefaultableUIntFt = DEFAULT_FIELD_TYPE, uuid_field_type: _OptUuidFt = None, data_stream_type_id_field_type: _OptDefaultableUIntFt = DEFAULT_FIELD_TYPE): def get_field_type(user_ft: Optional[Union[str, _FieldType]], create_default_ft: Callable[[], _FieldType]) -> _OptFt: if user_ft == DEFAULT_FIELD_TYPE: return create_default_ft() return typing.cast(_OptFt, user_ft) def create_default_magic_ft(): return UnsignedIntegerFieldType(32) def create_default_uuid_ft(): return StaticArrayFieldType(Count(16), UnsignedIntegerFieldType(8)) def create_default_dst_id_ft(): return UnsignedIntegerFieldType(64) self._magic_field_type = typing.cast(_OptUIntFt, get_field_type(magic_field_type, create_default_magic_ft)) self._uuid_field_type = typing.cast(Optional[StaticArrayFieldType], get_field_type(uuid_field_type, create_default_uuid_ft)) self._data_stream_type_id_field_type = typing.cast(_OptUIntFt, get_field_type(data_stream_type_id_field_type, create_default_dst_id_ft)) @property def magic_field_type(self) -> _OptUIntFt: return self._magic_field_type @property def uuid_field_type(self) -> Optional[StaticArrayFieldType]: return self._uuid_field_type @property def data_stream_type_id_field_type(self) -> _OptUIntFt: return self._data_stream_type_id_field_type class _TraceType: def __init__(self, trace_byte_order: ByteOrder, data_stream_types: Set[DataStreamType], uuid: _OptUuid, features: Optional[TraceTypeFeatures]): self._trace_byte_order = trace_byte_order self._data_stream_types = frozenset(data_stream_types) # assign unique IDs for index, dst in enumerate(sorted(self._data_stream_types, key=lambda st: st.name)): assert dst._id is None dst._id = Id(index) self._uuid = uuid self._set_features(features) self._set_pkt_header_ft() def _set_features(self, features: Optional[TraceTypeFeatures]): if features is not None: self._features = features return # automatic UUID field type because the trace type has a UUID uuid_ft = None if self._uuid is None else DEFAULT_FIELD_TYPE self._features = TraceTypeFeatures(uuid_field_type=uuid_ft) def _set_pkt_header_ft(self): members = collections.OrderedDict() def add_member_if_exists(name: str, ft: _OptFt): nonlocal members if ft is not None: members[name] = StructureFieldTypeMember(ft) add_member_if_exists('magic', self._features.magic_field_type) add_member_if_exists('uuid', self._features.uuid_field_type) add_member_if_exists('stream_id', self._features.data_stream_type_id_field_type) self._pkt_header_ft = StructureFieldType(8, members) @property def trace_byte_order(self) -> ByteOrder: return self._trace_byte_order @property def uuid(self) -> _OptUuid: return self._uuid @property def data_stream_types(self) -> FrozenSet[DataStreamType]: return self._data_stream_types def data_stream_type(self, name: str) -> Optional[DataStreamType]: for cand_dst in self._data_stream_types: if cand_dst.name == name: return cand_dst return None @property def features(self) -> TraceTypeFeatures: return self._features @property def clock_types(self) -> Set[ClockType]: clk_types = set() for dst in self._data_stream_types: if dst.default_clock_type is not None: clk_types.add(dst.default_clock_type) return clk_types # Standard trace type class for a barectf 3 configuration. # # The trace byte order property of an instance is the same as the # expected native byte order of the target system. class TraceType(_TraceType): def __init__(self, trace_byte_order: ByteOrder, data_stream_types: Set[DataStreamType], uuid: _OptUuid = None, features: Optional[TraceTypeFeatures] = None): super().__init__(trace_byte_order, data_stream_types, uuid, features) @property def native_byte_order(self) -> ByteOrder: return self._trace_byte_order # This trace type class specifically exists to support barectf 2 # configurations. Such configurations define the actual trace byte order # instead of the expected native byte order of the target system. # # The user provides the trace byte order property of an instance. # # IMPORTANT: When possible, prefer the `TraceType` class instead, as # enforcing the trace byte order could result in a less efficient # generated tracer. class TraceTypeWithUnknownNativeByteOrder(_TraceType): def __init__(self, trace_byte_order: ByteOrder, data_stream_types: Set[DataStreamType], uuid: _OptUuid = None, features: Optional[TraceTypeFeatures] = None): super().__init__(trace_byte_order, data_stream_types, uuid, features) _EnvEntry = Union[str, int] _EnvEntries = Mapping[str, _EnvEntry] class TraceEnvironment(collections.abc.Mapping): def __init__(self, environment: _EnvEntries): self._env = {name: value for name, value in environment.items()} def __getitem__(self, key: str) -> _EnvEntry: return self._env[key] def __iter__(self) -> Iterator[str]: return iter(self._env) def __len__(self) -> int: return len(self._env) class Trace: def __init__(self, type: _TraceType, environment: Optional[_EnvEntries] = None): self._type = type self._set_env(environment) def _set_env(self, environment: Optional[_EnvEntries]): init_env = collections.OrderedDict([ ('domain', 'bare'), ('tracer_name', 'barectf'), ('tracer_major', barectf_version.__major_version__), ('tracer_minor', barectf_version.__minor_version__), ('tracer_patch', barectf_version.__patch_version__), ('tracer_pre', barectf_version.__pre_version__), ('barectf_gen_date', str(datetime.datetime.now().isoformat())), ]) if environment is None: environment = {} init_env.update(environment) self._env = TraceEnvironment(typing.cast(_EnvEntries, init_env)) @property def type(self) -> _TraceType: return self._type @property def environment(self) -> TraceEnvironment: return self._env _ClkTypeCTypes = Mapping[ClockType, str] class ClockTypeCTypes(collections.abc.Mapping): def __init__(self, c_types: _ClkTypeCTypes): self._c_types = {clk_type: c_type for clk_type, c_type in c_types.items()} def __getitem__(self, key: ClockType) -> str: return self._c_types[key] def __iter__(self) -> Iterator[ClockType]: return iter(self._c_types) def __len__(self) -> int: return len(self._c_types) class ConfigurationCodeGenerationHeaderOptions: def __init__(self, identifier_prefix_definition: bool = False, default_data_stream_type_name_definition: bool = False): self._identifier_prefix_definition = identifier_prefix_definition self._default_data_stream_type_name_definition = default_data_stream_type_name_definition @property def identifier_prefix_definition(self) -> bool: return self._identifier_prefix_definition @property def default_data_stream_type_name_definition(self) -> bool: return self._default_data_stream_type_name_definition class ConfigurationCodeGenerationOptions: def __init__(self, identifier_prefix: str = 'barectf_', file_name_prefix: str = 'barectf', default_data_stream_type: Optional[DataStreamType] = None, header_options: Optional[ConfigurationCodeGenerationHeaderOptions] = None, clock_type_c_types: Optional[_ClkTypeCTypes] = None): self._identifier_prefix = identifier_prefix self._file_name_prefix = file_name_prefix self._default_data_stream_type = default_data_stream_type self._header_options = ConfigurationCodeGenerationHeaderOptions() if header_options is not None: self._header_options = header_options self._clock_type_c_types = ClockTypeCTypes({}) if clock_type_c_types is not None: self._clock_type_c_types = ClockTypeCTypes(clock_type_c_types) @property def identifier_prefix(self) -> str: return self._identifier_prefix @property def file_name_prefix(self) -> str: return self._file_name_prefix @property def default_data_stream_type(self) -> Optional[DataStreamType]: return self._default_data_stream_type @property def header_options(self) -> ConfigurationCodeGenerationHeaderOptions: return self._header_options @property def clock_type_c_types(self) -> ClockTypeCTypes: return self._clock_type_c_types class ConfigurationOptions: def __init__(self, code_generation_options: Optional[ConfigurationCodeGenerationOptions] = None): self._code_generation_options = ConfigurationCodeGenerationOptions() if code_generation_options is not None: self._code_generation_options = code_generation_options @property def code_generation_options(self) -> ConfigurationCodeGenerationOptions: return self._code_generation_options class Configuration: def __init__(self, trace: Trace, options: Optional[ConfigurationOptions] = None): self._trace = trace self._options = ConfigurationOptions() if options is not None: self._options = options clk_type_c_types = self._options.code_generation_options.clock_type_c_types for dst in trace.type.data_stream_types: def_clk_type = dst.default_clock_type if def_clk_type is None: continue if def_clk_type not in clk_type_c_types: clk_type_c_types._c_types[def_clk_type] = 'uint32_t' @property def trace(self) -> Trace: return self._trace @property def options(self) -> ConfigurationOptions: return self._options barectf-3.1.2/barectf/config_file.py000066400000000000000000000052541443101201700173460ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2015-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import barectf.config_parse as barectf_config_parse import barectf.config as barectf_config from barectf.typing import Count, VersionNumber from typing import Optional, List, TextIO def effective_configuration_file(file: TextIO, with_package_inclusion_directory: bool = True, inclusion_directories: Optional[List[str]] = None, ignore_inclusion_not_found: bool = False, indent_space_count: Count = Count(2)) -> str: if inclusion_directories is None: inclusion_directories = [] return barectf_config_parse._effective_config_file(file, with_package_inclusion_directory, inclusion_directories, ignore_inclusion_not_found, indent_space_count) def configuration_from_file(file: TextIO, with_package_inclusion_directory: bool = True, inclusion_directories: Optional[List[str]] = None, ignore_inclusion_not_found: bool = False) -> barectf_config.Configuration: if inclusion_directories is None: inclusion_directories = [] return barectf_config_parse._from_file(file, with_package_inclusion_directory, inclusion_directories, ignore_inclusion_not_found) def configuration_file_major_version(file: TextIO) -> VersionNumber: return barectf_config_parse._config_file_major_version(file) barectf-3.1.2/barectf/config_parse.py000066400000000000000000000121471443101201700175400ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2015-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import barectf.config_parse_common as barectf_config_parse_common from barectf.config_parse_common import _ConfigurationParseError from barectf.config_parse_common import _MapNode import barectf.config_parse_v2 as barectf_config_parse_v2 import barectf.config_parse_v3 as barectf_config_parse_v3 import barectf.config as barectf_config import collections from barectf.typing import Count, VersionNumber from typing import Optional, List, TextIO import typing # Creates and returns a barectf 3 YAML configuration file parser to # parse the file-like object `file`. # # `file` can be a barectf 2 or 3 configuration file. def _create_v3_parser(file: TextIO, with_pkg_include_dir: bool, include_dirs: Optional[List[str]], ignore_include_not_found: bool) -> barectf_config_parse_v3._Parser: try: root_node = barectf_config_parse_common._yaml_load(file) if type(root_node) is barectf_config_parse_common._ConfigNodeV3: # barectf 3 configuration file return barectf_config_parse_v3._Parser(file, typing.cast(barectf_config_parse_common._ConfigNodeV3, root_node), with_pkg_include_dir, include_dirs, ignore_include_not_found) elif type(root_node) is collections.OrderedDict: # barectf 2 configuration file v2_parser = barectf_config_parse_v2._Parser(file, typing.cast(_MapNode, root_node), with_pkg_include_dir, include_dirs, ignore_include_not_found) return barectf_config_parse_v3._Parser(file, v2_parser.config_node, with_pkg_include_dir, include_dirs, ignore_include_not_found) else: raise _ConfigurationParseError('Configuration', f'Root (configuration) node is not an object (it\'s a `{type(root_node)}`)') except _ConfigurationParseError as exc: barectf_config_parse_common._append_error_ctx(exc, 'Configuration', 'Cannot create configuration from YAML file') # satisfy static type checker (never reached) raise def _from_file(file: TextIO, with_pkg_include_dir: bool, include_dirs: Optional[List[str]], ignore_include_not_found: bool) -> barectf_config.Configuration: return _create_v3_parser(file, with_pkg_include_dir, include_dirs, ignore_include_not_found).config def _effective_config_file(file: TextIO, with_pkg_include_dir: bool, include_dirs: Optional[List[str]], ignore_include_not_found: bool, indent_space_count: Count) -> str: config_node = _create_v3_parser(file, with_pkg_include_dir, include_dirs, ignore_include_not_found).root_node return barectf_config_parse_common._yaml_dump(config_node, indent=indent_space_count, default_flow_style=False, explicit_start=True, explicit_end=True) def _config_file_major_version(file: TextIO) -> VersionNumber: try: root_node = barectf_config_parse_common._yaml_load(file) if type(root_node) is barectf_config_parse_common._ConfigNodeV3: # barectf 3 configuration file return VersionNumber(3) else: # barectf 2 configuration file assert type(root_node) is collections.OrderedDict return VersionNumber(2) except _ConfigurationParseError as exc: barectf_config_parse_common._append_error_ctx(exc, 'Configuration', 'Cannot load YAML file') # satisfy static type checker (never reached) raise barectf-3.1.2/barectf/config_parse_common.py000066400000000000000000000751171443101201700211160ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2015-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documeneffective_filetation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import pkg_resources import collections import jsonschema # type: ignore import os.path import yaml import copy import os from barectf.typing import VersionNumber, _OptStr from typing import Optional, List, Dict, Any, TextIO, MutableMapping, Union, Set, Iterable, Callable, Tuple import typing # The context of a configuration parsing error. # # Such a context object has a name and, optionally, a message. class _ConfigurationParseErrorContext: def __init__(self, name: str, message: _OptStr = None): self._name = name self._msg = message @property def name(self) -> str: return self._name @property def message(self) -> _OptStr: return self._msg # A configuration parsing error. # # Such an error object contains a list of contexts (`context` property). # # The first context of this list is the most specific context, while the # last is the more general. # # Use _append_ctx() to append a context to an existing configuration # parsing error when you catch it before raising it again. You can use # _append_error_ctx() to do exactly this in a single call. class _ConfigurationParseError(Exception): def __init__(self, init_ctx_obj_name, init_ctx_msg=None): super().__init__() self._ctx: List[_ConfigurationParseErrorContext] = [] self._append_ctx(init_ctx_obj_name, init_ctx_msg) @property def context(self) -> List[_ConfigurationParseErrorContext]: return self._ctx def _append_ctx(self, name: str, msg: _OptStr = None): self._ctx.append(_ConfigurationParseErrorContext(name, msg)) def __str__(self): lines = [] for ctx in reversed(self._ctx): line = f'{ctx.name}:' if ctx.message is not None: line += f' {ctx.message}' lines.append(line) return '\n'.join(lines) # Appends the context having the object name `obj_name` and the # (optional) message `message` to the `_ConfigurationParseError` # exception `exc` and then raises `exc` again. def _append_error_ctx(exc: _ConfigurationParseError, obj_name: str, message: _OptStr = None): exc._append_ctx(obj_name, message) raise exc _V3Prefixes = collections.namedtuple('_V3Prefixes', ['identifier', 'file_name']) # Convers a v2 prefix to v3 prefixes. def _v3_prefixes_from_v2_prefix(v2_prefix: str) -> _V3Prefixes: return _V3Prefixes(v2_prefix, v2_prefix.rstrip('_')) # This JSON schema reference resolver only serves to detect when it # needs to resolve a remote URI. # # This must never happen in barectf because all our schemas are local; # it would mean a programming or schema error. class _RefResolver(jsonschema.RefResolver): def resolve_remote(self, uri: str): raise RuntimeError(f'Missing local schema with URI `{uri}`') # Not all static type checkers support type recursion, so let's just use # `Any` as a map node's value's type. _MapNode = MutableMapping[str, Any] # Schema validator which considers all the schemas found in the # subdirectories `subdirs` (at build time) of the barectf package's # `schemas` directory. # # The only public method is validate() which accepts an instance to # validate as well as a schema short ID. class _SchemaValidator: def __init__(self, subdirs: Iterable[str]): schemas_dir = pkg_resources.resource_filename(__name__, 'schemas') self._store: Dict[str, str] = {} for subdir in subdirs: dir = os.path.join(schemas_dir, subdir) for file_name in os.listdir(dir): if not file_name.endswith('.yaml'): continue with open(os.path.join(dir, file_name)) as f: schema = yaml.load(f, Loader=yaml.SafeLoader) assert '$id' in schema schema_id = schema['$id'] assert schema_id not in self._store self._store[schema_id] = schema @staticmethod def _dict_from_ordered_dict(obj): if type(obj) is not collections.OrderedDict: return obj dct = {} for k, v in obj.items(): new_v = v if type(v) is collections.OrderedDict: new_v = _SchemaValidator._dict_from_ordered_dict(v) elif type(v) is list: new_v = [_SchemaValidator._dict_from_ordered_dict(elem) for elem in v] dct[k] = new_v return dct def _validate(self, instance: _MapNode, schema_short_id: str): # retrieve full schema ID from short ID schema_id = f'https://barectf.org/schemas/{schema_short_id}.json' assert schema_id in self._store # retrieve full schema schema = self._store[schema_id] # Create a reference resolver for this schema using this # validator's schema store. resolver = _RefResolver(base_uri=schema_id, referrer=schema, store=self._store) # create a JSON schema validator using this reference resolver validator = jsonschema.Draft7Validator(schema, resolver=resolver) # Validate the instance, converting its # `collections.OrderedDict` objects to `dict` objects so as to # make any error message easier to read (because # validator.validate() below uses str() for error messages, and # collections.OrderedDict.__str__() returns a somewhat bulky # representation). validator.validate(self._dict_from_ordered_dict(instance)) # Validates `instance` using the schema having the short ID # `schema_short_id`. # # A schema short ID is the part between `schemas/` and `.json` in # its URI. # # Raises a `_ConfigurationParseError` object, hiding any # `jsonschema` exception, on validation failure. def validate(self, instance: _MapNode, schema_short_id: str): try: self._validate(instance, schema_short_id) except jsonschema.ValidationError as exc: # convert to barectf `_ConfigurationParseError` exception contexts = ['Configuration object'] # Each element of the instance's absolute path is either an # integer (array element's index) or a string (object # property's name). for elem in exc.absolute_path: if type(elem) is int: ctx = f'Element #{elem + 1}' else: ctx = f'`{elem}` property' contexts.append(ctx) schema_ctx = '' if len(exc.context) > 0: # According to the documentation of # jsonschema.ValidationError.context(), the method # returns a # # > list of errors from the subschemas # # This contains additional information about the # validation failure which can help the user figure out # what's wrong exactly. # # Join each message with `; ` and append this to our # configuration parsing error's message. msgs = '; '.join([e.message for e in exc.context]) schema_ctx = f': {msgs}' new_exc = _ConfigurationParseError(contexts.pop(), f'{exc.message}{schema_ctx} (from schema `{schema_short_id}`)') for ctx in reversed(contexts): new_exc._append_ctx(ctx) raise new_exc # barectf 3 YAML configuration node. class _ConfigNodeV3: def __init__(self, config_node: _MapNode): self._config_node = config_node @property def config_node(self) -> _MapNode: return self._config_node _CONFIG_V3_YAML_TAG = 'tag:barectf.org,2020/3/config' # Loads the content of the YAML file-like object `file` as a Python # object and returns it. # # If the file's object has the barectf 3 configuration tag, then this # function returns a `_ConfigNodeV3` object. Otherwise, it returns a # `collections.OrderedDict` object. # # All YAML maps are loaded as `collections.OrderedDict` objects. def _yaml_load(file: TextIO) -> Union[_ConfigNodeV3, _MapNode]: class Loader(yaml.Loader): pass def config_ctor(loader, node) -> _ConfigNodeV3: if not isinstance(node, yaml.MappingNode): problem = f'Expecting a map for the tag `{node.tag}`' raise yaml.constructor.ConstructorError(problem=problem) loader.flatten_mapping(node) return _ConfigNodeV3(collections.OrderedDict(loader.construct_pairs(node))) def mapping_ctor(loader, node) -> _MapNode: loader.flatten_mapping(node) return collections.OrderedDict(loader.construct_pairs(node)) Loader.add_constructor(_CONFIG_V3_YAML_TAG, config_ctor) Loader.add_constructor(yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG, mapping_ctor) # YAML -> Python try: return yaml.load(file, Loader=Loader) except (yaml.YAMLError, OSError, IOError) as exc: raise _ConfigurationParseError('YAML loader', f'Cannot load file: {exc}') def _yaml_load_path(path: str) -> Union[_ConfigNodeV3, _MapNode]: with open(path) as f: return _yaml_load(f) # Dumps the content of the Python object `obj` # (`collections.OrderedDict` or `_ConfigNodeV3`) as a YAML string and # returns it. def _yaml_dump(node: _MapNode, **kwds) -> str: class Dumper(yaml.Dumper): pass def config_repr(dumper, node): return dumper.represent_mapping(_CONFIG_V3_YAML_TAG, node.config_node.items()) def mapping_repr(dumper, node): return dumper.represent_mapping(yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG, node.items()) Dumper.add_representer(_ConfigNodeV3, config_repr) Dumper.add_representer(collections.OrderedDict, mapping_repr) # Python -> YAML return yaml.dump(node, Dumper=Dumper, version=(1, 2), **kwds) # A common barectf YAML configuration parser. # # This is the base class of any barectf YAML configuration parser. It # mostly contains helpers. class _Parser: # Builds a base barectf YAML configuration parser to process the # configuration node `node` (already loaded from the file-like # object `file`). # # For its _process_node_include() method, the parser considers the # package inclusion directory as well as `include_dirs`, and ignores # nonexistent inclusion files if `ignore_include_not_found` is # `True`. def __init__(self, root_file: TextIO, node: Union[_MapNode, _ConfigNodeV3], with_pkg_include_dir: bool, include_dirs: Optional[List[str]], ignore_include_not_found: bool, major_version: VersionNumber): self._root_file = root_file self._root_node = node self._ft_prop_names = [ # barectf 2.1+ '$inherit', # barectf 2 'inherit', 'value-type', 'element-type', # barectf 3 'element-field-type', ] if include_dirs is None: include_dirs = [] self._include_dirs = copy.copy(include_dirs) if with_pkg_include_dir: self._include_dirs.append(pkg_resources.resource_filename(__name__, f'include/{major_version}')) self._ignore_include_not_found = ignore_include_not_found self._include_stack: List[str] = [] self._resolved_ft_aliases: Set[str] = set() self._schema_validator = _SchemaValidator({'config/common', f'config/{major_version}'}) self._major_version = major_version @property def root_node(self): return self._root_node @property def _struct_ft_node_members_prop_name(self) -> str: if self._major_version == 2: return 'fields' else: return 'members' # Returns the last included file name from the parser's inclusion # file name stack, or `N/A` if the root file does not have an # associated path under the `name` property. def _get_last_include_file(self) -> str: if self._include_stack: return self._include_stack[-1] if hasattr(self._root_file, 'name'): return typing.cast(str, self._root_file.name) return 'N/A' # Loads the inclusion file having the path `yaml_path` and returns # its content as a `collections.OrderedDict` object. def _load_include(self, yaml_path) -> Optional[_MapNode]: for inc_dir in self._include_dirs: # Current inclusion dir + file name path. # # Note: os.path.join() only takes the last argument if it's # absolute. inc_path = os.path.join(inc_dir, yaml_path) # real path (symbolic links resolved) real_path = os.path.realpath(inc_path) # normalized path (weird stuff removed!) norm_path = os.path.normpath(real_path) if not os.path.isfile(norm_path): # file doesn't exist: skip continue if norm_path in self._include_stack: base_path = self._get_last_include_file() raise _ConfigurationParseError(f'File `{base_path}`', f'Cannot recursively include file `{norm_path}`') self._include_stack.append(norm_path) # load raw content return typing.cast(_MapNode, _yaml_load_path(norm_path)) if not self._ignore_include_not_found: base_path = self._get_last_include_file() raise _ConfigurationParseError(f'File `{base_path}`', f'Cannot include file `{yaml_path}`: file not found in inclusion directories') return None # Returns a list of all the inclusion file paths as found in the # inclusion node `include_node`. def _get_include_paths(self, include_node: _MapNode) -> List[str]: if include_node is None: # none return [] if type(include_node) is str: # wrap as array return [typing.cast(str, include_node)] # already an array assert type(include_node) is list return typing.cast(List[str], include_node) # Updates the node `base_node` with an overlay node `overlay_node`. # # Both the inclusion and field type node inheritance features use # this update mechanism. def _update_node(self, base_node: _MapNode, overlay_node: _MapNode): # see the comment about the `members` property below def update_members_node(base_value: List[Any], olay_value: List[Any]): for olay_item in olay_value: # assume we append `olay_item` to `base_value` initially append_olay_item = True if type(olay_item) is collections.OrderedDict: # overlay item is an object if len(olay_item) == 1: # overlay object item contains a single property olay_name = list(olay_item)[0] # find corresponding base item for base_item in base_value: if type(base_item) is collections.OrderedDict: if len(olay_item) == 1: base_name = list(base_item)[0] if olay_name == base_name: # Names match: update with usual # strategy. self._update_node(base_item, olay_item) # Do _not_ append `olay_item` to # `base_value`: we just updated # `base_item`. append_olay_item = False break if append_olay_item: base_value.append(copy.deepcopy(olay_item)) for olay_key, olay_value in overlay_node.items(): if olay_key in base_node: base_value = base_node[olay_key] if type(olay_value) is collections.OrderedDict and type(base_value) is collections.OrderedDict: # merge both objects self._update_node(base_value, olay_value) elif type(olay_value) is list and type(base_value) is list: if olay_key == 'members' and self._major_version == 3: # This is a "temporary" hack. # # In barectf 2, a structure field type node # looks like this: # # class: struct # fields: # hello: uint8 # world: string # # Having an overlay such as # # fields: # hello: float # # will result in # # class: struct # fields: # hello: float # world: string # # because the `fields` property is a map. # # In barectf 3, this is fixed (a YAML map is not # ordered), so that the same initial structure # field type node looks like this: # # class: struct # members: # - hello: uint8 # - world: # field-type: # class: str # # Although the `members` property is # syntaxically an array, it's semantically an # ordered map, where an entry's key is the array # item's map's first key (like YAML's `!!omap`). # # Having an overlay such as # # members: # - hello: float # # would result in # # class: struct # members: # - hello: uint8 # - world: # field-type: # class: str # - hello: float # # with the naive strategy, while what we really # want is: # # class: struct # members: # - hello: float # - world: # field-type: # class: str # # As of this version of barectf, the _only_ # property with a list value which acts as an # ordered map is named `members`. This is why we # can only check the value of `olay_key`, # whatever our context. # # update_members_node() attempts to perform # this below. For a given item of `olay_value`, # if # # * It's not an object. # # * It contains more than one property. # # * Its single property's name does not match # the name of the single property of any # object item of `base_value`. # # then we append the item to `base_value` as # usual. update_members_node(base_value, olay_value) else: # append extension array items to base items base_value += copy.deepcopy(olay_value) else: # fall back to replacing base property base_node[olay_key] = copy.deepcopy(olay_value) else: # set base property from overlay property base_node[olay_key] = copy.deepcopy(olay_value) # Processes inclusions using `last_overlay_node` as the last overlay # node to use to "patch" the node. # # If `last_overlay_node` contains an `$include` property, then this # method patches the current base node (initially empty) in order # using the content of the inclusion files (recursively). # # At the end, this method removes the `$include` property of # `last_overlay_node` and then patches the current base node with # its other properties before returning the result (always a deep # copy). def _process_node_include(self, last_overlay_node: _MapNode, process_base_include_cb: Callable[[_MapNode], _MapNode], process_children_include_cb: Optional[Callable[[_MapNode], None]] = None) -> _MapNode: # process children inclusions first if process_children_include_cb is not None: process_children_include_cb(last_overlay_node) incl_prop_name = '$include' if incl_prop_name in last_overlay_node: include_node = last_overlay_node[incl_prop_name] else: # no inclusions! return last_overlay_node include_paths = self._get_include_paths(include_node) cur_base_path = self._get_last_include_file() base_node = None # keep the inclusion paths and remove the `$include` property include_paths = copy.deepcopy(include_paths) del last_overlay_node[incl_prop_name] for include_path in include_paths: # load raw YAML from included file overlay_node = self._load_include(include_path) if overlay_node is None: # Cannot find inclusion file, but we're ignoring those # errors, otherwise _load_include() itself raises a # config error. continue # recursively process inclusions try: overlay_node = process_base_include_cb(overlay_node) except _ConfigurationParseError as exc: _append_error_ctx(exc, f'File `{cur_base_path}`') # pop inclusion stack now that we're done including del self._include_stack[-1] # At this point, `base_node` is fully resolved (does not # contain any `$include` property). if base_node is None: base_node = overlay_node else: self._update_node(base_node, overlay_node) # Finally, update the latest base node with our last overlay # node. if base_node is None: # Nothing was included, which is possible when we're # ignoring inclusion errors. return last_overlay_node self._update_node(base_node, last_overlay_node) return base_node # Generates pairs of member node and field type node property name # (in the member node) for the structure field type node's members # node `node`. def _struct_ft_member_fts_iter(self, node: Union[List[_MapNode], _MapNode]) -> Iterable[Tuple[_MapNode, str]]: if type(node) is list: # barectf 3 assert self._major_version == 3 node = typing.cast(List[_MapNode], node) for member_node in node: assert type(member_node) is collections.OrderedDict member_node = typing.cast(_MapNode, member_node) name, val = list(member_node.items())[0] if type(val) is collections.OrderedDict: member_node = val name = 'field-type' yield member_node, name else: # barectf 2 assert self._major_version == 2 assert type(node) is collections.OrderedDict node = typing.cast(_MapNode, node) for name in node: yield node, name # Resolves the field type alias `key` in the node `parent_node`, as # well as any nested field type aliases, using the aliases of the # `ft_aliases_node` node. # # If `key` is not in `parent_node`, this method returns. # # This method can modify `ft_aliases_node` and `parent_node[key]`. # # `ctx_obj_name` is the context's object name when this method # raises a `_ConfigurationParseError` exception. def _resolve_ft_alias(self, ft_aliases_node: _MapNode, parent_node: _MapNode, key: str, ctx_obj_name: str, alias_set: Optional[Set[str]] = None): if key not in parent_node: return node = parent_node[key] if node is None: # some nodes can be null to use their default value return # This set holds all the field type aliases to be expanded, # recursively. This is used to detect cycles. if alias_set is None: alias_set = set() if type(node) is str: alias = node # Make sure this alias names an existing field type node, at # least. if alias not in ft_aliases_node: raise _ConfigurationParseError(ctx_obj_name, f'Field type alias `{alias}` does not exist') if alias not in self._resolved_ft_aliases: # Only check for a field type alias cycle when we didn't # resolve the alias yet, as a given node can refer to # the same field type alias more than once. if alias in alias_set: msg = f'Cycle detected during the `{alias}` field type alias resolution' raise _ConfigurationParseError(ctx_obj_name, msg) # Resolve it. # # Add `alias` to the set of encountered field type # aliases before calling self._resolve_ft_alias() to # detect cycles. alias_set.add(alias) self._resolve_ft_alias(ft_aliases_node, ft_aliases_node, alias, ctx_obj_name, alias_set) self._resolved_ft_aliases.add(alias) # replace alias with field type node copy parent_node[key] = copy.deepcopy(ft_aliases_node[alias]) return # resolve nested field type aliases for pkey in self._ft_prop_names: self._resolve_ft_alias(ft_aliases_node, node, pkey, ctx_obj_name, alias_set) # Resolve field type aliases of structure field type node member # nodes. pkey = self._struct_ft_node_members_prop_name if pkey in node: for member_node, ft_prop_name in self._struct_ft_member_fts_iter(node[pkey]): self._resolve_ft_alias(ft_aliases_node, member_node, ft_prop_name, ctx_obj_name, alias_set) # Like _resolve_ft_alias(), but builds a context object name for any # `ctx_obj_name` exception. def _resolve_ft_alias_from(self, ft_aliases_node: _MapNode, parent_node: _MapNode, key: str): self._resolve_ft_alias(ft_aliases_node, parent_node, key, f'`{key}` property') # Applies field type node inheritance to the property `key` of # `parent_node`. # # `parent_node[key]`, if it exists, must not contain any field type # alias (all field type objects are complete). # # This method can modify `parent[key]`. # # When this method returns, no field type node has an `$inherit` or # `inherit` property. def _apply_ft_inheritance(self, parent_node: _MapNode, key: str): if key not in parent_node: return node = parent_node[key] if node is None: return # process children first for pkey in self._ft_prop_names: self._apply_ft_inheritance(node, pkey) # Process the field types of structure field type node member # nodes. pkey = self._struct_ft_node_members_prop_name if pkey in node: for member_node, ft_prop_name in self._struct_ft_member_fts_iter(node[pkey]): self._apply_ft_inheritance(member_node, ft_prop_name) # apply inheritance for this node if 'inherit' in node: # barectf 2.1: `inherit` property was renamed to `$inherit` assert '$inherit' not in node node['$inherit'] = node['inherit'] del node['inherit'] inherit_key = '$inherit' if inherit_key in node: assert type(node[inherit_key]) is collections.OrderedDict # apply inheritance below self._apply_ft_inheritance(node, inherit_key) # `node` is an overlay on the `$inherit` node base_node = node[inherit_key] del node[inherit_key] self._update_node(base_node, node) # set updated base node as this node parent_node[key] = base_node barectf-3.1.2/barectf/config_parse_v2.py000066400000000000000000001075721443101201700201560ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2015-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from barectf.config_parse_common import _ConfigurationParseError from barectf.config_parse_common import _append_error_ctx import barectf.config_parse_common as config_parse_common from barectf.config_parse_common import _MapNode import collections import copy from barectf.typing import VersionNumber, _OptStr from typing import Optional, List, Dict, TextIO, Union, Callable import typing def _del_prop_if_exists(node: _MapNode, prop_name: str): if prop_name in node: del node[prop_name] def _rename_prop(node: _MapNode, old_prop_name: str, new_prop_name: str): if old_prop_name in node: node[new_prop_name] = node[old_prop_name] del node[old_prop_name] def _copy_prop_if_exists(dst_node: _MapNode, src_node: _MapNode, src_prop_name: str, dst_prop_name: _OptStr = None): if dst_prop_name is None: dst_prop_name = src_prop_name if src_prop_name in src_node: dst_node[dst_prop_name] = copy.deepcopy(src_node[src_prop_name]) # A barectf 2 YAML configuration parser. # # The only purpose of such a parser is to transform the passed root # configuration node so that it's a valid barectf 3 configuration node. # # The parser's `config_node` property is the equivalent barectf 3 # configuration node. # # See the comments of _parse() for more implementation details about the # parsing stages and general strategy. class _Parser(config_parse_common._Parser): # Builds a barectf 2 YAML configuration parser and parses the root # configuration node `node` (already loaded from the file-like # object `root_file`). def __init__(self, root_file: TextIO, node: _MapNode, with_pkg_include_dir: bool, include_dirs: Optional[List[str]], ignore_include_not_found: bool): super().__init__(root_file, node, with_pkg_include_dir, include_dirs, ignore_include_not_found, VersionNumber(2)) self._ft_cls_name_to_conv_method: Dict[str, Callable[[_MapNode], _MapNode]] = { 'int': self._conv_int_ft_node, 'integer': self._conv_int_ft_node, 'enum': self._conv_enum_ft_node, 'enumeration': self._conv_enum_ft_node, 'flt': self._conv_real_ft_node, 'float': self._conv_real_ft_node, 'floating-point': self._conv_real_ft_node, 'str': self._conv_string_ft_node, 'string': self._conv_string_ft_node, 'array': self._conv_array_ft_node, 'struct': self._conv_struct_ft_node, 'structure': self._conv_struct_ft_node, } self._parse() # Converts a v2 field type node to a v3 field type node and returns # it. def _conv_ft_node(self, v2_ft_node: _MapNode) -> _MapNode: assert 'class' in v2_ft_node cls = v2_ft_node['class'] assert cls in self._ft_cls_name_to_conv_method return self._ft_cls_name_to_conv_method[cls](v2_ft_node) def _conv_ft_node_if_exists(self, v2_parent_node: Optional[_MapNode], key: str) -> Optional[_MapNode]: if v2_parent_node is None: return None if key not in v2_parent_node: return None return self._conv_ft_node(v2_parent_node[key]) # Converts a v2 integer field type node to a v3 integer field type # node and returns it. def _conv_int_ft_node(self, v2_ft_node: _MapNode) -> _MapNode: # copy v2 integer field type node v3_ft_node = copy.deepcopy(v2_ft_node) # signedness depends on the class, not a property cls_name = 'uint' prop_name = 'signed' is_signed_node = v3_ft_node.get(prop_name) if is_signed_node is True: cls_name = 'sint' v3_ft_node['class'] = cls_name _del_prop_if_exists(v3_ft_node, prop_name) # rename `align` property to `alignment` _rename_prop(v3_ft_node, 'align', 'alignment') # rename `base` property to `preferred-display-base` _rename_prop(v3_ft_node, 'base', 'preferred-display-base') # remove `encoding` property _del_prop_if_exists(v3_ft_node, 'encoding') # remove `byte-order` property (the equivalent barectf 3 # configuration property is named `trace-byte-order`) _del_prop_if_exists(v3_ft_node, 'byte-order') # remove `property-mappings` property _del_prop_if_exists(v3_ft_node, 'property-mappings') return v3_ft_node # Converts a v2 enumeration field type node to a v3 enumeration # field type node and returns it. def _conv_enum_ft_node(self, v2_ft_node: _MapNode) -> _MapNode: # An enumeration field type _is_ an integer field type, so use a # copy of the converted v2 value field type node. v3_ft_node = copy.deepcopy(self._conv_ft_node(v2_ft_node['value-type'])) # transform class name accordingly prop_name = 'class' cls_name = 'uenum' if v3_ft_node[prop_name] == 'sint': cls_name = 'senum' v3_ft_node[prop_name] = cls_name # convert members to mappings prop_name = 'members' members_node = v2_ft_node.get(prop_name) if members_node is not None: mappings_node: _MapNode = collections.OrderedDict() cur = 0 for member_node in members_node: v3_value_node: Union[int, List[int]] if type(member_node) is str: label = member_node v3_value_node = cur cur += 1 else: assert type(member_node) is collections.OrderedDict label = member_node['label'] v2_value_node = member_node['value'] if type(v2_value_node) is int: cur = v2_value_node + 1 v3_value_node = v2_value_node else: assert type(v2_value_node) is list assert len(v2_value_node) == 2 v3_value_node = list(v2_value_node) cur = v2_value_node[1] + 1 if label not in mappings_node: mappings_node[label] = [] mappings_node[label].append(v3_value_node) v3_ft_node['mappings'] = mappings_node return v3_ft_node # Converts a v2 real field type node to a v3 real field type node # and returns it. def _conv_real_ft_node(self, v2_ft_node: _MapNode) -> _MapNode: # copy v2 real field type node v3_ft_node = copy.deepcopy(v2_ft_node) # set class to `real` v3_ft_node['class'] = 'real' # rename `align` property to `alignment` _rename_prop(v3_ft_node, 'align', 'alignment') # set `size` property to a single integer (total size, in bits) prop_name = 'size' v3_ft_node[prop_name] = v3_ft_node[prop_name]['exp'] + v3_ft_node[prop_name]['mant'] return v3_ft_node # Converts a v2 string field type node to a v3 string field type # node and returns it. def _conv_string_ft_node(self, v2_ft_node: _MapNode) -> _MapNode: # copy v2 string field type node v3_ft_node = copy.deepcopy(v2_ft_node) # remove `encoding` property _del_prop_if_exists(v3_ft_node, 'encoding') return v3_ft_node # Converts a v2 array field type node to a v3 (static) array field # type node and returns it. def _conv_array_ft_node(self, v2_ft_node: _MapNode) -> _MapNode: # class renamed to `static-array` or `dynamic-array` is_dynamic = v2_ft_node['length'] == 'dynamic' array_type = 'dynamic' if is_dynamic else 'static' v3_ft_node: _MapNode = collections.OrderedDict({'class': f'{array_type}-array'}) # copy `length` property if it's a static array field type if not is_dynamic: _copy_prop_if_exists(v3_ft_node, v2_ft_node, 'length') # convert element field type v3_ft_node['element-field-type'] = self._conv_ft_node(v2_ft_node['element-type']) return v3_ft_node # Converts a v2 structure field type node to a v3 structure field # type node and returns it. def _conv_struct_ft_node(self, v2_ft_node: _MapNode) -> _MapNode: # Create fresh v3 structure field type node, reusing the class # of `v2_ft_node`. v3_ft_node = collections.OrderedDict({'class': v2_ft_node['class']}) # rename `min-align` property to `minimum-alignment` _copy_prop_if_exists(v3_ft_node, v2_ft_node, 'min-align', 'minimum-alignment') # convert fields to members prop_name = 'fields' if prop_name in v2_ft_node: members_node = [] for member_name, v2_member_ft_node in v2_ft_node[prop_name].items(): members_node.append(collections.OrderedDict({ member_name: collections.OrderedDict({ 'field-type': self._conv_ft_node(v2_member_ft_node) }) })) v3_ft_node['members'] = members_node return v3_ft_node # Converts a v2 clock type node to a v3 clock type node and returns # it. def _conv_clk_type_node(self, v2_clk_type_node: _MapNode) -> _MapNode: # copy v2 clock type node v3_clk_type_node = copy.deepcopy(v2_clk_type_node) # rename `freq` property to `frequency` _rename_prop(v3_clk_type_node, 'freq', 'frequency') # rename `error-cycles` property to `precision` _rename_prop(v3_clk_type_node, 'error-cycles', 'precision') # rename `absolute` property to `origin-is-unix-epoch` _rename_prop(v3_clk_type_node, 'absolute', 'origin-is-unix-epoch') # rename `$return-ctype`/`return-ctype` property to `$c-type` new_prop_name = '$c-type' _rename_prop(v3_clk_type_node, 'return-ctype', new_prop_name) _rename_prop(v3_clk_type_node, '$return-ctype', new_prop_name) return v3_clk_type_node # Converts a v2 event record type node to a v3 event record type # node and returns it. def _conv_ert_node(self, v2_ert_node: _MapNode) -> _MapNode: # create empty v3 event record type node v3_ert_node: _MapNode = collections.OrderedDict() # copy `log-level` property _copy_prop_if_exists(v3_ert_node, v2_ert_node, 'log-level') # convert specific context field type node v2_ft_node = v2_ert_node.get('context-type') if v2_ft_node is not None: v3_ert_node['specific-context-field-type'] = self._conv_ft_node(v2_ft_node) # convert payload field type node v2_ft_node = v2_ert_node.get('payload-type') if v2_ft_node is not None: v3_ert_node['payload-field-type'] = self._conv_ft_node(v2_ft_node) return v3_ert_node @staticmethod def _set_v3_feature_ft_if_exists(v3_features_node: _MapNode, key: str, node: Union[Optional[_MapNode], bool]): val = node if val is None: val = False v3_features_node[key] = val # Converts a v2 data stream type node to a v3 data stream type node # and returns it. def _conv_dst_node(self, v2_dst_node: _MapNode) -> _MapNode: # This function creates a v3 data stream type features node from # the packet context and event record header field type nodes of # a v2 data stream type node. def v3_features_node_from_v2_ft_nodes(v2_pkt_ctx_ft_fields_node: _MapNode, v2_er_header_ft_fields_node: Optional[_MapNode]) -> _MapNode: if v2_er_header_ft_fields_node is None: v2_er_header_ft_fields_node = collections.OrderedDict() v3_pkt_total_size_ft_node = self._conv_ft_node(v2_pkt_ctx_ft_fields_node['packet_size']) v3_pkt_content_size_ft_node = self._conv_ft_node(v2_pkt_ctx_ft_fields_node['content_size']) v3_pkt_beg_ts_ft_node = self._conv_ft_node_if_exists(v2_pkt_ctx_ft_fields_node, 'timestamp_begin') v3_pkt_end_ts_ft_node = self._conv_ft_node_if_exists(v2_pkt_ctx_ft_fields_node, 'timestamp_end') v3_pkt_disc_er_counter_snap_ft_node = self._conv_ft_node_if_exists(v2_pkt_ctx_ft_fields_node, 'events_discarded') v3_ert_id_ft_node = self._conv_ft_node_if_exists(v2_er_header_ft_fields_node, 'id') v3_er_ts_ft_node = self._conv_ft_node_if_exists(v2_er_header_ft_fields_node, 'timestamp') v3_features_node: _MapNode = collections.OrderedDict() v3_pkt_node: _MapNode = collections.OrderedDict() v3_er_node: _MapNode = collections.OrderedDict() v3_pkt_node['total-size-field-type'] = v3_pkt_total_size_ft_node v3_pkt_node['content-size-field-type'] = v3_pkt_content_size_ft_node self._set_v3_feature_ft_if_exists(v3_pkt_node, 'beginning-timestamp-field-type', v3_pkt_beg_ts_ft_node) self._set_v3_feature_ft_if_exists(v3_pkt_node, 'end-timestamp-field-type', v3_pkt_end_ts_ft_node) self._set_v3_feature_ft_if_exists(v3_pkt_node, 'discarded-event-records-counter-snapshot-field-type', v3_pkt_disc_er_counter_snap_ft_node) self._set_v3_feature_ft_if_exists(v3_er_node, 'type-id-field-type', v3_ert_id_ft_node) self._set_v3_feature_ft_if_exists(v3_er_node, 'timestamp-field-type', v3_er_ts_ft_node) v3_features_node['packet'] = v3_pkt_node v3_features_node['event-record'] = v3_er_node return v3_features_node def clk_type_name_from_v2_int_ft_node(v2_int_ft_node: Optional[_MapNode]) -> _OptStr: if v2_int_ft_node is None: return None assert v2_int_ft_node['class'] in ('int', 'integer') prop_mappings_node = v2_int_ft_node.get('property-mappings') if prop_mappings_node is not None and len(prop_mappings_node) > 0: return prop_mappings_node[0]['name'] return None # create empty v3 data stream type node v3_dst_node: _MapNode = collections.OrderedDict() # rename `$default` property to `$is-default` _copy_prop_if_exists(v3_dst_node, v2_dst_node, '$default', '$is-default') # set default clock type node pct_prop_name = 'packet-context-type' v2_pkt_ctx_ft_fields_node = v2_dst_node[pct_prop_name]['fields'] eht_prop_name = 'event-header-type' v2_er_header_ft_fields_node = None v2_er_header_ft_node = v2_dst_node.get(eht_prop_name) if v2_er_header_ft_node is not None: v2_er_header_ft_fields_node = v2_er_header_ft_node['fields'] def_clk_type_name = None try: ts_begin_prop_name = 'timestamp_begin' ts_begin_clk_type_name = clk_type_name_from_v2_int_ft_node(v2_pkt_ctx_ft_fields_node.get(ts_begin_prop_name)) ts_end_prop_name = 'timestamp_end' ts_end_clk_type_name = clk_type_name_from_v2_int_ft_node(v2_pkt_ctx_ft_fields_node.get(ts_end_prop_name)) if ts_begin_clk_type_name is not None and ts_end_clk_type_name is not None: if ts_begin_clk_type_name != ts_end_clk_type_name: raise _ConfigurationParseError(f'`{ts_begin_prop_name}`/`{ts_end_prop_name}` properties', 'Field types are not mapped to the same clock type') except _ConfigurationParseError as exc: _append_error_ctx(exc, f'`{pct_prop_name}` property') try: if def_clk_type_name is None and v2_er_header_ft_fields_node is not None: def_clk_type_name = clk_type_name_from_v2_int_ft_node(v2_er_header_ft_fields_node.get('timestamp')) if def_clk_type_name is None and ts_begin_clk_type_name is not None: def_clk_type_name = ts_begin_clk_type_name if def_clk_type_name is None and ts_end_clk_type_name is not None: def_clk_type_name = ts_end_clk_type_name except _ConfigurationParseError as exc: _append_error_ctx(exc, f'`{eht_prop_name}` property') if def_clk_type_name is not None: v3_dst_node['$default-clock-type-name'] = def_clk_type_name # set features node v3_dst_node['$features'] = v3_features_node_from_v2_ft_nodes(v2_pkt_ctx_ft_fields_node, v2_er_header_ft_fields_node) # set extra packet context field type members node pkt_ctx_ft_extra_members = [] ctf_member_names = [ 'packet_size', 'content_size', 'timestamp_begin', 'timestamp_end', 'events_discarded', 'packet_seq_num', ] for member_name, v2_ft_node in v2_pkt_ctx_ft_fields_node.items(): if member_name in ctf_member_names: continue pkt_ctx_ft_extra_members.append(collections.OrderedDict({ member_name: collections.OrderedDict({ 'field-type': self._conv_ft_node(v2_ft_node) }) })) if len(pkt_ctx_ft_extra_members) > 0: v3_dst_node['packet-context-field-type-extra-members'] = pkt_ctx_ft_extra_members # convert event record common context field type node v2_ft_node = v2_dst_node.get('event-context-type') if v2_ft_node is not None: v3_dst_node['event-record-common-context-field-type'] = self._conv_ft_node(v2_ft_node) # convert event record type nodes v3_erts_node = collections.OrderedDict() for ert_name, v2_ert_node in v2_dst_node['events'].items(): try: v3_erts_node[ert_name] = self._conv_ert_node(v2_ert_node) except _ConfigurationParseError as exc: _append_error_ctx(exc, f'Event record type `{ert_name}`') v3_dst_node['event-record-types'] = v3_erts_node return v3_dst_node # Converts a v2 metadata node to a v3 trace node and returns it. def _conv_meta_node(self, v2_meta_node: _MapNode) -> _MapNode: def v3_features_node_from_v2_ft_node(v2_pkt_header_ft_node: Optional[_MapNode]) -> _MapNode: def set_if_exists(key, node): return self._set_v3_feature_ft_if_exists(v3_features_node, key, node) v2_pkt_header_ft_fields_node = collections.OrderedDict() if v2_pkt_header_ft_node is not None: v2_pkt_header_ft_fields_node = v2_pkt_header_ft_node['fields'] v3_magic_ft_node = self._conv_ft_node_if_exists(v2_pkt_header_ft_fields_node, 'magic') v3_uuid_ft_node = self._conv_ft_node_if_exists(v2_pkt_header_ft_fields_node, 'uuid') v3_dst_id_ft_node = self._conv_ft_node_if_exists(v2_pkt_header_ft_fields_node, 'stream_id') v3_features_node: _MapNode = collections.OrderedDict() set_if_exists('magic-field-type', v3_magic_ft_node) set_if_exists('uuid-field-type', v3_uuid_ft_node) set_if_exists('data-stream-type-id-field-type', v3_dst_id_ft_node) return v3_features_node v3_trace_node: _MapNode = collections.OrderedDict() v3_trace_type_node: _MapNode = collections.OrderedDict() v2_trace_node = v2_meta_node['trace'] # copy `byte-order` property as `trace-byte-order` property _copy_prop_if_exists(v3_trace_type_node, v2_trace_node, 'byte-order', 'trace-byte-order') # copy `uuid` property _copy_prop_if_exists(v3_trace_type_node, v2_trace_node, 'uuid') # copy `$log-levels`/`log-levels` property new_prop_name = '$log-level-aliases' _copy_prop_if_exists(v3_trace_type_node, v2_meta_node, 'log-levels', new_prop_name) _copy_prop_if_exists(v3_trace_type_node, v2_meta_node, '$log-levels', new_prop_name) # copy `clocks` property, converting clock type nodes v2_clk_types_node = v2_meta_node.get('clocks') if v2_clk_types_node is not None: v3_clk_types_node = collections.OrderedDict() for name, v2_clk_type_node in v2_clk_types_node.items(): v3_clk_types_node[name] = self._conv_clk_type_node(v2_clk_type_node) v3_trace_type_node['clock-types'] = v3_clk_types_node # set features node v2_pkt_header_ft_node = v2_trace_node.get('packet-header-type') v3_trace_type_node['$features'] = v3_features_node_from_v2_ft_node(v2_pkt_header_ft_node) # convert data stream type nodes v3_dsts_node = collections.OrderedDict() for dst_name, v2_dst_node in v2_meta_node['streams'].items(): try: v3_dsts_node[dst_name] = self._conv_dst_node(v2_dst_node) except _ConfigurationParseError as exc: _append_error_ctx(exc, f'Data stream type `{dst_name}`') v3_trace_type_node['data-stream-types'] = v3_dsts_node # If `v2_meta_node` has a `$default-stream` property, find the # corresponding v3 data stream type node and set its # `$is-default` property to `True`. prop_name = '$default-stream' v2_def_dst_node = v2_meta_node.get(prop_name) if v2_def_dst_node is not None: found = False for dst_name, v3_dst_node in v3_dsts_node.items(): if dst_name == v2_def_dst_node: v3_dst_node['$is-default'] = True found = True break if not found: raise _ConfigurationParseError(f'`{prop_name}` property', f'Data stream type `{v2_def_dst_node}` does not exist') # set environment node v2_env_node = v2_meta_node.get('env') if v2_env_node is not None: v3_trace_node['environment'] = copy.deepcopy(v2_env_node) # set v3 trace node's type node v3_trace_node['type'] = v3_trace_type_node return v3_trace_node # Transforms the root configuration node into a valid v3 # configuration node. def _transform_config_node(self): # remove the `version` property del self._root_node['version'] # relocate prefix and option nodes prefix_prop_name = 'prefix' v2_prefix_node = self._root_node.get(prefix_prop_name, 'barectf_') _del_prop_if_exists(self._root_node, prefix_prop_name) opt_prop_name = 'options' v2_options_node = self._root_node.get(opt_prop_name) _del_prop_if_exists(self._root_node, opt_prop_name) code_gen_node = collections.OrderedDict() v3_prefixes = config_parse_common._v3_prefixes_from_v2_prefix(v2_prefix_node) v3_prefix_node = collections.OrderedDict([ ('identifier', v3_prefixes.identifier), ('file-name', v3_prefixes.file_name), ]) code_gen_node[prefix_prop_name] = v3_prefix_node if v2_options_node is not None: header_node = collections.OrderedDict() _copy_prop_if_exists(header_node, v2_options_node, 'gen-prefix-def', 'identifier-prefix-definition') _copy_prop_if_exists(header_node, v2_options_node, 'gen-default-stream-def', 'default-data-stream-type-name-definition') code_gen_node['header'] = header_node self._root_node[opt_prop_name] = collections.OrderedDict({ 'code-generation': code_gen_node, }) # convert the v2 metadata node into a v3 trace node try: self._root_node['trace'] = self._conv_meta_node(self._root_node['metadata']) except _ConfigurationParseError as exc: _append_error_ctx(exc, 'Metadata object') del self._root_node['metadata'] # Expands the field type aliases found in the metadata node. # # This method modifies the metadata node. # # When this method returns: # # * Any field type alias is replaced with its full field type node # equivalent. # # * The `type-aliases` property of metadata node is removed. def _expand_ft_aliases(self): meta_node = self._root_node['metadata'] ft_aliases_node = meta_node['type-aliases'] # Expand field type aliases within trace, data stream, and event # record types now. try: self._resolve_ft_alias_from(ft_aliases_node, meta_node['trace'], 'packet-header-type') except _ConfigurationParseError as exc: _append_error_ctx(exc, 'Trace type') for dst_name, dst_node in meta_node['streams'].items(): try: self._resolve_ft_alias_from(ft_aliases_node, dst_node, 'packet-context-type') self._resolve_ft_alias_from(ft_aliases_node, dst_node, 'event-header-type') self._resolve_ft_alias_from(ft_aliases_node, dst_node, 'event-context-type') for ert_name, ert_node in dst_node['events'].items(): try: self._resolve_ft_alias_from(ft_aliases_node, ert_node, 'context-type') self._resolve_ft_alias_from(ft_aliases_node, ert_node, 'payload-type') except _ConfigurationParseError as exc: _append_error_ctx(exc, f'Event record type `{ert_name}`') except _ConfigurationParseError as exc: _append_error_ctx(exc, f'Data stream type `{dst_name}`') # remove the (now unneeded) `type-aliases` node del meta_node['type-aliases'] # Applies field type inheritance to all field type nodes found in # the metadata node. # # This method modifies the metadata node. # # When this method returns, no field type node has an `$inherit` or # `inherit` property. def _apply_fts_inheritance(self): meta_node = self._root_node['metadata'] self._apply_ft_inheritance(meta_node['trace'], 'packet-header-type') for dst_node in meta_node['streams'].values(): self._apply_ft_inheritance(dst_node, 'packet-context-type') self._apply_ft_inheritance(dst_node, 'event-header-type') self._apply_ft_inheritance(dst_node, 'event-context-type') for ert_node in dst_node['events'].values(): self._apply_ft_inheritance(ert_node, 'context-type') self._apply_ft_inheritance(ert_node, 'payload-type') # Calls _expand_ft_aliases() and _apply_fts_inheritance() if the # metadata node has a `type-aliases` property. def _expand_fts(self): # Make sure that the current configuration node is valid # considering field types are not expanded yet. self._schema_validator.validate(self._root_node, 'config/2/config-pre-field-type-expansion') meta_node = self._root_node['metadata'] ft_aliases_node = meta_node.get('type-aliases') if ft_aliases_node is None: # If there's no `type-aliases` node, then there's no field # type aliases and therefore no possible inheritance. return # first, expand field type aliases self._expand_ft_aliases() # next, apply inheritance to create effective field types self._apply_fts_inheritance() # Processes the inclusions of the event record type node `ert_node`, # returning the effective node. def _process_ert_node_include(self, ert_node: _MapNode) -> _MapNode: # Make sure the event record type node is valid for the # inclusion processing stage. self._schema_validator.validate(ert_node, 'config/2/ert-pre-include') # process inclusions return self._process_node_include(ert_node, self._process_ert_node_include) # Processes the inclusions of the data stream type node `dst_node`, # returning the effective node. def _process_dst_node_include(self, dst_node: _MapNode) -> _MapNode: def process_children_include(dst_node): prop_name = 'events' if prop_name in dst_node: erts_node = dst_node[prop_name] for key in list(erts_node): erts_node[key] = self._process_ert_node_include(erts_node[key]) # Make sure the data stream type node is valid for the inclusion # processing stage. self._schema_validator.validate(dst_node, 'config/2/dst-pre-include') # process inclusions return self._process_node_include(dst_node, self._process_dst_node_include, process_children_include) # Processes the inclusions of the trace type node `trace_type_node`, # returning the effective node. def _process_trace_type_node_include(self, trace_type_node: _MapNode) -> _MapNode: # Make sure the trace type node is valid for the inclusion # processing stage. self._schema_validator.validate(trace_type_node, 'config/2/trace-type-pre-include') # process inclusions return self._process_node_include(trace_type_node, self._process_trace_type_node_include) # Processes the inclusions of the clock type node `clk_type_node`, # returning the effective node. def _process_clk_type_node_include(self, clk_type_node: _MapNode) -> _MapNode: # Make sure the clock type node is valid for the inclusion # processing stage. self._schema_validator.validate(clk_type_node, 'config/2/clock-type-pre-include') # process inclusions return self._process_node_include(clk_type_node, self._process_clk_type_node_include) # Processes the inclusions of the metadata node `meta_node`, # returning the effective node. def _process_meta_node_include(self, meta_node: _MapNode) -> _MapNode: def process_children_include(meta_node: _MapNode): prop_name = 'trace' if prop_name in meta_node: meta_node[prop_name] = self._process_trace_type_node_include(meta_node[prop_name]) prop_name = 'clocks' if prop_name in meta_node: clk_types_node = meta_node[prop_name] for key in list(clk_types_node): clk_types_node[key] = self._process_clk_type_node_include(clk_types_node[key]) prop_name = 'streams' if prop_name in meta_node: dsts_node = meta_node[prop_name] for key in list(dsts_node): dsts_node[key] = self._process_dst_node_include(dsts_node[key]) # Make sure the metadata node is valid for the inclusion # processing stage. self._schema_validator.validate(meta_node, 'config/2/metadata-pre-include') # process inclusions return self._process_node_include(meta_node, self._process_meta_node_include, process_children_include) # Processes the inclusions of the configuration node, modifying it # during the process. def _process_config_includes(self): # Process inclusions in this order: # # 1. Clock type node, event record type nodes, and trace type # nodes (the order between those is not important). # # 2. Data stream type nodes. # # 3. Metadata node. # # This is because: # # * A metadata node can include clock type nodes, a trace type # node, data stream type nodes, and event record type nodes # (indirectly). # # * A data stream type node can include event record type nodes. # # First, make sure the configuration node itself is valid for # the inclusion processing stage. self._schema_validator.validate(self._root_node, 'config/2/config-pre-include') # Process metadata node inclusions. # # self._process_meta_node_include() returns a new (or the same) # metadata node without any `$include` property in it, # recursively. prop_name = 'metadata' self._root_node[prop_name] = self._process_meta_node_include(self._root_node[prop_name]) def _parse(self): # Make sure the configuration node is minimally valid, that is, # it contains a valid `version` property. # # This step does not validate the whole configuration node yet # because we don't have an effective configuration node; we # still need to: # # * Process inclusions. # * Expand field types (aliases and inheritance). self._schema_validator.validate(self._root_node, 'config/2/config-min') # process configuration node inclusions self._process_config_includes() # Expand field type nodes. # # This process: # # 1. Replaces field type aliases with "effective" field type # nodes, recursively. # # After this step, the `type-aliases` property of the # metadata node is gone. # # 2. Applies inheritance, following the `$inherit`/`inherit` # properties. # # After this step, field type nodes do not contain `$inherit` # or `inherit` properties. # # This is done blindly, in that the process _doesn't_ validate # field type nodes at this point. # # The reason we must do this here for a barectf 2 configuration, # considering that barectf 3 also supports field type node # aliases and inheritance, is that we need to find specific # packet header and packet context field type member nodes (for # example, `stream_id`, `packet_size`, or `timestamp_end`) to # set the `$features` properties of barectf 3 trace type and # data stream type nodes. Those field type nodes can be aliases, # contain aliases, or inherit from other nodes. self._expand_fts() # Validate the whole, (almost) effective configuration node. # # It's almost effective because the `log-level` property of # event record type nodes can be log level aliases. Log level # aliases are also a feature of a barectf 3 configuration node, # therefore this is compatible. self._schema_validator.validate(self._root_node, 'config/2/config') # Transform the current configuration node into a valid v3 # configuration node. self._transform_config_node() @property def config_node(self) -> config_parse_common._ConfigNodeV3: return config_parse_common._ConfigNodeV3(typing.cast(_MapNode, self._root_node)) barectf-3.1.2/barectf/config_parse_v3.py000066400000000000000000001675141443101201700201610ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2015-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import barectf.config_parse_common as barectf_config_parse_common from barectf.config_parse_common import _ConfigurationParseError from barectf.config_parse_common import _append_error_ctx from barectf.config_parse_common import _MapNode import barectf.config as barectf_config from barectf.config import _OptStructFt import collections import uuid from barectf.typing import Count, Alignment, VersionNumber from typing import Optional, List, Dict, Any, TextIO, Set, Iterable, Callable, Tuple, Type import typing # A barectf 3 YAML configuration parser. # # When you build such a parser, it parses the configuration node `node` # (already loaded from the file having the path `path`) and creates a # corresponding `barectf.Configuration` object which you can get with # the `config` property. # # See the comments of _parse() for more implementation details about the # parsing stages and general strategy. class _Parser(barectf_config_parse_common._Parser): # Builds a barectf 3 YAML configuration parser and parses the root # configuration node `node` (already loaded from the file-like # object `root_file`). def __init__(self, root_file: TextIO, node: barectf_config_parse_common._ConfigNodeV3, with_pkg_include_dir: bool, inclusion_dirs: Optional[List[str]], ignore_include_not_found: bool): super().__init__(root_file, node, with_pkg_include_dir, inclusion_dirs, ignore_include_not_found, VersionNumber(3)) self._ft_cls_name_to_create_method: Dict[str, Callable[[_MapNode], List[barectf_config._FieldType]]] = { 'unsigned-integer': self._create_int_ft, 'signed-integer': self._create_int_ft, 'unsigned-enumeration': self._create_enum_ft, 'signed-enumeration': self._create_enum_ft, 'real': self._create_real_ft, 'string': self._create_string_ft, 'static-array': self._create_static_array_ft, 'dynamic-array': self._create_dynamic_array_ft, 'structure': self._create_struct_ft, } self._parse() # Validates the alignment `alignment`, raising a # `_ConfigurationParseError` exception using `ctx_obj_name` if it's # invalid. @staticmethod def _validate_alignment(alignment: Alignment, ctx_obj_name: str): assert alignment >= 1 # check for power of two if (alignment & (alignment - 1)) != 0: raise _ConfigurationParseError(ctx_obj_name, f'Invalid alignment (not a power of two): {alignment}') # Validates the TSDL identifier `iden`, raising a # `_ConfigurationParseError` exception using `ctx_obj_name` and # `prop` to format the message if it's invalid. @staticmethod def _validate_iden(iden: str, ctx_obj_name: str, prop: str): assert type(iden) is str ctf_keywords = { 'align', 'callsite', 'clock', 'enum', 'env', 'event', 'floating_point', 'integer', 'stream', 'string', 'struct', 'trace', 'typealias', 'typedef', 'variant', } if iden in ctf_keywords: msg = f'Invalid {prop} (not a valid identifier): `{iden}`' raise _ConfigurationParseError(ctx_obj_name, msg) @staticmethod def _alignment_prop(ft_node: _MapNode, prop_name: str) -> Alignment: alignment = ft_node.get(prop_name) if alignment is not None: _Parser._validate_alignment(alignment, '`prop_name` property') return Alignment(alignment) @property def _trace_type_node(self) -> _MapNode: return self.config_node['trace']['type'] @staticmethod def _byte_order_from_node(node: str) -> barectf_config.ByteOrder: return { 'big-endian': barectf_config.ByteOrder.BIG_ENDIAN, 'little-endian': barectf_config.ByteOrder.LITTLE_ENDIAN, }[node] # Creates a bit array field type having the type `ft_type` from the # bit array field type node `ft_node`, passing the additional # `*args` to ft_type.__init__(). def _create_common_bit_array_ft(self, ft_node: _MapNode, ft_type: Type[barectf_config._BitArrayFieldType], default_alignment: Optional[Alignment], *args) -> barectf_config._BitArrayFieldType: alignment = self._alignment_prop(ft_node, 'alignment') if alignment is None: alignment = default_alignment return ft_type(ft_node['size'], alignment, *args) # Creates an integer field type having the type `ft_type` from the # integer field type node `ft_node`, passing the additional `*args` # to ft_type.__init__(). def _create_common_int_ft(self, ft_node: _MapNode, ft_type: Type[barectf_config._IntegerFieldType], *args) -> barectf_config._IntegerFieldType: preferred_display_base = { 'binary': barectf_config.DisplayBase.BINARY, 'octal': barectf_config.DisplayBase.OCTAL, 'decimal': barectf_config.DisplayBase.DECIMAL, 'hexadecimal': barectf_config.DisplayBase.HEXADECIMAL, }[ft_node.get('preferred-display-base', 'decimal')] return typing.cast(barectf_config._IntegerFieldType, self._create_common_bit_array_ft(ft_node, ft_type, None, preferred_display_base, *args)) # Creates an integer field type from the unsigned/signed integer # field type node `ft_node`. def _create_int_ft(self, ft_node: _MapNode) -> List[barectf_config._FieldType]: ft_type = { 'unsigned-integer': barectf_config.UnsignedIntegerFieldType, 'signed-integer': barectf_config.SignedIntegerFieldType, }[ft_node['class']] return [self._create_common_int_ft(ft_node, ft_type)] # Creates an enumeration field type from the unsigned/signed # enumeration field type node `ft_node`. def _create_enum_ft(self, ft_node: _MapNode) -> List[barectf_config._FieldType]: ft_type = { 'unsigned-enumeration': barectf_config.UnsignedEnumerationFieldType, 'signed-enumeration': barectf_config.SignedEnumerationFieldType, }[ft_node['class']] mappings = collections.OrderedDict() for label, mapping_node in ft_node['mappings'].items(): ranges = set() for range_node in mapping_node: if type(range_node) is list: ranges.add(barectf_config.EnumerationFieldTypeMappingRange(range_node[0], range_node[1])) else: assert type(range_node) is int ranges.add(barectf_config.EnumerationFieldTypeMappingRange(range_node, range_node)) mappings[label] = barectf_config.EnumerationFieldTypeMapping(ranges) return [typing.cast(barectf_config._EnumerationFieldType, self._create_common_int_ft(ft_node, ft_type, barectf_config.EnumerationFieldTypeMappings(mappings)))] # Creates a real field type from the real field type node `ft_node`. def _create_real_ft(self, ft_node: _MapNode) -> List[barectf_config._FieldType]: return [typing.cast(barectf_config.RealFieldType, self._create_common_bit_array_ft(ft_node, barectf_config.RealFieldType, Alignment(8)))] # Creates a string field type from the string field type node # `ft_node`. def _create_string_ft(self, ft_node: _MapNode) -> List[barectf_config._FieldType]: return [barectf_config.StringFieldType()] def _create_array_ft(self, ft_type, ft_node: _MapNode, **kwargs) -> barectf_config._ArrayFieldType: prop_name = 'element-field-type' try: element_fts = self._create_fts(ft_node[prop_name]) except _ConfigurationParseError as exc: _append_error_ctx(exc, f'`{prop_name}` property') if len(element_fts) != 1 or isinstance(element_fts[0], (barectf_config.StructureFieldType, barectf_config.DynamicArrayFieldType)): raise _ConfigurationParseError(f'`{prop_name}` property', 'Nested structure and dynamic array field types are not supported') return ft_type(element_field_type=element_fts[0], **kwargs) # Creates a static array field type from the static array field type # node `ft_node`. def _create_static_array_ft(self, ft_node: _MapNode) -> List[barectf_config._FieldType]: return [typing.cast(barectf_config.StaticArrayFieldType, self._create_array_ft(barectf_config.StaticArrayFieldType, ft_node, length=ft_node['length']))] # Creates a dynamic array field type from the dynamic array field # type node `ft_node`. def _create_dynamic_array_ft(self, ft_node: _MapNode) -> List[barectf_config._FieldType]: # create length unsigned integer field type len_ft = barectf_config.UnsignedIntegerFieldType(32, alignment=Alignment(8)) return [ len_ft, typing.cast(barectf_config.DynamicArrayFieldType, self._create_array_ft(barectf_config.DynamicArrayFieldType, ft_node, length_field_type=len_ft)) ] # Creates structure field type members from the structure field type # members node `members_node`. # # `prop_name` is the name of the property of which `members_node` is # the value. def _create_struct_ft_members(self, members_node: List[_MapNode], prop_name: str): members = collections.OrderedDict() member_names: Set[str] = set() for member_node in members_node: member_name, member_node = list(member_node.items())[0] if member_name in member_names: raise _ConfigurationParseError(f'`{prop_name}` property', f'Duplicate member `{member_name}`') self._validate_iden(member_name, f'`{prop_name}` property', 'structure field type member name') member_names.add(member_name) ft_prop_name = 'field-type' ft_node = member_node[ft_prop_name] try: if ft_node['class'] in ['structure']: raise _ConfigurationParseError(f'`{ft_prop_name}` property', 'Nested structure field types are not supported') try: member_fts = self._create_fts(ft_node) except _ConfigurationParseError as exc: _append_error_ctx(exc, f'`{ft_prop_name}` property') except _ConfigurationParseError as exc: _append_error_ctx(exc, f'Structure field type member `{member_name}`') if len(member_fts) == 2: # The only case where this happens is a dynamic array # field type node which generates an unsigned integer # field type for the length and the dynamic array field # type itself. assert type(member_fts[1]) is barectf_config.DynamicArrayFieldType members[f'__{member_name}_len'] = barectf_config.StructureFieldTypeMember(member_fts[0]) else: assert len(member_fts) == 1 members[member_name] = barectf_config.StructureFieldTypeMember(member_fts[-1]) return barectf_config.StructureFieldTypeMembers(members) # Creates a structure field type from the structure field type node # `ft_node`. def _create_struct_ft(self, ft_node: _MapNode) -> List[barectf_config._FieldType]: minimum_alignment = self._alignment_prop(ft_node, 'minimum-alignment') if minimum_alignment is None: minimum_alignment = 1 members = None prop_name = 'members' members_node = ft_node.get(prop_name) if members_node is not None: members = self._create_struct_ft_members(members_node, prop_name) return [barectf_config.StructureFieldType(minimum_alignment, members)] # Creates field types from the field type node `ft_node`. def _create_fts(self, ft_node: _MapNode) -> List[barectf_config._FieldType]: return self._ft_cls_name_to_create_method[ft_node['class']](ft_node) # Creates field types from the field type node `parent_node[key]` # if it exists. def _try_create_fts(self, parent_node: _MapNode, key: str) -> Optional[List[barectf_config._FieldType]]: if key not in parent_node: return None try: return self._create_fts(parent_node[key]) except _ConfigurationParseError as exc: _append_error_ctx(exc, f'`{key}` property') # satisfy static type checker (never reached) raise # Like _try_create_fts(), but casts the result's type (first and # only element) to `barectf_config.StructureFieldType` to satisfy # static type checkers. def _try_create_struct_ft(self, parent_node: _MapNode, key: str) -> _OptStructFt: fts = self._try_create_fts(parent_node, key) if fts is None: return None return typing.cast(barectf_config.StructureFieldType, fts[0]) # Returns the total number of members in the structure field type # node `ft_node` if it exists, otherwise 0. @staticmethod def _total_struct_ft_node_members(ft_node: Optional[_MapNode]) -> Count: if ft_node is None: return Count(0) members_node = ft_node.get('members') if members_node is None: return Count(0) return Count(len(members_node)) # Creates an event record type from the event record type node # `ert_node` named `name`. # # `ert_member_count` is the total number of structure field type # members within the event record type so far (from the common part # in its data stream type). For example, if the data stream type has # an event record header field type with `id` and `timestamp` # members, then `ert_member_count` is 2. def _create_ert(self, name: str, ert_node: _MapNode, ert_member_count: Count) -> barectf_config.EventRecordType: try: self._validate_iden(name, '`name` property', 'event record type name') # make sure the event record type is not empty spec_ctx_ft_prop_name = 'specific-context-field-type' payload_ft_prop_name = 'payload-field-type' ert_member_count = Count(ert_member_count + self._total_struct_ft_node_members(ert_node.get(spec_ctx_ft_prop_name))) ert_member_count = Count(ert_member_count + self._total_struct_ft_node_members(ert_node.get(payload_ft_prop_name))) if ert_member_count == 0: raise _ConfigurationParseError('Event record type', 'Event record type is empty (no members).') # create event record type return barectf_config.EventRecordType(name, ert_node.get('log-level'), self._try_create_struct_ft(ert_node, spec_ctx_ft_prop_name), self._try_create_struct_ft(ert_node, payload_ft_prop_name)) except _ConfigurationParseError as exc: _append_error_ctx(exc, f'Event record type `{name}`') # satisfy static type checker (never reached) raise # Returns the effective feature field type for the field type # node `parent_node[key]`, if any. # # Returns: # # If `parent_node[key]` is `False`: # `None`. # # If `parent_node[key]` is `True`: # `barectf_config.DEFAULT_FIELD_TYPE`. # # If `parent_node[key]` doesn't exist: # `none` (parameter). # # Otherwise: # A created field type. def _feature_ft(self, parent_node: _MapNode, key: str, none: Any = None) -> Any: if key not in parent_node: # missing: default feature field type return none ft_node = parent_node[key] assert ft_node is not None if ft_node is True: # default feature field type return barectf_config.DEFAULT_FIELD_TYPE if ft_node is False: # disabled feature return None assert type(ft_node) is collections.OrderedDict return self._create_fts(ft_node)[0] def _create_dst(self, name: str, dst_node: _MapNode) -> barectf_config.DataStreamType: try: # validate data stream type's name self._validate_iden(name, '`name` property', 'data stream type name') # get default clock type, if any def_clk_type = None prop_name = '$default-clock-type-name' def_clk_type_name = dst_node.get(prop_name) if def_clk_type_name is not None: try: def_clk_type = self._clk_type(def_clk_type_name, prop_name) except _ConfigurationParseError as exc: _append_error_ctx(exc, f'`{prop_name}` property') # create feature field types pkt_total_size_ft = barectf_config.DEFAULT_FIELD_TYPE pkt_content_size_ft = barectf_config.DEFAULT_FIELD_TYPE pkt_beginning_ts_ft = None pkt_end_ts_ft = None pkt_disc_er_counter_snap_ft = barectf_config.DEFAULT_FIELD_TYPE ert_id_ft = barectf_config.DEFAULT_FIELD_TYPE ert_ts_ft = None pkt_seq_num_ft = None if def_clk_type is not None: # The data stream type has a default clock type. # Initialize the packet beginning timestamp, packet end # timestamp, and event record timestamp field types to # default field types. # # This means your data stream type node only needs a # default clock type name to enable those features # automatically. Those features do not add any parameter # to the event tracing functions. pkt_beginning_ts_ft = barectf_config.DEFAULT_FIELD_TYPE pkt_end_ts_ft = barectf_config.DEFAULT_FIELD_TYPE ert_ts_ft = barectf_config.DEFAULT_FIELD_TYPE features_node = dst_node.get('$features') if features_node is not None: # create packet feature field types pkt_node = features_node.get('packet') if pkt_node is not None: pkt_total_size_ft = self._feature_ft(pkt_node, 'total-size-field-type', pkt_total_size_ft) pkt_content_size_ft = self._feature_ft(pkt_node, 'content-size-field-type', pkt_content_size_ft) pkt_beginning_ts_ft = self._feature_ft(pkt_node, 'beginning-timestamp-field-type', pkt_beginning_ts_ft) pkt_end_ts_ft = self._feature_ft(pkt_node, 'end-timestamp-field-type', pkt_end_ts_ft) pkt_disc_er_counter_snap_ft = self._feature_ft(pkt_node, 'discarded-event-records-counter-snapshot-field-type', pkt_disc_er_counter_snap_ft) pkt_seq_num_ft = self._feature_ft(pkt_node, 'sequence-number-field-type', pkt_seq_num_ft) # create event record feature field types er_node = features_node.get('event-record') type_id_ft_prop_name = 'type-id-field-type' if er_node is not None: ert_id_ft = self._feature_ft(er_node, type_id_ft_prop_name, ert_id_ft) ert_ts_ft = self._feature_ft(er_node, 'timestamp-field-type', ert_ts_ft) erts_prop_name = 'event-record-types' ert_count = len(dst_node[erts_prop_name]) try: if ert_id_ft is None and ert_count > 1: raise _ConfigurationParseError(f'`{type_id_ft_prop_name}` property', 'Event record type ID field type feature is required because data stream type has more than one event record type') if isinstance(ert_id_ft, barectf_config._IntegerFieldType): ert_id_int_ft = typing.cast(barectf_config._IntegerFieldType, ert_id_ft) if ert_count > (1 << ert_id_int_ft.size): raise _ConfigurationParseError(f'`{type_id_ft_prop_name}` property', f'Field type\'s size ({ert_id_int_ft.size} bits) is too small to accomodate {ert_count} event record types') except _ConfigurationParseError as exc: exc._append_ctx('`event-record` property') _append_error_ctx(exc, '`$features` property') pkt_features = barectf_config.DataStreamTypePacketFeatures(pkt_total_size_ft, pkt_content_size_ft, pkt_beginning_ts_ft, pkt_end_ts_ft, pkt_disc_er_counter_snap_ft, pkt_seq_num_ft) er_features = barectf_config.DataStreamTypeEventRecordFeatures(ert_id_ft, ert_ts_ft) features = barectf_config.DataStreamTypeFeatures(pkt_features, er_features) # create packet context (structure) field type extra members pkt_ctx_ft_extra_members = None prop_name = 'packet-context-field-type-extra-members' pkt_ctx_ft_extra_members_node = dst_node.get(prop_name) if pkt_ctx_ft_extra_members_node is not None: pkt_ctx_ft_extra_members = self._create_struct_ft_members(pkt_ctx_ft_extra_members_node, prop_name) # check for illegal packet context field type member names reserved_member_names = { 'packet_size', 'content_size', 'timestamp_begin', 'timestamp_end', 'events_discarded', 'packet_seq_num', } for member_name in pkt_ctx_ft_extra_members: if member_name in reserved_member_names: raise _ConfigurationParseError(f'`{prop_name}` property', f'Packet context field type member name `{member_name}` is reserved.') # create event record types er_header_common_ctx_member_count = Count(0) if er_features.type_id_field_type is not None: er_header_common_ctx_member_count = Count(er_header_common_ctx_member_count + 1) if er_features.timestamp_field_type is not None: er_header_common_ctx_member_count = Count(er_header_common_ctx_member_count + 1) er_common_ctx_ft_prop_name = 'event-record-common-context-field-type' er_common_ctx_ft_node = dst_node.get(er_common_ctx_ft_prop_name) er_header_common_ctx_member_count = Count(er_header_common_ctx_member_count + self._total_struct_ft_node_members(er_common_ctx_ft_node)) erts = set() for ert_name, ert_node in dst_node[erts_prop_name].items(): erts.add(self._create_ert(ert_name, ert_node, er_header_common_ctx_member_count)) # create data stream type return barectf_config.DataStreamType(name, erts, def_clk_type, features, pkt_ctx_ft_extra_members, self._try_create_struct_ft(dst_node, er_common_ctx_ft_prop_name)) except _ConfigurationParseError as exc: _append_error_ctx(exc, f'Data data stream type `{name}`') # satisfy static type checker (never reached) raise def _clk_type(self, name: str, prop_name: str) -> barectf_config.ClockType: clk_type = self._clk_types.get(name) if clk_type is None: raise _ConfigurationParseError(f'`{prop_name}` property', f'Clock type `{name}` does not exist') return clk_type def _create_clk_type(self, name: str, clk_type_node: _MapNode) -> barectf_config.ClockType: self._validate_iden(name, '`name` property', 'clock type name') clk_type_uuid = None uuid_node = clk_type_node.get('uuid') if uuid_node is not None: clk_type_uuid = uuid.UUID(uuid_node) offset_seconds = 0 offset_cycles = Count(0) offset_node = clk_type_node.get('offset') if offset_node is not None: offset_seconds = offset_node.get('seconds', 0) offset_cycles = offset_node.get('cycles', Count(0)) return barectf_config.ClockType(name, clk_type_node.get('frequency', int(1e9)), clk_type_uuid, clk_type_node.get('description'), clk_type_node.get('precision', 0), barectf_config.ClockTypeOffset(offset_seconds, offset_cycles), clk_type_node.get('origin-is-unix-epoch', True)) def _create_clk_types(self): self._clk_types = {} for clk_type_name, clk_type_node in self._trace_type_node.get('clock-types', {}).items(): self._clk_types[clk_type_name] = self._create_clk_type(clk_type_name, clk_type_node) def _create_trace_type(self): try: # create clock types (_create_dst() needs them) self._create_clk_types() # get UUID trace_type_uuid = None uuid_node = self._trace_type_node.get('uuid') if uuid_node is not None: if uuid_node == 'auto': trace_type_uuid = uuid.uuid1() else: trace_type_uuid = uuid.UUID(uuid_node) # create feature field types magic_ft = barectf_config.DEFAULT_FIELD_TYPE uuid_ft = None dst_id_ft = barectf_config.DEFAULT_FIELD_TYPE if trace_type_uuid is not None: # Trace type has a UUID: initialize UUID field type to # a default field type. uuid_ft = barectf_config.DEFAULT_FIELD_TYPE features_node = self._trace_type_node.get('$features') dst_id_ft_prop_name = 'data-stream-type-id-field-type' if features_node is not None: magic_ft = self._feature_ft(features_node, 'magic-field-type', magic_ft) uuid_ft = self._feature_ft(features_node, 'uuid-field-type', uuid_ft) dst_id_ft = self._feature_ft(features_node, dst_id_ft_prop_name, dst_id_ft) dsts_prop_name = 'data-stream-types' dst_count = len(self._trace_type_node[dsts_prop_name]) try: if dst_id_ft is None and dst_count > 1: raise _ConfigurationParseError(f'`{dst_id_ft_prop_name}` property', 'Data stream type ID field type feature is required because trace type has more than one data stream type') if isinstance(dst_id_ft, barectf_config._FieldType) and dst_count > (1 << dst_id_ft.size): raise _ConfigurationParseError(f'`{dst_id_ft_prop_name}` property', f'Field type\'s size ({dst_id_ft.size} bits) is too small to accomodate {dst_count} data stream types') except _ConfigurationParseError as exc: _append_error_ctx(exc, '`$features` property') features = barectf_config.TraceTypeFeatures(magic_ft, uuid_ft, dst_id_ft) # create data stream types dsts = set() for dst_name, dst_node in self._trace_type_node[dsts_prop_name].items(): dsts.add(self._create_dst(dst_name, dst_node)) # create trace type if self._trace_byte_order_prop_key == 'native-byte-order': trace_type_cls = barectf_config.TraceType else: trace_type_cls = barectf_config.TraceTypeWithUnknownNativeByteOrder return trace_type_cls(self._trace_byte_order, dsts, trace_type_uuid, features) except _ConfigurationParseError as exc: _append_error_ctx(exc, 'Trace type') def _create_trace(self): try: trace_type = self._create_trace_type() trace_node = self.config_node['trace'] env = None env_node = trace_node.get('environment') if env_node is not None: # validate each environment variable name for name in env_node: self._validate_iden(name, '`environment` property', 'environment variable name') # the node already has the expected structure env = barectf_config.TraceEnvironment(env_node) return barectf_config.Trace(trace_type, env) except _ConfigurationParseError as exc: _append_error_ctx(exc, 'Trace') def _create_config(self): # create trace first trace = self._create_trace() # find default data stream type, if any def_dst = None for dst_name, dst_node in self._trace_type_node['data-stream-types'].items(): prop_name = '$is-default' is_default = dst_node.get(prop_name) if is_default is True: if def_dst is not None: exc = _ConfigurationParseError(f'`{prop_name}` property', f'Duplicate default data stream type (`{def_dst.name}`)') exc._append_ctx(f'Data stream type `{dst_name}`') _append_error_ctx(exc, 'Trace type') def_dst = trace.type.data_stream_type(dst_name) # create clock type C type mapping clk_types_node = self._trace_type_node.get('clock-types') clk_type_c_types = None if clk_types_node is not None: clk_type_c_types = collections.OrderedDict() for dst in trace.type.data_stream_types: if dst.default_clock_type is None: continue clk_type_node = clk_types_node[dst.default_clock_type.name] c_type = clk_type_node.get('$c-type') if c_type is not None: clk_type_c_types[dst.default_clock_type] = c_type # create options iden_prefix_def = False def_dst_name_def = False opts_node = self.config_node.get('options') iden_prefix = 'barectf_' file_name_prefix = 'barectf' if opts_node is not None: code_gen_opts_node = opts_node.get('code-generation') if code_gen_opts_node is not None: prefix_node = code_gen_opts_node.get('prefix', 'barectf') if type(prefix_node) is str: # automatic prefixes iden_prefix = f'{prefix_node}_' file_name_prefix = prefix_node else: iden_prefix = prefix_node['identifier'] file_name_prefix = prefix_node['file-name'] header_opts = code_gen_opts_node.get('header') if header_opts is not None: iden_prefix_def = header_opts.get('identifier-prefix-definition', False) def_dst_name_def = header_opts.get('default-data-stream-type-name-definition', False) header_opts = barectf_config.ConfigurationCodeGenerationHeaderOptions(iden_prefix_def, def_dst_name_def) cg_opts = barectf_config.ConfigurationCodeGenerationOptions(iden_prefix, file_name_prefix, def_dst, header_opts, clk_type_c_types) opts = barectf_config.ConfigurationOptions(cg_opts) # create configuration self._config = barectf_config.Configuration(trace, opts) # Expands the field type aliases found in the trace type node. # # This method modifies the trace type node. # # When this method returns: # # * Any field type alias is replaced with its full field type # node equivalent. # # * The `$field-type-aliases` property of the trace type node is # removed. def _expand_ft_aliases(self): def resolve_ft_alias_from(parent_node: _MapNode, key: str): if key not in parent_node: return if type(parent_node[key]) not in [collections.OrderedDict, str]: return self._resolve_ft_alias_from(ft_aliases_node, parent_node, key) ft_aliases_node = self._trace_type_node['$field-type-aliases'] # Expand field type aliases within trace, data stream, and event # record type nodes. features_prop_name = '$features' try: features_node = self._trace_type_node.get(features_prop_name) if features_node is not None: try: resolve_ft_alias_from(features_node, 'magic-field-type') resolve_ft_alias_from(features_node, 'uuid-field-type') resolve_ft_alias_from(features_node, 'data-stream-type-id-field-type') except _ConfigurationParseError as exc: _append_error_ctx(exc, f'`{features_prop_name}` property') except _ConfigurationParseError as exc: _append_error_ctx(exc, 'Trace type') for dst_name, dst_node in self._trace_type_node['data-stream-types'].items(): try: features_node = dst_node.get(features_prop_name) if features_node is not None: try: pkt_prop_name = 'packet' pkt_node = features_node.get(pkt_prop_name) if pkt_node is not None: try: resolve_ft_alias_from(pkt_node, 'total-size-field-type') resolve_ft_alias_from(pkt_node, 'content-size-field-type') resolve_ft_alias_from(pkt_node, 'beginning-timestamp-field-type') resolve_ft_alias_from(pkt_node, 'end-timestamp-field-type') resolve_ft_alias_from(pkt_node, 'discarded-event-records-counter-snapshot-field-type') resolve_ft_alias_from(pkt_node, 'sequence-number-field-type') except _ConfigurationParseError as exc: _append_error_ctx(exc, f'`{pkt_prop_name}` property') er_prop_name = 'event-record' er_node = features_node.get(er_prop_name) if er_node is not None: try: resolve_ft_alias_from(er_node, 'type-id-field-type') resolve_ft_alias_from(er_node, 'timestamp-field-type') except _ConfigurationParseError as exc: _append_error_ctx(exc, f'`{er_prop_name}` property') except _ConfigurationParseError as exc: _append_error_ctx(exc, f'`{features_prop_name}` property') pkt_ctx_ft_extra_members_prop_name = 'packet-context-field-type-extra-members' pkt_ctx_ft_extra_members_node = dst_node.get(pkt_ctx_ft_extra_members_prop_name) if pkt_ctx_ft_extra_members_node is not None: try: for member_node in pkt_ctx_ft_extra_members_node: member_node = list(member_node.values())[0] resolve_ft_alias_from(member_node, 'field-type') except _ConfigurationParseError as exc: _append_error_ctx(exc, f'`{pkt_ctx_ft_extra_members_prop_name}` property') resolve_ft_alias_from(dst_node, 'event-record-common-context-field-type') for ert_name, ert_node in dst_node['event-record-types'].items(): try: resolve_ft_alias_from(ert_node, 'specific-context-field-type') resolve_ft_alias_from(ert_node, 'payload-field-type') except _ConfigurationParseError as exc: _append_error_ctx(exc, f'Event record type `{ert_name}`') except _ConfigurationParseError as exc: _append_error_ctx(exc, f'Data stream type `{dst_name}`') # remove the (now unneeded) `$field-type-aliases` property del self._trace_type_node['$field-type-aliases'] # Applies field type inheritance to all field type nodes found in # the trace type node. # # This method modifies the trace type node. # # When this method returns, no field type node has an `$inherit` # property. def _apply_fts_inheritance(self): def apply_ft_inheritance(parent_node: _MapNode, key: str): if key not in parent_node: return if type(parent_node[key]) is not collections.OrderedDict: return self._apply_ft_inheritance(parent_node, key) features_prop_name = '$features' features_node = self._trace_type_node.get(features_prop_name) if features_node is not None: apply_ft_inheritance(features_node, 'magic-field-type') apply_ft_inheritance(features_node, 'uuid-field-type') apply_ft_inheritance(features_node, 'data-stream-type-id-field-type') for dst_node in self._trace_type_node['data-stream-types'].values(): features_node = dst_node.get(features_prop_name) if features_node is not None: pkt_node = features_node.get('packet') if pkt_node is not None: apply_ft_inheritance(pkt_node, 'total-size-field-type') apply_ft_inheritance(pkt_node, 'content-size-field-type') apply_ft_inheritance(pkt_node, 'beginning-timestamp-field-type') apply_ft_inheritance(pkt_node, 'end-timestamp-field-type') apply_ft_inheritance(pkt_node, 'discarded-event-records-counter-snapshot-field-type') apply_ft_inheritance(pkt_node, 'sequence-number-field-type') er_node = features_node.get('event-record') if er_node is not None: apply_ft_inheritance(er_node, 'type-id-field-type') apply_ft_inheritance(er_node, 'timestamp-field-type') pkt_ctx_ft_extra_members_node = dst_node.get('packet-context-field-type-extra-members') if pkt_ctx_ft_extra_members_node is not None: for member_node in pkt_ctx_ft_extra_members_node: member_node = list(member_node.values())[0] apply_ft_inheritance(member_node, 'field-type') apply_ft_inheritance(dst_node, 'event-record-common-context-field-type') for ert_node in dst_node['event-record-types'].values(): apply_ft_inheritance(ert_node, 'specific-context-field-type') apply_ft_inheritance(ert_node, 'payload-field-type') # Normalizes structure field type member nodes. # # A structure field type member node can look like this: # # - msg: custom-string # # which is the equivalent of this: # # - msg: # field-type: custom-string # # This method normalizes form 1 to use form 2. def _normalize_struct_ft_member_nodes(self): def normalize_members_node(members_node: List[_MapNode]): ft_prop_name = 'field-type' for member_node in members_node: member_name, val_node = list(member_node.items())[0] if type(val_node) is str: member_node[member_name] = collections.OrderedDict({ ft_prop_name: val_node }) normalize_struct_ft_member_nodes(member_node[member_name], ft_prop_name) def normalize_struct_ft_member_nodes(parent_node: _MapNode, key: str): if type(parent_node) is not collections.OrderedDict: return ft_node = parent_node.get(key) if type(ft_node) is not collections.OrderedDict: return ft_node = typing.cast(collections.OrderedDict, ft_node) members_nodes = ft_node.get('members') if members_nodes is not None: normalize_members_node(members_nodes) prop_name = '$field-type-aliases' ft_aliases_node = self._trace_type_node.get(prop_name) if ft_aliases_node is not None: for alias in ft_aliases_node: normalize_struct_ft_member_nodes(ft_aliases_node, alias) features_prop_name = '$features' features_node = self._trace_type_node.get(features_prop_name) if features_node is not None: normalize_struct_ft_member_nodes(features_node, 'magic-field-type') normalize_struct_ft_member_nodes(features_node, 'uuid-field-type') normalize_struct_ft_member_nodes(features_node, 'data-stream-type-id-field-type') for dst_node in self._trace_type_node['data-stream-types'].values(): features_node = dst_node.get(features_prop_name) if features_node is not None: pkt_node = features_node.get('packet') if pkt_node is not None: normalize_struct_ft_member_nodes(pkt_node, 'total-size-field-type') normalize_struct_ft_member_nodes(pkt_node, 'content-size-field-type') normalize_struct_ft_member_nodes(pkt_node, 'beginning-timestamp-field-type') normalize_struct_ft_member_nodes(pkt_node, 'end-timestamp-field-type') normalize_struct_ft_member_nodes(pkt_node, 'discarded-event-records-counter-snapshot-field-type') normalize_struct_ft_member_nodes(pkt_node, 'sequence-number-field-type') er_node = features_node.get('event-record') if er_node is not None: normalize_struct_ft_member_nodes(er_node, 'type-id-field-type') normalize_struct_ft_member_nodes(er_node, 'timestamp-field-type') pkt_ctx_ft_extra_members_node = dst_node.get('packet-context-field-type-extra-members') if pkt_ctx_ft_extra_members_node is not None: normalize_members_node(pkt_ctx_ft_extra_members_node) normalize_struct_ft_member_nodes(dst_node, 'event-record-common-context-field-type') for ert_node in dst_node['event-record-types'].values(): normalize_struct_ft_member_nodes(ert_node, 'specific-context-field-type') normalize_struct_ft_member_nodes(ert_node, 'payload-field-type') # Calls _expand_ft_aliases() and _apply_fts_inheritance() if the # trace type node has a `$field-type-aliases` property. def _expand_fts(self): # Make sure that the current configuration node is valid # considering field types are not expanded yet. self._schema_validator.validate(self.config_node, 'config/3/config-pre-field-type-expansion') prop_name = '$field-type-aliases' ft_aliases_node = self._trace_type_node.get(prop_name) if ft_aliases_node is None: # If there's no `'$field-type-aliases'` node, then there's # no field type aliases and therefore no possible # inheritance. if prop_name in self._trace_type_node: del self._trace_type_node[prop_name] return # normalize structure field type member nodes self._normalize_struct_ft_member_nodes() # first, expand field type aliases self._expand_ft_aliases() # next, apply inheritance to create effective field type nodes self._apply_fts_inheritance() # Substitute the event record type node log level aliases with their # numeric equivalents. # # Removes the `$log-level-aliases` property of the trace type node. def _sub_log_level_aliases(self): # Make sure that the current configuration node is valid # considering log level aliases are not substituted yet. self._schema_validator.validate(self.config_node, 'config/3/config-pre-log-level-alias-sub') log_level_aliases_prop_name = '$log-level-aliases' log_level_aliases_node = self._trace_type_node.get(log_level_aliases_prop_name) if log_level_aliases_prop_name in self._trace_type_node: del self._trace_type_node[log_level_aliases_prop_name] if log_level_aliases_node is None: # no log level aliases return # substitute log level aliases for dst_name, dst_node in self._trace_type_node['data-stream-types'].items(): try: for ert_name, ert_node in dst_node['event-record-types'].items(): try: prop_name = 'log-level' ll_node = ert_node.get(prop_name) if ll_node is None: continue if type(ll_node) is str: if ll_node not in log_level_aliases_node: raise _ConfigurationParseError(f'`{prop_name}` property', f'Log level alias `{ll_node}` does not exist') ert_node[prop_name] = log_level_aliases_node[ll_node] except _ConfigurationParseError as exc: _append_error_ctx(exc, f'Event record type `{ert_name}`') except _ConfigurationParseError as exc: _append_error_ctx(exc, f'Data stream type `{dst_name}`') # Generator of parent node and key pairs for all the nodes, # recursively, of `node`. # # It is safe to delete a yielded node during the iteration. @staticmethod def _props(node: Any) -> Iterable[Tuple[Any, str]]: if type(node) is collections.OrderedDict: for key in list(node): yield from _Parser._props(node[key]) yield node, key elif type(node) is list: for item_node in node: yield from _Parser._props(item_node) def _trace_type_props(self) -> Iterable[Tuple[Any, str]]: yield from _Parser._props(self.config_node['trace']['type']) def _set_trace_byte_order_prop_key(self): if 'native-byte-order' in self._trace_type_node: self._trace_byte_order_prop_key = 'native-byte-order' else: self._trace_byte_order_prop_key = 'trace-byte-order' # Normalize the properties of the configuration node. # # This method, for each property of the trace type node: # # 1. Removes it if it's `None` (means default). # # 2. Chooses a specific `class` property value. # # 3. Chooses a specific trace byte order property value. # # 4. Chooses a specific `preferred-display-base` property value. # # This method also applies 1. to the trace node's `environment` # property. def _normalize_props(self): def normalize_byte_order_prop(parent_node: _MapNode, key: str): node = parent_node[key] if node in ['be', 'big']: parent_node[key] = 'big-endian' elif node in ['le', 'little']: parent_node[key] = 'little-endian' trace_node = self.config_node['trace'] normalize_byte_order_prop(self._trace_type_node, self._trace_byte_order_prop_key) for parent_node, key in self._trace_type_props(): node = parent_node[key] if node is None: # a `None` property is equivalent to not having it del parent_node[key] continue if key == 'class' and type(node) is str: # field type class aliases if node in ['uint', 'unsigned-int']: parent_node[key] = 'unsigned-integer' elif node in ['sint', 'signed-int']: parent_node[key] = 'signed-integer' elif node in ['uenum', 'unsigned-enum']: parent_node[key] = 'unsigned-enumeration' elif node in ['senum', 'signed-enum']: parent_node[key] = 'signed-enumeration' elif node == 'str': parent_node[key] = 'string' elif node == 'struct': parent_node[key] = 'structure' elif key == 'preferred-display-base' and type(node) is str: # display base aliases if node == 'bin': parent_node[key] = 'binary' elif node == 'oct': parent_node[key] = 'octal' elif node == 'dec': parent_node[key] = 'decimal' elif node == 'hex': parent_node[key] = 'hexadecimal' prop_name = 'environment' if prop_name in trace_node: node = trace_node[prop_name] if node is None: del trace_node[prop_name] # Sets the parser's trace byte order. def _set_trace_byte_order(self): self._trace_byte_order_node = self._trace_type_node[self._trace_byte_order_prop_key] self._trace_byte_order = self._byte_order_from_node(self._trace_byte_order_node) # Processes the inclusions of the event record type node # `ert_node`, returning the effective node. def _process_ert_node_include(self, ert_node: _MapNode) -> _MapNode: # Make sure the event record type node is valid for the # inclusion processing stage. self._schema_validator.validate(ert_node, 'config/3/ert-pre-include') # process inclusions return self._process_node_include(ert_node, self._process_ert_node_include) # Processes the inclusions of the data stream type node `dst_node`, # returning the effective node. def _process_dst_node_include(self, dst_node: _MapNode) -> _MapNode: def process_children_include(dst_node: _MapNode): prop_name = 'event-record-types' if prop_name in dst_node: erts_node = dst_node[prop_name] for key in list(erts_node): erts_node[key] = self._process_ert_node_include(erts_node[key]) # Make sure the data stream type node is valid for the inclusion # processing stage. self._schema_validator.validate(dst_node, 'config/3/dst-pre-include') # process inclusions return self._process_node_include(dst_node, self._process_dst_node_include, process_children_include) # Processes the inclusions of the clock type node `clk_type_node`, # returning the effective node. def _process_clk_type_node_include(self, clk_type_node: _MapNode) -> _MapNode: # Make sure the clock type node is valid for the inclusion # processing stage. self._schema_validator.validate(clk_type_node, 'config/3/clock-type-pre-include') # process inclusions return self._process_node_include(clk_type_node, self._process_clk_type_node_include) # Processes the inclusions of the trace type node `trace_type_node`, # returning the effective node. def _process_trace_type_node_include(self, trace_type_node: _MapNode) -> _MapNode: def process_children_include(trace_type_node: _MapNode): prop_name = 'clock-types' if prop_name in trace_type_node: clk_types_node = trace_type_node[prop_name] for key in list(clk_types_node): clk_types_node[key] = self._process_clk_type_node_include(clk_types_node[key]) prop_name = 'data-stream-types' if prop_name in trace_type_node: dsts_node = trace_type_node[prop_name] for key in list(dsts_node): dsts_node[key] = self._process_dst_node_include(dsts_node[key]) # Make sure the trace type node is valid for the inclusion # processing stage. self._schema_validator.validate(trace_type_node, 'config/3/trace-type-pre-include') # process inclusions return self._process_node_include(trace_type_node, self._process_trace_type_node_include, process_children_include) # Processes the inclusions of the trace node `trace_node`, returning # the effective node. def _process_trace_node_include(self, trace_node: _MapNode) -> _MapNode: def process_children_include(trace_node: _MapNode): prop_name = 'type' if prop_name in trace_node: trace_node[prop_name] = self._process_trace_type_node_include(trace_node[prop_name]) # Make sure the trace node is valid for the inclusion processing # stage. self._schema_validator.validate(trace_node, 'config/3/trace-pre-include') # process inclusions return self._process_node_include(trace_node, self._process_trace_node_include, process_children_include) # Processes the inclusions of the configuration node, modifying it # during the process. def _process_config_includes(self): # Process inclusions in this order: # # 1. Clock type node and event record type nodes (the order # between those is not important). # # 2. Data stream type nodes. # # 3. Trace type node. # # 4. Trace node. # # This is because: # # * A trace node can include a trace type node, clock type # nodes, data stream type nodes, and event record type nodes. # # * A trace type node can include clock type nodes, data stream # type nodes, and event record type nodes. # # * A data stream type node can include event record type nodes. # # First, make sure the configuration node itself is valid for # the inclusion processing stage. self._schema_validator.validate(self.config_node, 'config/3/config-pre-include') # Process trace node inclusions. # # self._process_trace_node_include() returns a new (or the same) # trace node without any `$include` property in it, recursively. self.config_node['trace'] = self._process_trace_node_include(self.config_node['trace']) def _parse(self): # process configuration node inclusions self._process_config_includes() # Expand field type nodes. # # This process: # # 1. Replaces field type aliases with "effective" field type # nodes, recursively. # # After this step, the `$field-type-aliases` property of the # trace type node is gone. # # 2. Applies inheritance, following the `$inherit` properties. # # After this step, field type nodes do not contain `$inherit` # properties. # # This is done blindly, in that the process _doesn't_ validate # field type nodes at this point. self._expand_fts() # Substitute log level aliases. # # This process: # # 1. Replaces log level aliases in event record type nodes with # their numeric equivalents as found in the # `$log-level-aliases` property of the trace type node. # # 2. Removes the `$log-level-aliases` property from the trace # type node. self._sub_log_level_aliases() # At this point, the configuration node must be valid as an # effective configuration node. self._schema_validator.validate(self.config_node, 'config/3/config') # Set the trace byte order property key. self._set_trace_byte_order_prop_key() # Normalize properties. # # This process removes `None` properties and chooses specific # enumerators when aliases exist (for example, `big-endian` # instead of `be`). # # The goal of this is that, if the user then gets this parser's # `config_node` property, it has a normal and very readable # form. # # It also makes _create_config() easier to implement because it # doesn't need to check for `None` nodes or enumerator aliases. self._normalize_props() # Set the trace byte order. self._set_trace_byte_order() # Create a barectf configuration object from the configuration # node. self._create_config() @property def config(self) -> barectf_config.Configuration: return self._config @property def config_node(self) -> _MapNode: return typing.cast(barectf_config_parse_common._ConfigNodeV3, self._root_node).config_node barectf-3.1.2/barectf/include/000077500000000000000000000000001443101201700161455ustar00rootroot00000000000000barectf-3.1.2/barectf/include/2/000077500000000000000000000000001443101201700163065ustar00rootroot00000000000000barectf-3.1.2/barectf/include/2/lttng-ust-log-levels.yaml000066400000000000000000000007251443101201700232060ustar00rootroot00000000000000# Include this in a metadata object to have access to the LTTng-UST log # level aliases. # # Note that the values from 0 to 7 are compatible with syslog log # levels, although the debug severity in syslog is named `DEBUG_SYSTEM` # here. $log-levels: EMERG: 0 ALERT: 1 CRIT: 2 ERR: 3 WARNING: 4 NOTICE: 5 INFO: 6 DEBUG_SYSTEM: 7 DEBUG_PROGRAM: 8 DEBUG_PROCESS: 9 DEBUG_MODULE: 10 DEBUG_UNIT: 11 DEBUG_FUNCTION: 12 DEBUG_LINE: 13 DEBUG: 14 barectf-3.1.2/barectf/include/2/stdfloat.yaml000066400000000000000000000005631443101201700210160ustar00rootroot00000000000000# Include this in a metadata object to have access to basic real field # type aliases. type-aliases: # IEEE 754-2008 binary32 (single-precision) float: class: floating-point size: exp: 8 mant: 24 align: 32 # IEEE 754-2008 binary64 (double-precision) double: class: floating-point size: exp: 11 mant: 53 align: 64 barectf-3.1.2/barectf/include/2/stdint.yaml000066400000000000000000000044271443101201700205060ustar00rootroot00000000000000# Include this in a metadata object to have access to basic integer # field type aliases. type-aliases: # 8-bit unsigned integer, 8-bit aligned uint8: class: int size: 8 align: 8 byte: uint8 # 8-bit signed integer, 8-bit aligned int8: $inherit: uint8 signed: true # 16-bit unsigned integer, 16-bit aligned uint16: class: int size: 16 align: 16 word: uint16 # 16-bit signed integer, 16-bit aligned int16: $inherit: uint16 signed: true # 32-bit unsigned integer, 32-bit aligned uint32: class: int size: 32 align: 32 dword: uint32 # 32-bit signed integer, 32-bit aligned int32: $inherit: uint32 signed: true # 64-bit unsigned integer, 64-bit aligned uint64: class: int size: 64 align: 64 # 64-bit signed integer, 64-bit aligned int64: $inherit: uint64 signed: true # byte-packed 8-bit unsigned integer byte-packed-uint8: uint8 # byte-packed 8-bit signed integer byte-packed-int8: int8 # byte-packed 16-bit unsigned integer byte-packed-uint16: $inherit: uint16 align: 8 # byte-packed 16-bit signed integer byte-packed-int16: $inherit: int16 align: 8 # byte-packed 32-bit unsigned integer byte-packed-uint32: $inherit: uint32 align: 8 # byte-packed 32-bit signed integer byte-packed-int32: $inherit: int32 align: 8 # byte-packed 64-bit unsigned integer byte-packed-uint64: $inherit: uint64 align: 8 # byte-packed 64-bit signed integer byte-packed-int64: $inherit: int64 align: 8 # byte-packed 8-bit unsigned integer bit-packed-uint8: $inherit: uint8 align: 1 # bit-packed 8-bit signed integer bit-packed-int8: $inherit: int8 align: 1 # bit-packed 16-bit unsigned integer bit-packed-uint16: $inherit: uint16 align: 1 # bit-packed 16-bit signed integer bit-packed-int16: $inherit: int16 align: 1 # bit-packed 32-bit unsigned integer bit-packed-uint32: $inherit: uint32 align: 1 # bit-packed 32-bit signed integer bit-packed-int32: $inherit: int32 align: 1 # bit-packed 64-bit unsigned integer bit-packed-uint64: $inherit: uint64 align: 1 # bit-packed 64-bit signed integer bit-packed-int64: $inherit: int64 align: 1 barectf-3.1.2/barectf/include/2/stdmisc.yaml000066400000000000000000000005351443101201700206430ustar00rootroot00000000000000# Include this in a metadata object to have access to various, # uncategorized field type aliases. type-aliases: # UUID array uuid: class: array length: 16 element-type: class: int size: 8 # CTF magic number type ctf-magic: class: int size: 32 align: 32 # a simple string string: class: string barectf-3.1.2/barectf/include/2/trace-basic.yaml000066400000000000000000000012211443101201700213430ustar00rootroot00000000000000# Include this in a trace type object to get a default, basic trace type # object with a little-endian byte order. # # The packet header field type contains: # # * A 32-bit magic number unsigned integer field type. # * A UUID static array field type. # * An 8-bit data stream type ID unsigned integer field type. # # The trace type's UUID is automatically generated by barectf. byte-order: le uuid: auto packet-header-type: class: struct fields: magic: class: int size: 32 align: 32 uuid: class: array length: 16 element-type: class: int size: 8 stream_id: class: int size: 8 barectf-3.1.2/barectf/include/3/000077500000000000000000000000001443101201700163075ustar00rootroot00000000000000barectf-3.1.2/barectf/include/3/lttng-ust-log-levels.yaml000066400000000000000000000007361443101201700232110ustar00rootroot00000000000000# Include this in a trace type object to have access to the LTTng-UST # log level aliases. # # Note that the values from 0 to 7 are compatible with syslog log # levels, although the debug severity in syslog is named `DEBUG_SYSTEM` # here. $log-level-aliases: EMERG: 0 ALERT: 1 CRIT: 2 ERR: 3 WARNING: 4 NOTICE: 5 INFO: 6 DEBUG_SYSTEM: 7 DEBUG_PROGRAM: 8 DEBUG_PROCESS: 9 DEBUG_MODULE: 10 DEBUG_UNIT: 11 DEBUG_FUNCTION: 12 DEBUG_LINE: 13 DEBUG: 14 barectf-3.1.2/barectf/include/3/stdint.yaml000066400000000000000000000061211443101201700205000ustar00rootroot00000000000000# Include this in a trace type object to have access to basic integer # type aliases. $field-type-aliases: # 8-bit unsigned integer, 8-bit aligned uint8: class: uint size: 8 alignment: 8 byte: uint8 # 8-bit signed integer, 8-bit aligned sint8: class: sint size: 8 alignment: 8 int8: sint8 # 16-bit unsigned integer, 16-bit aligned uint16: class: uint size: 16 alignment: 16 word: uint16 # 16-bit signed integer, 16-bit aligned sint16: class: sint size: 16 alignment: 16 int16: sint16 # 32-bit unsigned integer, 32-bit aligned uint32: class: uint size: 32 alignment: 32 dword: uint32 # 32-bit signed integer, 32-bit aligned sint32: class: sint size: 32 alignment: 32 int32: sint32 # 64-bit unsigned integer, 64-bit aligned uint64: class: uint size: 64 alignment: 64 qword: uint64 # 64-bit signed integer, 64-bit aligned sint64: class: sint size: 64 alignment: 64 int64: sint64 # byte-packed 8-bit unsigned integer byte-packed-uint8: uint8 byte-packed-byte: byte-packed-uint8 # byte-packed 8-bit signed integer byte-packed-sint8: sint8 byte-packed-int8: byte-packed-sint8 # byte-packed 16-bit unsigned integer byte-packed-uint16: $inherit: uint16 alignment: 8 byte-packed-word: byte-packed-uint16 # byte-packed 16-bit signed integer byte-packed-sint16: $inherit: sint16 alignment: 8 byte-packed-int16: byte-packed-sint16 # byte-packed 32-bit unsigned integer byte-packed-uint32: $inherit: uint32 alignment: 8 byte-packed-dword: byte-packed-uint32 # byte-packed 32-bit signed integer byte-packed-sint32: $inherit: sint32 alignment: 8 byte-packed-int32: byte-packed-sint32 # byte-packed 64-bit unsigned integer byte-packed-uint64: $inherit: uint64 alignment: 8 byte-packed-qword: byte-packed-uint64 # byte-packed 64-bit signed integer byte-packed-sint64: $inherit: sint64 alignment: 8 byte-packed-int64: byte-packed-sint64 # byte-packed 8-bit unsigned integer bit-packed-uint8: $inherit: uint8 alignment: 1 bit-packed-byte: bit-packed-uint8 # bit-packed 8-bit signed integer bit-packed-sint8: $inherit: sint8 alignment: 1 bit-packed-int8: bit-packed-sint8 # bit-packed 16-bit unsigned integer bit-packed-uint16: $inherit: uint16 alignment: 1 bit-packed-word: bit-packed-uint16 # bit-packed 16-bit signed integer bit-packed-sint16: $inherit: sint16 alignment: 1 bit-packed-int16: bit-packed-sint16 # bit-packed 32-bit unsigned integer bit-packed-uint32: $inherit: uint32 alignment: 1 bit-packed-dword: bit-packed-uint32 # bit-packed 32-bit signed integer bit-packed-sint32: $inherit: sint32 alignment: 1 bit-packed-int32: bit-packed-sint32 # bit-packed 64-bit unsigned integer bit-packed-uint64: $inherit: uint64 alignment: 1 bit-packed-qword: bit-packed-uint64 # bit-packed 64-bit signed integer bit-packed-sint64: $inherit: sint64 alignment: 1 bit-packed-int64: bit-packed-sint64 barectf-3.1.2/barectf/include/3/stdmisc.yaml000066400000000000000000000002711443101201700206410ustar00rootroot00000000000000# Include this in a trace type object to have access to various, # uncategorized field type aliases. $field-type-aliases: # a simple string string: class: string str: string barectf-3.1.2/barectf/include/3/stdreal.yaml000066400000000000000000000014211443101201700206270ustar00rootroot00000000000000# Include this in a trace type object to have access to basic real field # type aliases. $field-type-aliases: # IEEE 754-2008 binary32 (single-precision) float: class: real size: 32 alignment: 32 # IEEE 754-2008 binary64 (double-precision) double: class: real size: 64 alignment: 64 # byte-packed IEEE 754-2008 binary32 (single-precision) byte-packed-float: $inherit: float alignment: 8 # byte-packed IEEE 754-2008 binary64 (double-precision) byte-packed-double: $inherit: double alignment: 8 # bit-packed IEEE 754-2008 binary32 (single-precision) bit-packed-float: $inherit: float alignment: 1 # bit-packed IEEE 754-2008 binary64 (double-precision) bit-packed-double: $inherit: double alignment: 1 barectf-3.1.2/barectf/schemas/000077500000000000000000000000001443101201700161455ustar00rootroot00000000000000barectf-3.1.2/barectf/schemas/config/000077500000000000000000000000001443101201700174125ustar00rootroot00000000000000barectf-3.1.2/barectf/schemas/config/2/000077500000000000000000000000001443101201700175535ustar00rootroot00000000000000barectf-3.1.2/barectf/schemas/config/2/clock-type-pre-include.yaml000066400000000000000000000026021443101201700247160ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/2/clock-type-pre-include.json title: Clock type object before inclusions type: object properties: $include: $ref: https://barectf.org/schemas/config/2/include-prop.json barectf-3.1.2/barectf/schemas/config/2/config-min.yaml000066400000000000000000000026101443101201700224640ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/2/config-min.json title: Minimal configuration object type: object properties: version: type: string enum: - '2.0' - '2.1' - '2.2' required: - version barectf-3.1.2/barectf/schemas/config/2/config-pre-field-type-expansion.yaml000066400000000000000000000073101443101201700265330ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/2/config-pre-field-type-expansion.json title: Configuration object before field type expansions definitions: partial-ft: title: Partial field type object if: type: object then: oneOf: - properties: class: type: string required: - class - properties: inherit: type: string required: - inherit - properties: $inherit: type: string required: - $inherit properties: value-type: $ref: '#/definitions/partial-ft' element-type: $ref: '#/definitions/partial-ft' fields: if: type: object then: patternProperties: '.*': $ref: '#/definitions/partial-ft' else: type: 'null' else: oneOf: - type: string - type: 'null' type: object properties: metadata: title: Metadata object before field type expansions type: object properties: type-aliases: title: Field type aliases object before field type expansions if: type: object then: patternProperties: '.*': $ref: '#/definitions/partial-ft' else: type: 'null' trace: title: Trace type object before field type expansions type: object properties: packet-header-type: $ref: '#/definitions/partial-ft' streams: title: Data stream types object before field type expansions type: object patternProperties: '.*': title: Data stream type object before field type expansions type: object properties: packet-context-type: $ref: '#/definitions/partial-ft' event-header-type: $ref: '#/definitions/partial-ft' event-context-type: $ref: '#/definitions/partial-ft' events: type: object patternProperties: '.*': type: object properties: context-type: $ref: '#/definitions/partial-ft' payload-type: $ref: '#/definitions/partial-ft' required: - events required: - trace - streams required: - metadata barectf-3.1.2/barectf/schemas/config/2/config-pre-include.yaml000066400000000000000000000026401443101201700241130ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/2/config-pre-include.json title: Configuration object before inclusions type: object properties: metadata: $ref: https://barectf.org/schemas/config/2/metadata-pre-include.json required: - metadata barectf-3.1.2/barectf/schemas/config/2/config.yaml000066400000000000000000000224451443101201700217130ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/2/config.json title: Effective configuration object definitions: opt-struct-ft: if: type: object then: $ref: https://barectf.org/schemas/config/2/field-type.json#/definitions/struct-ft else: type: 'null' uint-ft: allOf: - $ref: https://barectf.org/schemas/config/2/field-type.json#/definitions/int-ft - properties: signed: const: false uint-ft-ts: allOf: - $ref: '#/definitions/uint-ft' - properties: property-mappings: type: array required: - property-mappings packet-header-ft-prop: allOf: - $ref: '#/definitions/opt-struct-ft' - if: type: object properties: fields: type: object then: properties: fields: properties: magic: allOf: - $ref: '#/definitions/uint-ft' - properties: size: const: 32 uuid: allOf: - $ref: https://barectf.org/schemas/config/2/field-type.json#/definitions/array-ft - properties: length: const: 16 element-type: allOf: - $ref: https://barectf.org/schemas/config/2/field-type.json#/definitions/int-ft - properties: size: const: 8 signed: const: false align: enum: - 1 - 2 - 4 - 8 stream_id: $ref: '#/definitions/uint-ft' stream_instance_id: $ref: '#/definitions/uint-ft' trace-type: title: Trace type object type: object properties: byte-order: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/byte-order-prop uuid: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-trace-type-uuid-prop packet-header-type: $ref: '#/definitions/packet-header-ft-prop' required: - byte-order additionalProperties: false clock-type: title: Clock type object type: object oneOf: - required: - $return-ctype - required: - return-ctype - allOf: - not: required: - $return-ctype - not: required: - return-ctype properties: uuid: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-uuid-prop description: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-string freq: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-1 error-cycles: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-0 offset: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-clock-type-offset-prop absolute: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-bool return-ctype: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-string $return-ctype: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-string additionalProperties: false $default-stream: if: type: string then: pattern: '^[A-Za-z_][A-Za-z0-9_]*$' else: type: 'null' packet-context-ft-prop: allOf: - $ref: https://barectf.org/schemas/config/2/field-type.json#/definitions/struct-ft - properties: fields: properties: packet_size: $ref: '#/definitions/uint-ft' content_size: $ref: '#/definitions/uint-ft' events_discarded: $ref: '#/definitions/uint-ft' packet_seq_num: $ref: '#/definitions/uint-ft' timestamp_begin: $ref: '#/definitions/uint-ft-ts' timestamp_end: $ref: '#/definitions/uint-ft-ts' required: - packet_size - content_size dependencies: timestamp_begin: - timestamp_end timestamp_end: - timestamp_begin required: - fields event-header-ft-prop: allOf: - $ref: '#/definitions/opt-struct-ft' - if: type: object properties: fields: type: object then: properties: fields: properties: id: $ref: '#/definitions/uint-ft' timestamp: $ref: '#/definitions/uint-ft-ts' dst: title: Data stream type object type: object properties: $default: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-bool packet-context-type: $ref: '#/definitions/packet-context-ft-prop' event-header-type: $ref: '#/definitions/event-header-ft-prop' event-context-type: $ref: '#/definitions/opt-struct-ft' events: title: Event record types object type: object patternProperties: '^[A-Za-z_][A-Za-z0-9_]*$': $ref: '#/definitions/ert' additionalProperties: false minProperties: 1 required: - packet-context-type - events additionalProperties: false ert: title: Event record type object type: object properties: log-level: if: type: integer then: minimum: 0 else: oneOf: - type: string - type: 'null' context-type: $ref: '#/definitions/opt-struct-ft' payload-type: $ref: '#/definitions/opt-struct-ft' additionalProperties: false type: object properties: version: type: string enum: - '2.0' - '2.1' - '2.2' prefix: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/config-prefix-prop options: title: Configuration options object type: object properties: gen-prefix-def: type: boolean gen-default-stream-def: type: boolean additionalProperties: false metadata: title: Metadata object type: object oneOf: - required: - $log-levels - required: - log-levels - allOf: - not: required: - $log-levels - not: required: - log-levels properties: log-levels: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-log-level-aliases-prop $log-levels: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-log-level-aliases-prop trace: $ref: '#/definitions/trace-type' env: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-env-prop clocks: title: Clock types object type: object patternProperties: '^[A-Za-z_][A-Za-z0-9_]*$': $ref: '#/definitions/clock-type' additionalProperties: false $default-stream: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-string streams: title: Data stream types object type: object patternProperties: '^[A-Za-z_][A-Za-z0-9_]*$': $ref: '#/definitions/dst' additionalProperties: false minProperties: 1 required: - trace - streams additionalProperties: false required: - version - metadata additionalProperties: false barectf-3.1.2/barectf/schemas/config/2/dst-pre-include.yaml000066400000000000000000000030761443101201700234440ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/2/dst-pre-include.json title: Data stream type object before inclusions type: object properties: $include: $ref: https://barectf.org/schemas/config/2/include-prop.json events: title: Event record types object before inclusions type: object patternProperties: '.*': $ref: https://barectf.org/schemas/config/2/ert-pre-include.json barectf-3.1.2/barectf/schemas/config/2/ert-pre-include.yaml000066400000000000000000000026021443101201700234360ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/2/ert-pre-include.json title: Event record type object before inclusions type: object properties: $include: $ref: https://barectf.org/schemas/config/2/include-prop.json barectf-3.1.2/barectf/schemas/config/2/field-type.yaml000066400000000000000000000204101443101201700224760ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/2/field-type.json title: Effective field type object definitions: opt-encoding-prop: title: Encoding property value if: type: string then: enum: - utf8 - UTF8 - utf-8 - UTF-8 - Utf-8 - ascii - Ascii - ASCII - none - None - NONE else: type: 'null' int-ft-class-prop: type: string enum: - int - integer int-ft: title: Integer field type object type: object properties: class: $ref: '#/definitions/int-ft-class-prop' size: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/int-ft-size-prop signed: oneOf: - type: boolean - type: 'null' align: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-1 byte-order: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-byte-order-prop base: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-ft-preferred-display-base-prop encoding: $ref: '#/definitions/opt-encoding-prop' property-mappings: if: type: array then: items: type: object properties: type: type: string const: clock name: type: string pattern: '^[A-Za-z_][A-Za-z0-9_]*$' property: type: string const: value required: - type - name - property additionalProperties: false minItems: 1 maxItems: 1 else: type: 'null' required: - class - size additionalProperties: false real-ft-class-prop: type: string enum: - flt - float - floating-point real-ft: title: Real field type object type: object properties: class: $ref: '#/definitions/real-ft-class-prop' size: type: object properties: exp: type: integer mant: type: integer oneOf: - properties: exp: const: 8 mant: const: 24 - properties: exp: const: 11 mant: const: 53 required: - exp - mant additionalProperties: false align: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-1 byte-order: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-byte-order-prop required: - class - size additionalProperties: false enum-ft-class-prop: type: string enum: - enum - enumeration enum-ft: title: Enumeration field type object type: object properties: class: $ref: '#/definitions/enum-ft-class-prop' value-type: $ref: '#/definitions/int-ft' members: type: array minItems: 1 items: if: type: object then: properties: label: type: string value: if: type: array then: items: type: integer minItems: 2 maxItems: 2 else: type: integer additionalProperties: false required: - label - value else: type: string required: - class - value-type additionalProperties: false string-ft-class-prop: type: string enum: - str - string string-ft: title: String field type object type: object properties: class: $ref: '#/definitions/string-ft-class-prop' encoding: $ref: '#/definitions/opt-encoding-prop' required: - class additionalProperties: false array-ft-class-prop: type: string const: array array-ft: title: Static array field type object type: object properties: class: $ref: '#/definitions/array-ft-class-prop' element-type: $ref: '#/definitions/ft' length: if: type: integer then: minimum: 0 else: type: string const: dynamic required: - class - element-type - length additionalProperties: false struct-ft-class-prop: type: string enum: - struct - structure struct-ft: title: Structure field type object type: object properties: class: $ref: '#/definitions/struct-ft-class-prop' min-align: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-1 fields: if: type: object then: patternProperties: '^[A-Za-z_][A-Za-z0-9_]*$': $ref: '#/definitions/ft' additionalProperties: false else: type: 'null' required: - class additionalProperties: false ft: type: object properties: class: # This is used to make sure that the field type's class name is # valid as any of the conditionals below can fail. # # Although we could use `oneOf` instead of this enumeration here # and refer to each of the `*-ft-class-prop` definitions, it # would be hard for the validator to show something useful for # the user as all cases would fail. # # Using `enum` below makes the validator show a very clear # validation failure message. enum: - int - integer - flt - float - floating-point - enum - enumeration - str - string - array - struct - structure allOf: - if: properties: class: $ref: '#/definitions/int-ft-class-prop' then: $ref: '#/definitions/int-ft' - if: properties: class: $ref: '#/definitions/real-ft-class-prop' then: $ref: '#/definitions/real-ft' - if: properties: class: $ref: '#/definitions/enum-ft-class-prop' then: $ref: '#/definitions/enum-ft' - if: properties: class: $ref: '#/definitions/string-ft-class-prop' then: $ref: '#/definitions/string-ft' - if: properties: class: $ref: '#/definitions/array-ft-class-prop' then: $ref: '#/definitions/array-ft' - if: properties: class: $ref: '#/definitions/struct-ft-class-prop' then: $ref: '#/definitions/struct-ft' required: - class $ref: '#/definitions/ft' barectf-3.1.2/barectf/schemas/config/2/include-prop.yaml000066400000000000000000000025341443101201700230440ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/2/include-prop.json title: Inclusion property value if: type: array then: items: type: string minItems: 1 else: type: string barectf-3.1.2/barectf/schemas/config/2/metadata-pre-include.yaml000066400000000000000000000035141443101201700244270ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/2/metadata-pre-include.json title: Metadata object before inclusions type: object properties: $include: $ref: https://barectf.org/schemas/config/2/include-prop.json clocks: title: Clock types object before inclusions type: object patternProperties: '.*': $ref: https://barectf.org/schemas/config/2/clock-type-pre-include.json trace: $ref: https://barectf.org/schemas/config/2/trace-type-pre-include.json streams: title: Data stream types object before inclusions type: object patternProperties: '.*': $ref: https://barectf.org/schemas/config/2/dst-pre-include.json barectf-3.1.2/barectf/schemas/config/2/trace-type-pre-include.yaml000066400000000000000000000026021443101201700247210ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/2/trace-type-pre-include.json title: Trace type object before inclusions type: object properties: $include: $ref: https://barectf.org/schemas/config/2/include-prop.json barectf-3.1.2/barectf/schemas/config/3/000077500000000000000000000000001443101201700175545ustar00rootroot00000000000000barectf-3.1.2/barectf/schemas/config/3/clock-type-pre-include.yaml000066400000000000000000000026021443101201700247170ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/3/clock-type-pre-include.json title: Clock type object before inclusions type: object properties: $include: $ref: https://barectf.org/schemas/config/3/include-prop.json barectf-3.1.2/barectf/schemas/config/3/config-pre-field-type-expansion.yaml000066400000000000000000000151131443101201700265340ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/3/config-pre-field-type-expansion.json title: Configuration object before field type expansions definitions: partial-ft: title: Partial field type object if: type: object then: oneOf: - properties: class: type: string required: - class - properties: $inherit: type: string required: - $inherit properties: element-field-type: $ref: '#/definitions/partial-ft' members: if: type: array then: items: type: object patternProperties: '^[A-Za-z_][A-Za-z0-9_]*$': if: type: object then: properties: field-type: $ref: '#/definitions/partial-ft' required: - field-type else: type: string minProperties: 1 maxProperties: 1 else: type: 'null' else: oneOf: - type: string - type: boolean - type: 'null' type: object properties: trace: title: Trace object before field type expansions type: object properties: type: title: Trace type object before field type expansions type: object properties: $field-type-aliases: title: Field type aliases object before field type expansions if: type: object then: patternProperties: '.*': $ref: '#/definitions/partial-ft' else: type: 'null' $features: if: type: object then: properties: magic-field-type: $ref: '#/definitions/partial-ft' uuid-field-type: $ref: '#/definitions/partial-ft' data-stream-type-id-field-type: $ref: '#/definitions/partial-ft' else: type: 'null' data-stream-types: title: Data stream types object before field type expansions type: object patternProperties: '.*': title: Data stream type object before field type expansions type: object properties: $features: if: type: object then: properties: packet: if: type: object then: properties: total-size-field-type: $ref: '#/definitions/partial-ft' content-size-field-type: $ref: '#/definitions/partial-ft' beginning-timestamp-field-type: $ref: '#/definitions/partial-ft' end-timestamp-field-type: $ref: '#/definitions/partial-ft' discarded-event-records-counter-snapshot-field-type: $ref: '#/definitions/partial-ft' sequence-number-field-type: $ref: '#/definitions/partial-ft' else: type: 'null' event-record: if: type: object then: properties: type-id-field-type: $ref: '#/definitions/partial-ft' timestamp-field-type: $ref: '#/definitions/partial-ft' else: type: 'null' else: type: 'null' packet-context-field-type-extra-members: if: type: array then: items: type: object properties: field-type: $ref: '#/definitions/partial-ft' else: type: 'null' event-record-common-context-field-type: $ref: '#/definitions/partial-ft' event-record-types: title: Event record types object before field type expansions type: object patternProperties: '.*': title: Event record type object before field type expansions type: object properties: specific-context-field-type: $ref: '#/definitions/partial-ft' payload-field-type: $ref: '#/definitions/partial-ft' required: - event-record-types required: - data-stream-types required: - type required: - trace barectf-3.1.2/barectf/schemas/config/3/config-pre-include.yaml000066400000000000000000000026271443101201700241210ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/3/config-pre-include.json title: Configuration object before inclusions type: object properties: trace: $ref: https://barectf.org/schemas/config/3/trace-pre-include.json required: - trace barectf-3.1.2/barectf/schemas/config/3/config-pre-log-level-alias-sub.yaml000066400000000000000000000053361443101201700262420ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/3/config-pre-log-level-alias-sub.json title: Configuration object before log level alias substitutions type: object properties: trace: title: Trace object before log level alias substitutions type: object properties: type: title: Trace type object before log level alias substitutions type: object properties: $log-level-aliases: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-log-level-aliases-prop data-stream-types: title: Data stream types object before log level alias substitutions type: object patternProperties: '.*': title: Data stream type object before log level alias substitutions type: object properties: event-record-types: title: Event record types object before log level alias substitutions type: object patternProperties: '.*': title: Event record type object before log level alias substitutions type: object properties: log-level: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-log-level-or-alias-prop required: - event-record-types required: - data-stream-types required: - type required: - trace barectf-3.1.2/barectf/schemas/config/3/config.yaml000066400000000000000000000244751443101201700217210ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/3/config.json title: Effective configuration object definitions: feature-uint-ft: type: object allOf: - properties: class: enum: - uint - unsigned-int - unsigned-integer - uenum - unsigned-enum - unsigned-enumeration - if: properties: class: $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/uint-ft-class-prop then: $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/uint-ft - if: properties: class: $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/uenum-ft-class-prop then: $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/uenum-ft opt-or-def-feature-uint-ft: if: type: object then: $ref: '#/definitions/feature-uint-ft' else: oneOf: - type: boolean - type: 'null' opt-feature-uint-ft: if: type: object then: $ref: '#/definitions/feature-uint-ft' else: if: type: boolean then: const: true else: type: 'null' opt-struct-ft: if: type: object then: $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/struct-ft else: type: 'null' trace: title: Trace object type: object properties: type: $ref: '#/definitions/trace-type' environment: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-env-prop required: - type trace-type: title: Trace type object type: object properties: native-byte-order: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/byte-order-prop trace-byte-order: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/byte-order-prop uuid: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-trace-type-uuid-prop $features: if: type: object then: properties: magic-field-type: allOf: - $ref: '#/definitions/opt-or-def-feature-uint-ft' - if: type: object then: properties: size: const: 32 uuid-field-type: if: type: object then: allOf: - $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/static-array-ft - properties: length: const: 16 element-field-type: allOf: - $ref: '#/definitions/feature-uint-ft' - properties: size: const: 8 alignment: if: type: integer then: const: 8 else: oneOf: - type: boolean - type: 'null' data-stream-type-id-field-type: $ref: '#/definitions/opt-or-def-feature-uint-ft' additionalProperties: false else: type: 'null' clock-types: title: Clock types object type: object patternProperties: '^[A-Za-z_][A-Za-z0-9_]*$': $ref: '#/definitions/clock-type' additionalProperties: false data-stream-types: title: Data stream types object type: object patternProperties: '^[A-Za-z_][A-Za-z0-9_]*$': $ref: '#/definitions/dst' additionalProperties: false minProperties: 1 required: - data-stream-types oneOf: - required: - trace-byte-order - required: - native-byte-order additionalProperties: false clock-type: title: Clock type object type: object properties: uuid: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-uuid-prop description: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-string frequency: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-1 precision: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-0 offset: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-clock-type-offset-prop origin-is-unix-epoch: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-bool $c-type: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-string additionalProperties: false dst: title: Data stream type object type: object properties: $is-default: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-bool $default-clock-type-name: if: type: string then: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/iden-prop else: type: 'null' $features: if: type: object then: properties: packet: if: type: object then: properties: total-size-field-type: $ref: '#/definitions/opt-feature-uint-ft' content-size-field-type: $ref: '#/definitions/opt-feature-uint-ft' beginning-timestamp-field-type: $ref: '#/definitions/opt-or-def-feature-uint-ft' end-timestamp-field-type: $ref: '#/definitions/opt-or-def-feature-uint-ft' discarded-event-records-counter-snapshot-field-type: $ref: '#/definitions/opt-or-def-feature-uint-ft' sequence-number-field-type: $ref: '#/definitions/opt-or-def-feature-uint-ft' additionalProperties: false else: type: 'null' event-record: if: type: object then: properties: type-id-field-type: $ref: '#/definitions/opt-or-def-feature-uint-ft' timestamp-field-type: $ref: '#/definitions/opt-or-def-feature-uint-ft' additionalProperties: false else: type: 'null' additionalProperties: false else: type: 'null' packet-context-field-type-extra-members: if: type: array then: $ref: https://barectf.org/schemas/config/3/field-type.json#/definitions/struct-ft-members else: type: 'null' event-record-common-context-field-type: $ref: '#/definitions/opt-struct-ft' event-record-types: title: Event record types object type: object patternProperties: '^[A-Za-z_][A-Za-z0-9_]*$': $ref: '#/definitions/ert' additionalProperties: false minProperties: 1 required: - event-record-types additionalProperties: false ert: title: Event record type object type: object properties: log-level: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-0 specific-context-field-type: $ref: '#/definitions/opt-struct-ft' payload-field-type: $ref: '#/definitions/opt-struct-ft' additionalProperties: false type: object properties: options: title: Configuration options object type: object properties: code-generation: title: Code generation configuration options object type: object properties: prefix: if: type: string then: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/config-prefix-prop else: type: object properties: identifier: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/iden-prop file-name: type: string required: - identifier - file-name additionalProperties: false header: title: Header code generation configuration options object type: object properties: identifier-prefix-definition: type: boolean default-data-stream-type-name-definition: type: boolean additionalProperties: false additionalProperties: false additionalProperties: false trace: $ref: '#/definitions/trace' required: - trace additionalProperties: false barectf-3.1.2/barectf/schemas/config/3/dst-pre-include.yaml000066400000000000000000000031121443101201700234340ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/3/dst-pre-include.json title: Data stream type object before inclusions type: object properties: $include: $ref: https://barectf.org/schemas/config/3/include-prop.json event-record-types: title: Event record types object before inclusions type: object patternProperties: '.*': $ref: https://barectf.org/schemas/config/3/ert-pre-include.json barectf-3.1.2/barectf/schemas/config/3/ert-pre-include.yaml000066400000000000000000000026021443101201700234370ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/3/ert-pre-include.json title: Event record type object before inclusions type: object properties: $include: $ref: https://barectf.org/schemas/config/3/include-prop.json barectf-3.1.2/barectf/schemas/config/3/field-type.yaml000066400000000000000000000235451443101201700225130ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/3/field-type.json title: Effective field type object definitions: ft-base: type: object required: - class bit-array-ft: allOf: - $ref: '#/definitions/ft-base' - properties: size: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/int-ft-size-prop alignment: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-1 required: - size int-ft-props: properties: class: true size: true alignment: true preferred-display-base: true additionalProperties: false int-ft: allOf: - $ref: '#/definitions/bit-array-ft' - properties: preferred-display-base: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-ft-preferred-display-base-prop uint-ft-class-prop: type: string enum: - uint - unsigned-int - unsigned-integer uint-ft: title: Unsigned integer field type object allOf: - $ref: '#/definitions/int-ft' - $ref: '#/definitions/int-ft-props' - properties: class: $ref: '#/definitions/uint-ft-class-prop' sint-ft-class-prop: type: string enum: - sint - signed-int - signed-integer sint-ft: title: Signed integer field type object allOf: - $ref: '#/definitions/int-ft' - $ref: '#/definitions/int-ft-props' - properties: class: $ref: '#/definitions/sint-ft-class-prop' enum-ft-props: properties: class: true size: true alignment: true preferred-display-base: true mappings: true additionalProperties: false enum-ft: properties: class: true size: true alignment: true preferred-display-base: true mappings: if: type: object then: patternProperties: '.*': type: array minItems: 1 items: if: type: array then: items: type: integer minItems: 2 maxItems: 2 else: type: integer minProperties: 1 else: type: 'null' additionalProperties: false required: - mappings uenum-ft-class-prop: type: string enum: - uenum - unsigned-enum - unsigned-enumeration uenum-ft: title: Unsigned enumeration field type object allOf: - $ref: '#/definitions/int-ft' - $ref: '#/definitions/enum-ft' - $ref: '#/definitions/enum-ft-props' - properties: class: $ref: '#/definitions/uenum-ft-class-prop' senum-ft-class-prop: type: string enum: - senum - signed-enum - signed-enumeration senum-ft: title: Signed enumeration field type object allOf: - $ref: '#/definitions/int-ft' - $ref: '#/definitions/enum-ft' - $ref: '#/definitions/enum-ft-props' - properties: class: $ref: '#/definitions/senum-ft-class-prop' real-ft-class-prop: type: string const: real real-ft: title: Real field type object allOf: - $ref: '#/definitions/bit-array-ft' - properties: class: $ref: '#/definitions/real-ft-class-prop' size: enum: - 32 - 64 properties: class: true size: true alignment: true additionalProperties: false string-ft-class-prop: type: string enum: - str - string string-ft: title: String field type object allOf: - $ref: '#/definitions/ft-base' - properties: class: $ref: '#/definitions/string-ft-class-prop' properties: class: true additionalProperties: false array-ft: title: Array field type object allOf: - $ref: '#/definitions/ft-base' - properties: element-field-type: $ref: '#/definitions/ft' required: - element-field-type static-array-ft-class-prop: type: string const: static-array static-array-ft: title: Static array field type object allOf: - $ref: '#/definitions/array-ft' - properties: class: $ref: '#/definitions/static-array-ft-class-prop' length: type: integer minimum: 0 properties: class: true element-field-type: true length: true additionalProperties: false dynamic-array-ft-class-prop: type: string const: dynamic-array dynamic-array-ft-class-prop: title: Dynamic array field type object allOf: - $ref: '#/definitions/array-ft' - properties: class: $ref: '#/definitions/dynamic-array-ft-class-prop' properties: class: true element-field-type: true additionalProperties: false struct-ft-class-prop: type: string enum: - struct - structure struct-ft-member: type: object properties: field-type: $ref: '#/definitions/ft' required: - field-type additionalProperties: false struct-ft-members: type: array items: type: object patternProperties: '^[A-Za-z_][A-Za-z0-9_]*$': $ref: '#/definitions/struct-ft-member' minProperties: 1 maxProperties: 1 struct-ft: title: Structure field type object allOf: - $ref: '#/definitions/ft-base' - properties: class: $ref: '#/definitions/struct-ft-class-prop' minimum-alignment: $ref: https://barectf.org/schemas/config/common/common.json#/definitions/opt-int-min-1 members: if: type: array then: $ref: '#/definitions/struct-ft-members' else: type: 'null' properties: class: true minimum-alignment: true members: true additionalProperties: false ft: allOf: - $ref: '#/definitions/ft-base' - properties: # This is used to make sure that the field type's class name # is valid as any of the conditionals below can fail. # # Although we could use `oneOf` instead of this enumeration # here and refer to each of the `*-ft-class-prop` definitions, # it would be hard for the validator to show something useful # for the user as all cases would fail. # # Using `enum` below makes the validator show a very clear # validation failure message. class: enum: - uint - unsigned-int - unsigned-integer - sint - signed-int - signed-integer - uenum - unsigned-enum - unsigned-enumeration - senum - signed-enum - signed-enumeration - real - str - string - static-array - dynamic-array - struct - structure - if: properties: class: $ref: '#/definitions/uint-ft-class-prop' then: $ref: '#/definitions/uint-ft' - if: properties: class: $ref: '#/definitions/sint-ft-class-prop' then: $ref: '#/definitions/sint-ft' - if: properties: class: $ref: '#/definitions/uenum-ft-class-prop' then: $ref: '#/definitions/uenum-ft' - if: properties: class: $ref: '#/definitions/senum-ft-class-prop' then: $ref: '#/definitions/senum-ft' - if: properties: class: $ref: '#/definitions/real-ft-class-prop' then: $ref: '#/definitions/real-ft' - if: properties: class: $ref: '#/definitions/string-ft-class-prop' then: $ref: '#/definitions/string-ft' - if: properties: class: $ref: '#/definitions/static-array-ft-class-prop' then: $ref: '#/definitions/static-array-ft' - if: properties: class: $ref: '#/definitions/dynamic-array-ft-class-prop' then: $ref: '#/definitions/dynamic-array-ft' - if: properties: class: $ref: '#/definitions/struct-ft-class-prop' then: $ref: '#/definitions/struct-ft' required: - class $ref: '#/definitions/ft' barectf-3.1.2/barectf/schemas/config/3/include-prop.yaml000066400000000000000000000025341443101201700230450ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/3/include-prop.json title: Inclusion property value if: type: array then: items: type: string minItems: 1 else: type: string barectf-3.1.2/barectf/schemas/config/3/trace-pre-include.yaml000066400000000000000000000027131443101201700237460ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/3/trace-pre-include.json title: Trace object before inclusions type: object properties: $include: $ref: https://barectf.org/schemas/config/3/include-prop.json type: $ref: https://barectf.org/schemas/config/3/trace-type-pre-include.json barectf-3.1.2/barectf/schemas/config/3/trace-type-pre-include.yaml000066400000000000000000000034131443101201700247230ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/3/trace-type-pre-include.json title: Trace type object before inclusions type: object properties: $include: $ref: https://barectf.org/schemas/config/3/include-prop.json clock-types: title: Clock types object before inclusions type: object patternProperties: '.*': $ref: https://barectf.org/schemas/config/3/clock-type-pre-include.json data-stream-types: title: Data stream types object before inclusions type: object patternProperties: '.*': $ref: https://barectf.org/schemas/config/3/dst-pre-include.json barectf-3.1.2/barectf/schemas/config/common/000077500000000000000000000000001443101201700207025ustar00rootroot00000000000000barectf-3.1.2/barectf/schemas/config/common/common.yaml000066400000000000000000000102411443101201700230540ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $schema: http://json-schema.org/draft-07/schema# $id: https://barectf.org/schemas/config/common/common.json definitions: opt-bool: oneOf: - type: boolean - type: 'null' opt-string: oneOf: - type: string - type: 'null' opt-int-min-0: if: type: integer then: minimum: 0 else: type: 'null' opt-int-min-1: if: type: integer then: minimum: 1 else: type: 'null' opt-log-level-aliases-prop: title: Optional log level aliases object if: type: object then: patternProperties: '': $ref: '#/definitions/opt-int-min-0' else: type: 'null' byte-order-prop: title: Byte order property value type: string enum: - le - little - little-endian - be - big - big-endian opt-byte-order-prop: title: Optional byte order property value if: type: string then: $ref: '#/definitions/byte-order-prop' else: type: 'null' int-ft-size-prop: title: Integer field type's size property type: integer minimum: 1 maximum: 64 opt-int-ft-preferred-display-base-prop: if: type: string then: enum: - bin - binary - oct - octal - dec - decimal - hex - hexadecimal else: type: 'null' opt-uuid-prop: title: Optional UUID property value if: type: string then: pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' else: type: 'null' opt-trace-type-uuid-prop: title: Optional trace type UUID property value if: type: string then: oneOf: - $ref: '#/definitions/opt-uuid-prop' - type: string const: auto else: type: 'null' opt-clock-type-offset-prop: if: type: object then: properties: cycles: $ref: '#/definitions/opt-int-min-0' seconds: $ref: '#/definitions/opt-int-min-0' additionalProperties: false else: type: 'null' iden-prop: type: string allOf: - pattern: '^[A-Za-z_][A-Za-z0-9_]*$' - not: enum: - align - callsite - clock - enum - env - event - floating_point - integer - stream - string - struct - trace - typealias - typedef - variant config-prefix-prop: $ref: '#/definitions/iden-prop' opt-env-prop: title: Environment variables if: type: object then: patternProperties: '^[A-Za-z_][A-Za-z0-9_]*$': oneOf: - type: string - type: integer additionalProperties: false else: type: 'null' opt-log-level-or-alias-prop: title: Optional log level (integral or alias) property if: type: integer then: minimum: 0 else: oneOf: - type: string - type: 'null' barectf-3.1.2/barectf/template.py000066400000000000000000000060101443101201700167040ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import jinja2 import barectf.config as barectf_config import barectf.version as barectf_version from barectf.typing import Count from typing import Callable, Optional, Any, Mapping def _filt_indent_tab(text: str, count: Count = Count(1), indent_first: bool = False) -> str: in_lines = text.split('\n') out_lines = [] tab = '\t' for index, in_line in enumerate(in_lines): in_line = in_line.rstrip() if len(in_line) == 0 or (index == 0 and not indent_first): out_lines.append(in_line) continue out_lines.append(f'{tab * count}{in_line}') return '\n'.join(out_lines) def _filt_escape_dq(text: str) -> str: return text.replace('\\', '\\\\').replace('"', '\\"') _Filter = Callable[..., Any] _Filters = Mapping[str, _Filter] _Test = Callable[..., bool] _Tests = Mapping[str, _Test] class _Template: def __init__(self, name: str, is_file_template: bool = False, cfg: Optional[barectf_config.Configuration] = None, filters: Optional[_Filters] = None, tests: Optional[_Tests] = None): env = jinja2.Environment(trim_blocks=True, lstrip_blocks=True, loader=jinja2.PackageLoader('barectf', 'templates')) env.globals.update({ 'cfg': cfg, 'barectf_config': barectf_config, 'barectf_version': barectf_version, }) env.filters['indent_tab'] = _filt_indent_tab env.filters['escape_dq'] = _filt_escape_dq if filters is not None: env.filters.update(filters) if tests is not None: env.tests.update(tests) self._templ = env.get_template(name) self._is_file_template = is_file_template def render(self, **kwargs) -> str: text = self._templ.render(**kwargs) if self._is_file_template: text = text.strip() + '\n' return text barectf-3.1.2/barectf/templates/000077500000000000000000000000001443101201700165205ustar00rootroot00000000000000barectf-3.1.2/barectf/templates/c/000077500000000000000000000000001443101201700167425ustar00rootroot00000000000000barectf-3.1.2/barectf/templates/c/align-statements-comment.j2000066400000000000000000000025341443101201700241220ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% if op.names %} {% if op.names | length == 1 %} /* Align for {{ root_ft_prefix_names[op.top_name] }} structure */ {%- else %} /* Align for `{{ op.top_name }}` field */ {%- endif %} {% endif %} barectf-3.1.2/barectf/templates/c/barectf.c-macros.j2000066400000000000000000000047011443101201700223120ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'common.j2' as common %} {% set prefix = common.prefix %} {% set ucprefix = common.ucprefix %} {% set cg_opts = cfg.options.code_generation_options %} {# # Generates the preamble of the packet opening/closing functions for # the data stream type `dst`. #} {% macro open_close_func_preamble(dst, ts_feature) %} struct {{ prefix }}ctx * const ctx = &sctx->parent; {% if dst.default_clock_type and ts_feature %} const {{ cg_opts.clock_type_c_types[dst.default_clock_type] }} ts = ctx->use_cur_last_event_ts ? sctx->cur_last_event_ts : ctx->cbs.{{ dst.default_clock_type.name }}_clock_get_value(ctx->data); {% endif %} const int saved_in_tracing_section = ctx->in_tracing_section; {%- endmacro %} {# # Generates a list of function call parameters for the members of # the structure field type `ft`. # # Each parameter has the prefix `param_prefix`. # # The list always starts with a comma (if there's at least one member). # # Example: # # , cc_peer_id, sc_addr, p_msg_id, p_msg #} {% macro ft_call_params(param_prefix, ft, only_dyn=false) %} {% if ft %} {% for member_name, member in ft.members.items() %} {% if not only_dyn or member.field_type.size_is_dynamic or member.field_type._is_len %} , {{ param_prefix }}_{{ member_name }} {%- endif %} {% endfor %} {% endif %} {% endmacro %} barectf-3.1.2/barectf/templates/c/barectf.c.j2000066400000000000000000000375141443101201700210400ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'common.j2' as common %} {% import 'c/common.j2' as c_common %} {% import 'c/barectf.c-macros.j2' as macros %} {% set prefix = common.prefix %} {% set ucprefix = common.ucprefix %} {% set ctx_struct_name = c_common.ctx_struct_name %} {% set cg_opts = cfg.options.code_generation_options %} {% set const_params = true %} {% include 'license-header.j2' %} #include #include #include #include "{{ header_file_name }}" #include "{{ bitfield_header_file_name }}" #define _ALIGN(_at_var, _align) \ do { \ (_at_var) = ((_at_var) + ((_align) - 1)) & -(_align); \ } while (0) #ifdef __cplusplus # define _TO_VOID_PTR(_value) static_cast(_value) # define _FROM_VOID_PTR(_type, _value) static_cast<_type *>(_value) #else # define _TO_VOID_PTR(_value) ((void *) (_value)) # define _FROM_VOID_PTR(_type, _value) ((_type *) (_value)) #endif #define _BITS_TO_BYTES(_x) ((_x) >> 3) #define _BYTES_TO_BITS(_x) ((_x) << 3) union _f2u { float f; uint32_t u; }; union _d2u { double f; uint64_t u; }; uint32_t {{ prefix }}packet_size(const void * const vctx) { return _FROM_VOID_PTR(const struct {{ ctx_struct_name }}, vctx)->packet_size; } int {{ prefix }}packet_is_full(const void * const vctx) { const struct {{ ctx_struct_name }} * const ctx = _FROM_VOID_PTR(const struct {{ ctx_struct_name }}, vctx); return ctx->at == ctx->packet_size; } int {{ prefix }}packet_is_empty(const void * const vctx) { const struct {{ ctx_struct_name }} * const ctx = _FROM_VOID_PTR(const struct {{ ctx_struct_name }}, vctx); return ctx->at <= ctx->off_content; } uint32_t {{ prefix }}packet_events_discarded(const void * const vctx) { return _FROM_VOID_PTR(const struct {{ ctx_struct_name }}, vctx)->events_discarded; } uint32_t {{ prefix }}discarded_event_records_count(const void * const vctx) { return {{ prefix }}packet_events_discarded(vctx); } uint32_t {{ prefix }}packet_sequence_number(const void * const vctx) { return _FROM_VOID_PTR(const struct {{ ctx_struct_name }}, vctx)->sequence_number; } uint8_t *{{ prefix }}packet_buf(const void * const vctx) { return _FROM_VOID_PTR(const struct {{ ctx_struct_name }}, vctx)->buf; } uint8_t *{{ prefix }}packet_buf_addr(const void * const vctx) { return {{ prefix }}packet_buf(vctx); } uint32_t {{ prefix }}packet_buf_size(const void * const vctx) { const struct {{ ctx_struct_name }} * const ctx = _FROM_VOID_PTR(const struct {{ ctx_struct_name }}, vctx); return _BITS_TO_BYTES(ctx->packet_size); } void {{ prefix }}packet_set_buf(void * const vctx, uint8_t * const buf, const uint32_t buf_size) { struct {{ ctx_struct_name }} * const ctx = _FROM_VOID_PTR(struct {{ ctx_struct_name }}, vctx); ctx->buf = buf; if (ctx->at == ctx->packet_size) { /* Keep full packet state */ ctx->at = _BYTES_TO_BITS(buf_size); } ctx->packet_size = _BYTES_TO_BITS(buf_size); } int {{ prefix }}packet_is_open(const void * const vctx) { return _FROM_VOID_PTR(const struct {{ ctx_struct_name }}, vctx)->packet_is_open; } int {{ prefix }}is_in_tracing_section(const void * const vctx) { return _FROM_VOID_PTR(const struct {{ ctx_struct_name }}, vctx)->in_tracing_section; } volatile const int *{{ prefix }}is_in_tracing_section_ptr(const void * const vctx) { return &_FROM_VOID_PTR(const struct {{ ctx_struct_name }}, vctx)->in_tracing_section; } int {{ prefix }}is_tracing_enabled(const void * const vctx) { return _FROM_VOID_PTR(const struct {{ ctx_struct_name }}, vctx)->is_tracing_enabled; } void {{ prefix }}enable_tracing(void * const vctx, const int enable) { _FROM_VOID_PTR(struct {{ ctx_struct_name }}, vctx)->is_tracing_enabled = enable; } static void _write_c_str(struct {{ ctx_struct_name }} * const ctx, const char * const src) { const uint32_t sz = strlen(src) + 1; memcpy(&ctx->buf[_BITS_TO_BYTES(ctx->at)], src, sz); ctx->at += _BYTES_TO_BITS(sz); } static int _reserve_er_space(void * const vctx, const uint32_t er_size) { int ret; struct {{ ctx_struct_name }} * const ctx = _FROM_VOID_PTR(struct {{ ctx_struct_name }}, vctx); /* Event _cannot_ fit? */ if (er_size > (ctx->packet_size - ctx->off_content)) { goto no_space; } /* Packet is full? */ if ({{ prefix }}packet_is_full(ctx)) { /* Yes: is the back end full? */ if (ctx->cbs.is_backend_full(ctx->data)) { /* Yes: discard event record */ goto no_space; } /* Back-end is _not_ full: open new packet */ ctx->use_cur_last_event_ts = 1; ctx->cbs.open_packet(ctx->data); ctx->use_cur_last_event_ts = 0; } /* Event fits the current packet? */ if (er_size > (ctx->packet_size - ctx->at)) { /* No: close packet now */ ctx->use_cur_last_event_ts = 1; ctx->cbs.close_packet(ctx->data); ctx->use_cur_last_event_ts = 0; /* Is the back end full? */ if (ctx->cbs.is_backend_full(ctx->data)) { /* Yes: discard event record */ goto no_space; } /* Back-end is _not_ full: open new packet */ ctx->use_cur_last_event_ts = 1; ctx->cbs.open_packet(ctx->data); ctx->use_cur_last_event_ts = 0; assert(er_size <= (ctx->packet_size - ctx->at)); } ret = 1; goto end; no_space: ctx->events_discarded++; ret = 0; end: return ret; } static void _commit_er(void * const vctx) { struct {{ ctx_struct_name }} * const ctx = _FROM_VOID_PTR(struct {{ ctx_struct_name }}, vctx); /* Is the packet full? */ if ({{ prefix }}packet_is_full(ctx)) { /* Yes: close it now */ ctx->cbs.close_packet(ctx->data); } } {% include 'c/ctx-init-func-proto.j2' %} { struct {{ ctx_struct_name }} * const ctx = _FROM_VOID_PTR(struct {{ ctx_struct_name }}, vctx); ctx->cbs = cbs; ctx->data = data; ctx->buf = buf; ctx->packet_size = _BYTES_TO_BITS(buf_size); ctx->at = 0; ctx->events_discarded = 0; ctx->sequence_number = 0; ctx->packet_is_open = 0; ctx->in_tracing_section = 0; ctx->is_tracing_enabled = 1; ctx->use_cur_last_event_ts = 0; } {% for dst in cfg.trace.type.data_stream_types | sort %} {% set def_clk_type = dst.default_clock_type %} {% set sctx_name %}{{ prefix }}{{ dst.name }}{% endset %} {% set this_ds_ops = ds_ops[dst] %} {% include 'c/open-func-proto.j2' %} { {{ macros.open_close_func_preamble(dst, dst.features.packet_features.beginning_timestamp_field_type) | indent_tab }} /* * This function is either called by a tracing function, or * directly by the platform. * * If it's called by a tracing function, then * `ctx->in_tracing_section` is 1, so it's safe to open * the packet here (alter the packet), even if tracing was * disabled in the meantime because we're already in a tracing * section (which finishes at the end of the tracing function * call). * * If it's called directly by the platform, then if tracing is * disabled, we don't want to alter the packet, and return * immediately. */ if (!ctx->is_tracing_enabled && !saved_in_tracing_section) { ctx->in_tracing_section = 0; goto end; } /* We can alter the packet */ ctx->in_tracing_section = 1; /* Do not open a packet that is already open */ if (ctx->packet_is_open) { ctx->in_tracing_section = saved_in_tracing_section; goto end; } ctx->at = 0; {% set pkt_header_op = this_ds_ops.pkt_header_op %} {% if pkt_header_op %} {{ pkt_header_op.serialize_str(dst=dst) | indent_tab }} {% endif %} {{ this_ds_ops.pkt_ctx_op.serialize_str(dst=dst) | indent_tab }} /* Save content beginning's offset */ ctx->off_content = ctx->at; /* Mark current packet as open */ ctx->packet_is_open = 1; /* Not tracing anymore */ ctx->in_tracing_section = saved_in_tracing_section; end: return; } {% include 'c/close-func-proto.j2' %} { {{ macros.open_close_func_preamble(dst, dst.features.packet_features.end_timestamp_field_type) | indent_tab }} /* * This function is either called by a tracing function, or * directly by the platform. * * If it's called by a tracing function, then * `ctx->in_tracing_section` is 1, so it's safe to close * the packet here (alter the packet), even if tracing was * disabled in the meantime, because we're already in a tracing * section (which finishes at the end of the tracing function * call). * * If it's called directly by the platform, then if tracing is * disabled, we don't want to alter the packet, and return * immediately. */ if (!ctx->is_tracing_enabled && !saved_in_tracing_section) { ctx->in_tracing_section = 0; goto end; } /* We can alter the packet */ ctx->in_tracing_section = 1; /* Do not close a packet that is not open */ if (!ctx->packet_is_open) { ctx->in_tracing_section = saved_in_tracing_section; goto end; } /* Save content size */ ctx->content_size = ctx->at; {% set name = 'timestamp_end' %} {% if name in dst._pkt_ctx_ft.members %} {% set op = ds_op_pkt_ctx_op(dst, name) %} /* Go back to `timestamp_end` field offset */ ctx->at = sctx->off_{{ op | op_src_var_name }}; {% set src = 'ts' %} {% filter indent_tab(indent_first=true) %} {% include 'c/serialize-write-saved-int-statements.j2' %} {% endfilter %} {% endif %} {% set name = 'content_size' %} {% if name in dst._pkt_ctx_ft.members %} {% set op = ds_op_pkt_ctx_op(dst, name) %} /* Go back to `content_size` field offset */ ctx->at = sctx->off_{{ op | op_src_var_name }}; {% set src %}ctx->{{ name }}{% endset %} {% filter indent_tab(indent_first=true) %} {% include 'c/serialize-write-saved-int-statements.j2' %} {% endfilter %} {% endif %} {% set name = 'events_discarded' %} {% if name in dst._pkt_ctx_ft.members %} {% set op = ds_op_pkt_ctx_op(dst, name) %} /* Go back to `events_discarded` field offset */ ctx->at = sctx->off_{{ op | op_src_var_name }}; {% set src %}ctx->{{ name }}{% endset %} {% filter indent_tab(indent_first=true) %} {% include 'c/serialize-write-saved-int-statements.j2' %} {% endfilter %} {% endif %} /* Go back to end of packet */ ctx->at = ctx->packet_size; /* Mark packet as closed */ ctx->packet_is_open = 0; {% if 'packet_seq_num' in dst._pkt_ctx_ft.members %} /* Increment sequence number for next packet */ ctx->sequence_number++; {% endif %} /* Not tracing anymore */ ctx->in_tracing_section = saved_in_tracing_section; end: return; } {% if dst._er_header_ft %} static void _serialize_er_header_{{ dst.name }}(void * const vctx, const uint32_t ert_id) { struct {{ ctx_struct_name }} * const ctx = _FROM_VOID_PTR(struct {{ ctx_struct_name }}, vctx); {% if def_clk_type and dst.features.event_record_features.timestamp_field_type %} struct {{ sctx_name }}_ctx * const sctx = _FROM_VOID_PTR(struct {{ sctx_name }}_ctx, vctx); const {{ cg_opts.clock_type_c_types[def_clk_type] }} ts = sctx->cur_last_event_ts; {% endif %} {{ this_ds_ops.er_header_op.serialize_str(dst=dst) | indent_tab }} } {% endif %} {% if dst.event_record_common_context_field_type %} static void _serialize_er_common_ctx_{{ dst.name }}(void * const vctx{{ dst | serialize_er_common_ctx_func_params_str(const_params) }}) { struct {{ ctx_struct_name }} * const ctx = _FROM_VOID_PTR(struct {{ ctx_struct_name }}, vctx); {{ this_ds_ops.er_common_ctx_op.serialize_str(dst=dst) | indent_tab }} } {% endif %} {# internal serialization functions #} {% for ert in dst.event_record_types | sort %} static void _serialize_er_{{ dst.name }}_{{ ert.name }}(void * const vctx{{ (dst, ert) | trace_func_params_str(const_params) }}) { struct {{ ctx_struct_name }} * const ctx = _FROM_VOID_PTR(struct {{ ctx_struct_name }}, vctx); {% if dst._er_header_ft %} /* Serialize header */ _serialize_er_header_{{ dst.name }}(ctx, {{ ert.id }}); {% endif %} {% if dst.event_record_common_context_field_type %} /* Serialize common context */ {% set params = macros.ft_call_params(root_ft_prefixes.ERCC, dst.event_record_common_context_field_type) %} _serialize_er_common_ctx_{{ dst.name }}(ctx{{ params }}); {% endif %} {% set this_er_ops = this_ds_ops.er_ops[ert] %} {% if this_er_ops.spec_ctx_op %} {{ this_er_ops.spec_ctx_op.serialize_str(dst=dst, ert=ert) | indent_tab }} {% endif %} {% if this_er_ops.payload_op %} {{ this_er_ops.payload_op.serialize_str(dst=dst, ert=ert) | indent_tab }} {% endif %} } {% endfor %} {# internal size functions #} {% for ert in dst.event_record_types | sort %} {% set this_er_ops = this_ds_ops.er_ops[ert] %} static uint32_t _er_size_{{ dst.name }}_{{ ert.name }}(void * const vctx{{ (dst, ert) | trace_func_params_str(const_params, only_dyn=true) }}) { struct {{ ctx_struct_name }} * const ctx = _FROM_VOID_PTR(struct {{ ctx_struct_name }}, vctx); uint32_t at = ctx->at; {% if this_ds_ops.er_header_op %} {{ this_ds_ops.er_header_op.size_str(dst=dst) | indent_tab }} {% endif %} {% if this_ds_ops.er_common_ctx_op %} {{ this_ds_ops.er_common_ctx_op.size_str(dst=dst) | indent_tab }} {% endif %} {% if this_er_ops.spec_ctx_op %} {{ this_er_ops.spec_ctx_op.size_str(dst=dst, ert=ert) | indent_tab }} {% endif %} {% if this_er_ops.payload_op %} {{ this_er_ops.payload_op.size_str(dst=dst, ert=ert) | indent_tab }} {% endif %} return at - ctx->at; } {% endfor %} {# public tracing functions #} {% for ert in dst.event_record_types | sort %} {% include 'c/trace-func-proto.j2' %} { struct {{ ctx_struct_name }} * const ctx = &sctx->parent; uint32_t er_size; {% if def_clk_type %} /* Save timestamp */ sctx->cur_last_event_ts = ctx->cbs.{{ def_clk_type.name }}_clock_get_value(ctx->data); {% endif %} if (!ctx->is_tracing_enabled) { goto end; } /* We can alter the packet */ ctx->in_tracing_section = 1; /* Compute event record size */ {% set er_common_ctx_params = macros.ft_call_params(root_ft_prefixes.ERCC, dst.event_record_common_context_field_type, true) %} {% set spec_ctx_params = macros.ft_call_params(root_ft_prefixes.ERSC, ert.specific_context_field_type, true) %} {% set payload_params = macros.ft_call_params(root_ft_prefixes.ERP, ert.payload_field_type, true) %} {% set params %}{{ er_common_ctx_params }}{{ spec_ctx_params }}{{ payload_params }}{% endset %} er_size = _er_size_{{ dst.name }}_{{ ert.name }}(_TO_VOID_PTR(ctx){{ params }}); /* Is there enough space to serialize? */ if (!_reserve_er_space(_TO_VOID_PTR(ctx), er_size)) { /* no: forget this */ ctx->in_tracing_section = 0; goto end; } /* Serialize event record */ {% set er_common_ctx_params = macros.ft_call_params(root_ft_prefixes.ERCC, dst.event_record_common_context_field_type) %} {% set spec_ctx_params = macros.ft_call_params(root_ft_prefixes.ERSC, ert.specific_context_field_type) %} {% set payload_params = macros.ft_call_params(root_ft_prefixes.ERP, ert.payload_field_type) %} {% set params %}{{ er_common_ctx_params }}{{ spec_ctx_params }}{{ payload_params }}{% endset %} _serialize_er_{{ dst.name }}_{{ ert.name }}(_TO_VOID_PTR(ctx){{ params }}); /* Commit event record */ _commit_er(_TO_VOID_PTR(ctx)); /* Not tracing anymore */ ctx->in_tracing_section = 0; end: return; } {% if not loop.last %}{{ '\n' }}{% endif %} {% endfor %} {% endfor %} barectf-3.1.2/barectf/templates/c/barectf.h.j2000066400000000000000000000130741443101201700210400ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'common.j2' as common %} {% import 'c/common.j2' as c_common %} {% set prefix = common.prefix %} {% set ucprefix = common.ucprefix %} {% set trace_type = cfg.trace.type %} {% set cg_opts = cfg.options.code_generation_options %} {% set def_dst = cg_opts.default_data_stream_type %} {% set header_opts = cg_opts.header_options %} {% set const_params = false %} #ifndef _{{ ucprefix }}H #define _{{ ucprefix }}H {% include 'license-header.j2' %} #include #ifdef __cplusplus extern "C" { #endif {% if header_opts.identifier_prefix_definition %} /* Backward compatibility */ #define _BARECTF_PREFIX {{ prefix }} #define _BARECTF_IDENTIFIER_PREFIX {{ prefix }} {% endif %} {% if def_dst and header_opts.default_data_stream_type_name_definition %} /* Backward compatibility */ #define _BARECTF_DEFAULT_STREAM {{ def_dst.name }} #define _BARECTF_DEFAULT_DATA_STREAM_TYPE_NAME {{ def_dst.name }} {% endif %} {% if def_dst %} {% for ert in def_dst.event_record_types | sort %} #define {{ prefix }}trace_{{ ert.name }} {{ c_common.trace_func_name(def_dst, ert) }} {% endfor %} {% endif %} struct {{ prefix }}ctx; uint32_t {{ prefix }}packet_size(const void *vctx); int {{ prefix }}packet_is_full(const void *vctx); int {{ prefix }}packet_is_empty(const void *vctx); uint32_t {{ prefix }}packet_events_discarded(const void *vctx); uint32_t {{ prefix }}discarded_event_records_count(const void * const vctx); uint32_t {{ prefix }}packet_sequence_number(const void * const vctx); uint8_t *{{ prefix }}packet_buf(const void *vctx); uint8_t *{{ prefix }}packet_buf_addr(const void * const vctx); void {{ prefix }}packet_set_buf(void *vctx, uint8_t *buf, uint32_t buf_size); uint32_t {{ prefix }}packet_buf_size(const void *vctx); int {{ prefix }}packet_is_open(const void *vctx); int {{ prefix }}is_in_tracing_section(const void *vctx); volatile const int *{{ prefix }}is_in_tracing_section_ptr(const void *vctx); int {{ prefix }}is_tracing_enabled(const void *vctx); void {{ prefix }}enable_tracing(void *vctx, int enable); /* barectf platform callbacks */ struct {{ prefix }}platform_callbacks { {% set clk_types = trace_type.clock_types %} {% if clk_types %} /* Clock source callbacks */ {% for clk_type in clk_types | sort %} {{ cg_opts.clock_type_c_types[clk_type] }} (*{{ clk_type.name }}_clock_get_value)(void *); {% endfor %} {% endif %} /* Is the back end full? */ int (*is_backend_full)(void *); /* Open packet */ void (*open_packet)(void *); /* Close packet */ void (*close_packet)(void *); }; /* Common barectf context */ struct {{ prefix }}ctx { /* Platform callbacks */ struct {{ prefix }}platform_callbacks cbs; /* Platform data (passed to callbacks) */ void *data; /* Output buffer (will contain a CTF binary packet) */ uint8_t *buf; /* Packet's total size (bits) */ uint32_t packet_size; /* Packet's content size (bits) */ uint32_t content_size; /* Current position from beginning of packet (bits) */ uint32_t at; /* Size of packet header + context fields (content offset) */ uint32_t off_content; /* Discarded event records counter snapshot */ uint32_t events_discarded; /* Packet's sequence number */ uint32_t sequence_number; /* Current packet is open? */ int packet_is_open; /* In tracing code? */ volatile int in_tracing_section; /* Tracing is enabled? */ volatile int is_tracing_enabled; /* Use current/last event record timestamp when opening/closing packets */ int use_cur_last_event_ts; }; {% for dst in trace_type.data_stream_types | sort %} /* Context for data stream type `{{ dst.name }}` */ struct {{ prefix }}{{ dst.name }}_ctx { /* Parent */ struct {{ prefix }}ctx parent; /* Config-specific members follow */ {% if trace_type._pkt_header_ft %} {% for member_name in trace_type._pkt_header_ft.members %} uint32_t off_ph_{{ member_name }}; {% endfor %} {% endif %} {% for member_name in dst._pkt_ctx_ft.members %} uint32_t off_pc_{{ member_name }}; {% endfor %} {% if dst.default_clock_type %} {{ cg_opts.clock_type_c_types[dst.default_clock_type] }} cur_last_event_ts; {% endif %} }; {% endfor %} {% include 'c/ctx-init-func-proto.j2' %}; {% for dst in trace_type.data_stream_types | sort %} {% include 'c/open-func-proto.j2' %}; {% include 'c/close-func-proto.j2' %}; {% for ert in dst.event_record_types | sort %} {% include 'c/trace-func-proto.j2' %}; {% if not loop.last %}{{ '\n' }}{% endif %} {% endfor %} {% endfor %} #ifdef __cplusplus } #endif #endif /* _{{ ucprefix }}H */ barectf-3.1.2/barectf/templates/c/bitfield.h.j2000066400000000000000000000201571443101201700212140ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'common.j2' as common %} {% set ucprefix = common.ucprefix %} #ifndef _{{ ucprefix }}BITFIELD_H #define _{{ ucprefix }}BITFIELD_H #include /* * BabelTrace * * Bitfields read/write functions. * * Copyright (c) 2010-2020 Mathieu Desnoyers * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * {% include 'license-header-footer.j2' %} #include #ifdef __cplusplus # define _CAST_PTR(_type, _value) \ static_cast<_type>(static_cast(_value)) #else # define _CAST_PTR(_type, _value) ((void *) (_value)) #endif /* We can't shift a int from 32 bit, >> 32 and << 32 on int is undefined */ #define _bt_piecewise_rshift(_vtype, _v, _shift) \ do { \ unsigned long ___shift = (_shift); \ unsigned long sb = (___shift) / (sizeof(_v) * CHAR_BIT - 1); \ unsigned long final = (___shift) % (sizeof(_v) * CHAR_BIT - 1); \ \ for (; sb; sb--) \ _v >>= sizeof(_v) * CHAR_BIT - 1; \ _v >>= final; \ } while (0) /* * bt_bitfield_write - write integer to a bitfield in native endianness * * Save integer to the bitfield, which starts at the "start" bit, has "len" * bits. * The inside of a bitfield is from high bits to low bits. * Uses native endianness. * For unsigned "v", pad MSB with 0 if bitfield is larger than v. * For signed "v", sign-extend v if bitfield is larger than v. * * On little endian, bytes are placed from the less significant to the most * significant. Also, consecutive bitfields are placed from lower bits to higher * bits. * * On big endian, bytes are places from most significant to less significant. * Also, consecutive bitfields are placed from higher to lower bits. */ {% if cfg.trace.type.trace_byte_order == barectf_config.ByteOrder.LITTLE_ENDIAN %} /* Trace byte order: little-endian */ #define _bt_bitfield_write_le(_ptr, type, _start, _length, _vtype, _v) \ do { \ _vtype __v = (_v); \ type *__ptr = _CAST_PTR(type *, _ptr); \ unsigned long __start = (_start), __length = (_length); \ type mask, cmask; \ unsigned long ts = sizeof(type) * CHAR_BIT; /* type size */ \ unsigned long start_unit, end_unit, this_unit; \ unsigned long end, cshift; /* cshift is "complement shift" */ \ \ if (!__length) \ break; \ \ end = __start + __length; \ start_unit = __start / ts; \ end_unit = (end + (ts - 1)) / ts; \ \ /* Trim v high bits */ \ if (__length < sizeof(__v) * CHAR_BIT) \ __v &= ~((~(_vtype) 0) << __length); \ \ /* We can now append v with a simple "or", shift it piece-wise */ \ this_unit = start_unit; \ if (start_unit == end_unit - 1) { \ mask = ~((~(type) 0) << (__start % ts)); \ if (end % ts) \ mask |= (~(type) 0) << (end % ts); \ cmask = (type) __v << (__start % ts); \ cmask &= ~mask; \ __ptr[this_unit] &= mask; \ __ptr[this_unit] |= cmask; \ break; \ } \ if (__start % ts) { \ cshift = __start % ts; \ mask = ~((~(type) 0) << cshift); \ cmask = (type) __v << cshift; \ cmask &= ~mask; \ __ptr[this_unit] &= mask; \ __ptr[this_unit] |= cmask; \ _bt_piecewise_rshift(_vtype, __v, ts - cshift); \ __start += ts - cshift; \ this_unit++; \ } \ for (; this_unit < end_unit - 1; this_unit++) { \ __ptr[this_unit] = (type) __v; \ _bt_piecewise_rshift(_vtype, __v, ts); \ __start += ts; \ } \ if (end % ts) { \ mask = (~(type) 0) << (end % ts); \ cmask = (type) __v; \ cmask &= ~mask; \ __ptr[this_unit] &= mask; \ __ptr[this_unit] |= cmask; \ } else \ __ptr[this_unit] = (type) __v; \ } while (0) #define bt_bitfield_write_le(ptr, _start, _length, _vtype, _v) \ _bt_bitfield_write_le(ptr, uint8_t, _start, _length, _vtype, _v) {% else %} /* Trace byte order: big-endian */ #define _bt_bitfield_write_be(_ptr, type, _start, _length, _vtype, _v) \ do { \ _vtype __v = (_v); \ type *__ptr = _CAST_PTR(type *, _ptr); \ unsigned long __start = (_start), __length = (_length); \ type mask, cmask; \ unsigned long ts = sizeof(type) * CHAR_BIT; /* type size */ \ unsigned long start_unit, end_unit, this_unit; \ unsigned long end, cshift; /* cshift is "complement shift" */ \ \ if (!__length) \ break; \ \ end = __start + __length; \ start_unit = __start / ts; \ end_unit = (end + (ts - 1)) / ts; \ \ /* Trim v high bits */ \ if (__length < sizeof(__v) * CHAR_BIT) \ __v &= ~((~(_vtype) 0) << __length); \ \ /* We can now append v with a simple "or", shift it piece-wise */ \ this_unit = end_unit - 1; \ if (start_unit == end_unit - 1) { \ mask = ~((~(type) 0) << ((ts - (end % ts)) % ts)); \ if (__start % ts) \ mask |= (~((type) 0)) << (ts - (__start % ts)); \ cmask = (type) __v << ((ts - (end % ts)) % ts); \ cmask &= ~mask; \ __ptr[this_unit] &= mask; \ __ptr[this_unit] |= cmask; \ break; \ } \ if (end % ts) { \ cshift = end % ts; \ mask = ~((~(type) 0) << (ts - cshift)); \ cmask = (type) __v << (ts - cshift); \ cmask &= ~mask; \ __ptr[this_unit] &= mask; \ __ptr[this_unit] |= cmask; \ _bt_piecewise_rshift(_vtype, __v, cshift); \ end -= cshift; \ this_unit--; \ } \ for (; (long) this_unit >= (long) start_unit + 1; this_unit--) { \ __ptr[this_unit] = (type) __v; \ _bt_piecewise_rshift(_vtype, __v, ts); \ end -= ts; \ } \ if (__start % ts) { \ mask = (~(type) 0) << (ts - (__start % ts)); \ cmask = (type) __v; \ cmask &= ~mask; \ __ptr[this_unit] &= mask; \ __ptr[this_unit] |= cmask; \ } else \ __ptr[this_unit] = (type) __v; \ } while (0) #define bt_bitfield_write_be(ptr, _start, _length, _vtype, _v) \ _bt_bitfield_write_be(ptr, uint8_t, _start, _length, _vtype, _v) {% endif %} #endif /* _{{ ucprefix }}BITFIELD_H */ barectf-3.1.2/barectf/templates/c/close-func-proto.j2000066400000000000000000000026531443101201700224040ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'common.j2' as common %} {% import 'c/common.j2' as c_common %} /* Close packet for data stream type `{{ dst.name }}` */ void {{ common.prefix }}{{ dst.name }}_close_packet(struct {{ common.prefix }}{{ dst.name }}_ctx *{{ c_common.const_ptr_str(const_params) }}sctx) barectf-3.1.2/barectf/templates/c/common.j2000066400000000000000000000043511443101201700204720ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {# # Common variables and macros (for C templates). #} {% import 'common.j2' as common %} {# generic barectf context structure name #} {% set ctx_struct_name %}{{ common.prefix }}ctx{% endset %} {# # Generates the name of a tracing function for the data stream type # `dst` and the event record type `ert`. # # Example: # # barectf_my_stream_trace_my_event #} {% macro trace_func_name(dst, ert) %} {{ common.prefix }}{{ dst.name }}_trace_{{ ert.name }} {%- endmacro %} {# # Generates: # # If `is_const` is `true`: # The string ` const `. # # Otherwise: # An empty string. #} {% macro const_ptr_str(is_const) %} {{ ' const ' if is_const else '' }} {%- endmacro %} {# # Generates: # # If `is_const` is `true`: # The string `const `. # # Otherwise: # An empty string. #} {% macro const_str(is_const) %} {{ 'const ' if is_const else '' }} {%- endmacro %} {# # Generates the length variable name of the dynamic field type # operation `op`. #} {% macro dyn_array_ft_op_len_var_name(op) %} {{ op.names[0] }}_{{ op.ft._length_ft_member_name }} {%- endmacro %} barectf-3.1.2/barectf/templates/c/ctx-init-func-proto.j2000066400000000000000000000030031443101201700230240ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'common.j2' as common %} {% import 'c/common.j2' as c_common %} /* Initialize context */ void {{ common.prefix }}init(void *vctx, uint8_t *{{ c_common.const_ptr_str(const_params) }}buf, {{ c_common.const_str(const_params) }}uint32_t buf_size, const struct {{ common.prefix }}platform_callbacks cbs, void *{{ c_common.const_ptr_str(const_params) }}data) barectf-3.1.2/barectf/templates/c/func-proto-params.j2000066400000000000000000000025171443101201700225610ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% for param in params %} {% set c_type = param.ft | ft_c_type(const_params) | string %}, {{ c_type }}{{ ' ' if not c_type.endswith('*') }}{{ prefix }}_{{ param.name }} {%- endfor %} barectf-3.1.2/barectf/templates/c/open-func-proto.j2000066400000000000000000000027311443101201700222350ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'common.j2' as common %} {% import 'c/common.j2' as c_common %} /* Open packet for data stream type `{{ dst.name }}` */ void {{ common.prefix }}{{ dst.name }}_open_packet( struct {{ common.prefix }}{{ dst.name }}_ctx *{{ c_common.const_ptr_str(const_params) }}sctx{{ dst | open_func_params_str(const_params) }}) barectf-3.1.2/barectf/templates/c/serialize-align-statements.j2000066400000000000000000000023461443101201700244500ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% include 'c/align-statements-comment.j2' %} _ALIGN(ctx->at, {{ op.value }}); barectf-3.1.2/barectf/templates/c/serialize-write-array-statements.j2000066400000000000000000000030671443101201700256250ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'c/common.j2' as c_common %} {% set var_name = op.level | loop_var_name %} {% include 'c/serialize-write-statements-comment.j2' %} { uint32_t {{ var_name }}; for ({{ var_name }} = 0; {{ var_name }} < (uint32_t) {{ length_src }}; ++{{ var_name }}) { {% for subop in op.subops %} {{ subop.serialize_str(dst=dst, ert=ert) | indent_tab(2) }} {% if not loop.last %}{{ '\n' }}{% endif %} {% endfor %} } } barectf-3.1.2/barectf/templates/c/serialize-write-bit-array-statements.j2000066400000000000000000000040501443101201700263720ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'common.j2' as common %} {% set incr_at %}ctx->at += {{ op.ft.size }}{% endset %} {% if op.ft.alignment % 8 == 0 and op.ft.size in [8, 16, 32, 64] and cfg.trace.type.__class__ != barectf_config.TraceTypeWithUnknownNativeByteOrder %} {% set c_type %}uint{{ op.ft.size }}_t{% endset %} { const {{ c_type }} tmp_val = ({{ c_type }}) {{ src }}; memcpy(&ctx->buf[_BITS_TO_BYTES(ctx->at)], &tmp_val, sizeof(tmp_val)); {{ incr_at }}; } {%- else %} {% set bo = 'le' if cfg.trace.type.trace_byte_order == barectf_config.ByteOrder.LITTLE_ENDIAN else 'be' %} {% set c_type_non_const = c_type | replace('const ', '') %} {% set offset_in_byte = 'ctx->at % 8' if op.offset_in_byte == none else op.offset_in_byte %} bt_bitfield_write_{{ bo }}(&ctx->buf[_BITS_TO_BYTES(ctx->at)], {{ offset_in_byte }}, {{ op.ft.size }}, {{ c_type_non_const }}, ({{ c_type_non_const }}) {{ src }}); {{ incr_at }}; {%- endif %} barectf-3.1.2/barectf/templates/c/serialize-write-dst-id-statements.j2000066400000000000000000000024621443101201700256710ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% set c_type = op.ft | ft_c_type %} {% set src = dst.id %} /* Write data stream type ID field */ {% include 'c/serialize-write-bit-array-statements.j2' %} barectf-3.1.2/barectf/templates/c/serialize-write-dynamic-array-statements.j2000066400000000000000000000024641443101201700272470ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'c/common.j2' as c_common %} {% set length_src = c_common.dyn_array_ft_op_len_var_name(op) %} {% include 'c/serialize-write-array-statements.j2' %} barectf-3.1.2/barectf/templates/c/serialize-write-ert-id-statements.j2000066400000000000000000000024651443101201700256740ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% set c_type = op.ft | ft_c_type %} {% set src = 'ert_id' %} /* Write event record type ID field */ {% include 'c/serialize-write-bit-array-statements.j2' %} barectf-3.1.2/barectf/templates/c/serialize-write-int-statements.j2000066400000000000000000000025721443101201700253010ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'c/common.j2' as c_common %} {% set c_type = op.ft | ft_c_type %} {% set src = op | op_src_var_name %} {% include 'c/serialize-write-statements-comment.j2' %} {% include 'c/serialize-write-bit-array-statements.j2' %} barectf-3.1.2/barectf/templates/c/serialize-write-magic-statements.j2000066400000000000000000000024631443101201700255660ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% set c_type = op.ft | ft_c_type %} {% set src = '0xc1fc1fc1UL' %} /* Write magic number field */ {% include 'c/serialize-write-bit-array-statements.j2' %} barectf-3.1.2/barectf/templates/c/serialize-write-packet-size-statements.j2000066400000000000000000000024741443101201700267270ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% set c_type = op.ft | ft_c_type %} {% set src = 'ctx->packet_size' %} /* Write packet total size field */ {% include 'c/serialize-write-bit-array-statements.j2' %} barectf-3.1.2/barectf/templates/c/serialize-write-real-statements.j2000066400000000000000000000031721443101201700254270ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'c/common.j2' as c_common %} {% set union_name = 'f2u' if op.ft.size == 32 else 'd2u' %} {% set c_type = 'uint32_t' if op.ft.size == 32 else 'uint64_t' %} {% set src %}{{ union_name }}.u{% endset %} {% include 'c/serialize-write-statements-comment.j2' %} { union _{{ union_name }} {{ union_name }}; {{ union_name }}.f = {{ op | op_src_var_name }}; {% filter indent_tab(indent_first=true) %} {% include 'c/serialize-write-bit-array-statements.j2' %} {% endfilter %} } barectf-3.1.2/barectf/templates/c/serialize-write-saved-int-statements.j2000066400000000000000000000025251443101201700263770ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'c/common.j2' as c_common %} {% set c_type = op.ft | ft_c_type %} {% include 'c/serialize-write-statements-comment.j2' %} {% include 'c/serialize-write-bit-array-statements.j2' %} barectf-3.1.2/barectf/templates/c/serialize-write-seq-num-statements.j2000066400000000000000000000024601443101201700260700ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2022 Jon Lamb # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% set c_type = op.ft | ft_c_type %} {% set src = 'ctx->sequence_number' %} /* Write `packet_seq_num` field */ {% include 'c/serialize-write-bit-array-statements.j2' %} barectf-3.1.2/barectf/templates/c/serialize-write-skip-save-statements.j2000066400000000000000000000025101443101201700264010ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'c/common.j2' as c_common %} /* Do not write `{{ op.top_name }}` field; save its offset */ sctx->off_{{ op | op_src_var_name }} = ctx->at; ctx->at += {{ op.ft.size }}; barectf-3.1.2/barectf/templates/c/serialize-write-statements-comment.j2000066400000000000000000000022741443101201700261500ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} /* Write `{{ op.top_name }}` field */ barectf-3.1.2/barectf/templates/c/serialize-write-static-array-statements.j2000066400000000000000000000024001443101201700271000ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% set length_src %}{{ op.ft.length }}U{% endset %} {% include 'c/serialize-write-array-statements.j2' %} barectf-3.1.2/barectf/templates/c/serialize-write-string-statements.j2000066400000000000000000000024451443101201700260140ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'c/common.j2' as c_common %} {% include 'c/serialize-write-statements-comment.j2' %} _write_c_str(ctx, {{ op | op_src_var_name }}); barectf-3.1.2/barectf/templates/c/serialize-write-struct-statements.j2000066400000000000000000000027471443101201700260370ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% if op.names %} {% if op.names | length == 1 %} /* Write {{ root_ft_prefix_names[op.top_name] }} structure */ {% else %} /* Write `{{ op.top_name }}` field */ {% endif %} {% endif %} { {% for subop in op.subops %} {{ subop.serialize_str(dst=dst, ert=ert) | indent_tab }} {% if not loop.last %}{{ '\n' }}{% endif %} {% endfor %} } barectf-3.1.2/barectf/templates/c/serialize-write-timestamp-statements.j2000066400000000000000000000025341443101201700265100ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% set c_type = op.ft | ft_c_type %} {% set src = 'ts' %} /* Write {{ 'beginning ' if op.top_name == 'timestamp_begin' }}timestamp field */ {% include 'c/serialize-write-bit-array-statements.j2' %} barectf-3.1.2/barectf/templates/c/serialize-write-uuid-statements.j2000066400000000000000000000026321443101201700254520ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} /* Write UUID */ { static const uint8_t uuid[] = { {% for row in cfg.trace.type.uuid.bytes | batch(4) %} {{ row | join(', ') }}, {% endfor %} }; _ALIGN(ctx->at, 8); memcpy(&ctx->buf[_BITS_TO_BYTES(ctx->at)], uuid, 16); ctx->at += _BYTES_TO_BITS(16); } barectf-3.1.2/barectf/templates/c/size-align-statements.j2000066400000000000000000000023411443101201700234260ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% include 'c/align-statements-comment.j2' %} _ALIGN(at, {{ op.value }}); barectf-3.1.2/barectf/templates/c/size-write-array-statements.j2000066400000000000000000000030621443101201700246030ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'c/common.j2' as c_common %} {% set var_name = op.level | loop_var_name %} {% include 'c/serialize-write-statements-comment.j2' %} { uint32_t {{ var_name }}; for ({{ var_name }} = 0; {{ var_name }} < (uint32_t) {{ length_src }}; ++{{ var_name }}) { {% for subop in op.subops %} {{ subop.size_str(dst=dst, ert=ert) | indent_tab(2) }} {% if not loop.last %}{{ '\n' }}{% endif %} {% endfor %} } } barectf-3.1.2/barectf/templates/c/size-write-bit-array-statements.j2000066400000000000000000000023431443101201700253600ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} /* Add `{{ op.top_name }}` bit array field's size */ at += {{ op.ft.size }}; barectf-3.1.2/barectf/templates/c/size-write-dynamic-array-statements.j2000066400000000000000000000024571443101201700262340ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'c/common.j2' as c_common %} {% set length_src = c_common.dyn_array_ft_op_len_var_name(op) %} {% include 'c/size-write-array-statements.j2' %} barectf-3.1.2/barectf/templates/c/size-write-static-array-statements.j2000066400000000000000000000023731443101201700260740ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% set length_src %}{{ op.ft.length }}U{% endset %} {% include 'c/size-write-array-statements.j2' %} barectf-3.1.2/barectf/templates/c/size-write-string-statements.j2000066400000000000000000000024551443101201700250000ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'c/common.j2' as c_common %} /* Add `{{ op.top_name }}` string field's size */ at += _BYTES_TO_BITS(strlen({{ op | op_src_var_name }}) + 1); barectf-3.1.2/barectf/templates/c/size-write-struct-statements.j2000066400000000000000000000027621443101201700250170ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% if op.names %} {% if op.names | length == 1 %} /* Add {{ root_ft_prefix_names[op.top_name] }} structure size */ {% else %} /* Add `{{ op.top_name }}` structure field size */ {% endif %} {% endif %} { {% for subop in op.subops %} {{ subop.size_str(dst=dst, ert=ert) | indent_tab }} {% if not loop.last %}{{ '\n' }}{% endif %} {% endfor %} } barectf-3.1.2/barectf/templates/c/trace-func-proto.j2000066400000000000000000000030041443101201700223640ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'common.j2' as common %} {% import 'c/common.j2' as c_common %} /* Trace (data stream type `{{ dst.name }}`, event record type `{{ ert.name }}`) */ void {{ common.prefix }}{{ dst.name }}_trace_{{ ert.name }}(struct {{ common.prefix }}{{ dst.name }}_ctx *{{ c_common.const_ptr_str(const_params) }}sctx{{ (dst, ert) | trace_func_params_str(const_params) }}) barectf-3.1.2/barectf/templates/common.j2000066400000000000000000000027121443101201700202470ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {# # Common variables and macros (for any template). #} {# identifier prefix and its uppercase equivalent #} {% set prefix = cfg.options.code_generation_options.identifier_prefix %} {% set ucprefix = prefix | upper %} {# generation date #} {% set gen_date = cfg.trace.environment['barectf_gen_date'] %} barectf-3.1.2/barectf/templates/license-header-footer.j2000066400000000000000000000026541443101201700231300ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'common.j2' as common %} * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * The following code was generated by barectf v{{ barectf_version.__version__ }} * on {{ common.gen_date }}. * * For more details, see . */ barectf-3.1.2/barectf/templates/license-header.j2000066400000000000000000000045341443101201700216330ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} /* * The MIT License (MIT) * * Copyright (c) 2015-2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * {% include 'license-header-footer.j2' %} barectf-3.1.2/barectf/templates/metadata/000077500000000000000000000000001443101201700203005ustar00rootroot00000000000000barectf-3.1.2/barectf/templates/metadata/enum-ft.j2000066400000000000000000000027501443101201700221140ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} enum : {{ ft | int_ft_str }} { {% for label, mapping in ft.mappings.items() %} {% for rg in mapping.ranges %} {% if rg.lower == rg.upper %} {% set rg_str = rg.lower %} {% else %} {% set rg_str %}{{ rg.lower }} ... {{ rg.upper }}{% endset %} {% endif %} "{{ label | escape_dq }}" = {{ rg_str }}, {% endfor %} {% endfor %} } barectf-3.1.2/barectf/templates/metadata/int-ft.j2000066400000000000000000000026701443101201700217430ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} integer { signed = {{ 'true' if is_signed else 'false' }}; size = {{ ft.size }}; align = {{ ft.alignment }}; byte_order = native; base = {{ ft.preferred_display_base | disp_base_int }}; {% if ft._mapped_clk_type_name %} map = clock.{{ ft._mapped_clk_type_name }}.value; {% endif %} } barectf-3.1.2/barectf/templates/metadata/metadata.j2000066400000000000000000000072621443101201700223240ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} {% import 'common.j2' as common %} /* CTF 1.8 */ {% include 'license-header.j2' %} {# # Generates a root field type string named `name` for the field type # `rft` with all the lines except the first one indented with a single # tab. #} {% macro root_ft(name, rft) %} {{ name }} := {{ rft | ft_str }}; {%- endmacro %} trace { major = 1; minor = 8; byte_order = {{ 'le' if cfg.trace.type.trace_byte_order == barectf_config.ByteOrder.LITTLE_ENDIAN else 'be' }}; {% if cfg.trace.type.uuid %} uuid = "{{ cfg.trace.type.uuid }}"; {% endif %} {% if cfg.trace.type._pkt_header_ft %} {{ root_ft('packet.header', cfg.trace.type._pkt_header_ft) | indent_tab }} {% endif %} }; env { {% for name, value in cfg.trace.environment.items() %} {{ name }} = {{ value if value is number else '"{}"'.format(value | escape_dq) }}; {% endfor %} }; {# all clock types (data stream types's default clock types) #} {% for clk_type in cfg.trace.type.clock_types | sort %} clock { name = {{ clk_type.name }}; {% if clk_type.description %} description = "{{ clk_type.description | escape_dq }}"; {% endif %} {% if clk_type.uuid %} uuid = "{{ clk_type.uuid }}"; {% endif %} freq = {{ clk_type.frequency }}; precision = {{ clk_type.precision }}; offset_s = {{ clk_type.offset.seconds }}; offset = {{ clk_type.offset.cycles }}; absolute = {{ 'true' if clk_type.origin_is_unix_epoch else 'false' }}; }; {% endfor %} {# data stream types and their event record types #} {% for dst in cfg.trace.type.data_stream_types | sort %} /* Data stream type `{{ dst.name }}` */ stream { {% if cfg.trace.type.features.data_stream_type_id_field_type %} id = {{ dst.id }}; {% endif %} {{ root_ft('packet.context', dst._pkt_ctx_ft) | indent_tab }} {% if dst._er_header_ft %} {{ root_ft('event.header', dst._er_header_ft) | indent_tab }} {% endif %} {% if dst.event_record_common_context_field_type %} {{ root_ft('event.context', dst.event_record_common_context_field_type) | indent_tab }} {% endif %} }; {# data stream type's event record types #} {% for ert in dst.event_record_types | sort %} event { {% if cfg.trace.type.features.data_stream_type_id_field_type %} stream_id = {{ dst.id }}; {% endif %} id = {{ ert.id }}; name = "{{ ert.name }}"; {% if ert.log_level %} loglevel = {{ ert.log_level }}; {% endif %} {% if ert.specific_context_field_type %} {{ root_ft('context', ert.specific_context_field_type) | indent_tab }} {% endif %} {% if ert.payload_field_type %} {{ root_ft('fields', ert.payload_field_type) | indent_tab }} {% endif %} }; {% endfor %} {% endfor %} barectf-3.1.2/barectf/templates/metadata/real-ft.j2000066400000000000000000000024701443101201700220720ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} floating_point { mant_dig = {{ 24 if ft.size == 32 else 53 }}; exp_dig = {{ 8 if ft.size == 32 else 11 }}; align = {{ ft.alignment }}; byte_order = native; } barectf-3.1.2/barectf/templates/metadata/str-ft.j2000066400000000000000000000022631443101201700217570ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} string { encoding = UTF8; } barectf-3.1.2/barectf/templates/metadata/struct-ft.j2000066400000000000000000000026161443101201700224750ustar00rootroot00000000000000{# # The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} struct { {% for name, member in ft.members.items() %} {{ member.field_type | deepest_ft | ft_str | indent_tab }} {{ name }} {%- for len in member.field_type | ft_lengths %}[{{ len }}]{% endfor %}; {% endfor %} } align({{ ft.minimum_alignment }}) barectf-3.1.2/barectf/tsdl182gen.py000066400000000000000000000105361443101201700167740ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2015-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import barectf.config as barectf_config import barectf.template as barectf_template from typing import List, Optional, Union import typing def _filt_disp_base_int(disp_base: barectf_config.DisplayBase) -> int: return { barectf_config.DisplayBase.BINARY: 2, barectf_config.DisplayBase.OCTAL: 8, barectf_config.DisplayBase.DECIMAL: 10, barectf_config.DisplayBase.HEXADECIMAL: 16, }[disp_base] def _filt_int_ft_str(ft: barectf_config._FieldType) -> str: return _INT_FT_TEMPL.render(ft=ft, is_signed=isinstance(ft, barectf_config.SignedIntegerFieldType)) def _gen_enum_ft(ft: barectf_config._FieldType) -> str: return _ENUM_FT_TEMPL.render(ft=ft) def _gen_real_ft(ft: barectf_config._FieldType) -> str: return _REAL_FT_TEMPL.render(ft=ft) def _gen_str_ft(ft: barectf_config._FieldType) -> str: return _STR_FT_TEMPL.render(ft=ft) def _filt_ft_lengths(ft: barectf_config._FieldType) -> List[Union[str, int]]: lengths: List[Union[str, int]] = [] while isinstance(ft, barectf_config._ArrayFieldType): if type(ft) is barectf_config.StaticArrayFieldType: ft = typing.cast(barectf_config.StaticArrayFieldType, ft) lengths.append(ft.length) else: assert type(ft) is barectf_config.DynamicArrayFieldType ft = typing.cast(barectf_config.DynamicArrayFieldType, ft) lengths.append(typing.cast(str, ft._length_ft_member_name)) ft = ft.element_field_type return lengths def _filt_deepest_ft(ft: barectf_config._FieldType) -> barectf_config._FieldType: while isinstance(ft, barectf_config._ArrayFieldType): ft = ft.element_field_type return ft def _gen_struct_ft(ft: barectf_config._FieldType) -> str: return _STRUCT_FT_TEMPL.render(ft=ft) _FT_CLS_TO_GEN_FT_FUNC = { barectf_config.UnsignedIntegerFieldType: _filt_int_ft_str, barectf_config.SignedIntegerFieldType: _filt_int_ft_str, barectf_config.UnsignedEnumerationFieldType: _gen_enum_ft, barectf_config.SignedEnumerationFieldType: _gen_enum_ft, barectf_config.RealFieldType: _gen_real_ft, barectf_config.StringFieldType: _gen_str_ft, barectf_config.StructureFieldType: _gen_struct_ft, } def _filt_ft_str(ft: barectf_config._FieldType) -> str: return _FT_CLS_TO_GEN_FT_FUNC[type(ft)](ft) _TEMPL_FILTERS = { 'disp_base_int': _filt_disp_base_int, 'int_ft_str': _filt_int_ft_str, 'ft_str': _filt_ft_str, 'ft_lengths': _filt_ft_lengths, 'deepest_ft': _filt_deepest_ft, } def _create_template(name: str, is_file_template: bool = False, cfg: Optional[barectf_config.Configuration] = None) -> barectf_template._Template: return barectf_template._Template(f'metadata/{name}', is_file_template, cfg, typing.cast(barectf_template._Filters, _TEMPL_FILTERS)) _ENUM_FT_TEMPL = _create_template('enum-ft.j2') _INT_FT_TEMPL = _create_template('int-ft.j2') _REAL_FT_TEMPL = _create_template('real-ft.j2') _STR_FT_TEMPL = _create_template('str-ft.j2') _STRUCT_FT_TEMPL = _create_template('struct-ft.j2') def _from_config(cfg: barectf_config.Configuration) -> str: return _create_template('metadata.j2', True, cfg).render() barectf-3.1.2/barectf/typing.py000066400000000000000000000025631443101201700164140ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import typing Index = typing.NewType('Index', int) Count = typing.NewType('Count', int) Id = typing.NewType('Id', int) Alignment = typing.NewType('Alignment', int) VersionNumber = typing.NewType('VersionNumber', int) _OptStr = typing.Optional[str] barectf-3.1.2/barectf/version.py000066400000000000000000000024641443101201700165670ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2014-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. __major_version__ = 3 __minor_version__ = 1 __patch_version__ = 2 __pre_version__ = '' __version__ = f'{__major_version__}.{__minor_version__}.{__patch_version__}{__pre_version__}' barectf-3.1.2/docs/000077500000000000000000000000001443101201700140445ustar00rootroot00000000000000barectf-3.1.2/docs/antora.yml000066400000000000000000000002271443101201700160540ustar00rootroot00000000000000name: barectf title: barectf version: '3.1' asciidoc: attributes: req-abbr: 'Req?' nav: - modules/ROOT/nav.adoc barectf-3.1.2/docs/modules/000077500000000000000000000000001443101201700155145ustar00rootroot00000000000000barectf-3.1.2/docs/modules/ROOT/000077500000000000000000000000001443101201700162775ustar00rootroot00000000000000barectf-3.1.2/docs/modules/ROOT/images/000077500000000000000000000000001443101201700175445ustar00rootroot00000000000000barectf-3.1.2/docs/modules/ROOT/images/barectf-logo.svg000066400000000000000000000210631443101201700226330ustar00rootroot00000000000000barectf-logobarectf-3.1.2/docs/modules/ROOT/images/getting-started-trace-compass.png000066400000000000000000001471051443101201700261260ustar00rootroot00000000000000‰PNG  IHDR§ïÌΣsBIT|dˆ IDATxœìÝyXSWþ?ðwXd ‰D”Í…]lQ!еUÜÚ¯ЊVmµÚÖ·Q«U‡±ÓÎÆX}ꌭuÔŽV«ýiÝ*­:Õ¯îU@T´”]d$HHÎïJ¾²Ü°…ÏëyòŸ¯*'„BH­mTqP$ÝϬÝzAµ½¾¾2™²:dòzìþË4ÓEÙcHLLÄŒ3pøpC5cÆ œL˜0B¡gΜL&ÃÊ•+áçç{{{øûûcß¾}-Úܼy3áä䄈ˆäääd2V¯^ 8;;#&&‰Doíí푘˜ˆððp>|“'OÆäÉ“qøða„‡‡#11öööŽ!„b¾ ºC±/~†Ñ\³f ªªªðèÑ#8p@­lùòåøç?ÿ‰þóŸðõõE=àëë‹cÇŽÁÞÞĻヒáÇÃßß@C‚²ÿ~ìÛ·®®®¸téúôéX¶l ‘””™L†ùóçcíڵغu«ÎOž<©º3ŽêêjUYã]‹“'O=„Bˆ¹PûóåçϟǼyó´Vnºv˜äâOúS‹„B,cÞ¼yXºt©Î}}}}ñÉ'Ÿ`îܹ¨¯¯GïÞ½qêÔ)„……©Õ{þü9D"nÞ¼‰Àõë×1}útè111“'OVK&€Ïç«{èòÍ7ß **Jïq!„sЩÖPØÙÙµØVRR‚àêÕ«(--Eqq±ê"ÙÙÙ¨ªªBhhh‹ý222 T*­Zï —Ëñüùsƒã"„Bˆn'Í×P´%‰D‚°°0LŸ>ü1 €I“&©Ê+**J¥²Å¾ŽŽŽ€7nÀÅÅÅ ãêz¬Ñüq!„B:` E#¹\®·Nrr2ÊÊʰaÃÕ¶¦Ÿ®ðöö†R©Drr2^zé%µ}=<< püøq,X°À Ø&Ož¬z¬Ñøè€j[ãBÍæC!„îªC¾‡¢ÿþ¸térssu¾)»¹¹¡²²Û¶mCII öïß;wî¨ÊœœðÆo`éÒ¥HOOGUUŽ?‰Dkkk¬Y³qqq8{ö, òó󑜜¬7>©TªJ&ïT4Þ™hüô}1!„ò:d ÅܹsñßÿþƒFxx8Ž?®±ž¿¿?6lØ€O>ùë֭Ä ðꫯªÕÙµk–/_ŽW^y2™ C† Á‹/¾¬[·vvvX¶lòòòàââ‚5kÖh\sÑǃ½½½ÚÌÆ;”LB!ê:äSÝ}ʃBHwÒak(!„b>è¯B!Äh”PB!Äh”PB!Äh”PB!Äh”PB!Äh”PB!Äh”PB!Äh”PB!Ähõ6áîÇìè!„vA EÑõæ„Bˆ¹¡G„B1Z§L(j¤Úÿ¤9!Æ ¹¥Ÿ¹Ž‘¹ö«3¡1îÞ:eBA!„®… B!„ B!„ B!„ B!„ B!„ B!„ B!„Íì Iu5$Õôe+„BH[ê²Ëcßþ¨Ö‘( ŒaC†à»C‡óçΕUûw·¾¾J¥ÖÖÖàñxí~|bœŒGððÑ#”—•C&—C(À×ÛC‡cמo`mm…wÞ~»£ÃÔ«-cÕ5FG¾?†Ò²2ǃƒƒúº¹A,ßÞ2™ _³½D"¼9=Z­ÝKW®â—_Eä믣o_w“Ç­MÓ˜›[ðîüv¹Žp¹n˜ÃµE×Ü1•¶'s8¦Ôe þýQ[W()-EUUÜÝÜ`kk è%ÁÊÊ ½D"€Çƒ¥¥e‡Ä™xé2efbÆ´iprêÕ!1Ã)•Jœ>s¹yy°²²‚S¯†sWV^Žògå]ç`Èy xZR‚(zú3¦½Ñî1ÂcÀ€×özÓàrÝèÊ×–öüùjËqêÊç -tÙ„bô+/«þ}ñòeüú ¡!Ãàîæ¦VoÚÔ)í1wÒÒ›—‡ýûc\x8lmmŒ1(ŠŽ®s0dŒÆŽ[[Èd2|ÿ訨@Nn.ú÷ëסsÒ31=úù2O]6¡àjמo`ii‰ùsç¨þïåé kkkdçä€Çãap` <=zõê…ššZ$ߺ…ܼ|ÜÏszÆCäæåC$rDmm-Rn¥"/?ß :ºæh[0dŒšS*•¾½}[„f2/_ÆÙóT¯{¿üðõñ<~\ ª›—Ÿ;[[ôëëÎé\è:ŸÚ®Mi«ããíÕ[AËØ }׈¶žK\çΕk×p39è߯JËÊðßS§ñ¤¨H­^kDz­Î“®÷sgöw(4±éѳfL‡……’RRr+þbÌoQ>‚gxVQxÈËχǀþ˜0n,€†Ì6+;•••¨’TC©TB$!(0@-‹÷öòBVvÊŸ=CP@€ê›µµ5æ¾5[U¯òùs8xyùù‡†´*ÎÞNN{{;LŸö,,,™•…3çÎãÞý_àéáѶƒjFžW>NÌš1–––HN¹…ä[·ðäÉx èoÐyžýæ XXX õöÜHJBaáµßÄtÕ)++×9GM54*†ŒQ#ÆÊÊÊðëƒtXXX´x<ÙÙdçä¨ýß‚Çáëãë7n ÿñcˆCCPQY‰çUUˆòògœÎ…®ó©íºÑ”¶:>ÞÞ¸q3 …‡„ ò·Ø©ÖèºF´Ç\â2w$ÕÕøå×è%!ú©°°°À¯ÒqñòeܾsW•µv,¹ö³5mWV>×úž`îºeBÁ³°€…EÃÍç>Î Ûš,¶rvvÆ³Š ÔÕÖ¡¦¶›—íÿÙ©ÖNm]\]œÑK$Âã‚ü¿ïB$rİ!Cáçë£3†¢âbÜ»ÿ ŠŸ>Emm­ª½ÖÆÙÈÒÒJµOcQQYÉeXÈoø|@åó*½u---T/\\ÎQìÿ·¡ç¹±šßêr©ó¬âís´-2F°gß>Õ¿-,,ðRXzöì ™L`ÐñÛo-žŸ?w®Æ7=>Ÿ77W£®®ù¿ýÆêëëÃù\p9ç­!ЧOo<-)L&G^þc€—·ªŽ®kD{Ì%.s§¼¼Œ1ôë×O«¯7.^¾Œgju[3–myžZûž`ºeBÑ”…EË«UÓm·ä<ôÇȰ0µzXZZbFô4äæå!''™ÙÙ8wálmlп¿æçÕ•8~ò¿ =½DŽøöÀwFÅ©‰\^ áÖ;áαgOðx<”••¡¼¼½zq[½mÁS‚غó¬ÿ)dó:úæh[0tŒ¼<=Ñ£Gô áåå Ño¿öèÑVVV¨®–¶Ø§1댿áùùøàÉ“""/ÿ1àêâ‚Çõ ?s†œ .çÜ>ÞÞ())Å“'Oÿø1lmmT묚k~h¹Äeî4ÆÅ˜Rµ­þ·±µÖñ±]®cÙš~rmÛÚÚÚà÷sÑ-×PBä臢⧰µ±…cÏžªWÓ”yzx |ÌhÕs´Òò†Ï±7¾é7Íz‹‹ŸB¡P`@ÿþèëÞðQWS=Ÿ”Édªßú4üvÂõ ‘4°²²Âà  0ÆpöB"*›Ýái\ O[žç¦¸ÎQSÚÐ1óÊ+;f4† ¢J&õvr‚L&ÃýßÖ(@•D‚Çaooa'L(¼½¼aaaìœ\>y_Ÿ†;\Ï…>š®\ëøx5¬£ÈÉËCá“'ðòôT{3Ôu0Uüºp™;"QÃÉÍÍS­k¼ÛbèÇ35S{œ'mï æ¬ÛߡЇÏç#0 ÷ù ?þ??_H$ÕÉd˜8~JËÊðÓ©Óððð€­ Ò>¸87Üsêåà®^¿Ï2l(z .¿>H”””r~“Ò§®®GŽ%ÀÅÙ¹y ­†¿h’¶»“á¡!(**BIi)9ŠÞNN°±µAyY9ú÷ïðѯèm£-ÏsSúæ(ÐðYUUn&'chp0¬­­>®)ÆF ãÇ'qùê5dy™LŽðÑ£Ž³µ.^¾ÜâÍeì˜Ñ°´´„­­ úõí‹G™™`Œ©jr9\hºn4E[@ç>}ž‘¥R ï&;Ý×Sů—¹Ó¿_?ä?~Œ#ßCïÞ½‘“KKK Ó°HUMãÔ–çéYE…Î÷sFw(852 #Äbð,xH½}OŸ>U]c‰DÈÎÎÆ´4X[YaôË£T Îb Ÿ/$ ddàYE\]]2t(,,,ž‘>¼½{#*b2¼ûm»#dçäàQf¦Ú«é&__0Æàس§jQ4 ÿ\p¡éºaHoo(•JØØØ ¯»úâW}×Sį—¹3qüx ‚\.G^~>\]\ðÆ”(8öìiб´S['}ï æŒ———§ú 9þ<æÍ›×‘ñj¤Õ°³çwt]ή=ßÀÖÖoÏšÙÑ¡tZ4·ô3×12×~i’—Ÿÿž: ÿ~;fŒj{[_#ºÓ“–è!„˜™¬ì€§‡g‡ÆAºJ(!ÄŒ(•JdggÃÒÒýûõíèpH7B !„˜‘¼ü|ÔÉdè×·o‡ü…eÒ}Ñ Ò­ÐÜÒÏ\ÇÈ\ûÕ™Ðwot‡‚B!F£„‚B!F£„‚B!F£„‚B!F£„‚B!F£„‚B!FÓú!åiu{ÆÑéŽOÌÍ-ýÌuŒÌµ_ q÷¥5¡èÈÏ×Ëå°2ñ£! ¹Å…¹Ž‘¹ö«3¡1îÞ:å#¹\ÖÑ!3EsK?s#síWgBcܽuÊ„‚B!] %„B1%„B1šÉÿ]åþ—±ç¦¼½zÃÆÖ ýÜà9îϦ> !„B:“&•û_F}?,ùËÀÛŽÈx°žãLyB!„t6&{äјLô;Q*««AˆÇCÔÕÖ›ê„Bé¤L’P4O&>²ƒB*RZ…¬ìRS¢SØýÍ^ܹ{·£Ã fˆæ–~æ:FæÚ¯Î„Ƹ}P4M&à‡ì¡”J J ÍLÆüáeFI!„Î­Õ Å÷ÿšïÿ5gŠ|q!½á›ÑX]-Ò*(««P“™ëª,ô|ëŠÉ‚Õ¥¶®gΞÓ¢¢v9ž&gÏGn^^‡Ÿ´ š[ú™ë™k¿:cóѪE™ßÿk>ú¿´LÉ —×CV[‹½›và­÷þ ©5YÉíšLÜMKÃ…Ä‹0`D"‘j{VV6.^¾ŒÒ²28ðù4hÆŽ  á˜84wÓî¡ðÉD¿1^žž€›Éɸ}ûª««Ñ·o_¼6qzöì ÈÍÍCêí;()-…H$Âk' ¿~'''>ú=úùaüØpðù÷õåÄ4hnég®cd®ýêLhŒÍ‹Á Ec2Šzêe2ÈëäpüvnÙƒYá‚vK&ŠŠŠpúÌYÔÉê0%*žª²ÚÚZ9v ÆE`@ªª$¨¯—«íÿ¿gÏa¸q˜0~DŽŽ€ŸoÜÀ½_~ETÄdðùÈËχ½½½jŸg•xíÕ‰ …¸tù ¾OøK-„¥¥%† †¯7Î]¸€ÿÙ‰ð1£1tÈðx¼6 bZ4·ô3×12×~u&4ÆæÉ „âûÍä_Û ÷á !¯—C.“A^'ƒL&‡R¡l·dâʵk¸y3 £F½qH,,ÔŸÞTUI P(àëã[[[ØÚÚ¶hcô+/ãÅ«þ¯T*qõúϘõæ ¸ºº‚Ôöòâ‹pû­ì¥°H½}åÏž¡OïÞ@€©QQÈÍËÙ³çp'íÞŒžFoBsK?s#síWgBcl¾ ZC1¢wÞˆyÓ>XŒœ+[Q_+‡¼VŽz™ Y=”ŒµÛc™L KKØÙÚ¶˜Ð»·< ÀW»¾FÂÇ‘“›Û¢Žµ•z>UQY ™L¦štúôìÙÖÖÖËä-Ê\œÑ·¯;JKKQ[WDZW¤3 ¹¥Ÿ¹Ž‘¹ö«3¡16_œŠ‚}/Á}Útðø/cÖÚ}Ƚþä29ä²z(Š6 ³¥qáሊ˜Œ«×®ã›}ߢ¨Ù‚‡·fÍÄŒèi°´´ÄÑcÇpäûc:Û¬«­0Æ8Ç¡é–Ø»w±ý?;Q[[‡…¿[§^½8·G:Í-ýÌuŒÌµ_ ±ùâôÈ£y2Ñ€áÝ¿®Â—«>Eï€é(ºw+>ÿ±í"ÕÀÛË ¿{ÿ=\ûùgìýûñÂàÁ?6=zôPÕñ0 ¤d8þóõרª’@ pÐØž££#cxRT„~}ûOQQN9™L†©Íž ’®…æ–~æ:FæÚ¯Î„ÆØ~~~øüóϵ¶ehýêêjøúúâƒ>0ºÍÔÔTLœ8"‘/¿ü2.^¼Øê¸LÑžL&C\\<==áàà€‘#GâÂ… õüùs¬_¿!!! …èÛ·/.\ˆÊÊJNÇûÝï~×â6¾îܹ£³Ÿ†ª­­…T*5i›„ÀàÁƒñé§Ÿr®ßU碦¸Åb1víÚÕ&ÇëãZQQØØXÀÁÁ!!!HHHhÿ@òòòXãkÏž=¬3VKt–'''³1cư°~ýú±/¿üRU6{öl¶nÝ:&‘HT¯êêj­m骿ÿ~ÉΟ?ϲ³³ÙöíÛ™¥¥%;xð Æ¶ ­ÄB![±b…Öø¸´™žžÎÙ?ÿùO–Íþñ0;;;–ššÚª¸LÑÞþð6xð`véÒ%ö믿²U«V1>ŸÏ ZïÉ“'lÁ‚ìÂ… ¬  €]¾|™³·Þz‹Óñ¤R)«¨¨P{mÞ¼™ùûû·8–¾¹¥ÏG}ÄfÍšeT±cÔYuö~ýñd§OŸæ\¿3ÎE.c¬)îÐÐP¶sçÎ6‰ÉÆU—ÒÒRæííÍbbbØ7؃Øîݻٵk×Ú=–.™P,^¼˜mÙ²…ÕÕÕ± &¨%‘‘‘lÓ¦Mœ¥«¾B¡h±möìÙlΜ9F×?yò$‹Å,&&FgBÁ¥ÍE‹±¹sçªÕ™>}:{çwZÕS´ÄvìØ¡VÇËË‹%$$h|}}ظq#âããqðàAX[[cÉ’%n×îÛ·&L€P(Ä™3g4<öY½z5<<<àì쌘˜H$UÙÊ•+áçç{{{øûûcß¾}jqˆÅbüýï‡X,†@ @XXnݺ…Í›7#((B¡S§NEIII«úIZR*•X¿~=üýý!‰œœU¹X,Æúõë1bÄ888`È!¸r努\×9×§ùm]ÇÒ6õ¿¾¾qqqððð@ïÞ½ƒ"33“ÓþÚæ:WÚ†.и6×””­r###UûîÞ½ .4ä4´®x‡¢©æw(Äb1‰DÌÖÖ–yxx°˜˜V\\¬*ŠŠbñññœë7Ê>ûì3­íé«ÏcÑÑÑlãÆŒ±†»ºîPèkS*•2ì×_U«s÷î]€=þœs\¦lïòåËL$±Y³f±cÇŽ1±XÜâŽEsõõõìÙ³gìÔ©S, €}ûí·Zëj‹Ÿ1ÆÞÿ}6oÞ`YYY,== <˜-X°@gŸ en¿É7âÒ¯?ýéOlذaìîÝ»,33“M›6yyy±ºº:ÆXÃ93f KIIaÅÅÅ,66–¹ººªÊõs]šÿ–®ïX𿢾ã¯ZµŠ :”ݾ}›egg³ØØX€=zôˆÓþÚæº!c¬íghäÈ‘,))‰Æõ·q•Ë嬨¨HãëÙ³gŒ1ƪ««vïÞ=6wî\æêêÊ<== ºKoJf—P\»vedd°²²2vîÜ9ÌÂÂÂX}}½Æý ©ŸÀ„B!«¨¨à›¦ú{÷îe#GŽTÝÆ_¸p¡A Eó6³²²VXX¨V¯  €`ÙÙÙõÔí}ñÅÌÊÊŠYZZ²×^{•••éìÛŸÿüg€`'Ndë銿¢¢‚ÙÛÛ³ëׯkÜWßÜJKKc,77Wc¹¶‹á–-[Ô¶UVV2 ·õáÌ IDAT –œœ¬ÚvíÚ5æîî®õØ>>>lïÞ½jí6½¦¤¤0jëP6mÚÄ ¤³O†ê® Emm-³··WK % srrb‡fŒµ<'ÙÙÙª zkÎySšÞø´‹±–sQßñ¥R)³µµeIIIªòššÕ—ø5Íõ¦Lõȃƕ›‡2ìþçØXII ûþûïŸÏgGŽ1¸=cé¾ßÞ9RõïqãÆáèÑ£ðõõÅ;w0lذV×/,,ÄÂ… ±yófôìÙSošêçççcíÚµHLLÔx¿5m:99hxŒâææ¦ªÛø ggg½m4eªö/^ŒôôtÜ»w<ü1 „sçÎá…^ÐØ¿O>ù}ôrss±yóf„„„ -- œãß»w/üüü¦ñú`ìØ± BDD,X€ñãÇëÝÏÎÎNíÿP*•ˆŽŽÇÈår<þ\U§¤¤ÀÕ«WQZZŠââb«Ë555jÛ¸Þú%ºeeeA.—#$$DµÏç#,, <и§§'ø|>$ §snŒ¦ÇÒDßñ³²² P(Ô®kõ¸ìߨù\o 4®ÜôêÕ ðÎ;ï`Ö¬Y€7Þx±±±8t袣£ nÓ]r …!|||àèèˆüüüVׯ­­Å´iÓ0a¼ûî»zÛÐVÿ“O>Á“'OkkkX[[cÇŽøüóÏamm¯¾úÊà6…B!>|¨V?;;NNN°··7¨¦hïáÇضmöïß 8ß}÷F…¿þõ¯:ÇÎÒÒÞÞÞøâ‹/àããƒï¾ûΠø·oߎE‹é<†¾ãŸ={LJ ¦M›†©S§ÜŽ££#àÆÈÎÎFvv6?~Œªª* kwÂÂÂPPP€?þ ÖÙfÓ‹”®m¤ujkk¡P(P__¯¶ÝÆÆ¶¶¶Z÷k<úι)è:ßúŽ/—Ë¡P( P(Zµ{ëîãÊe E¯^½`kk WWWµ} „§OŸrë¼ ™}BñøñcTTTÀßß¿Uõëëëñæ›o‚ÏçcçÎz÷×Uÿ믿c r¹\õŠÅòåË!—Ëcp›…¨m;zô¨ZvjH?Œm¯¢¢Bc»ÁÁÁxöì™Îc7ecc£J`¸ÄéÒ%äååá­·Þâ| mÂÃñgÏ\½z?üð TeÚƒ6åáá@€ãÇk,ONNFYY6lØ€   J:˜¯¯/x<._¾¬Ú¦P(œœ¬õ®ZSúÎy[h:õßÇǧEÿšjÏø¹ü 5ê®ãŒ¢¢"¯¦ ¸_ýu9rDmß`àÀÏÌ*¡())ALL .]º„ÂÂB\¿~Ó§OGTT ˆŽŽÆÆ9ÕW*•˜;w.²³³ñí·ß¢¾¾ÕÕÕ¨®®c¬E{\êsah›«V­Â‰'°qãF`ÇŽ8räV¬XѪ¸Œm/88~~~˜9s&nÞ¼‰ÂÂBìß¿_}õÞ|óÍÇ»pá>üðC\¼x¹¹¹¸pá–.]ŠGá7Þàÿ¶mÛ0gÎÎcÝ\yy9vïÞ‚‚H¥R\¼x|>_õ(¨ÿþ¸térssQ]]­µkkk¬Y³qqq8{ö, òó󑜜 pssCee%¶mÛ†’’ìß¿ßä_ÂE #ðÞ{ïaÑ¢EHJJBqq1V¬Xggg¼úê«z÷×wÎM­ù\Ôw|@€yóæaáÂ…¸yó&ž>}Š¿ýíoí?ן¡öŽK[|5®VVVpqqÑøj¼ë+W®Äž={°}ûvŸy{{³íÛ·«Ê7lØÀúôéÃD"›1c‹ŽŽV+oÞnmm­ÚÊqÆ;uêëׯŸÎ>ª».Êd¬a1ݲeËXß¾}™³³3{ûí·Yii©ª\Ó¹vpp`?ÿü3cLÿ9×EßâÁæÇÒ4õ¿ººšÅÄİ>}ú0777¶jÕ*€eeeqÚ_ß÷Epc®?C4®ÜýôÓOlĈL 0±XÌΞ=Ûê¶ŒÁËËËSýŠwþüùVvß”j¤Õ°³çwtÄ ÑÜÒÏ\ÇÈ\ûeŒ¢¢"¸»»C*•ê\'ÂqSkWaV<!¤3JOO׺ÀŽÇã!>>¾CâJMM…O—}Ó£qí\Ìîc£„ÒÙøûû´Žª­ýôSÎõ»ê\Ô·X,Æ®]»ÚäxÝa\u]¯ÛS—L(RRRŽåË—£¦¦F­L"‘`ݺuH$ª×ýû÷µ¶¥«þ¡C‡pþüylذiiiøðñjÕ*:tHc[†Ö_¹r%JJJtö•K›7n^ýu¤¦¦bòäɘ4in߾ݪ¸LÑÞâÅ‹qÿþ}œ>}§NBNN"""töU׸|ñŨ¨¨P{mÞ¼þþþÖ[n*ñññxÿý÷MÖ!¦L™‚aÆq®ßUçb{ÇmîãªïzÝ®òòòXãkÏž=¬3VKt–/^¼˜mÙ²…ÕÕÕ± &°/¿üRUÉ6mÚÄùXºê+ŠÛfÏžÍæÌ™ctý“'O2±XÌbbbØŠ+´ÆÇ¥ÍE‹±¹sçªÕ™>}:{çwZÕcÛ+++c<=yòDU^TTÄìííÙ74³×qaŒ1±XÌþõ¯T®onéóÑG±Y³fÕFggìuVæÖ¯Î8¹Œ±¦¸CCCÙÎ;Û*,ƒtÆqÕEßõº=uÉ;[·nÅÒ¥KÑ£Ge‰÷cŒ!44TíVº®ú-‡ÇÙÙr¹\c{úê7*++Ã’%K°gÏXYéþûl\Ú<|ø0fΜ©VgÖ¬Yøá‡ ŠËTíedd@(ÂÕÕUUîââ‚Ñ£Gãĉ 6.)))HKKüyóZU®Ë©S§ ‹Áçóáë닸¸8ÀƃÂÚÚK–,Ðp»vß¾}˜0a„B!Μ9ÉdX½z5<<<àì쌘˜Õc™L†•+WÂÏÏöööð÷÷Ǿ}ûÔâ‹Åøûßÿ±X @€°°0ܺu ›7oFPP„B!¦Nª÷.áN©Tbýúõð÷÷‡H$BDDrrrTåb±ëׯLj#ààà€!C†àÊ•+ªr]ç\Ÿæ·ýuKÛ\ÔwüúúzÄÅÅÁÃý{÷FLL ˆÌÌLNûk›ë\i‹.\¸@ãÚd\SRR´>ÆŒŒTí«ïzÝžºdB¡‹D"ÁþðØÙÙÁÓÓ±±±xúô)€Çã¡oß¾èÓ§§úš\½zb±Xk{ºê7ŠÅâÅ‹ƘÁ}lÚfMM JKKáãã£VgàÀ¨¬¬DUUç¸LÕ^ïÞ½QYY©6Ž …ååå(((ÐÚ/CÆeÛ¶m˜9s&D"Q«ÊµyöìÞxã ¼÷Þ{xüø10mÚ4Àš5k°nÝ:Ìœ9r¹\míÎòåË1gÎ\¹r£F,[¶ éééHJJ­[·••…µk×zôè___;v ÷îÝÃüùóñî»ï"==]-žsçÎá?ÿù=zooo„††"//'Nœ@rr2233ñÇ?þÑ >íþüç?ãÈ‘#8räRRR`ccƒqãÆA&“©êœ>}Û¶mCVVÂÂÂ0cÆ U¹®sÞÚŽ¥m.ê;þþðœ>}?þø#’““aaa‡ªÊ¹Ä¯i®s¥ëg(++ [·n¥qým\ƒƒƒQTT¤ñÕøËGk¯×m¦+>òhªù#k×®±ŒŒ VVVÆÎ;Ç‚ƒƒYXX«¯¯×¸¿!õ˜P(dœbÓTïÞ½läÈ‘ªÇ .Ô{k_W›YYY +,,T«WPPÀ°ììlƒúaŠö”J% a‘‘‘,??Ÿ¥§§³ØØX6lØ06eÊý2d\***˜½½=»~ýºÁåúæVZZ³°°`¹¹¹˵ݮݲe‹Ú¶ÊÊJfaaÁ’““UÛ®]»ÆÜÝݵÛÇLJíÝ»W­Ý¦·SRRVPP Ú¶iÓ&6hÐ }2”¹=h¤¯_µµµÌÞޞݼySµM"‘0'''vøðaÆXËs’Ͱ{÷îµêœ7Õ¼m]Çb¬å\Ôw|©TÊlmmYRR’ª¼¦¦†`=⿦¹Þ”©yиrÓšëu[Ò}_¹ 9r¤êßãÆÃÑ£Gáëë‹;wîh\˜Ãµ~aa!.\ˆÍ›7£gÏžzãÐT???k×®Ebb¢ÆÇ­iÓÉÉ @Ãã777UÝÊÊJ "ôµÑ”)Úãñx8rä-Z„   øùùaÑ¢E°³³SûM¯‘¡ã²wï^øùù!,,¬Uåº`ìØ± BDD,X€ñãÇëÝÏÎÎNíÿP*•ˆŽŽÇÈår<þ\U§¤¤ÀÕ«WQZZŠââb«Ë@m!r`` ç[¿D·¬¬,Èår„„„¨¶ñù|„……áÁƒ÷ñôôŸÏ‡D"átÎÑôXšè;~VV …Úu­±—ý5ŸëmÆ•C¯×mÍìŠæ|||àèèˆüü|N+}5Õ¯­­Å´iÓ0a¼ûî»zÛÐVÿ“O>Á“'O¤Ú¦P(_~ù%¶nÝŠ˜˜ƒÚ …xøð!¬Úž '''ØÛÛëm£)Sµçé鉟~úIm[dd$ÂÃÃ[ÓÐqÙ¾};–-[¦1~.åºXZZâìÙ³HLLÄž={0mÚ4Œ; µãèè¸qã\\\Z”K$„……aúôéøøã1`ÀLš4Ig›M/Rº¶‘Ö©­­…B¡@}}½Úú,ØÚÚjݯñè;禠ë|ë;¾\.‡B¡€B¡Ð˜¸·Gü†èîãš’’‚ÐÐPe8~ü¸A×ëö`vk(š{üø1***àïïߪúõõõxóÍ7Áçó±sçN½ûëªÿõ×_ƒ1¹\®zÅÆÆbùòåËåZ“ }1DEEáÀjÛŽ=ŠèèhÎm´e{——‡ÄÄDÌž=»E™!ãréÒ%äååá­·ÞÒx}å\…‡‡cÏž=¸zõ*~øáµµÚ³6åáá@€ãÇk,ONNFYY6lØ€   J:˜¯¯/x<._¾¬Ú¦P(œœŒ^xAïþúÎy[h:õßÇǧEÿšjÏø¹ü 5ê®ãÊe ÀízÝ^Ì*¡())ALL .]º„ÂÂB\¿~Ó§OGTT ˆŽŽÆÆ9ÕW*•˜;w.²³³ñí·ß¢¾¾ÕÕÕ¨®®V-lÚ—ú\ÚæªU«pâÄ lܸرcŽ9‚+V´*.S´·mÛ6$&&"??'NœÀ¸qã°víZ¸»»|^›Ú¶mæÌ™@Ъr}ÊË˱{÷n@*•ââÅ‹àóùª[‹ýû÷Ç¥K—››‹êêj­íX[[cÍš5ˆ‹‹ÃÙ³g¡P(ŸŸääd€››*++±mÛ6”””`ÿþý&ý.b8@€÷Þ{‹-BRRŠ‹‹±bÅ 8;;ãÕW_Õ»¿¾snjÍ碾ã Ì›7 .ÄÍ›7ñôéSüíok÷ø¹þ µw\Úâë¨qµ²²‚‹‹‹ÆWã]@ÿõº]™Ó¢Ìââb¶téRæããÃlmm™¯¯/[³f «ªªbŒ5|ÂСCÙ²eË8ÕOHH`4¾rrrZ´§¯¾&Ͷ¶ÍÄÄD6jÔ(Ö³gO6f̵ï{hM\Æ´WWWÇæÎË\\\˜P(d£Gfà|N5 c ç«G,55Uã>úÊÓ?·233ÙäÉ“™³³3³µµeÁÁÁì§Ÿ~ú¿ý¥R6eÊæààÀ"""cÚ?C¯T*ÙgŸ}ÆŸÏgÞÞÞlûöíªò 6°>}ú0‘HÄf̘Á¢££ÕÊ›·[[[«ZèÕèÔ©S¬_¿~:ûd¨îº(“±†ÅtË–-c}ûöeÎÎÎìí·ßf¥¥¥ªrMçÚÁÁýüóÏŒ1ýç\}‹›KÓ\ÔwüêêjÃúôéÃÜÜÜØªU«–••Åi}ßÁeŒ¹þ Ѹr§ëzÝžxyyyª_QÏŸ?ߪÏí›Z´vöüŽƒ˜!š[ú™ë™k¿ŒQTTwwwH¥RëD¸¢1n`êqí*Ìê‘!„tFéééZ¿¤ˆÇã!>>¾CâJMM…O—}Ó£qí\ÌþS„ÒÑüýý[õ%v¦öàÁ¤§§#<<EEEˆ‹‹ÃêÕ«;:¬V£qí\è!„tˆ‡»»;¢¢¢0þ|­Ÿ.#ÜѸ6 ;„ÒM„……áæÍ›†Ù¡qm@w(!„b4J(!„b4J(!„b4J(!„b4J(!„b4J(!„b4J(!„b4J(!„b4J(!„b´.P$$$`àÀغu«j[LLL‹?ãå奵 ]õ 6oÞŒáÇC ÀÏÏŸþ¹Ö¶ ­_]] ___|ðÁF·™ššŠ‰'B$áå—_ÆÅ‹[—)Ú«©©ÁªU«àáá777ÌŸ?‰Dëñ¸Ô—Édˆ‹‹ƒ§§'0räH\¸pÁà:ƨ­­…T*5Y{„paȼýôÓ6ލõ4õE,c×®]"m:Ó¸Nš4 7nìè0Zè’ EJJ ÂÃñ|ùrÔÔÔ¨•I$¬[·‰Dõºÿ¾Ö¶tÕ?tèΟ? 6 -- ~ø!V­Z…C‡ilËÐú+W®DII‰Î¾ri3##ãÆÃ믿ŽÔÔTLž<“&MÂíÛ·[—)Ú[¼x1î߿ӧOãÔ©SÈÉÉADD„Ö~r©ÿÉ'ŸàĉØ·o’““1jÔ(DFF¢°°Ð :ƈÇûï¿o’¶áÊy7eÊ 6¬#j½Îô3ÔÇU¡PàêÕ«ïèPZÊËËc¯={ö°Î@Z-ÑY¾xñb¶eËVWWÇ&L˜À¾üòKUYdd$Û´içc骯P(Zl›={6›3gŽÑõOž<ÉÄb1‹‰‰a+V¬Ð—6-ZÄæÎ«VgúôéìwÞiU?Œm¯¬¬Œñx<öäÉUyQQ³··g7nÜh±/×úAAAlÇŽjûzyy±„„ÎuôÍ-}>úè#6kÖ,£Úè쌣Ϊ+÷««Ì;.c¬©/¡¡¡lçÎm–A±tvÉÉÉÌÁÁÉåòŽ¥….y‡bëÖ­Xºt)zôèÑ¢L"‘ÀÁÁAã~Œ1„††ª=bÐUߢåð8;;C.—klO_ýFeeeX²d öìÙ++ÝŸK›‡ÆÌ™3ÕêÌš5 ?üðƒAq™ª½ŒŒ …B¸ººªÊ]\\0zôhœ8q¢Å¾\ë÷êÕ iiiªÿWVV¢¼¼ÕÑçÔ©S‹ÅàóùðõõE\\`ãÆˆÇÁƒamm%K–h¸]»oß>L˜0B¡gΜÐðøeõêÕððð€³³3bbbTqd2V®\ ???ØÛÛÃßßûöíS‹C,ãïÿ;Äb1ÂÂÂpëÖ-lÞ¼AAA …˜:uªÞ»\„;¥R‰õë×Ãßß"‘ÈÉÉQ•‹Åb¬_¿#FŒ€ƒƒ† ‚+W®¨Êus}L5ïš?>Ðs}}=âââàááÞ½{#&&Dfff«ÇQm}€ .t›qMIIiñ¨½ñ©³?—.]Â+¯¼+++Îב/¾ø£F‚P(Ĉ#””Ä¹Ü ]ñESÍïPˆÅb&‰˜­­-óðð`111¬¸¸XUÅâãã9×o.44”}öÙgZÛÓWŸ1Æ¢££ÙÆc wtÝ¡ÐצT*eد¿þªVçîÝ» {þü9ç¸LÕÞǵq¬¯¯gÇgï½÷^‹}¹Ö¿|ù2‰DlÖ¬YìØ±cL,·¸¡¯Ž¾¹U^^ÎlmmÙ¿ÿýoV^^ÎÒÒÒØÍ›7UåÚ~»‰Dl÷îÝìÎ;¬ººš1ÆXll,‹ŒŒdÅÅÅ,??Ÿ?ž-^¼XµßÖ­[YZZËÌÌdÿøÇ?˜¥¥%{ðàZ»ááá,55•±Ù³g3Ç>øà–••ÅÒÓÓÙàÁƒÙ‚ töÉP]ù7y]¸ôëOú6l»{÷.ËÌÌdÓ¦Mc^^^¬®®Ž1ÖpNÆŒÃRRRXqq1‹e®®®ªr}ç\Sλæ¿íë‹yÕªUlèСìöíÛ,;;›ÅÆÆ2ìÑ£GzãnΘ;#GŽdIIIÝb\år9+**Òøzöì™Î>M:•mذAõ.ב!C†°«W¯²Ç³åË—³ž={ªŽ£¯Üf—P\»vedd°²²2vîÜ9ÌÂÂÂX}}½Æý ©ŸÀ„B!«¨¨à›¦ú{÷îe#GŽT=6X¸p¡A Eó6³²²VXX¨V¯  €`ÙÙÙõÃí)•JÂ"##Y~~>KOOg±±±lذalÊ”)-ö7¤þ_|Á¬¬¬˜¥¥%{íµ×XYYY‹ötÕÑ7·ÒÒÒ˜……ËÍÍÕX®í´e˵m•••Ì‚%''«¶]»v¹»»k=¶Û»w¯Z»M/`))) +((PmÛ´i4hÎ>ª»&µµµÌÞÞ^í G"‘0'''vøðaÆXËs’Ͱ{÷îµêœ72Õ¼Ó£®˜¥R)³µµeIIIªòšššI(h\õS*•ÌÉÉIã£ãFú®# …‚ùúú²mÛ¶q*7„îûí]ÐÈ‘#Uÿ7nŽ= ___ܹsGã‚®õ ±páBlÞ¼={öÔ‡¦úùùùX»v-5>6hM›NNN£¸¹¹©êVVVhx¡¯¦LÑÇÑ#G°hÑ"ÁÏÏ‹-‚d2Y‹cr­¿xñb¤§§ãÞ½{àñxøøã1hÐ œ;w/¼ðç:º`ìØ± BDD,X€ñãÇëÝÏÎÎNíÿP*•ˆŽŽÇÈår<þ\U§¤¤ÀÕ«WQZZŠââb+Î@m!r`` ç[¿D·¬¬,Èår„„„¨¶ñù|„……áÁƒ÷ñôôŸÏ‡D"átε1Õ¼ã¢iÌYYYP(j×ºÆØ;«f÷ïßG]]Z»†^G,,,ðÒK/!##£UåºtÉ5†ðññ££#òóó[]¿¶¶Ó¦MÄ ðî»ïêmC[ýO>ùOžŸ;wêÝ_Wý¯¿þŒ1ÈårÕ+66Ë—/‡\.GLLŒÁm@TT8 ¶íèÑ£ˆŽŽæÜF[¶yyyHLLÄìÙ³õÖÕT¿¢¢Bc½àà`<{öŒs®ÂÃñgÏ\½z?üð TeÚ³6åáá@€ãÇk,ONNFYY6lØ€   J:˜¯¯/x<._¾¬Ú¦P(œœÌtÅ~V IDATéî–¾sÎ…±óÎP>>>-úÜ é‹9Žkpp0ŠŠŠ4¾š/ªlêÒ¥Kjåzi~7')) AAAœË¹2«„¢¤¤111¸té qýúuLŸ>QQQ4h ::Zõ… úê+•JÌ;ÙÙÙøöÛoQ__êêjTWWƒ1Ö¢=.õ¹0´ÍU«Váĉظq# °cÇ9r+V¬hU\¦hoÛ¶mHLLD~~>Nœ8qãÆaíÚµpwwרg}õƒƒƒáç燙3gâæÍ›(,,ÄþýûñÕW_áÍ7ßä\GŸòòrìÞ½J¥¸xñ"ø|¾êQPÿþýqéÒ%äææ¢ººZk;ÖÖÖX³f âââpöìY( äçç#99àææ†ÊÊJlÛ¶ %%%Ø¿?îܹÃ)FÒ6Þ{ï=,Z´III(..ÆŠ+àììŒW_}Uïþúι.¦šw†˜7o.\ˆ›7oâéÓ§øÛßþf²ö51´/æ8®VVVpqqÑøj¼#¨¿- ®×‘¿üå/øñÇQRR‚¿üå/¨ªªRûQ_9gæ´(³¸¸˜-]º”ùøø0[[[æëëËÖ¬Yꪪc ‹M†Ê–-[Æ©~BB ñ•““Ó¢=}õ5i¾(³µm&&&²Q£F±ž={²1cƨ-ÚiM\Æ´WWWÇæÎË\\\˜P(d£GfÐz¹ÖÏÉÉao¿ý6swwgöööìÅ_lñ)}uôÍ­ÌÌL6yòdæììÌlmmYpp0ûé§Ÿþo©”M™2…988°ˆˆƘöÏÐ+•JöÙgŸ±€€Æçó™··7Û¾}»ª|Æ ¬OŸ>L$±3f°èèhµòæíÖÖÖ¶XÔuêÔ)Ö¯_?}2Tw]”ÉXùeË–±¾}û2gggööÛo³ÒÒRU¹¦síààÀ~þùgƘþs®)ç¾ÅƒÍc®®®f111¬OŸ>ÌÍÍ­ZµŠ`YYYzãnŽËsíKw׿ï>d Å÷Op¹ŽDGG3& Ùk¯½¦¶¸^_¹!xyyyª_QÏŸ?yóæž•˜X´vöüŽƒ˜!š[ú™ë™k¿L­¨¨îîîJ¥:׎hBc¬1ã »víÂÑ£Gñßÿþ× ýÄb1.\¨õAõ•¬yBHg”žž®uÇC|||G‡¨’šš ŸV½éµ·î4®NNNøýïoâ¨LËì>6J!¿¿¿Aë¨ÚÓƒžžŽððp!..«W¯îè°8éNãÚ–ŸN1ºCA!ÝXEEâããáî¨(ÌŸ?_ë'ÎwÝq\i éVhnég®cd®ýêLhŒ»7ºCA!„£QBA!„£QBA!„£QBA!„£QBA!„£QBA!„£QBA!„£QBA!„£QBA!„£ué„"!!ÄÖ­[UÛbbbZü///­m誯P(°yóf >~~~øüóϵ¶ehýêêjøúúâƒ>0ºÍÔÔTLœ8"‘/¿ü2.^¼Øê¸ôµ÷üùs¬_¿!!! …èÛ·/.\ˆÊÊJNåMq­[QQØØXÀÁÁ!!!HHHhuÿZ«¶¶R©´MÚ&ÝÛàÁƒñé§Ÿr®ßU碦¸Åb1víÚÕ&Çëãªé½°#tÉ„"%%áááX¾|9jjjÔÊ$ Ö­[‰D¢zÝ¿_k[ºê:tçϟdž ––†?ü«V­Â¡C‡4¶ehý•+W¢¤¤Dg_¹´™‘‘qãÆáõ×_Gjj*&OžŒI“&áöíÛ­ŠK_{R©YYYØ´i룅Dê`×jR@E4ØÐöýÃK.$çœpÖ:kÁÞ¿ýÝ¿ßooNvöÙ!...&ÛBdôˆÁ’½½}çô¸»»C§Ó™Ôc²o£¾¾Ë–-CVVúöµü òl4<ˆ¨¨(#›èèh>|˜“_lõL¡Õj! ­®·d»{÷nÈd2³ö\ãcâøñã‹ÅàñxðòòBbb" -- ÉÉÉØ¿?°lÙ2·k÷îÝ‹œ zä‚ÂëÖ­Cÿþý1räHÄÄÄàÎ;;;; >/¼ð+{S\¸pb±Ø¬ž%û6bbb ???BÌ´4O{ͦ¦&ܽ{·Ó‹µðû￳ö‹«ž^¯‡Z­Æ‰'„„£6LõllµZ-jkk1xð`,X°Ã† èQ£ð÷¿ÿÝB†ÌÇÇÄýû÷Ž%K–àæÍ›ÈËËCDD`Íš5X¿~=¢¢¢ Ó錞WÆÇÇcÞ¼y8þ<&MšX¾|9ÊÊÊPTT„Ë—/C©TbíÚµ€~ýúÁËË ßÿ=®^½ŠE‹añâÅ(++3òçôéÓØ±c®_¿ŽÑ£G#((•••8vìär9nܸ>úˆsœÓlܸ999ÈÉÉB¡€££#¦L™‚GlNœ8mÛ¶A©TB"‘àwÞ1Ô[sk0×—¹¹ÈÔÿºuëpâÄ 9rr¹ööö¸víš¡žÿ¦æ:[,ý )•JdffÒ¼þ_^P[[kòêøæ£ÛÐy´§ã6ÏÅ‹Iyy9©¯¯'§OŸ&D"‘––“í¹Øçåå@@Ôj5+ßLÙïÙ³‡Lœ8ѰM/“É,>ò`ÒT*•©©©1²«®®&ˆJ¥â½7™:u*)//7jÃTÏÆöÚµkùãÿH²³³I]]9tèáñx$''‡UŽÚÃ4·JJJˆ½½=©¨¨0Yon»vëÖ­Fe ÄÞÞžÈårCÙÅ‹‰‡‡‡Ù¾…B!Ù³g‘nûm`…BAêêjCÙæÍ›‰¯¯¯Å˜¸ÒÛ ´ÁWss3qvv&………†2FCÜÜÜÈÁƒ !ÇD¥RäêÕ«Vy{:j[ê‹Îs‘©­VKœœœHQQ‘¡¾©©‰ ׯ_gå¿©¹Þž®zäAóÊîðÈÃò~{dâĉ†Ÿ§L™‚ÜÜ\xyyáÊ•+&æ°µ¯©©L&Czz: Àè‡)ûªª*¬]»gÏž5¹Mo¦››€ÇQ† f°mû”„»»;£F{¸è%%%aÆ ¨¨¨@zz:QRROOOVõí1g;hÐ À‚  GLL 8€ÈÈHNñ11fÌLž<þþþ Åûï¿7ß|“±]ÿþý~///Gkk+"##aggÐétxðàÁ¦®®ÙÙÙ¸páîÞ½‹Û·o[<]îççF‡¯üüüXoýR,£T*¡Óé €€ÇãA"‘ ´´Ôd›‘#G‚ÇãA£Ñ°s[hß—)˜úW*•ÐëõF÷µ6;6íÛè8ן4¯=“^÷È£#B¡DUU•ÕöÍÍ͈ˆˆ@HH/^̨aÎ>)) ·nÝ‚¿¿?ààà€íÛ·cË–-pppÀ—_~ÉYS €Ïçm¯€J¥‚››œ9ÅÁEúôéƒÑ£G###B¡ûöíãTÏd;hÐ 899aèСF¶¾¾¾Mq's>œ:u G…££#"""0kÖ,Î:üüóÏP©TP©T¸yó¦á‘‘F£D"Auu5>þøcäåå! À¢fû›”¥2Šu477C¯×£¥¥Å¨ÜÑÑNNNfÛµÓ˜w–Æ›©N½^½^oUû§ÍóžW6g(º½~AqóæM¨ÕjˆD"«ì[ZZ0gÎðx<ìܹ“±½%û]»vNg¸bbbN©TÊYÂÂÂmT–››kôîKlôLáèèØiÁÁ¥ÞœíôéÓ‘““cT_ZZ Ãï\lj‰àà`deeáÂ… 8|ø0ª«« ul{zzz‚ÏçãèÑ£&ëår9êë둚š ðù|º8xÆxyyÁÎÎ?þø£¡L¯×C.—㥗^blÏ4æO‚ös‘©¡PØ)¾ö55•¼ð ÄÕÕ•¼óÎ;$22Ò¨¾£nss³á WÇ'/¾ø¢Å˜¸ò¼Ê$äñaºåË—“áÇwwwòî»ï’»wïêMµ‹‹ ùé§Ÿ!Ìcn ¦Ãƒû25™úoll$R©”¼ð dذa$!! J¥’U{¦ÿÁ&Çlÿ†h^¹ÑeÚUVVÞÂ9s .|‚Ëv4iÑß™÷¬Ý ôBèÜb¦·æ¨·Æe µµµððð€V«µxN„-4Çéê¼özÕ# …B鎔••™=`ggg‡ääägâWqq1„Ba}Ñ£yí^ôºR(JwC$YõO캚ÒÒR”••!88µµµHLLÄêÕ«Ÿµ[VCóÚ½ ; …òœ V«‘œœ „……aÑ¢Ef?]FaÍëcè…B¡<'H$>k7z4¯¡; …B¡Pl†.(( …B¡Ø ]PP( …B±º  P( …b3tAA¡P( Åfè‚‚B¡P(ŠÍÐ…B¡P(›¡ …B¡P(6C …B¡Pl¦G/(òòòàããƒÌÌLC™T*íô1£F2«aÉ^¯×#==¯¾ú*ø|>¼½½±e˳Z\íáåå…?üÐfÍââbL:®®®xýõ×QPP`µ_Lz<@JJ !0|øpÈd2444°ªoÏ|`ö‹}®\¹b°35ÖÀãyƒ1cÆÀÅÅÈË˳›-477C«Õ>1} Å\æÝرc±iÓ¦'ì‘õ˜ŠE,㫯¾ê¾˜ãYäõYåÅZzä‚B¡P 88ñññhjj2ªÓh4X¿~=4áúõ×_ÍjY²?pàΜ9ƒÔÔT”””`ÕªUHHHÀLjqµ_¹r%êêê,ÆÊF³¼¼S¦LÁôéÓQ\\Œ3f`Ú´iøå—_¬ò‹IO«ÕB©TbóæÍ(--ÅþýûñÓO?!66–U}{222 V«®ôôtˆD"Xëúúz¾þúk( üùÏÆ!C,æÔ’““ñÞ{ï=1} Å\æÝÛo¿ñãÇ?a¬§;ý õ¦¼v *++IÛ•••EºÚFÅúØØX²uëVòðáCB>ÿüsCÝÌ™3ÉæÍ›Y÷eÉ^¯×w*›;w.™7ožÍöÿøÇ?ˆX,&R©”¬X±Â¬l4—.]JæÏŸod3{öl²`Á«â`Ò3Åùóç‰@ °º¾=b±˜|öÙg„Ëc˜˜H¢££Yi¶Á4·˜Ø°aç>{¶æ¨»Ò“ãê)óŽMŽMÅDvîÜù¤ÜâäKwâYåÅZzäEff&âââЯ_¿Nu...&ÛBdôˆÁ’½½}çô¸»»C§Ó™Ôc²o£¾¾Ë–-CVVúöµüýll4<ˆ¨¨(#›èèh>|˜“_lõL¡Õj! ­®oC¡P ¤¤ .`y¬wïÞ ™LƨɕãÇC,ƒÇãÁËË ‰‰‰€´´4$''cÿþýpppÀ²eË<Þ–Ü»w/BBB pòäIÀ£G°zõjxzzÂÝÝR©ÆP·råJx{{ÃÙÙ"‘{÷î5òC,ãÓO?…X,ŸÏ‡D"ÁåË—‘žžÌš5‹q—‹ÂžÖÖV¤¤¤@$ÁÕÕ¡¡¡øí·ß õb±)))˜0a\\\0nÜ8œ?ÞPoiÌ™èªy×q›œÉç––$&&ÂÓÓƒ†T*…nܸauÍa.ÈÏÏnòªP(Ì>ê9s¦ÙXØÌO®÷¢¶v]r¯é‰;íéø®U,WWWâääD<==‰T*%·oß6Ô‡……‘äädÖö "ûÛßÌê1ÙBHdd$IKK#„<Þ °´CÁ¤©Õj òïÿÛÈæ_ÿú@¤´´ÔH788˜“ÚÚZ2wî\bggG>üðC¢T*IYY;v,yÿý÷-ÆÄ•žüNÞlâúÏÿüO2~üxò¯ý‹Ü¸qƒDDDQ£F‘‡BÉo¼A ¹}û6‰‰‰!C‡5Ô3¹9ºrÞu|WËäsBByå•WÈ/¿üBT*‰‰‰!Èõë×ýîˆ-;'N$EEEÏE^u:©­­5yÝ¿ߨö}²™ŸÖÜ‹ºê^Óë/^$åå夾¾žœ>}š‰DBZZZL¶çbŸ——GQ«Õ¬|3e¿gÏ2qâDÃc™LÆiAÑQS©T¤¦¦ÆÈ®ººš *•ŠS\ô6nÜHdêÔ©¤¼¼Ü¨ S}GÔj5qvv&—.]2Yß~¬¯]»F?þñ$;;›ÔÕÕ‘C‡GrrrÌöÁ4·JJJˆ½½=©¨¨0Yoî´uëV£²††booOär¹¡ìâÅ‹ÄÃÃÃlßB¡ìÙ³ÇH·ýÍD¡P¤ººÚP¶yófâëëk1&®<¯ Šææfâììlô‚£Ñhˆ››9xð !¤ó˜¨T*ÃÂÖš1o£«æ)-ù¬Õj‰““)**2Ô755=“ÍkgÚ÷Áv~Zs/êª{M|äa‰‰'ÂÛÛƒ ”)S››‹Ÿ~úÉèÖØ×ÔÔ@&“!== `ôÔ}UUÖ®]‹¬¬,“!¬Ñtssðø1J{Ú>QáîîÎ).zIIIhiiÁ7àëë‹ÀÀ@TTT°®ïÈž={àíí ‰Db9 X°`¢££1xð`„‡‡#&&ÆìaS6Œ3“'O†¿¿?æÎ‹Ó§O³j׿£ßËËËÑÚÚŠÈÈHŒ5 £FÂ;#lêêê‘‘¨¨(¼ù書}û¶Åç~~~`t8ÕÏÏõÖ/Å2J¥:ÎpÐx<$ JKKM¶9r$x<4 «17GWÍ;6´÷Y©TB¯×6´³³ã¬ÙÕмv†íü´æ^Ôkï5½nAÑ¡Pˆ¢ªªÊjûææfDDD $$‹/fÔ0gŸ””„[·nÁßßpppÀöíÛ±eË888àË/¿ä¬)ÀçóqíÚ5#{•J7778;;sŠƒ‹ôéÓ£GFFF„B!öíÛÇ©¾=_|ñ–.]j¶¾=ƒ ‚““†jTîëë‹;wî°Ò0EŸ>}pêÔ)=zŽŽŽˆˆˆÀ¬Y³8ë 8ðóÏ?C¥RA¥RáæÍ›øý÷ß<>»#‘HP]]?þyyy°¨iê†Ônþ½…ææfèõz´´´•;::ÂÉÉÉl»¶1`sKtÕ¼cK›Ï:z½z½þ‰õe-½9¯Öœ¡°v~Z“?kï5½~AqóæM¨ÕjˆD"«ì[ZZ0gÎðx<ìܹ“±½%û]»vNg¸bbbN©TÊYÂÂÂmT–››‹ÈÈHÖ\õLáèèØiÁÁ¶þܹs¨¬¬ÄŸþô'‹}´gúôéÈÉÉ1*+--…k s#++ .\ÀáÇQ]]m¨3w˜µ=žžžàóù8zô¨Éz¹\Žúúz¤¦¦Âßß|>Ÿ.ž1^^^°³³Ã?þh(ÓëõËåx饗Û39lw\ …b~p‰¥7æ5 µµµ&¯Ž‡³Û°v~vEþØÒ«uuuJ¥8wîjjjpéÒ%Ìž=aaaðõõDFF"--•}kk+æÏŸ•J…o¾ù---hllDcc#!ôØØ³«fBBŽ;†´´4TWWcûöíÈÉÉÁŠ+¬ò‹I/??«V­BAA***ŸŸ¸¸8\¿~áááŒõ¦Ø¶mæÍ›>ŸÏ:O+W®DVV¾øâ ܺu ‡®]»ÇZ£#÷îÝÃîÝ»Q]] ­V‹‚‚ðx<ã #Fàܹs¨¨¨@cc£Y¬Y³‰‰‰8uêôz=ªªª —ËÆ CCC¶mÛ†ºº:|÷ÝwfËQž|>K–,ÁÒ¥KQTT„Û·ocÅŠpwwÇ[o½ÅØžiÌ-ÑUóŽ+|> .„L&Caa!îܹƒO>ù¤ËôMÁ5–ޘ׾}ûbÈ!&¯¶|™L???¼û­­EAA^|ñEÆúŽÜ¹s‡BLL ë±€I“&!77YYY‰DØ´irrrX½›4‡Z­Fnn.Æ777ìØ±999†-Åùóçãµ×^ÃØ±cmQkýúõX·n–/_Ž 88 … ‰ššŠ¤¤$ˆD"äåå±zÑ¢k7zÏc^é…B¡P(›¡ …B¡P(6C …B¡Pl†.(( …B¡Ø<;²™ IDAT ]PP( …B±º  P( …b3tAA¡P( Åfè‚‚B¡P(ŠÍÐ…B¡P(›éÑ Š¼¼<øøø 33ÓP&•J;}ĄQ£ÌjX²×ëõHOOÇ«¯¾ >ŸooolٲŬWûÆÆFxyyáÃ?´Y³¸¸S§N…««+^ýuXí“Þƒ’’‚ÀÀ@ >2™ VÇ ˜O&>øÀì]¹rÅbÖÐÜÜ ­VÛåºÊرc±iÓ&Öö=u.šò[,㫯¾z"ýõæ¼Zso’ôÈ…B¡@pp0âããÑÔÔdT§Ñh°~ýzh4Ãõ믿šÕ²dàÀœ9s©©©())ÁªU«€˜Ôâj¿råJÔÕÕYŒ•fyy9¦L™‚éÓ§£¸¸3fÌÀ´iÓðË/¿X哞V«…R©ÄæÍ›QZZŠýû÷ã§Ÿ~Bll¬UqZO&ŒŒ ¨Õj£+=="‘fµ¬%99ï½÷^—ëR(o¿ý6ÆÏÚ¾§ÎŧíwoÎ+×{û§²²’´]YYY¤; mÔX¬%[·n%>$!!!äóÏ?7ÔÍœ9“lÞ¼™u_–ìõz}§²¹sç’yóæÙlÿüƒˆÅb"•JÉŠ+ÌúÇFséÒ¥dþüùF6³gÏ& ,°*&=Sœ?ž‚Nålâ´4ž\tÚ‹Åä³Ï>3YÇ4·˜Ø°a‰ŽŽ¶I£»ckŽº+½-®î8Ù䨔ßAAAdçÎOÊ-NtǼšƒë½ýIÓ#w(233‡~ýúuªÓh4pqq1ÙŽ‚   £-sKöööÓãîîNgRɾúúz,[¶ YYYèÛ×ò÷³±Ñ|8^xáVö¦¸páÄb±Y=KömÄÄÄ 66~~~ „pޱ½fSSîÞ½ÛéÅÜÇÇ øý÷ßYûÅUO¯×C­VãĉˆGBBB—ÆiζmÛWWW«úºÿ>ÂÃñdÉܼyyyyˆˆˆ¬Y³ëׯGTTt:ÑYøøxÌ›7çϟǤI“Ë—/GYYŠŠŠpùòe(•J¬]»Я_?xyyáûï¿ÇÕ«W±hÑ",^¼eeeFþœ>};vìÀõë×1zôh¡²²ÇŽƒ\.Ç7ðÑGY+¥37nDNNrrr P(àèèˆ)S¦àÑ£G›'N`Û¶mP*•H$xçw õ–ÆÜÌõen.2õ¿nÝ:œ8qGŽ\.‡½½=®]»f¨gã¿©¹ÎKCJ¥™™™4¯ÿ—×€€ÔÖÖš¼:¾ùh¹{ûS¡'>òhOÇ-ò‹/’òòrR__ONŸ>MˆD"!---&Ûs±ÏËË#€¨ÕjV¾™²ß³g™8q¢a«J&“1ná[ÒT*•©©©1²«®®&ˆJ¥â½7™:u*)//·9ÎŽãÉEG­VgggréÒ%³úLs«¤¤„ØÛÛ“ŠŠ “õæ¶k·nÝjTÖÐÐ@ìíí‰\.7”]¼x‘xxx˜í[(’={öé¶ßV(©®®6”mÞ¼™øúúZŒ‰+½íÑ@Lq577gggRXXh(Óh4ÄÍÍqáîîΨÑ.zIIIذa***žžŽÀÀ@”””ÀÞÞÞ¦8Ûàš¯={öÀÛÛ‰Äê>ÇŒƒÉ“'Ãßß¡¡¡xÿý÷ñæ›o2¶ëß¿¿ÑïåååhmmEdd$ììì:<0ØÔÕÕ!;;.\ÀÝ»wqûöm‹§ËýüüÀèટŸë­_Še”J%t: e<‰¥¥¥&ÛŒ9<†Õ˜ÛBû¾LÁÔ¿R©„^¯7º¯µÙ±ißFǹþ$ yå×ר'A¯[PtD(bàÀ¨ªªbuÒ×”}ss3"""‚Å‹3j˜³OJJ­[·àïïo(Óëõ€Ï?ÿ™™™J¥œ4ø|>®]»†±cÇÊU*ÜÜÜàìį̀Ñ.zЧOŒ=øñDZoß>”••Yg{¸æë‹/¾ÀòåËu-ѧOœ:u gÏžEVV"""0yòdäååqÒ8p àçŸÆ!C:Õk4H$Ìž=ü1þð‡?`Ú´i5Ûߤ,•Q¬£¹¹z½---Fçyáääd¶]Û0yW`i¼™ú×étÐëõÐëõ&èOÃ.<ïyU( 2YŠ£G~çúõ¤èug(:róæM¨ÕjˆD"«ì[ZZ0gÎðx<ìܹ“±½%û]»vNg¸bbbNgöE–ɇ°°0dgg•åææ"22’µW=S8::ÂÙÙÙê8;ÂEçܹs¨¬¬ÄŸþô'VÚL#++ .\ÀáÇQ]]m¨csàÉÓÓ|>ßè¾=r¹õõõHMM…¿¿?ø|>]¯ye{†‚ëkÔ“¤W-(êêê •JqîÜ9ÔÔÔàÒ¥K˜={6ÂÂÂàëë ˆŒŒDZZ+ûÖÖVÌŸ?*• ß|ó ZZZÐØØˆÆÆFÃáÀözlìÙÀU3!!ÇŽCZZª««±}ûväää`ÅŠVùŤ—ŸŸU«V¡  ÈÏÏG\\®_¿Žððpk†Îf¶mÛ†yóæÏçÛ¤sïÞ=ìÞ½ÕÕÕÐjµ(((Ç3< 1bÎ;‡ŠŠ 466šÕqppÀš5k˜˜ˆS§NA¯×£ªª r¹0lØ0444`Û¶m¨««Ãwß}÷Dþ…=|>K–,ÁÒ¥KQTT„Û·ocÅŠpwwÇ[o½ÅØžiÌ»šŽs‘©>Ÿ… B&“¡°°wîÜÁ'Ÿ|òÔýgû7ô´ý2çß³Êkß¾}1dÈ“WÛ®GW½æt½jAA££#–,Y¡Pˆ à7ÞÀ·ß~ àqòU*•áÝ&“ýÑ£G±oß>\½zpqq1\•••ô˜ìÙ`æ+¯¼‚~øGŽ¿¿?²³³qòäIŒ3Æ*¿˜ôFŒ‡B&“ÁÏÏï¾û.jkkQPP€_|ÑÚ᳚;wîàСCˆ‰‰±YK­V#77ãLJ››vìØœœÖ÷üùóñÚk¯aìØ±ˆŽŽ¶¨µ~ýz¬[·Ë—/Ç€ …B‰DHMMERRD"òòòX½hQž,˜6mÂÃÃñòË/ãþýû8~ü8ëÝ#KcÞÕ˜š‹Lýoݺ“'OFhh(Ƈææfÿÿñçá?—¿¡6h^MÓ¯9]‰]ee¥asæÌ›>¿ßU4iÑß™÷¬Ý ôBèÜb¦·æ¨·Æe µµµððð€V«µxN„-4Çéê¼özÕ…B¡tGÊÊÊÌþ“";;;$''?¿Š‹‹! {ì‹Ík÷¢×ʃB¡Pž5"‘è™<ÓîHii)ÊÊÊŒÚÚZ$&&bõêÕÏÚ-«¡yí^Ð …ByNP«ÕHNN†‡‡°hÑ"ÖŸº¢˜‡æõ1t‡‚B¡Pž$ Ÿµ½š×ÇÐ …B¡P(6C …B¡Pl†.(( …B¡Ø ]PP( …B±º  P( …b3tAA¡P( Åfè‚‚B¡P(ŠÍÐ…B¡P(›¡ …B¡P(6Ó£yyyðññAff¦¡L*•vú‚˜Q£F™Õ°d¯×둞žŽW_}|>ÞÞÞØ²e‹Y-®öðòò‡~h³fqq1¦N WWW¼þúë(((°Ú/&½ %%>|8d2¬Ž“­½Z­FLL ÆŒ"//ÏPÏuü¹ÒÜÜ ­VÛez ¸Ì»±cÇbÓ¦MOØ#ë1‹X,ÆW_}Õ-|1dzÈkwËŽôÈ…B¡@pp0âããÑÔÔdT§Ñh°~ýzh4Ãõ믿šÕ²dàÀœ9s©©©())ÁªU«€˜Ôâj¿råJÔÕÕYŒ•fyy9¦L™‚éÓ§£¸¸3fÌÀ´iÓðË/¿X哞V«…R©ÄæÍ›QZZŠýû÷ã§Ÿ~Bll¬Õq²±¯¯¯G`` à믿†B¡ÀŸÿüg 2Ä`Ãuü¹’œœŒ÷Þ{¯Ëô(6p™wo¿ý6Æÿ„=²žîô7ÔÝóÚÝDz#=ò»** sçÎ5üƒ‚‚=zsæÌ±ÉþŸÿü'Š‹‹mÑ?6šééé˜9s¦á}bb"._¾ŒÏ>û _ý5ç8˜ô†Š;vì=<<™™‰éÓ§wÒb'ûÍ›7ãÕW_ÅöíÛ e"‘ÈȆëøS(½gõ•ݽg‘מ6–=r‡"33qqqèׯ_§:F“í! 2ÚJ·dooß9=îîîÐét&õ˜ìÛ¨¯¯Ç²eË••…¾}-¯éØh$ ._¾ŒôôtøûûC `Ö¬Yœv(–immEJJ D"\]]Šß~ûÍP/‹‘’’‚ &ÀÅÅãÆÃùóç õ–Æœ‰®šw0ùÜÒÒ‚ÄÄDxzzbðàÁJ¥ðññÁ7¬Î£9ÌÅùùùÏM^ E§G³m×Ì™3úèØgFF&Mš@€ & ¨¨ˆ1V6lNŸ>mø]¡P ÿþFÚ¶Þozä‚ÂëÖ­Cÿþý1räHÄÄÄàÎ;;;; >/¼ð+{S\¸pb±Ø¬ž%û6bbb ???B8ÇØ^³©© wïÞíôbîãテ†üþûï¬ý⪧×ë¡V«qâÄ ÄÇÇ#!!Á¦8-ÙkµZÔÖÖbðàÁX°`† †Q£Fáïÿ»‘×ñìÈýû÷Ž%K–àæÍ›ÈËËCDD`Íš5X¿~=¢¢¢ ÓéŒÎîÄÇÇcÞ¼y8þ<&MšX¾|9ÊÊÊPTT„Ë—/C©TbíÚµ€~ýúÁËË ßÿ=®^½ŠE‹añâÅ(++3òçôéÓØ±c®_¿ŽÑ£G#((•••8vìär9nܸ>úˆu|Ëlܸ999ÈÉÉB¡€££#¦L™‚GlNœ8mÛ¶A©TB"‘àwÞ1Ô[sKtå¼3…%Ÿ×­[‡'NàÈ‘#Ëå°··Çµk׬Ê–bQ*•ÈÌÌ|.ò€ÚÚZ“WÇ7Ù½{7þû¿ÿÿþ÷¿1qâDL:jµÚb¬l±ù~SYYIÚ®¬¬,ÒÐ6jXÛ†„„Ï?ÿÜðûÅ‹Iyy9©¯¯'§OŸ&D"‘––“í¹Øçåå@@Ôj5+ßLÙïÙ³‡Lœ8‘èõzB!2™Œ¬X±‚u¼5•J%@jjjŒìª«« ¢R©8ÅÁEoãÆ@¦NJÊËË­Ž“ÉþÚµkùãÿH²³³I]]9tèáñx$''Ç`Ç4žLs«¤¤„ØÛÛ“ŠŠ “õ6l ÑÑÑFeAAAdëÖ­Fe ÄÞÞžÈår#ß<<<Ìö- Éž={ŒtwîÜiø]¡P¤ººÚP¶yófâëëk1&®pùûëI0ÅÕÜÜLœIaa¡¡L£Ñ777rðàABHç1Q©T¹zõªUcÞFWÍ;S>ZòY«Õ'''RTTd¨ojj"Èõë×ýc.š×Î0õ©×뉗—Ù¶mc¬C‡%§N2ü.—ˉ“““Ymkî7=ò …%&NœhøyÊ”)ÈÍÍ…——®\¹bòp [ûššÈd2¤§§cÀ€Œ~˜²¯ªªÂÚµkqöìY“!¬ÑtssðøqÁ°aà ¶mŸ¸pwwgÔh½¤¤$lذHOOG`` JJJ`ooÏ)N6y4h`Á‚†óááሉ‰Á €ûøwd̘1˜Ÿßi‹R¥RÁÍÍ ÎÎΜâà¢}úôÁèÑ£‘‘‘¡Pˆ}ûöqŽ“ý Aƒàää„¡C‡µõõõµøHƒëø÷éÓ§NÂÑ£Gáè興ˆÌš5‹UÛö 8ðóÏ?C¥RA¥RáæÍ›†GF‰ÕÕÕøøã‘——‡€€‹š¦nHÝáæß[hnn†^¯GKK‹Q¹££#œœœÌ¶k¦1·DWÍ;¶´aÖëõÐëõO¬/kéÍye{†‚ }úô³³3«X ‡GìÖÜozý‚âæÍ›P«Õ> ÀÖ¾¥¥sæÌÇÃÎ;Û[²ßµk!Ðét†+&&ñññÐétJ¥œ5 ,, ÙÙÙFe¹¹¹†wí\ã`£g GGG8;;sŽ“­ýôéÓ‘““cÔ¶´´>>>f}â:þm#++ .\ÀáÇQ]]m¨3w˜µ=žžžàóù8zô¨Éz¹\Žúúz¤¦¦Âßß|>Ÿ.ž1^^^°³³Ã?þh(ÓëõËåx饗Û39lw\ …b~p‰¥7æÕ–3wfŠŠŠàïïoøÝ\¬<ÿþ÷¿mŒÌ2½jAQWW©TŠsçΡ¦¦—.]ÂìÙ³___@dd$ÒÒÒXÙ·¶¶bþüùP©Tøæ›oÐÒÒ‚ÆÆF466VzíõØØ³«fBBŽ;†´´4TWWcûöíÈÉÉÁŠ+¬ò‹I/??«V­BAA***ŸŸ¸¸8\¿~áááÖ +V®\‰¬¬,|ñŸuë:„]»v!..»ñgâÞ½{ؽ{7ª««¡ÕjQPPgx4bÄœ;whll4«ãàà€5kÖ 11§N‚^¯GUUär9€Ç'®°mÛ6ÔÕÕá»ï¾Ã•+WlÌÅø|>–,Y‚¥K—¢¨¨·o߯Š+àîÞz‹±=Ó˜[¢«æWø|>.\™L†ÂÂBܹsŸ|òI—雂k,½1¯}ûöÅ!CL^m;2æøË_þ‚#GŽ ®®ùË_ðûï¿#22’1ÖI“&᫯¾BEE*++-îˆ[K¯ZPBàèèˆ%K–@(bÁ‚xã7ðí·ßxüªR© +6&û£Gbß¾}¸zõ*<<<àââb¸*++;é1Ù³ÁÍW^y?üðŽ9dggãäÉ“3fŒU~1é1>„L&ƒŸŸÞ}÷]ÔÖÖ¢  /¾ø¢µÃÇȤI“››‹¬¬,ˆD"lÚ´ 999†wLãɵZÜÜ\Œ?nnnرcrrr [ÞóçÏÇk¯½†±cÇ2þoõë×cݺuX¾|9 €àà`( ÿFjj*’’’ ‰——ÇêE‹òdÉÈÈÀ´iÓŽ—_~÷ïßÇñãÇYïYsKtå¼ãÊÖ­[1yòd„††bܸqhnn`úãæ]5±Ð¼þ?!!!X³f ¼¼¼péÒ%œ={ýúõcŒ5-- LJ¿¿?BBB0jÔ(8::Úg{ì*++ oQÏœ9ƒ… viÖФmDgú‰(][ÌôÖõÖ¸ºšÚÚZxxx@«ÕZ<;b šcóØ’×6Äb1d2Y·ùO£éU; …Ò)++3{ÏÎή[ýGÄââb…B«_ôž&4¯Ý‹^÷±Q …BénˆD"«þ‰ÝÓ ´´eeeFmm-±zõêgí+h^»t‡‚B¡PžcÔj5’““ááá°°0,Z´Èì'Î(ìyóJw(( å9F"‘ °°ðY»Ñëxymÿ½ÝºCA¡P( Åfè‚‚B¡P(ŠÍÐ…B¡P(›¡ …B¡P(6C …B¡Pl†.(( …B¡Ø ]PP( …B±º  P( …b3tAA¡P( Åfzô‚"//>>>ÈÌÌ4”I¥ÒN_3jÔ(³–ìõz=ÒÓÓñꫯ‚ÏçÃÛÛ[¶l1«ÅÕ¾±±^^^øðÃmÖ,..ÆÔ©SáêêŠ×_VûŤ÷àÁ¤¤¤ 00LJL&CCCƒÕq>zô‰‰‰9r$\\\0qâDäççw²ë8æÖÄf ÍÍÍÐjµOLŸòü2vìXlÚ´‰µ}O‹¦ü‹Åøê«¯žH½9¯\ïÅOš¹ P(F||<šššŒê4 Ö¯_Fc¸~ýõW³Z–ì8€3gÎ 55%%%XµjpàÀ“Z\íW®\‰ºº:‹±²Ñ,//Ç”)S0}útcÆŒ˜6m~ùå«übÒÓjµP*•ؼy3JKK±ÿ~üôÓOˆµ:Τ¤$;v {÷î…\.ǤI“0sæLÔÔÔ0?æ\c³•ääänûÕÁ”žÍÛo¿ñãdz¶ï©sñiûÝ›óÊõ^üÄ©¬¬$mWVVéh5ëcccÉÖ­[ÉÇIHHùüóÏ u3gÎ$›7ofÝ—%{½^ß©lîܹdÞ¼y6Ûÿãÿ b±˜H¥R²bÅ ³þ±Ñ\ºt)™?¾‘Íìٳɂ ¬ŠƒIÏçÏŸ' S9Û8ýýýÉöíÛÊFEòòò!æÇœklLs‹‰ 6èèh›4º;¶æ¨»ÒÛâêŽs‘MŽMùDvîÜù¤ÜâDwÌ+ÌÝ‹Ÿ=r‡"33qqqèׯ_§:F“í! 2Úz·dooß9=îîîÐét&õ˜ìÛ¨¯¯Ç²eË••…¾}-?̓"**ÊÈ&::‡æä[=ShµZ…B£2.q4%%%†ßpïÞ=Œ3€ù1çŽ?±X ///$&&ÒÒÒœœŒýû÷ÃÁÁË–-ðx»vïÞ½ @ ÀÉ“'<~Œ³zõjxzzÂÝÝR©ÆP·råJx{{ÃÙÙ"‘{÷î5òC,ãÓO?…X,ŸÏ‡D"ÁåË—‘žžÌš5‹q÷‡ÂžÖÖV¤¤¤@$ÁÕÕ¡¡¡øí·ß õb±)))˜0a\\\0nÜ8œ?ÞPoiÌ™è¸ío©/ss‘©ÿ––$&&ÂÓÓƒ†T*…nܸÁª½¹¹Îs~@~~>Ík»¼*ŠNãÛ®™3gš×Ô½øiÑ#–Ðh4X·nú÷ï‘#G"&&wîÜØÙÙaøðáxá…XÙ›âÂ… ‹Åfõ,Ù·ƒØØXøùùÂ9ÆöšMMM¸{÷n§ äãテ†üþûï¬ý⪧×ë¡V«qâÄ ÄÇÇ#!!Áê8ÿú׿âÛo¿Åܹs‘——‡©S§"-- >>>Ûq‰ ÷ïßGxx8–,Y‚›7o"//€5kÖ`ýúõˆŠŠ‚N§3:»yóæáüùó˜4i`ùòå(++CQQ._¾tbYI IDAT ¥R‰µk×úõë///|ÿý÷¸zõ*-Z„Å‹£¬¬ÌÈŸÓ§OcÇŽ¸~ý:F   TVVâØ±cËå¸qã>úè#«b¥tfãÆÈÉÉANN 1eÊ//¢V«YùfÊ~Ïž=dâĉ†­z™LfñQ“¦R©$HMM‘]uu5@T*§8¸èmܸ‘ ÈÔ©SIyy¹Mqfdd¾}û’>}úÿøÿ õõõ&í:Ž9ÛØaž[%%%ÄÞÞžTTT˜¬7·]»uëV£²††booOär¹¡ìâÅ‹ÄÃÃÃlßB¡ìÙ³ÇH·ý6°B¡ Huuµ¡lóæÍÄ×××bL\émÚ`Š«¹¹™8;;“ÂÂBC™F£!nnnäàÁƒ„Îc¢R©rõêU«Æ¼=µ-õEHç¹ÈÔ¿V«%NNN¤¨¨ÈPßÔÔDëׯ³òßÔ\oOW=ò y冥{ñÓÄò>tdâĉ†Ÿ§L™‚ÜÜ\xyyáÊ•+&æ°µ¯©©L&Czz: Àè‡)ûªª*¬]»gÏž5¹Uo¦››€Ç† f°m;åëîîΨÑ.zIIIذa***žžŽÀÀ@”””ÀÞÞžsœ±±±(++ÃÕ«Wagg‡?þ¾¾¾8}ú4^zé%V\ÇÈcÆŒÁäÉ“áïïÐÐP¼ÿþûxóÍ7Ûõïßßè÷òòr´¶¶"22vvvN‡lêêê .àîÝ»¸}û¶ÅÓå~~~`t(ÕÏÏõÖ/Å2J¥:†2‰D‚ÒÒR“mFŽ FÃjÌm¡}_¦`ê_©TB¯×Ý×ÚìØ´o£ã\мrÃܽØÓÓÓjMkèu ŠŽ…B 8UUU¬Núš²onnFDDBBB°xñbF söIII¸uëüýý ez½ðùçŸ#33R©”“¦@ ŸÏǵk×0vìXC¹J¥‚››œ5ÚÃEúôéƒÑ£G###?þø#öíÛ‡²²2Nq^»v Û¶mCmm-† Ø·oÂÃÃñ_ÿõ_8xð I_Ùä‡+}úôÁ©S§pöìYdee!""“'OF^^'~þùgCLíÑh4H$˜={6>þøcüáÀ´iÓ,j¶¿IY*£XGss3ôz=ZZZŒÎê8::ÂÉÉÉl»¶1`ó®ÀÒx3õ¯Óé ×ë¡×ëM.ôŸ†ÿ\xÞóªP(d².44G5*3u/¶å±5ôº3¹yó&Ôj5D"‘Uö---˜3gx<vîÜÉØÞ’ý®]»@N§3\111ˆ‡N§3»˜`ò!,, ÙÙÙFe¹¹¹ˆŒŒd­ÁUÏŽŽŽpvvæ§Z­6©€û÷ï[ì“kll FVV.\¸€Ã‡£ººÚPÇæÀ§§§'ø|~§?ú6är9êë둚š ðù|º8xÆxyyÁÎÎ?þø£¡L¯×C.—³Ú%có'Aû¹ÈÔ¿P(ì_{ž¦ÿ\M?¯yår†¢#m÷â§M¯ZPÔÕÕA*•âܹs¨©©Á¥K—0{öl„……Á×׉´´4Vö­­­˜?>T*¾ùæ´´´ ±±†C†íõØØ³«fBBŽ;†´´4TWWcûöíÈÉÉÁŠ+¬ò‹I/??«V­BAA***ŸŸ¸¸8\¿~áááœÇ- ÞÞÞˆŠŠBaa!jjjðÝwßáË/¿Äœ9s,¶íªœ·qïÞ=ìÞ½ÕÕÕÐjµ(((Ç3< 1bÎ;‡ŠŠ 466šÕqppÀš5k˜˜ˆS§NA¯×£ªª r¹0lØ0444`Û¶m¨««Ãwß}‡+W®pö—Òuðù|,Y²K—.EQQnß¾+VÀÝÝo½õc{¦1ïj:ÎE¦þù|>.\™L†ÂÂBܹsŸ|òÉS÷ŸíßÐÓöËœÏ*¯}ûöÅ!CL^m»]}/¶•^µ  „ÀÑÑK–,P(Ä‚ ðÆoàÛo¿ðøÅG¥RÞm2Ù=zûöíÃÕ«WáááÃUYYÙIÉž Öh¾òÊ+øá‡päÈøûû#;;'Ož4|ä’«_Lz#FŒÀÇ!“Éàçç‡wß}µµµ(((À‹/¾ÈyÜúõ뇓'OâÅ_Dxx8¼½½‘ššŠ7šÝµi£+rÞµZÜÜ\Œ?nnnرcrrr [ÞóçÏÇk¯½†±cÇ"::Ú¢Öúõë±nÝ:,_¾ @pp0 @$!55III‰DÈËËcõ¢Ey²ddd`Ú´iÇË/¿Œû÷ïãøñã¬w,yWcj.2õ¿uëVLž<¡¡¡7nš››üÿǯŸ†ÿ\þ†Ú y5MWß‹mÅ®²²Òð6îÌ™3X¸páSw¢#MÚFôwæ=k7(½:·˜é­9ê­qÙBmm-<<< Õj-ža Íñcº:¯=…^µCA¡P(Ý‘²²2³ÿ¤ÈÎÎÉÉÉÏįââb…Âû¢GóÚ½èõŸò P(”gH$²êLOWSZZв²2£¶¶‰‰‰X½zõ³vËjh^»t‡‚B¡PžÔj5’““ááá°°0,Z´ˆñœ…š×ÇÐ …ByNH$(,,|Önô:h^Cw(( …B¡Ø ]PP( …B±º  P( …b3tAA¡P( Åfè‚‚B¡P(ŠÍÐ…B¡P(›¡ …B¡P(6C …B¡Pl†.(( …B¡ØL^PäååÁÇÇ™™™†2©TÚé bFeVÃ’½^¯Gzz:^}õUðù|x{{cË–-fµ¸Ú766ÂËË ~ø¡ÍšÅÅŘ:u*\]]ñú믣  Àj¿˜ôøÀì—]¹rÅb|ÖÒÜÜ ­VûD´)sp™wcǎŦM›ž°GÖc*±XŒ¯¾úª[øbŽîžWStÌë“Îs\P( #>>MMMFuëׯ‡F£1\¿þú«Y-KöÀ™3gššŠ’’¬Zµ 8pà€I-®ö+W®D]]ÅXÙh–——cÊ”)˜>}:Š‹‹1cÆ L›6 ¿üò‹U~1éiµZ(•JlÞ¼¥¥¥Ø¿?~úé'ÄÆÆ²Êk{,%S®222 V«®ôôtˆD"XÌ«µ$''ã½÷Þ{"ÚŠ9¸Ì»·ß~ãÇÂYOwúêMyíôÈïòصkfÏž ©TŠ3fÕi4 4<•–%û¨¨(Ì;×ð{LL pôèQÌ™3Ç&ûþóŸ(..Ftt´EÿØh¦§§cæÌ™†w‰¸|ù2>ûì3|ýõלã`Ò:t(vìØa°÷ðð@ff&¦OŸn(c;–Æ’)Wýû÷Gÿþýʾýö[Èd2‹}R(½™gõ•ݽšWfzäEff&âââЯ_¿Nu...&ÛBd´mnÉÞÞ¾szÜÝÝ¡ÓéLê1Ù·Q__eË–!++ }ûZ^ӱѶÕlllÄ;wL>Ì`ôèÑhhhÀƒû%VÏh4¢¾¾'Nœ@||<¹2±qµ„˜X¥§§#::nnn¢ÛiåÞ½{˜>}:.\ˆ[·n!++ ‘‘‘€U«VaÍš5ˆŽŽ†Á`0Ùï9sæàܹs?~<`éÒ¥())A~~>®\¹•J…Õ«Wúõë|óÍ7¸víæÏŸ  ¤¤ÄÄŸS§NaÇŽ¸qãFމTTTàØ±cP*•(++Ãûï¿os¦¬_¿™™™ÈÌÌDAA1aÂüþûïœÍ‰'žž•J¹\Ž7ß|“+·–sktå¸3‡5Ÿß{ï=œ8qß~û-”J%ìííqýúu›âLJµ¾¨T*¤¥¥=q BuuµÙ£ý‡ºµ6:ƒÐk(***¨õÈÈÈ î€^§lNŸ~ú)÷úÂ… TZZJuuutêÔ) "¹\NÍÍÍf닱ÏÊÊ"WWWª¯¯ä›9û={öиqãÈh4Qll,%$$îo{M•JE¨ªªÊÄN£ÑR«Õ¢ú!Foýúõ€Ðĉ©´´”+›¢Ž¹«úúzrvv¦‹/ZÔ'â[EEEdooOåååfË×®]K³fÍ29B[·n59×ÐÐ@ööö¤T*¹s.\ ///‹mËd2Ú³g‰îÎ;¹×€4 wnÓ¦MäççgµObóþëIðõ«©©‰œ)//;§ÕjÉÝÝ>LDs¢V« ]»vͦœ·ÒUãΜÖ|ÖëõäääDùùù\ycc# 7nðúÝ!cÇR_X\;b­ "¢¡C‡ÒÉ“'¹r¥RINNN‚}nOûkXzä kŒ7Žû{„ 8rä|||põêU³j„ÚWUU!66©©©0`¯æì+++±zõjœ9sÆìm[4ÝÝÝ<¼5àééÉÙ¶>qáááÁ«Ñ1zëÖ­ÃÚµkQ^^ŽÔÔT£¨¨ÞÞÞ¢óб±Ú³gF¹\Îkk ¼òÊ+ Ä”)Sðî»ïâÕW_å­×~™±´´---ˆŠŠ‚À`0àþýûœMmm-öïßóçÏãÎ;¨©©±ºã< L6¯^úeXG¥RÁ`0 88˜;'‘H —ËQ\\l¶ÎðáÃ!‘H ÕjåÜ]5î„ÐÖg•J£ÑhòžlõýqÂâÊßFW öÄG¯»åÑ™L†¢²²Òfû¦¦&DFF"<< ,àÕ°d¿nÝ:üúë¯ „ƒƒ°}ûvlÞ¼øì³ÏDkºººB*•vX¢T«Õpww‡³³³¨~ˆÑ€>}ú`äȑزe d28`VWlÄÆjÛ¶mX´h‘ mkôéÓ'OžDvv6‰iÓ¦‰Ö8p àòåËP«ÕP«Õ¸uëwËH«ÕB.—C£Ñàƒ>@VVï“)æ.HÝáâß[hjj‚ÑhDss³ÉyGGG899Y¬×š¾œ[£«ÆPÚ~0FÆGÖ–­ôæ¸ ÝCa­VÈ†Ûæ€m× >zý„âÖ­[¨¯¯‡¯¯¯MöÍÍ͘9s&$ vîÜÉ[ßšý®]»@D0 ܃øøx ( Ñšýû÷›œ;r䢢¢kˆÕ3‡££c‡ G+bó &VgÏžEEEþú׿ ÒBXX222pþüy=z†+³´™µ-ÞÞÞJ¥ÈÎÎ6[®T*QWW‡7"00R©”M3>>>°³³Ã?üÀ3P*•xöÙgyëóå\wb‘ÉdúüG ¦/½1®böPXC"‘à—_~±ÉÇGq êUŠÚÚZ( œ={UUU¸xñ"f̘ˆˆøùù¢¢¢’’"Ⱦ¥¥sçÎ…Z­Æ—_~‰ææfèt:èt:nVØVOˆ½Äj&&&âØ±cHIIF£ÁöíÛ‘™™‰„„›üâÓËÉÉÁŠ+››‹òòräää ..7nÜÀôéÓå¡+IOOÇœ9s •J;­u÷î]ìÞ½z½¹¹¹H$Ü­ gžygÏžEyy9t:E¬Zµ III8yò$ŒF#*++¡T*<ÜÝÐЀôôtÔÖÖbß¾}ìǸÂJ¥X¸p!-Z„üü|ÔÔÔ !!xíµ×xëóåÜ]5îÄ"•J1oÞ<ÄÆÆ"//·o߯‡~ØeúæÛ—Þ×¾}ûâ©§ž2{´®ÈaüøñøüóÏQ^^ŽŠŠŠ+·ƒ†Z­æ®óm_?ŠkP¯šP±páBÈd2¼ýöÛxùå—ñÕW_xøÁªV«¹Ù)Ÿ}vv68€k×®ÁËË ...ÜQQQÑAÏ^¶h>ÿüóøî»ïðí·ß"00û÷ïÇ÷ß›üâÓ{æ™gðÛo¿!66xë­·P]]ÜÜ\<ýôÓ¼qíJnß¾¯¿þ111]¢W__#GŽ`ìØ±pwwÇŽ;™™É-yÏ;þóŸ1fÌÞßY³f Þ{ï=,]º @XX ¾¾¾Ø¸q#Ö­[___dee úÐbÝégø»‚F½ý…ý0ƒ!6¶øé­1ê­ýêjª««áåå½^ouïˆ9XŒ-Ó™¸özÕ ƒÁ`tGJJJ,n³³³ëV¿ÂXXX™LÖ#>ôX\»½î±QƒÁènøúúÚ¼ÿQS\\Œ’’„……¡ººIIIX¹råãvK,®Ý ¶BÁ`0O0õõõHNN†——"""0þ|‹Oœ1„ó$Æ•­P0 ÆŒ\.G^^Þãv£×ñ$Æ•­P0 ƒÁè4lBÁ`0 £Ó° ƒÁ`0ŒNÃ& ƒÁ`0: ›P0 ƒÁè4lBÁ`0 £Ó° ƒÁ`0ŒNÃ& ƒÁ`0: ›P0 ƒÁè4=zB‘••…Ñ£G#--;§P(:üƒ˜#FXÔ°fo4‘ššŠ^xR©£FÂæÍ›-j‰µ×étðññÁ²eË:­YXXˆ‰'ÂÍÍ /½ôrssmö‹Oïþýûذa‚ƒƒáêêŠaÆ!66 œ˜ÿüóGÒÞ“W@ØgÊ£¤GN( †øøx466š”iµZ¬Y³Z­–;~þùg‹ZÖì:„Ó§OcãÆ(**Š+˜˜ˆC‡™Õk¿|ùrÔÖÖZí«ÍÒÒRL˜0“&MBaa!&OžŒ×_?þø£M~ñééõz¨T*lÚ´ ÅÅÅ8xð .]º„Å‹ ŠkWæ`Ë–-¨¯¯79RSSáëë‹   «±µ…ääd¼óÎ;]®Ë`¼ñÆ;v¬`ûž:ÿh¿Ÿ”¸Â>S%=òyìÚµ 3fÌ€B¡ÀäÉ“MÊ´Z- ‰D"HËš}tt4fÏžÍ½Ž‰‰Ann.²³³1sæÌNÙÿç?ÿAaa!fÍšeÕ?!š©©©˜:u*7+MJJ•+Wð¯ý _|ñ…è~ðé :;vìàì½¼¼––†I“&qçÄä¡39èß¿?ú÷ïoR端¾Bll,o» Fw¢;ý«íÞÄ“W¡Ÿ)’¹B‘––†¸¸8ôëׯC™V«…‹‹‹ÙzD„“å köööÃãááƒÁ`VϾ•ºº:,Y²èÛ×úœNˆæáÇmb3kÖ,=zT”_BõÌ¡×ë!“ɸ×ÖâÚžÎä =(**¼yóµmŽãÇ#44‰>>>HJJ¤¤¤ 99„ƒƒ–,YàáríÞ½{WWW|ÿý÷€ßÿ+W®„··7<<< P( Õj¹²åË—cÔ¨Qpvv†¯¯/öîÝkâGhh(>úè#„††B*•B.—ãÊ•+HMME`` \]]1mÚ´Çú¤·ÑÒÒ‚ 6À××nnn˜2e n޼ɕ‡††bÆ xñÅáââ‚çž{çÎãÊ­åœöËþÖÚ²4ùÚonnFRR¼½½1xð`( Œ=eee‚ê[ëB±ä7äää°¸¶‰kAAÅÛ¹S§N5飘ϔGIœPXC«Õâ½÷ÞCÿþý1|øpÄÄÄàöíÛ;;; 6 C† doŽóçÏ#44Ô¢ž5ûVbbb°xñb€ˆD÷±­fcc#îܹcòa£GFCC9r$¶lÙ™L†˜Õ“[s°mÛ6,Z´ˆWß}úôÁÉ“'‘ GGGDFFbÚ´i¢u¸|ù2Ôj5Ôj5nݺÅÝ2ÒjµËåÐh4øàƒ••ÅûTJÛ‹”µs Ûhjj‚ÑhDss³ÉyGGG899Y¬×š¾œwÖòÍ×¾Á`€Ñh„Ñh´©þÍ“W!{(:ó™ò(èõŠ[·n¡¾¾¾¾¾6Ù777cæÌ™H$عs'o}kö»víÁ`0pGLL âããa0 P(Dk@DDöïßorîÈ‘#ˆŠŠ¬!VÏŽŽŽ&­ˆÉƒ-98{ö,***ð׿þ•W_aaaÈÈÈÀùóçqôèQh4®Ì҆жx{{C*•";;Ûl¹R©D]]6nÜ+GI: IDATˆÀÀ@H¥R69xÌøøøÀÎÎ?üðwÎh4B©TâÙgŸå­Ï—óGAÛ±È×¾L&ëп¶ü‘þ yµò¤ÆUÈ [?S½jBQ[[ …B³gÏ¢ªª /^ÄŒ3???@TTRRRÙ·´´`îܹP«ÕøòË/ÑÜÜ NNÇm|i«'Ä^b5qìØ1¤¤¤@£Ñ`ûöíÈÌÌDBB‚M~ñéåää`ÅŠÈÍÍEyy9rrr‡7n`úôé‚ò 4gB}OOOÇœ9s •JÇÙwïÞÅîÝ»¡Ñh ×ë‘›› ‰DÂÝ zæ™gpöìY”——C§ÓYÔqppÀªU«””„“'OÂh4¢²²J¥àé鉆†¤§§£¶¶ûöí{$?ÄÅŽT*ÅÂ… ±hÑ"äç磦¦ ðððÀk¯½Æ[Ÿ/ç]Mû±È×¾T*żyó‹¼¼<ܾ}~øáî¿Ð÷Ðí—%ÿW\ûöí‹§žzÊìѺêÑíèM›2kjj(..Žd2999‘­ZµŠ!’H$4räHÚ¶mW¾qãF2d¹¹¹Ñ›o¾IQQQ&åíu›šš¸^­?~œž~úiÞ~‹áIÝ”Iôp3ÝÒ¥KiذaäááAo½õݹs‡+7—kºtéñçÜ|›Û·en,òµ¯ÓéH¡PÐ!CÈÓÓ“ ©T*Aõ-õV„ÄXè{ˆÅÕ6ç¦L»ŠŠ îkÞéÓ§;õü~WѨס¿³°¦b0ÄÀÆ?½5F½µ_¡ºº^^^ÐëõV÷‰…Åø!]מB¯ºåÁ`0Ý‘’’‹ììììÛ¯9B&“õØ=×îE¯{l”Á`0º¾¾¾÷‡þ—ââb””” ,, ÕÕÕHJJÂÊ•+·[6ÃâÚ½`+ ƒñ„P__äädxyy!""óçÏÿßè°¸>„­P0 Æ‚\.G^^Þãv£×Áâú¶BÁ`0 £Ó° ƒÁ`0ŒNÃ& ƒÁ`0: ›P0 ƒÁè4lBÁ`0 £Ó° ƒÁ`0ŒNÃ& ƒÁ`0: ›P0 ƒÁè4lBÁ`0 £Óôè EVVF´´4îœB¡èðbFŒaQÚ½ÑhDjj*^xáH¥RŒ5 ›7o¶¨%Ö^§ÓÁÇÇË–-ë´faa!&Nœ777¼ôÒKÈÍ͵Ù/>½û÷ïcÆ †««+† †ØØX444p6bòðûï¿#)) LJ‹‹ ƇœœÑq«c MMMÐëõ]ªÉ`ð!fÜ3üñ#öÈvÌõ%44Ÿþy·ðÅÝ!®¿ýöìììPVV&ÈþŽkœP ,, ñññhll4)ÓjµX³f ´Z-wüüóϵ¬Ù:t§OŸÆÆQTT„+V 11‡2«%Ö~ùò娭­µÚW!𥥥˜0a&Mš„ÂÂBLž<¯¿þ:~üñG›üâÓÓëõP©TØ´iŠ‹‹qðàA\ºt ‹/×ö¬[·ÇŽÃÞ½{¡T*1~üxL:UUU¢â&VÇ’““ñÎ;ït™ƒ!1ãî7ÞÀرc±G¶ÓÞC½)®Ý‚ŠŠ j=222¨; ×i­–/^¼˜¶nÝJ¿ýö…‡‡Ó§Ÿ~Ê•M:•6mÚ$¸-köF£±Ã¹Ù³gÓœ9s:mÿ?ÿó?J …‚,ú'DsÑ¢E4wî\›3fÐÛo¿mS?øôÌqîÜ9ruuå^‹ÉC`` mß¾Ýä܈#(++«ƒ­µ¸ Ñá[|¬]»–fÍšÕ)îNgcÔ]éÉýê)ãNHŒÍõ%$$„vîÜù¨ÜåKw¦©©‰Ð7ÙÿÑqí‘+iiiˆ‹‹C¿~ý:”iµZ¸¸¸˜­GD 1Y*·fooß1<0 fõøì[©««Ã’%K‘‘¾}­ÿ6!š‡Ftt´‰Í¬Y³pôèQQ~ Õ3‡^¯‡L&ã^[‹k{ „¢¢"îuCCîÞ½ ;¾¸ Õáãøñã …D"’’’)))HNNÆÁƒáàà€%K–x¸¬¸wï^„‡‡ÃÕÕßÿ=€‡·`V®\ oooxxx@¡P@«ÕreË—/ǨQ£àìì ___ìÝ»×ÄÐÐP|ôÑG …T*…\.Ç•+WššŠÀÀ@¸ººbÚ´i¼«\ á´´´`Æ ðõõ…››¦L™‚›7orå¡¡¡Ø°a^|ñE¸¸¸à¹çžÃ¹sç¸rk9磫Æ]ûen>Ÿ›››‘””ooo < …£G¼¬.K}€œœœ'&®n ·S§N5Ñxÿý÷1|øp¸»»ãÝwß5éßxmñ-öZfBO\¡hKûŠÐÐPrss#'''òöö&…BA555\yDD%'' ¶oOHH}òÉ'õøì‰ˆ¢¢¢(%%…ˆ®X[¡àÓÔëõ€~ù囟~ú‰Ðýû÷û%V¯¹¹™îÝ»GÇ'úòË/¹21qýá‡ÈÍÍfÍšEß|ó …††vXi ⛾±u÷î]rrr¢ÿûßt÷î]***¢¼¼<®ÜÒ·+777Ú½{7]½z•t:ÅÄÄÐÔ©S©¦¦†*++éÕW_¥Å‹sõÒÒÒ¨¨¨ˆÊÊÊèŸÿü'õéӇЋ‹Mtè°°ª««iöìÙdggGË–-#•JE%%%4fÌz÷Ýw­öI,=ù›¼5„ôëÿø;–~úé'*++£ÈÈH1býöÛoDô0'/¿ü2PMM ÅÄÄÐСC¹r¾œ[¢+Ç]ûo¥|>'&&ÒóÏ?O?þø#©ÕjЉ‰õ-¸-Y¡7nåçç?q5 T]]mö¸wïׯŠ+¬æFÈxmë³{[®e­ôº Å… ¨´´”êêêèÔ©SDr¹œš››ÍÖcŸ••E®®®T__/È7sö{öì¡qãÆq·!bccEM(ÚkªT*@UUU&v†Z­Õ1zëׯ'€&NœH¥¥¥\™Øëõzrrr¢üü|®¼±±ñ±L(X\Mill´ª!v¼ µï̵Ìúz{dܸqÜß&LÀ‘#GàãルW¯šÝP#Ô¾ªª ±±±HMMÅ€xý0g_YY‰Õ«WãÌ™3foCØ¢éîîàáíOOOζõ‰ ^¶ˆÑ[·nÖ®]‹òòr¤¦¦"88EEEðöö•‡Å‹£¤¤×®]ƒ>øàøùùáÔ©SxöÙgÇOGþþþxå•Wˆ)S¦àÝwßÅ«¯¾Ê[¯ÿþ&¯KKKÑÒÒ‚¨¨(ØÙÙ îß¿ÏÙÔÖÖbÿþý8þ<îܹƒšš«;ÎÀd#r@@€à¥_†uT* ‚ƒƒ¹s‰r¹ÅÅÅfë >‰Z­VPÎ-ÑUãNm}V©T0&ïÉVß',®àÕ;^…ÚÛr-k¥GL&ÃÀQYYi³}SS"##Ž ðjX²_·n~ýõWÂÁÁؾ};6oÞ |öÙg¢5]]]!•Jqýúu{µZ www8;;‹ê‡=èÓ§Fމ-[¶@&“áÀfu-åáúõëHOOǾ}ûàëë‹Ñ£GãÀ?~<þßÿû‚ã&DG}úôÁÉ“'‘ GGGDFFbÚ´i‚ë·2pà@ÀåË—¡V«¡V«qëÖ-((÷îÝ ,nBtĆŒŒ œ?G…F£áÊ,mfm‹··7¤R)²³³Í–+•JÔÕÕaãÆ „T*e“ƒÇŒìììðÃ?pçŒF#”J¥ .¾œ ¡³ãN,2™¬CŸÿÄô¥7Æ5((ÕÕÕfÖÍÙæÆc[ÄŽW[Ç·˜ø÷ª Emm- Ξ=‹ªª*\¼x3fÌ@DDüüüQQQHIIdßÒÒ‚¹sçB­VãË/¿Dss3t:t:ˆ¨ƒž{!ˆÕLLLıcÇ’’FƒíÛ·#33 6ùŧ—““ƒ+V 77åååÈÉÉA\\nܸéÓ§ ÊC+AAA5j¢££‘——‡ªª*ìÛ·Ÿ}öfΜ)8f]¥s÷î]ìÞ½z½¹¹¹H$Ü­ gžygÏžEyy9t:E¬Zµ III8yò$ŒF#*++¡T*žžžhhh@zz:jkk±oß>\½zU°ŸŒ®G*•báÂ…X´hòóóQSSƒ„„xxxàµ×^ã­Ï—sktÕ¸‹T*żyó‹¼¼<ܾ}~øa—é›Cl_zc\ûöí‹§žzÊìѺ"À§!d¼<jµDdóøÿÞ´)³¦¦†âââH&“‘““ùøøÐªU«èÁƒDôð÷žþyZºt© û¬¬,nÓaûãæÍ›ôøìÍÑ~s¡­šgΜ¡ñãÇÓ€èå—_¦Ë—/se¶øeMïúõëG~~~äììLžžžE×®]×öܼy“Þzë-òòò"gggúÓŸþdö)kqªÃ7¶ÊÊÊhòäÉäááANNNDß}÷ÝÿÕ×ëé7Þ š2e Y~Ö»¥¥…>ùäò÷÷'‰DB#GޤmÛ¶qå7n¤!C†››½ùæ›eRÞ^×Ü3èǧ§Ÿ~ÚjŸÄò¤nÊ$z¸éméÒ¥4lØ0òðð ·Þz‹îܹ՛˵‹‹ ]ºt‰ˆøsn‰®w|›Ûû¬ÓéH¡PÐ!CÈÓÓ“ ©T*^¿Û#$ÆBûÂâjª1lØ0Z³f ùøøp×¾ñzâÄ 1bM›6M½­×²Vì***¸¯¨§OŸÆ¼yó„MÁ!zú;K·Œ^[üôÖõÖ~u5ÕÕÕðòò‚^¯·zoÝ,Æ–éL\{ ½ê–ƒÁ`tGJJJ,n³³³Crròãv‘£°°2™¬G|豸v/zÝc£ ƒÑÝðõõµê¤¸¸%%% Cuu5’’’°råÊÇí– X\»l…‚Á`0ž`êë둜œ ///DDD`þüùŸ8cçIŒ+[¡`0Œ'¹\޼¼¼ÇíF¯ãIŒ+[¡`0 ƒÑiØ„‚Á`0 F§a ƒÁ`0†M( ƒÁ`t6¡`0 ƒÑiØ„‚Á`0 F§a ƒÁ`0†M( ƒÁ`t6¡`0 ƒÑizô„"++ £GFZZwN¡Ptø1#FŒ°¨aÍÞh4"55/¼ð¤R)F…Í›7[Ôk¯ÓéàããƒeË–uZ³°°'N„››^zé%äææÚìŸÞýû÷±aÃÃÕÕÆ Cll,L4êë븸¸ 88YYYÛlŸÏ¿ýíoÿéÏÕ«WˆÏwgijj‚^¯dúŒ'—1cÆàã?lßSÇ¢9¿CCCñùçŸ?’öz{\ÿèk 5zä„¢  aaaˆGcc£I™V«Åš5k Õj¹ã矶¨eÍþСC8}ú46n܈¢¢"¬X±‰‰‰8tèY-±öË—/Gmm­Õ¾ Ñ,--Å„ 0iÒ$bòäÉxýõ×ñã?Ú䟞^¯‡J¥Â¦M›P\\ŒƒâÒ¥KX¼x1§QWW‡àà`À_|‚‚üýïÇSO=Õ¡=Kùܲe êëëMŽÔÔTøúú"((€ø|w–ääd¼óÎ;LŸñäòÆo`ìØ±‚í{êXü£ýîíqý£¯Öè‘ÿËc×®]˜1c &OžlR¦Õj1hÐ H$AZÖ죣£1{ölîuLL rss‘™3gvÊþ?ÿù 1kÖ,«þ ÑLMMÅÔ©S¹•ޤ¤$\¹rÿú׿ðÅ_ˆîŸÞСC±cÇÎÞËË iii˜4iwnÓ¦Mxá…°}ûv¯¯Ù>ZÊgÿþýѿۯ¾ú ±±±Ük±ùf0º+Ýé_m÷&z{\»Ó5°G®P¤¥¥!..ýúõëP¦Õjáââb¶!$$Ääƒ5{{ûŽáñðð€Á`0«ÇgßJ]]–,Y‚ŒŒ ôík}N'DóðáÃˆŽŽ6±™5kŽ=*Ê/¡zæÐëõÉdÜëÝ»w›|ð[ÃZ>ÛRPP€¢¢"Ì›7;g-¶rüøq„††B"‘ÀÇÇIII€””$''ãàÁƒpppÀ’%K<\®Ý»w/ÂÃÃáêêŠï¿ÿðûï¿cåÊ•ðöö†‡‡ ´Z-W¶|ùrŒ5 ÎÎÎðõõÅÞ½{Mü ÅG}„ÐÐPH¥RÈår\¹r©©© „««+¦M›Æ»ÊÅNKK 6lØ___¸¹¹aÊ”)¸yó&WŠ 6àÅ_„‹‹ ž{î9œ;wŽ+·–s>Ú/û[kËÒXäk¿¹¹IIIðööÆàÁƒ¡P(0zôh”•• ªoi¬ Å’ß““ÃâÚ&®oùN:•«û(®¶Ò#'ÖÐjµxï½÷п >111¸}û6ÀÎÎÆ Ã!CÙ›ãüùó µ¨g;•˜˜,^¼ "Ñ}l«ÙØØˆ;wî˜|˜ÀèÑ£ÑÐЀöK¬žÑhD}}=Nœ8øøx$&&x8¹¨®®ÆàÁƒñöÛoÃÓÓ#FŒÀÿ÷‹îk[ÒÓÓ 777îœØüñqïÞ=LŸ> .Ä­[·••…ÈÈHÀªU«°fÍDGGÃ`0˜ì݉ǜ9spîÜ9Œ?°téR””” ??W®\J¥ÂêÕ«ýúõƒ¾ùæ\»v óçÏÇ‚ PRRbâÏ©S§°cÇܸq#GŽDHH***pìØ1(•J”••áý÷ß·¹¿ SÖ¯_ÌÌLdff¢  ŽŽŽ˜0a~ÿýwÎæÄ‰HOO‡J¥‚\.Ç›o¾É•[˹-XjËÒXäkÿ½÷ÞÉ'ðí·ßB©TÂÞÞׯ_çÊ…øon¬ ÅÚ{H¥R!--Åõã„êêj³GÛ/]} ìÔzdddPw@¯Ó ¶ §O?ý”{}áÂ*--¥ºº::uê‘\.§ææf³õÅØgee‘««+Õ×× òÍœýž={hܸqd4‰ˆ(66–÷·½¦J¥"TUUeb§Ñh©ÕjQý£·~ýz@hâĉTZZJDDׯ_'ô—¿ü…öïßOµµµôõ×_“D"¡ÌÌL«ýkŸÏVêëëÉÙÙ™.^¼hr^l¾ùÆVQQÙÛÛSyy¹Ùòµk×Ò¬Y³LÎ…„„ÐÖ­[MÎ544½½=)•J_½¼¼,¶-“ÉhÏž=&º;wîä^Òh4ܹM›6‘ŸŸŸÕ>‰EÌû¯'Áׯ¦¦&rvv¦¼¼<îœV«%www:|ø0ủZ­&tíÚ5›rÞ–öÚÖÚ"ê8ùÚ×ëõäääDùùù\ycc# 7nòßÜXo‹±cé=Äâj9®Ö{ |”ôÈ=Ö7n÷÷„ päÈøøøàêÕ«f7浯ªªBll,RSS1`À^?ÌÙWVVbõêÕ8sæŒÙÛ¶hº»»xxÅÓÓ“³m}âÂÃÃW£-bôÖ­[‡µk×¢¼¼©©©FQQ xûí·¹="Ó§OGLL :„¨¨(Ñ}ß³gF¹\nr^l¾ùð÷÷Ç+¯¼‚ÀÀ@L™2ï¾û.^}õUÞzí÷z”––¢¥¥QQQ°³³ Ü¿Ÿ³©­­Åþýûqþüyܹs555Vw—€ÉÆÕ€€ÁK¿ ë¨T* n31H$Èår›­3|øpH$hµZA9ï mÛ2_û*• F£Ñä}Ñj'¤~+íÇú£€ÅU8]} ì ½î–G{d2ˆÊÊJ›í›šš‰ððp,X°€WÃ’ýºuëð믿"00pppÀöíÛ±yóf888à³Ï>­éêê ©Tj²¼jµîîîpvvÕ1zЧOŒ9[¶lL&Ã0hÐ 899aèС&¶~~~6/ÅmÛ¶ ‹-âµ›ïöôéÓ'OžDvv6‰iÓ¦‰Ö8p àòåËP«ÕP«Õ¸uëwËH«ÕB.—C£Ñàƒ>@VV÷äŠ%Ú^¤¬cØFSSŒF#š››MÎ;::ÂÉÉÉb½Öðå¼+°–o¾ö ŒF#ŒF£Mõÿhžô¸ ÝCÑžÎ^;C¯ŸPܺu õõõŸ0à³onnÆÌ™3!‘H°sçNÞúÖìwíÚ"‚Á`àŽ˜˜ÄÇÇÃ`0@¡PˆÖ€ˆˆìß¿ßäÜ‘#GLVÄôCˆž9¹ ǤI“™™iR^\\ŒÑ£G[Õ0ÇÙ³gQQQ¿þõ¯¼¶bóm‰°°0dddàüùó8zô(4 Wfi3k[¼½½!•J‘m¶\©T¢®®7nD`` ¤R)›‰åIÝ”Iôp3ÝÒ¥KiذaäááAo½õݹs‡+7—kºtéñçÜ|›Û·en,òµ¯ÓéH¡PÐ!CÈÓÓ“ ©T*Aõ-õV„ÄXè{ˆÅ•[®»ŠŠ î+êéÓ§Mžñ\4êuèïüø¤ƒÑû`c‹ŸÞ£ÞÚ¯ÎP]] ///èõz«ûD„Âbü®ŽkO¡WÝò`0ŒîHII‰Å vvvví× !“Éz쇋k÷¢×=6Ê`0Ý ___›~Ä®«)..FII ÂÂÂP]]¤¤$¬\¹òq»e3,®Ý ¶BÁ`0OõõõHNN†——"""0þ|‹O—1„Ãâú¶BÁ`0Or¹yyyÛ^‹ëCØ ƒÁ`0ŒNÃ& ƒÁ`0: ›P0 ƒÁè4lBÁ`0 £Ó° ƒÁ`0ŒNÃ& ƒÁ`0: ›P0 ƒÁè4lBÁ`0 £Ó° ƒÁ`¸¢ ´IDAT0ŒNÓ£'YYY=z4ÒÒÒ¸s …¢Ã?ˆ1b„E köF£©©©xá… •J1jÔ(lÞ¼Ù¢–X{N,[¶¬Óš………˜8q"ÜÜÜðÒK/!77×f¿øôîß¿ 6 88®®®6lbccÑÐÐ`¢Q__˜˜øûûÃÅÅÁÁÁÈÊÊ2Û_Þ¬• õ§+hjj‚^¯ïr]ÃbÆÝ˜1cðñÇ?blÇ\_BCCñùçŸw _,ÑÝãjŽöq}Ôq‚‚„……!>>&eZ­kÖ¬V«åŽŸþÙ¢–5ûC‡áôéÓØ¸q#ŠŠŠ°bÅ $&&âСCfµÄÚ/_¾µµµVû*D³´´&LÀ¤I“PXXˆÉ“'ãõ×_Ç?þh“_|zz½*• ›6mBqq1<ˆK—.añâÅœF]]‚ƒƒ_|ñ ð÷¿ÿO=õ”Ù6ùòf­\ˆ?]Err2Þyç.×e0¬!fܽñÆ;vì#öÈvºÓ{¨7ŵ;Ð#ÿ—Ç®]»0cÆ ( Lž<Ù¤L«ÕbРAH$‚´¬ÙGGGcöìÙÜ똘äææ";;3gÎì”ýþóbÖ¬YVý¢™ššŠ©S§r+III¸rå þõ¯á‹/¾Ý>½¡C‡bÇŽœ½——ÒÒÒ0iÒ$îܦM›ð /`ûöíÜ9___‹ýäË›µr!þ0O ë_v÷vX\ùé‘+iiiˆ‹‹C¿~ý:”iµZ¸¸¸˜­GD 1¹Å`ÍÞÞ¾cx<<<`0ÌêñÙ·RWW‡%K– ##}ûZŸÓ Ñ<|ø0¢££MlfÍš…£GŠòK¨ž9ôz=d2÷z÷î݈µhßkyRÎçŽ?ŽÐÐPH$øøø )) ’’‚ääd{"¢¨¨(JII!"¢E‹QBB‚àþ¶×Ôëõ€~ù囟~ú‰Ðýû÷û%V¯¹¹™îÝ»GÇ'úòË/‰ˆH§ÓºvíÍ;—†JǧM›6Yì_„äÉ’?&ýã[wïÞ%'''ú÷¿ÿMwïÞ¥¢¢"ÊËËãÊ×®]K³fÍ2©Bnnn´{÷nºzõ*ét:""Љ‰¡©S§RMM UVVÒ«¯¾J‹/æê¥¥¥QQQ•••Ñ?ÿùOêÓ§›è†……Qaa!UWWÓìÙ³ÉÎÎŽ–-[F*•ŠJJJh̘1ôî»ïZí“XļÿzBúõüƒÆŽK?ýô•••Qdd$1‚~ûí7"z˜“—_~™ ¨¦¦†bbbhèС\9_Î-Ñ•ã.$$„vîÜibgÍçÄÄDzþùçéÇ$µZM111€nܸÁëw{„ÄØR_ÆGùùùOD\ UWW›=îÝ»'¸¡C‡ÒÉ“'9{¥RINNN&õÛûÜö5ß5H,½nBqáÂ*--¥ºº::uê‘\.§ææf³õÅØgee‘««+Õ×× òÍœýž={hܸqd4‰ˆ(66VÔ„¢½¦J¥"TUUeb§Ñh©ÕjQý£·~ýz@hâĉTZZJDDׯ_'ô—¿ü…öïßOµµµôõ×_“D"¡ÌÌL³ýâ˃zyyYl[&“Ñž={LtÛ¾ù i4îܦM›ÈÏÏÏjŸÄò¤N(šššÈÙÙÙäG«Õ’»»;>|˜ˆ:æD­Vs“g[rÞJW;s>ZóY¯×“““åççsåeBÁâÚkmu~BÑžö× ±ôÈ[Ö7nF…Aƒa„ 8rä.]º„«W¯vʾªª ±±±HMMÅ€xý0g_YY‰Õ«W###Ãìm[4ÝÝÝ<¼Ò–Ö'<<1117‚òåAHž,ù#¼òÊ+ ÄìÙ³M–­Ñ~™±´´---ˆŠŠÂˆ#0bļù書ÿ>gS[[‹-[¶ ::¯¾ú*jjj¬î8“È‚—~ÖQ©T0 ÜfbH$Ëå(..6[gøðáH$Ðjµ‚rn‰®wBhë³J¥‚Ñh4Ùlhgg'Z³«aqåo£+{ â£×M(Ú#“É0pà@TVVÚlßÔÔ„ÈÈH„‡‡cÁ‚¼–ì×­[‡_ýppp€ƒƒ¶oߎ͛7ÃÁÁŸ}ö™hMWWWH¥R\¿~ÝÄ^­VÃÝÝÎÎ΢ú!Fúô郑#GbË–-Éd8pà ''' :ÔÄÖÏÏ·oß¶ØÇ¶ðåÍR¹9ÄЧOœ@VV‚‚‚¬jš» u‡‹o¡©© F£ÍÍÍ&çáääd±^kørn®wBiõÙ`0Àh4Âh4>²¶l¥7ÇUè km´BD6ùjË5ˆ^?¡¸uëêëë­>a`;¹¹3g΄D"ÁÎ;yë[³ßµkˆƒ;bbbƒÁ…B!Z"""°ÿ~“sGŽATT”` ±zæpttä&“&MBff¦Iyqq1FmU£¾¼ Ék[ĆŒŒ œ?G…F£áÊ,mfm‹··7¤R)²³³Í–+•JÔÕÕaãÆ „T*e“ƒÇŒìììðÃ?pçŒF#”J%ž}öYÞú|9BgÇXd2Y‡>ÿˆéKoŒkPPª««Íb6FJ$üòË/6ùø(®A½jBQ[[ …B³gÏ¢ªª /^ÄŒ3???@TTRRRÙ·´´`îܹP«ÕøòË/ÑÜÜ NNÇÍ Ûê ±‚XÍÄÄD;v )))Ðh4ؾ};233‘`“_|z999X±brssQ^^ŽœœÄÅÅáÆ˜>}:€‡¿±‘‘‘mÛ¶á×_Å×_]»v!..NtÞøÊ…ø#”»wïb÷îÝÐh4ÐëõÈÍÍ…D"án=óÌ38{ö,ÊËË¡Óé,ê888`ÕªUHJJÂÉ“'a4QYY ¥R àáî솆¤§§£¶¶ûöí³x[ŽñÇ •J±páB,Z´ùùù¨©©ABB<<<ðÚk¯ñÖç˹5ºj܉E*•bÞ¼yˆE^^nß¾?ü°ËôÍ!¶/½1®}ûöÅSO=eöh]‘Âøñãñù矣¼¼V¹ µZÍ]çÛ¾~× ^5¡ "8::báÂ…Édxûí·ñòË/㫯¾ððƒU­Vs³S>ûììl8p×®]ƒ——\\\¸£¢¢¢ƒŸ½lÑ|þùçñÝwßáÛo¿E`` öïßï¿ÿþþþ6ùŧ÷Ì3Ïà·ß~Cll,ðÖ[o¡ºº¹¹¹xúé§<èGŽAFF|}}ññÇ#33Óì7=¾<ð• ñG(õõõ8räÆŽ wwwìØ±™™™Ü’÷ܹsñç?ÿcÆŒáý ‘5kÖà½÷ÞÃÒ¥K1`À„……¡  ÀÃß䨏q#Ö­[___dee úÐb>. . <>. . <>. . <>. . <> to produce xref:how-barectf-works:ctf-primer.adoc#ds[CTF data streams]. . <>. IMPORTANT: Make sure that barectf xref:install.adoc[is installed] before you follow this guide. [[yaml]] == Write the YAML configuration file . Create an empty directory and `cd` into it, for example: + [.cl] [verse] [.prompt]##$## cd $(mktemp --directory) . Write the following xref:yaml:index.adoc[YAML configuration file]: + [[config.yaml]] .`config.yaml` [source,yaml] ---- # Needed YAML tag for the configuration object --- ! # Configuration's trace trace: # Type of the trace type: # Add standard field type aliases $include: - stdint.yaml - stdmisc.yaml # Native byte order is little-endian native-byte-order: little-endian # One clock type clock-types: # The Linux FS platform requires a clock type named `default` # which has a 1-GHz frequency and the `uint64_t` C type. default: frequency: 1000000000 $c-type: uint64_t # One data stream type data-stream-types: # Stream type named `default` default: # Default data stream type $is-default: true # Default clock type: `default` $default-clock-type-name: default # Two event record types event-record-types: # Event record type named `one_integer` one_integer: payload-field-type: class: structure members: # One payload member: a 32-bit signed integer field type # (`int32_t` C type) - the_integer: int32 # Event record type named `one_string` one_string: payload-field-type: class: structure members: # One payload member: a string field type # (`const char *` C type) - the_string: string ---- + barectf will <> two xref:tracing-funcs:index.adoc[tracing functions] named `+barectf_trace_one_integer()+` and `+barectf_trace_one_string()+` from this configuration. [[cli]] == Generate the files with the `barectf` CLI tool . Create a directory which will contain the CTF trace: + -- [.cl] [verse] [.prompt]##$## mkdir trace -- + A CTF trace always contains a file named `metadata` and one or more data stream files. barectf always generates the `metadata` file while the user application writes the data stream files through the generated tracer. . Generate the CTF metadata stream and C{nbsp}source files with the xref:cli:index.adoc[`barectf` CLI tool]: + [.cl] [verse] -- [.prompt]##$## barectf generate --metadata-dir=trace config.yaml -- + `barectf generate` creates: + [%autowidth.stretch, cols="d,a"] |=== |File name |Description |`trace/metadata` |The CTF metadata stream file. It's in the `trace` directory because we used the xref:cli:usage.adoc#generate-metadata-dir-option[`+--metadata-dir+`] option. |`barectf.h` |The generated tracer's public C{nbsp}header file. |`barectf-bitfield.h` |Internal macros for the generated tracer (included by `barectf.c`). |`barectf.c` |The generated tracer's C{nbsp}source code. |=== [[app]] == Write the application source file Write a simple application which uses the generated tracer: .`app.c` [source,c] ---- /* Include the Linux FS platform header */ #include "barectf-platform-linux-fs.h" /* Include the barectf public header */ #include "barectf.h" int main(const int argc, const char * const argv[]) { /* Platform context */ struct barectf_platform_linux_fs_ctx *platform_ctx; /* barectf context */ struct barectf_default_ctx *ctx; int i; /* * Obtain a platform context. * * The platform is configured to write 512-byte packets to a data * stream file within the `trace` directory. */ platform_ctx = barectf_platform_linux_fs_init(512, "trace/stream", 0, 0, 0); /* Obtain the barectf context from the platform context */ ctx = barectf_platform_linux_fs_get_barectf_ctx(platform_ctx); /* * Write a `one_integer` event record which contains the number of * command arguments. */ barectf_trace_one_integer(ctx, argc); /* For each command argument */ for (i = 0; i < argc; ++i) { /* * Write a `one_integer` event record which contains the * argument's index. */ barectf_trace_one_integer(ctx, i); /* * Write a `one_string` event record which contains the * argument. */ barectf_trace_one_string(ctx, argv[i]); } /* Finalize (free) the platform context */ barectf_platform_linux_fs_fini(platform_ctx); return 0; } ---- This application calls the `+barectf_trace_one_integer()+` and `+barectf_trace_one_string()+` functions which correspond to the `one_integer` and `one_string` event record types in <>. [[build]] == Download platform source files and build the application To build the final application, you need the Linux FS platform source files. The Linux FS platform only exists to demonstrate barectf; a barectf user almost always xref:platform:index.adoc[writes its own platform] because of the bare-metal/embedded nature of the target systems. . Download the Linux FS platform source files: + [.cl] [verse] [.prompt]##$## wget https://raw.githubusercontent.com/efficios/barectf/stable-{page-component-version}/platforms/linux-fs/barectf-platform-linux-fs.h [.prompt]##$## wget https://raw.githubusercontent.com/efficios/barectf/stable-{page-component-version}/platforms/linux-fs/barectf-platform-linux-fs.c . Build the application: + [.cl] [verse] [.prompt]##$## gcc -o app app.c barectf.c barectf-platform-linux-fs.c [[trace]] == Execute the application Run the <> application, passing a few command-line arguments: [.cl] [verse] [.prompt]##$## ./app lorem ipsum nulla dolore consequat This writes the xref:how-barectf-works:ctf-primer.adoc#ds[CTF data stream] file `trace/stream`. The `trace` directory is now a complete xref:how-barectf-works:ctf-primer.adoc#trace[CTF trace]. [[read]] == Read the CTF trace Use https://babeltrace.org/[Babeltrace{nbsp}2] to read the resulting CTF trace: [.cl] [verse] [.prompt]##$## babeltrace2 trace ---- [15:52:24.202028327] (+?.?????????) one_integer: { the_integer = 6 } [15:52:24.202029477] (+0.000001150) one_integer: { the_integer = 0 } [15:52:24.202029988] (+0.000000511) one_string: { the_string = "./app" } [15:52:24.202033362] (+0.000003374) one_integer: { the_integer = 1 } [15:52:24.202033716] (+0.000000354) one_string: { the_string = "lorem" } [15:52:24.202034147] (+0.000000431) one_integer: { the_integer = 2 } [15:52:24.202034465] (+0.000000318) one_string: { the_string = "ipsum" } [15:52:24.202034812] (+0.000000347) one_integer: { the_integer = 3 } [15:52:24.202035147] (+0.000000335) one_string: { the_string = "nulla" } [15:52:24.202035527] (+0.000000380) one_integer: { the_integer = 4 } [15:52:24.202035848] (+0.000000321) one_string: { the_string = "dolore" } [15:52:24.202036175] (+0.000000327) one_integer: { the_integer = 5 } [15:52:24.202036553] (+0.000000378) one_string: { the_string = "consequat" } ---- You can also open the trace with https://www.eclipse.org/tracecompass/[Trace{nbsp}Compass]: .Trace Compass 5.3.0's event list view image::getting-started-trace-compass.png[] barectf-3.1.2/docs/modules/ROOT/pages/index.adoc000066400000000000000000000063741443101201700213470ustar00rootroot00000000000000= Welcome! :ansi-c: ANSI{nbsp}C [.welcome-logo] image::barectf-logo.svg[] Welcome to the _**barectf**_{nbsp}{page-component-version} documentation! == What's barectf? barectf (from _bare_ metal and _CTF_) is a generator of https://en.wikipedia.org/wiki/Tracing_(software)[tracer] which produces xref:how-barectf-works:ctf-primer.adoc#ds[CTF data streams]. CTF is a binary trace format designed to be very fast to write without compromising great flexibility. barectf reads a xref:yaml:index.adoc[configuration] and produces: * A CTF xref:how-barectf-works:ctf-primer.adoc#trace[metadata stream] file. * {ansi-c} source code files which, once xref:build:index.adoc[compiled], constitute a tracer which writes CTF data streams. + The generated C{nbsp}source code has no other dependencies than a few C{nbsp}standard library headers. Your C/{cpp} program can include the generated `barectf.h` header and call its xref:tracing-funcs:index.adoc[`+barectf_trace_*()+` functions] from source locations of your choice to write xref:how-barectf-works:ctf-primer.adoc#er[event records] to xref:how-barectf-works:ctf-primer.adoc#pkt[CTF packets]. You can then read and analyze the CTF traces with tools such as https://babeltrace.org/[Babeltrace{nbsp}2] and https://www.eclipse.org/tracecompass/[Trace{nbsp}Compass]. xref:getting-started.adoc[Get started] now with a simple barectf configuration. Read xref:how-barectf-works:index.adoc[] to understand the mechanics and terminology of barectf. == Do I need barectf? You may need barectf if you need to add CTF tracing capabilities to your bare metal or embedded application/system. Because barectf generates portable {ansi-c} code, you can compile it and use it for virtually any system. If you need to add CTF instrumentation to Linux applications or to the Linux kernel, have a look at https://lttng.org/[LTTng] which offers a comprehensive tracing solution for Linux. == Components of barectf The barectf project contains: * A Python{nbsp}3 package, named `barectf`, which offers an API to programatically create a barectf configuration and generate files out of it. + The documentation of the `barectf` Python{nbsp}3 package isn't available yet. * A xref:cli:index.adoc[command-line interface] (CLI), named `barectf`, which can process a xref:yaml:index.adoc[barectf YAML configuration file] to generate files out of it. * Installed xref:yaml:include.adoc#std[standard partial YAML files] which you can include in your barectf YAML configuration. == What's in this documentation? This documentation shows: * xref:install.adoc[How to install barectf]. * xref:how-barectf-works:index.adoc[How barectf works]. * xref:yaml:index.adoc[How to write a barectf YAML configuration]. * xref:cli:index.adoc[How to generate files from a YAML configuration file] with the `barectf` CLI tool. * xref:build:index.adoc[How to use and build your application with a generated tracer]. * xref:platform:index.adoc[How to write a barectf platform]. == It's "`barectf`"! The name of the project is "`**barectf**`"; not "`BareCTF`", nor "`__bareCTF__`", nor "`__Barectf__`". == License The barectf project, including this documentation, is licensed under the https://github.com/efficios/barectf/blob/stable-{page-component-version}/LICENSE[MIT license]. barectf-3.1.2/docs/modules/ROOT/pages/install.adoc000066400000000000000000000016261443101201700217010ustar00rootroot00000000000000= Install barectf == Requirements barectf{nbsp}{page-component-version} requires http://python.org/[Python]{nbsp}3.6 and pip for Python{nbsp}3. You can install barectf on Linux, macOS, or Windows. == Install barectf There are two ways to install barectf with pip: * To install barectf on your system: + [.cl] [verse] [.prompt]##### pip3 install barectf * To install barectf for the current user: + [.cl] [verse] -- [.prompt]##$## pip3 install --user barectf -- + See `+pip3 install --help+` to learn more about the `+--user+` option. NOTE: The commands above install the latest version of barectf, while you're currently reading the documentation of barectf{nbsp}{page-component-version}. == Upgrade barectf To upgrade your system barectf: [.cl] [verse] [.prompt]##### pip3 install --upgrade barectf To upgrade your user barectf: [.cl] [verse] [.prompt]##$## pip3 install --user --upgrade barectf barectf-3.1.2/docs/modules/ROOT/pages/whats-new.adoc000066400000000000000000000023461443101201700221500ustar00rootroot00000000000000= What's new in barectf{nbsp}{page-component-display-version}? Thanks to a https://review.lttng.org/c/barectf/+/7496[contribution from Jon Lamb], the xref:how-barectf-works:ctf-primer.adoc#pkt[CTF packets] which a barectf-generated tracer writes can contain an automatically-incremented **sequence number** in their context field. This is useful for a trace reader/analyzer to detect packets lost at transport time, for example. https://babeltrace.org/[Babeltrace{nbsp}2] supports such a packet context field out of the box. To enable this new packet feature, set the xref:yaml:dst-obj.adoc#seq-num-ft-prop[`sequence-number-field-type` property] of the packet features object, for example: .Data stream type object with an enabled packet sequence number field type feature. ==== [source,yaml] ---- $features: packet: sequence-number-field-type: true event-record-types: # ... ---- ==== This feature is disabled (false) by default to avoid breaking changes. The xref:platform:api.adoc#close[packet closing function] automatically increments the current packet sequence number of the barectf context. Within platform code, you can get the current value with xref:platform:api.adoc#barectf-pkt-seq-num-func[`barectf_packet_sequence_number()`]. barectf-3.1.2/docs/modules/ROOT/partials/000077500000000000000000000000001443101201700201165ustar00rootroot00000000000000barectf-3.1.2/docs/modules/ROOT/partials/def-prefix-note.adoc000066400000000000000000000001741443101201700237440ustar00rootroot00000000000000NOTE: This page assumes that the configured xref:yaml:cfg-obj.adoc#prefix-prop[identifier prefix] is the default `barectf`. barectf-3.1.2/docs/modules/build/000077500000000000000000000000001443101201700166135ustar00rootroot00000000000000barectf-3.1.2/docs/modules/build/pages/000077500000000000000000000000001443101201700177125ustar00rootroot00000000000000barectf-3.1.2/docs/modules/build/pages/index.adoc000066400000000000000000000037671443101201700216660ustar00rootroot00000000000000= Build your application with a generated tracer To build your application with a tracer which barectf xref:cli:index.adoc[generates] using https://gcc.gnu.org/[GCC]: [.cl] [verse] [.prompt]##$## gcc my-app.c barectf.c Note that you probably need to build a xref:platform:index.adoc[platform] into your application too: [.cl] [verse] [.prompt]##$## gcc my-app.c barectf.c platform.c You can also build the tracer and/or the platform as dynamic libraries and link your application to them if your system supports this feature. [[req]] == Compiler requirements barectf xref:cli:index.adoc[generates] ANSI{nbsp}C code, with the exception of a requirement for `stdint.h`, which is part of C99. If your C{nbsp}standard library doesn't offer `stdint.h`, you need to create this file and define the following type definitions: * `uint8_t` * `uint16_t` * `uint32_t` * `uint64_t` * `int8_t` * `int16_t` * `int32_t` * `int64_t` .Custom `stdint.h`. ==== [source,c] ---- #ifndef _BARECTF_STDINT_H #define _BARECTF_STDINT_H typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef unsigned long uint64_t; typedef signed char int8_t; typedef signed short int16_t; typedef signed int int32_t; typedef signed long int64_t; #endif /* _BARECTF_STDINT_H */ ---- ==== == Supported C{nbsp}compilers The C{nbsp}code which barectf generates is known to be compilable by the following compilers: * https://gcc.gnu.org/[GCC] and G++ (tested with the IA-32, x86-64, MIPS, ARM, and AVR architectures; also tested with and without the https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html[`+-ansi+` option]) * https://clang.llvm.org/[Clang] and Clang++ (tested with and without the https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-ansi[`+-ansi+` option]) * https://visualstudio.microsoft.com/[Microsoft Visual Studio] 2008 (with a <>) * Microsoft Visual Studio 2010+ * https://bellard.org/tcc/[TCC] * https://github.com/rui314/8cc[8cc] barectf-3.1.2/docs/modules/cli/000077500000000000000000000000001443101201700162635ustar00rootroot00000000000000barectf-3.1.2/docs/modules/cli/pages/000077500000000000000000000000001443101201700173625ustar00rootroot00000000000000barectf-3.1.2/docs/modules/cli/pages/index.adoc000066400000000000000000000072311443101201700213240ustar00rootroot00000000000000= Generate files from a YAML configuration file barectf ships with the `barectf` command-line interface (CLI) tool. The `barectf` CLI tool has a command interface, like https://git-scm.com/[Git]. This page focuses on the `barectf generate` command. See xref:usage.adoc[] for the complete CLI tool's documentation. == Generate files from a YAML configuration Use the xref:usage.adoc#generate-command[`barectf generate` command] to generate files from a barectf xref:yaml:index.adoc[YAML configuration file]: [.cl] [verse] [.prompt]##$## barectf generate my-config.yaml On success, this command writes the following files to the current working directory: [%autowidth.stretch, cols="d,a"] |=== |File name |Description |[[metadata-file]]`metadata` |The CTF metadata stream file. You'll need to place this file in a directory with the xref:how-barectf-works:ctf-primer.adoc#ds[data stream] files which your application will write through the generated tracer. See xref:how-barectf-works:index.adoc[] to learn more. |`barectf.h` |The generated tracer's public C{nbsp}header file. This header contains the prototypes of the packet opening, packet closing, and xref:tracing-funcs:index.adoc[tracing functions]. barectf generates one packet opening/closing function per configured xref:yaml:dst-obj.adoc[data stream type] and one tracing function per configured xref:yaml:ert-obj.adoc[event record type]. Your application and xref:platform:index.adoc[platforms] need to include this file. |`barectf-bitfield.h` |Internal macros for the generated tracer (included by `barectf.c`). |[[barectf.c-file]]`barectf.c` |The generated tracer's C{nbsp}source code. |=== Those file names assume that `my-config.yaml` uses the default xref:yaml:cfg-obj.adoc#prefix-prop[prefixes]. === Use dedicated output directories Because the <> which barectf generates is part of an eventual xref:how-barectf-works:ctf-primer.adoc#trace[CTF trace], you'll probably want to make barectf write it to its own directory. Use the `barectf generate` command's xref:usage.adoc#generate-metadata-dir-option[`+--metadata-dir+` option] to specify the `metadata` file's output directory: [.cl] [verse] [.prompt]##$## barectf generate my-config.yaml --metadata-dir=my-trace `barectf generate` also offers the xref:usage.adoc#generate-code-dir-option[`+--code-dir+`] and xref:usage.adoc#generate-headers-dir-option[`+--headers-dir+`] options to select the output directories of the generated <> and headers. === Control inclusions A barectf xref:yaml:index.adoc[YAML configuration file] can xref:yaml:include.adoc[include partial YAML files]. Set the most significant inclusion search directories with the `barectf generate` command's xref:usage.adoc#generate-include-dir-option[`+--include-dir+`] option. You can use the option more than once: [.cl] [verse] [.prompt]##$## barectf generate my-config.yaml \ --include-dir=/path/to/project/barectf \ --include-dir=/path/to/base/barectf By default, if `barectf generate` can't find an inclusion file, it prints an error and xref:usage.adoc#exit-status[exits] with a non-zero status. However, it's possible that some YAML file **_A_** includes a file **_B_** which barectf can't find, but **_A_** doesn't need anything from **_B_**. Force `barectf generate` to continue silently instead with its xref:usage.adoc#generate-ignore-include-not-found-option[`+--ignore-include-not-found+`] option: [.cl] [verse] [.prompt]##$## barectf generate my-config.yaml --ignore-include-not-found \ --include-dir=/path/to/project/barectf \ --include-dir=/path/to/base/barectf \ barectf-3.1.2/docs/modules/cli/pages/usage.adoc000066400000000000000000000227671443101201700213340ustar00rootroot00000000000000= `barectf` CLI tool usage barectf ships with the `barectf` command-line interface (CLI) tool. == General synopses Run a `barectf` command: [.cl] [verse] *barectf* _COMMAND_ _COMMAND-ARGUMENTS_ Print the version of `barectf`: [.cl] [verse] *barectf* pass:[[]xref:#version-option[--version]pass:[\]] Print brief general help: [.cl] [verse] *barectf* pass:[[]xref:#help-option[--help]pass:[\]] == General description The `barectf` tool offers a https://git-scm.com/[Git]-like user interface with the following available commands: <>:: Generates the C{nbsp}source and CTF metadata stream files of a tracer from a xref:yaml:index.adoc[YAML configuration file]. <>:: Prints the xref:yaml:index.adoc#stages[_effective_] version of a YAML configuration file. <>:: Prints the major version (2 or 3) of a YAML configuration file. == General options [[help-option]]`-h`:: `--help`:: Print brief general help and exit. [[version-option]]`-V`:: `--version`:: Print the version of `barectf` and exit. [[generate-command]] == `generate` command === Synopses Generate files from a xref:yaml:index.adoc[YAML configuration file]: [.cl] [verse] *barectf generate* pass:[[]xref:#generate-prefix-option[--prefix]=__PREFIX__] pass:[[]xref:#generate-metadata-dir-option[--metadata-dir]=__MDIR__] pass:[[]xref:#generate-headers-dir-option[--headers-dir]=__HDIR__] pass:[[]xref:#generate-code-dir-option[--code-dir]=__CDIR__] pass:[[]xref:#generate-include-dir-option[--include-dir]=__IDIR__]... pass:[[]xref:#generate-ignore-include-not-found-option[--ignore-include-not-found]pass:[\]] _CONFIG-PATH_ Print command's brief help: [.cl] [verse] *barectf generate* xref:#generate-help-option[--help] === Command name aliases * `gen` === Description The `barectf generate` command reads the xref:yaml:index.adoc[YAML configuration file] `__CONFIG-PATH__` to produce: [%autowidth.stretch, cols="d,a"] |=== |File name |Description |`__MDIR__/metadata` |The CTF metadata stream file. |`__HDIR__/__FPREFIX__.h` |The generated tracer's public C{nbsp}header file. |`__HDIR__/__FPREFIX__-bitfield.h` |Internal macros for the generated tracer (included by `__FPREFIX__.c`). |`__CDIR__/__FPREFIX__.c` |The generated tracer's C{nbsp}source code. |=== See xref:lel[Build the generated C{nbsp}source code] to learn how to build the C{nbsp}source which the `generate` command produces. In the list above, `__FPREFIX__` is: Without the <> option:: If the `__CONFIG-PATH__` file has a file name xref:yaml:cfg-obj.adoc#prefix-prop[prefix option]::: The `__CONFIG-PATH__` file's file name prefix option. Otherwise::: `barectf` With the <> option:: `__PREFIX__`, without trailing underscores. + For example, if `__PREFIX__` is `my_tracer_`, then `__FPREFIX__` is `my_tracer`. By default, `__MDIR__`, `__HDIR__`, and `__CDIR__` are the current working directory. Use the <>, <>, and <> to specify other output directories. Therefore, by default, the `generate` command writes the `metadata`, `barectf.h`, `barectf-bitfield.h`, and `barectf.c` files to the current working directory. If you use the <> option, then all the public C{nbsp}identifiers in `__FPREFIX__.h` and `__FPREFIX__.c` begin with `__PREFIX__`. Otherwise, they begin with: If the `__CONFIG-PATH__` file has an identifier xref:yaml:cfg-obj.adoc#prefix-prop[prefix option]:: The `__CONFIG-PATH__` file's identifier prefix option. Otherwise:: `barectf_` Add directories to be searched into for xref:yaml:include.adoc[inclusion files] before the default inclusion directories with the repeatable <> option. By default, if `barectf` can't find an inclusion file while processing the `__CONFIG-PATH__` file, the command prints an error and <> with a non-zero status. Force `barectf generate` to continue silently instead with its <> option. === Options [[generate-code-dir-option]]`-c __CDIR__`:: `--code-dir=__CDIR__`:: Write the C{nbsp}source file to the directory `__CDIR__` instead of the current working directory. [[generate-headers-dir-option]]`-H __HDIR__`:: `--headers-dir=__HDIR__`:: Write C{nbsp}header files to the directory `__HDIR__` instead of the current working directory. [[generate-help-option]]`-h`:: `--help`:: Print the `generate` command's brief help and exit. [[generate-ignore-include-not-found-option]]`--ignore-include-not-found`:: Continue to process the `__CONFIG-PATH__` file when inclusion files are not found. [[generate-include-dir-option]]`-I __IDIR__`:: `--include-dir=__IDIR__`:: Add `__IDIR__` to the list of directories to be searched into for inclusion files before the default inclusion directories. + The default inclusion directories are: + . The current working directory. . The directory containing the xref:yaml:include.adoc#std[standard partial YAML files] (like `stdint.yaml`). [[generate-metadata-dir-option]]`-m __MDIR__`:: `--metadata-dir=__MDIR__`:: Write the CTF metadata stream file to the directory `__MDIR__` instead of the current working directory. [[generate-prefix-option]]`-p __PREFIX__`:: `--prefix=__PREFIX__`:: Override the default or `__CONFIG-PATH__` file's file and identifier prefixes with: + File name prefix::: `__PREFIX__`, without trailing underscores. Identifier prefix::: `__PREFIX__` + -- `__PREFIX__` must be a valid C{nbsp}identifier. The default file name prefix is `barectf`. The default identifier prefix is `barectf_`. -- [[show-effective-configuration-command]] == `show-effective-configuration` command === Synopses Show the xref:yaml:index.adoc#stages[effective] version of a xref:yaml:index.adoc[YAML configuration file]: [.cl] [verse] *barectf show-effective-configuration* pass:[[]xref:#show-effective-configuration-include-dir-option[--include-dir]=__IDIR__]... pass:[[]xref:#show-effective-configuration-ignore-include-not-found-option[--ignore-include-not-found]pass:[\]] _CONFIG-PATH_ Print command's brief help: [.cl] [verse] *barectf show-effective-configuration* xref:#show-effective-configuration-help-option[`--help`] === Command name aliases * `show-effective-config` * `show-effective-cfg` === Description The `barectf show-effective-configuration` command reads the xref:yaml:index.adoc[YAML configuration file] `__CONFIG-PATH__` and prints an equivalent, _effective_ YAML configuration. See the xref:yaml:index.adoc#stages[processing stages] of a YAML configuration file to learn what an effective configuration is. Moreover, the `show-effective-configuration` command validates the `__CONFIG-PATH__` file. In other words, if the command <> with status{nbsp}0, the <> using the same options and `__CONFIG-PATH__` file would also succeed. Add directories to be searched into for inclusion files before the default inclusion directories with the repeatable <> option. By default, if `barectf` can't find an inclusion file while processing the `__CONFIG-PATH__` file, the command prints an error and <> with a non-zero status. Force `barectf show-effective-configuration` to continue silently instead with its <> option. === Options [[show-effective-configuration-help-option]]`-h`:: `--help`:: Print the `show-effective-configuration` command's brief help and exit. [[show-effective-configuration-ignore-include-not-found-option]]`--ignore-include-not-found`:: Continue to process the `__CONFIG-PATH__` file when inclusion files are not found. [[show-effective-configuration-include-dir-option]]`-I __IDIR__`:: `--include-dir=__IDIR__`:: Add `__IDIR__` to the list of directories to be searched into for inclusion files before the default inclusion directories. + The default inclusion directories are: + . The current working directory. . The directory containing the xref:yaml:include.adoc#std[standard partial YAML files] (like `stdint.yaml`). [[show-configuration-version-command]] == `show-configuration-version` command === Synopses Show a xref:yaml:index.adoc[YAML configuration file]'s version: [.cl] [verse] *barectf show-configuration-version* _CONFIG-PATH_ Print command's brief help: [.cl] [verse] *barectf show-configuration-version* xref:#show-configuration-version-help-option[`--help`] === Command name aliases * `show-config-version` * `show-cfg-version` === Description The `barectf show-configuration-version` command reads the xref:yaml:index.adoc[YAML configuration file] `__CONFIG-PATH__` and prints its version, which is either 2 or 3. The `show-configuration-version` does _not_ validate the `__CONFIG-PATH__` file like the <> does. === Options [[show-configuration-version-help-option]]`-h`:: `--help`:: Print the `show-configuration-version` command's brief help and exit. [[exit-status]] == Exit status 0:: Success Not 0:: Error barectf-3.1.2/docs/modules/how-barectf-works/000077500000000000000000000000001443101201700210605ustar00rootroot00000000000000barectf-3.1.2/docs/modules/how-barectf-works/images/000077500000000000000000000000001443101201700223255ustar00rootroot00000000000000barectf-3.1.2/docs/modules/how-barectf-works/images/barectf-data-flow.svg000066400000000000000000003705161443101201700263440ustar00rootroot00000000000000howitworksbarectf-3.1.2/docs/modules/how-barectf-works/images/ctf-trace-all.svg000066400000000000000000002265541443101201700255020ustar00rootroot00000000000000ctf-trace-allbarectf-3.1.2/docs/modules/how-barectf-works/images/ctf-trace.svg000066400000000000000000001260221443101201700247210ustar00rootroot00000000000000ctf-tracebarectf-3.1.2/docs/modules/how-barectf-works/pages/000077500000000000000000000000001443101201700221575ustar00rootroot00000000000000barectf-3.1.2/docs/modules/how-barectf-works/pages/ctf-primer.adoc000066400000000000000000000153151443101201700250640ustar00rootroot00000000000000= CTF primer The https://diamon.org/ctf/[_**Common Trace Format**_] (CTF) is a binary https://en.wikipedia.org/wiki/Tracing_(software)[trace] format which is designed to be very fast to write while offering many field types to represent data. A barectf configuration can use the following CTF field types: * Unsigned/signed xref:yaml:int-ft-obj.adoc[integer] (1 to 64 bits). * Unsigned/signed xref:yaml:enum-ft-obj.adoc[enumeration] (1 to 64 bits). * xref:yaml:real-ft-obj.adoc[Real] (single or double precision). * Null-terminated xref:yaml:str-ft-obj.adoc[string]. * xref:yaml:struct-ft-obj.adoc[Structure] (zero or more named members). * xref:yaml:static-array-ft-obj.adoc[Static array] of any field type except structure and dynamic array. * xref:yaml:dyn-array-ft-obj.adoc[Dynamic array] of any field type except structure and dynamic array. CTF makes it possible to describe the alignment and byte order of integer, enumeration, and real fields. A system which produces CTF streams is known as a _CTF producer_. A system which consumes CTF streams is known as a _CTF consumer_. [[trace]] == CTF trace structure A _**CTF trace**_ is exactly one metadata stream and one or more <>: [.width-50] image::ctf-trace.svg[] The metadata stream describes the trace's data streams with TSDL (Trace Stream Description Language). On the file system, its file name must be `metadata`. The metadata stream describes things such as: * The xref:yaml:clk-type-obj.adoc[type] of the data stream default clocks. * The names of xref:yaml:ert-obj.adoc[event record types]. * The types of event record fields. * The xref:yaml:trace-obj.adoc[trace]'s environment variables. [[ds]] === Data stream A _**CTF data stream**_ is a sequence of one or more data <>: [.width-100] image::ctf-trace-all.svg[] A xref:yaml:dst-obj.adoc[data stream type] describes data streams. A packet contains one or more bytes of data. Although a packet can contain padding itself, from the data stream's point of view, there's no padding between packets. A data stream can have, conceptually: [[def-clk]]A default clock:: Described by a xref:yaml:clk-type-obj.adoc[clock type] in the trace's metadata stream. + <> and event records can contain snapshots, named _timestamps_, of their data stream's clock. [[disc-er-counter]]A counter of discarded event records:: Indicates the number of event records which the generated tracer needed to discard for different reasons. + For example, the tracer discards an event record when it doesn't fit the current packet and the back end is full (see xref:platform:index.adoc[]). + A <> can contain a snapshot of this counter. On the file system, a data stream file: * Can have any name, except `metadata` and anything which begins with `.`. * Must be in the same directory as the `metadata` file. [[pkt]] === Packet A _**CTF packet**_ is a part of a <>. A packet contains, in this order: . [.opt]##Optional##A header structure field, which contains: + ** [.opt]##Optional##The CTF magic number. + See the trace type features object's xref:yaml:trace-type-obj.adoc#magic-ft-prop[`magic-field-type` property]. ** [.opt]##Optional##A trace type https://en.wikipedia.org/wiki/Universally_unique_identifier[UUID]. + See the trace type object's xref:yaml:trace-type-obj.adoc#uuid-prop[`uuid` property] and the trace type features object's xref:yaml:trace-type-obj.adoc#uuid-ft-prop[`uuid-field-type` property]. ** [.opt]##Optional##The numeric ID of the data stream type which, in the metadata stream, describes this packet's data stream. + See the trace type features object's xref:yaml:trace-type-obj.adoc#dst-id-ft-prop[`data-stream-type-id-field-type` property]. ** [.opt]##Optional##The numeric ID of this packet's data stream. . A context structure field, which contains: + ** The packet's total size, in bits (always a multiple of{nbsp}8). + See the data stream type packet features object's xref:yaml:dst-obj.adoc#total-size-ft-prop[`total-size-field-type` property]. ** The packet's content size, in bits. + See the data stream type packet features object's xref:yaml:dst-obj.adoc#content-size-ft-prop[`content-size-field-type` property]. ** [.opt]##Optional##The packet's beginning timestamp. + See the data stream type packet features object's xref:yaml:dst-obj.adoc#beginning-ts-ft-prop[`beginning-timestamp-field-type` property]. ** [.opt]##Optional##The packet's end timestamp. + See the data stream type packet features object's xref:yaml:dst-obj.adoc#end-ts-ft-prop[`end-timestamp-field-type` property]. ** [.opt]##Optional##A discarded event record counter snapshot. + See the data stream type packet features object's xref:yaml:dst-obj.adoc#disc-er-counter-snapshot-ft-prop[`discarded-event-records-counter-snapshot-field-type` property]. ** [.opt]##Optional##A packet sequence number (within its <>). + See the data stream type packet features object's xref:yaml:dst-obj.adoc#seq-num-ft-prop[`sequence-number-field-type` property]. ** [.opt]##Optional##User fields. + See the data stream type object's xref:yaml:dst-obj.adoc#pkt-ctx-ft-extra-members-prop[`packet-context-field-type-extra-members` property]. . Zero or more <>. A packet contains one or more bytes of data. A packet can have padding (garbage data) after its last event record if its total size is different from its content size. [[er]] === Event record A _**CTF event record**_ is the result of a tracer writing a time-stamped record with user data when an event occurs during a user application's execution. An xref:yaml:ert-obj.adoc[event record type] describes event records. An event record contains, in this order: . [.opt]##Optional##A header structure field, which contains: + ** [.opt]##Optional##The numeric ID of the event record type which, in the metadata stream, describes this event record. + See the data stream type event record features object's xref:yaml:dst-obj.adoc#type-id-ft-prop[`type-id-field-type` property]. ** [.opt]##Optional##A timestamp. + See the data stream type event record features object's xref:yaml:dst-obj.adoc#ts-prop[`timestamp-field-type` property]. . [.opt]##Optional##A common context structure field, which contains user fields. + See the data stream type object's xref:yaml:dst-obj.adoc#er-common-ctx-ft-prop[`event-record-common-context-field-type` property]. . [.opt]##Optional##A specific context structure field, which contains user fields. + See the event record type object's xref:yaml:ert-obj.adoc#spec-ctx-ft-prop[`specific-context-field-type` property]. . [.opt]##Optional##A payload structure field, which contains user fields. + See the event record type object's xref:yaml:ert-obj.adoc#payload-ft-prop[`payload-field-type` property]. barectf-3.1.2/docs/modules/how-barectf-works/pages/index.adoc000066400000000000000000000065761443101201700241340ustar00rootroot00000000000000= How barectf works barectf generates a CTF metadata stream and C{nbsp}source files from a xref:yaml:index.adoc[**configuration**]. A barectf configuration specifies a xref:yaml:trace-type-obj.adoc[trace type], xref:yaml:clk-type-obj.adoc[clock types], xref:yaml:dst-obj.adoc[data stream types], xref:yaml:ert-obj.adoc[event record types], and other options to generate the files. With the `barectf` https://pypi.org/project/barectf/[Python package], you build the barectf configuration programatically by assembling configuration objects. This documentation is _not_ about the Python package. The xref:cli:index.adoc[`barectf` CLI tool] can read a xref:yaml:index.adoc[YAML configuration file] and generate files out of it. [[generated-files]] == Generated files barectf generates the following files from a configuration: [%autowidth.stretch, cols="d,a"] |=== |File name |Description |[[metadata]]`metadata` |The CTF metadata stream file. You'll need to place this file in a directory with the xref:how-barectf-works:ctf-primer.adoc#ds[data stream] files which your application will write through the generated tracer. See xref:how-barectf-works:index.adoc[] to learn more. |[[barectf.h]]`barectf.h` |The generated tracer's public C{nbsp}header file. This header contains the prototypes of the packet opening, packet closing, and xref:tracing-funcs:index.adoc[tracing functions]. barectf generates one packet opening/closing function per configured xref:yaml:dst-obj.adoc[data stream type] and one tracing function per configured xref:yaml:ert-obj.adoc[event record type]. Your application and xref:platform:index.adoc[platforms] need to include this file. |`barectf-bitfield.h` |Internal macros for the generated tracer (included by `barectf.c`). |[[barectf.c]]`barectf.c` |The generated tracer's C{nbsp}source code. |=== Those file names assume that the configuration uses the default xref:yaml:cfg-obj.adoc#prefix-prop[prefixes]. All C{nbsp}files are written in ANSI{nbsp}C. [[ctf-data-stream-file-creation]] == CTF data stream file creation Your application calls the xref:tracing-funcs:index.adoc[tracing functions] found in <> to write xref:ctf-primer.adoc#er[event records] to CTF xref:ctf-primer.adoc#ds[data streams] of xref:ctf-primer.adoc#pkt[packets]. Those CTF data streams and the generated <> form a complete xref:ctf-primer.adoc#trace[CTF trace]. How exactly the event timestamps are sourced and the CTF packets are appended to some file or memory buffer is controlled by the xref:platform:index.adoc[**platform**]. == Data flow The typical data flow with barectf is: [.width-80] image::barectf-data-flow.svg[] . barectf reads your xref:yaml:index.adoc[YAML configuration file]. . barectf <> the CTF metadata stream file. . barectf also generates the tracer's C{nbsp}files. . After adding calls to the generated tracing functions in your application code, you pass your application's C{nbsp}source file(s), xref:platform:index.adoc[platform] C{nbsp}source files, and the generated tracer's C{nbsp}source file to a xref:build:index.adoc[C{nbsp}compiler to create your final application]. . Your application <> during its execution. + Those data stream files and the metadata stream file of step{nbsp}2 form a complete xref:ctf-primer.adoc#trace[CTF trace]. barectf-3.1.2/docs/modules/platform/000077500000000000000000000000001443101201700173405ustar00rootroot00000000000000barectf-3.1.2/docs/modules/platform/pages/000077500000000000000000000000001443101201700204375ustar00rootroot00000000000000barectf-3.1.2/docs/modules/platform/pages/api.adoc000066400000000000000000000170271443101201700220470ustar00rootroot00000000000000= Platform API :us: _ include::ROOT:partial$def-prefix-note.adoc[] The public header (usually named `barectf.h`) which barectf xref:cli:index.adoc[generates] offers an API to write a barectf platform. [[ctx]] == Context structure For a given xref:yaml:dst-obj.adoc[data stream type] named `__NAME__`: [source,c] ---- struct barectf_NAME_ctx { /* ... */ }; ---- A barectf platform is responsible for allocating and deallocating such a structure for each data stream type. What this structure actually contains is not important; a barectf platform only needs to store it. [[cbs]] == Platform callback functions structure [source,c] ---- struct barectf_platform_callbacks { /* Clock source callback functions here */ /* * Returns whether or not the back end is full. */ int (*is_backend_full)(void *user_data); /* * Opens the current packet. */ void (*open_packet)(void *user_data); /* * Closes the current packet. */ void (*close_packet)(void *user_data); }; ---- Each callback function receives as its `user_data` parameter what you passed to the <> as the `user_data` parameter. [[cb-clk-src]] === Clock source For each xref:yaml:clk-type-obj.adoc[clock type object] `__NAME__` within the trace type's xref:yaml:trace-type-obj.adoc#clk-types-prop[`clock-types` property], the platform callback functions structure contains one clock source callback function: [source,c] ---- CTYPE (*NAME_clock_get_value)(void *user_data); ---- `__CTYPE__` is the clock type object's xref:yaml:clk-type-obj.adoc#c-type-prop[`$c-type` property] (`uint32_t` by default). A clock source function returns the clock's current value. The clock value must be monotonic. [[cb-open]] === Packet opening [source,c] ---- void (*open_packet)(void *user_data); ---- This function must call the <>. [[cb-close]] === Packet closing [source,c] ---- void (*close_packet)(void *user_data); ---- This function must: . Call the <>. . Copy or move the current packet to the back end. After step{nbsp}2, this function _can_ set a new packet buffer with <>. If it doesn't, the next calls to the <> and xref:tracing-funcs:index.adoc[tracing functions] will write to the current packet buffer. [[cb-is-back-end-full]] === Is the back end full? [source,c] ---- int (*is_backend_full)(void *user_data); ---- This function returns whether or not the back end is full. In other words, if a new packet is <> now, does this packet have its reserved space in the back end? [[accessors]] == Context property accessors * [[barectf-pkt-buf-addr-func]]{empty} + [source,c] ---- uint8_t *barectf_packet_buf_addr(const void *vctx); ---- + Returns the packet buffer address of the barectf context `vctx`. * {empty} + [source,c] ---- uint32_t barectf_packet_buf_size(const void *vctx); ---- + Returns the packet buffer size (bytes) of the barectf context `vctx`. * {empty} + [source,c] ---- int barectf_packet_is_full(const void *vctx); ---- + Returns whether or not the packet of the barectf context `vctx` is full. * {empty} + [source,c] ---- int barectf_packet_is_empty(const void *vctx); ---- + Returns whether or not the packet of the barectf context `vctx` is empty. * {empty} + [source,c] ---- int barectf_packet_is_open(const void *vctx); ---- + Returns whether or not the packet of the barectf context `vctx` is open. * [[barectf-packet-set-buf-func]]{empty} + [source,c] ---- void barectf_packet_set_buf(void *vctx, uint8_t *addr, uint32_t size); ---- + Sets the packet buffer of the barectf context `vctx` to the address `addr` and the size `size` bytes. + You can only call this function from the <>. * [[barectf-disc-er-count-func]]{empty} + [source,c] ---- uint32_t barectf_discarded_event_records_count(const void *vctx); ---- + Returns the number of xref:how-barectf-works:ctf-primer.adoc#disc-er-counter[discarded event records] in the barectf context `vctx`. * [[barectf-pkt-seq-num-func]]{empty} + [source,c] ---- uint32_t barectf_packet_sequence_number(const void *vctx); ---- + Returns the packet sequence number in the barectf context `vctx`. * {empty} + [source,c] ---- int barectf_is_in_tracing_section(const void *vctx); ---- + Returns whether or not there's a current xref:tracing-funcs:index.adoc[tracing function] call for the barectf context `vctx`. * {empty} + [source,c] ---- volatile const int *barectf_is_in_tracing_section_ptr(const void *vctx); ---- + Returns a pointer to an `int` variable which indicates whether or not there's a current xref:tracing-funcs:index.adoc[tracing function] call for the barectf context `vctx`. [[init]] == Context initialization Initializes the <> `vctx` with the initial packet buffer located at the address `buf_addr` and having `buf_size` bytes, the <> `cbs`, and the user data `data`. [source,c] ---- void barectf_init(void *vctx, uint8_t *buf_addr, uint32_t buf_size, struct barectf_platform_callbacks cbs, void *user_data); ---- `user_data` is what the platform callback functions receive as their first parameter. [[open]] == Packet opening For a given xref:yaml:dst-obj.adoc[data stream type] named `__NAME__`, a packet opening function opens the current xref:how-barectf-works:ctf-primer.adoc#pkt[packet] of a <> `sctx`: [source,c] ---- void barectf_NAME_open_packet(struct barectf_NAME_ctx *sctx); ---- [[open-params]] === Parameters For each member `__MNAME__` of the data stream type object's xref:yaml:dst-obj.adoc#pkt-ctx-ft-extra-members-prop[`packet-context-field-type-extra-members` property], this function has an additional parameter named `pc{us}__MNAME__`. See xref:yaml:ft-obj.adoc#gen-c-types[Generated C{nbsp}types] to determine the exact C{nbsp}type of each parameter. Note that a member with a xref:yaml:dyn-array-ft-obj.adoc[dynamic array field type] actually makes barectf generate _two_ adjacent parameters: . One for the dynamic array's length. + Example: `uint32_t pc___my_array_len` . One for the dynamic array's data. + Example: `const uint8_t *pc_my_array` === Role A packet opening function: . Writes initial xref:how-barectf-works:ctf-primer.adoc#pkt[packet header and context] fields. + The source of some of those fields can be <>. . Saves the offsets of some packet context fields to write them at <> time. . Marks the current packet as being open. In general, a <> and a platform initialization function (for the first packet) call this function. [[close]] == Packet closing For a given xref:yaml:dst-obj.adoc[data stream type] named `__NAME__`, a packet closing function closes the current xref:how-barectf-works:ctf-primer.adoc#pkt[packet] of a <> `sctx`: [source,c] ---- void barectf_NAME_close_packet(struct barectf_NAME_ctx *sctx); ---- === Role A packet closing function: . Marks the current packet as being closed. . Writes some xref:how-barectf-works:ctf-primer.adoc#pkt[packet context] fields. . If the xref:yaml:dst-obj.adoc#seq-num-ft-prop[`sequence-number-field-type` packet feature] of the corresponding data stream type is enabled: increments the packet sequence number of `sctx`. In general, a <> and a platform finalization function (for the last packet) call this function. barectf-3.1.2/docs/modules/platform/pages/example.adoc000066400000000000000000000155071443101201700227320ustar00rootroot00000000000000= Platform example :us: _ This barectf platform example is a stripped-down version of the https://github.com/efficios/barectf/tree/stable-{page-component-version}/platforms/linux-fs[Linux FS demonstration platform]. == `my-platform.h` [source,c] ---- #ifndef _MY_PLATFORM_H #define _MY_PLATFORM_H #ifdef __cplusplus extern "C" { #endif /* Platform context */ struct my_platform_ctx; /* barectf context */ struct barectf_my_stream_ctx; /* Platform initialization function */ struct my_platform_ctx *my_platform_init(unsigned int buf_size, const char *data_stream_file_path); /* Platform finalization function */ void my_platform_fini(struct my_platform_ctx *platform_ctx); /* barectf context pointer access function */ struct barectf_my_stream_ctx *my_platform_get_barectf_ctx( struct my_platform_ctx *platform_ctx); #ifdef __cplusplus } #endif #endif /* _MY_PLATFORM_H */ ---- == `my-platform.c` [source,c] ---- #include #include #include #include #include #include "barectf.h" /* Platform context */ struct my_platform_ctx { struct barectf_my_stream_ctx ctx; FILE *fh; }; /* Clock source platform function */ static uint64_t my_clock_get_value(void * const data) { struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); return ts.tv_sec * 1000000000ULL + ts.tv_nsec; } static void write_packet(const struct my_platform_ctx * const platform_ctx) { /* Append current packet to data stream file */ const size_t nmemb = fwrite(barectf_packet_buf_addr(&platform_ctx->ctx), barectf_packet_buf_size(&platform_ctx->ctx), 1, platform_ctx->fh); assert(nmemb == 1); } /* Full back end check platform function */ static int is_backend_full(void * const data) { return 0; } /* Packet opening platform function */ static void open_packet(void * const data) { struct my_platform_ctx * const platform_ctx = data; barectf_my_stream_open_packet(&platform_ctx->ctx); } /* Packet closing platform function */ static void close_packet(void * const data) { struct my_platform_ctx * const platform_ctx = data; /* Close packet now */ barectf_my_stream_close_packet(&platform_ctx->ctx); /* Write packet to file */ write_packet(platform_ctx); } /* Platform initialization function */ struct my_platform_ctx *my_platform_init(const unsigned int buf_size, const char * const data_stream_file_path) { char stream_path[256]; uint8_t *buf = NULL; struct my_platform_ctx *platform_ctx; struct barectf_platform_callbacks cbs; /* Set platform callback functions */ cbs.my_clock_clock_get_value = my_clock_get_value; cbs.is_backend_full = is_backend_full; cbs.open_packet = open_packet; cbs.close_packet = close_packet; /* Allocate platform context (which contains a barectf context) */ platform_ctx = malloc(sizeof(*platform_ctx)); if (!platform_ctx) { goto error; } /* Allocate packet buffer */ buf = malloc(buf_size); if (!buf) { goto error; } /* Open data stream file */ platform_ctx->fh = fopen(data_stream_file_path, "wb"); if (!platform_ctx->fh) { goto error; } /* Initialize barectf context */ barectf_init(&platform_ctx->ctx, buf, buf_size, cbs, platform_ctx); /* Open the first packet */ open_packet(platform_ctx); goto end; error: free(platform_ctx); free(buf); end: /* Return platform context to user */ return platform_ctx; } /* Platform finalization function */ void my_platform_fini(struct my_platform_ctx * const platform_ctx) { /* Close current packet if needed */ if (barectf_packet_is_open(&platform_ctx->ctx) && !barectf_packet_is_empty(&platform_ctx->ctx)) { close_packet(platform_ctx); } /* Close data stream file */ fclose(platform_ctx->fh); /* Deallocate packet buffer */ free(barectf_packet_buf(&platform_ctx->ctx)); /* Deallocate platform context */ free(platform_ctx); } /* barectf context pointer access function */ struct barectf_my_stream_ctx *my_platform_get_barectf_ctx( struct my_platform_ctx * const platform_ctx) { return &platform_ctx->ctx; } ---- == Components In this example, you can find all the required components of a barectf platform: xref:api.adoc#cbs[Platform callback functions]:: xref:api.adoc#cb-clk-src[Clock source]::: + [source,c] ---- static uint64_t my_clock_get_value(void * const data) { struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); return ts.tv_sec * 1000000000ULL + ts.tv_nsec; } ---- xref:api.adoc#cb-open[Packet opening]::: + [source,c] ---- static void open_packet(void * const data) { struct my_platform_ctx * const platform_ctx = data; barectf_my_stream_open_packet(&platform_ctx->ctx); } ---- xref:api.adoc#cb-close[Packet closing]::: + [source,c] ---- static void close_packet(void * const data) { struct my_platform_ctx * const platform_ctx = data; barectf_my_stream_close_packet(&platform_ctx->ctx); write_packet(platform_ctx); } ---- xref:api.adoc#cb-is-back-end-full[Is the back end full?]::: + [source,c] ---- static int is_backend_full(void * const data) { return 0; } ---- + This one always returns 0 as we assume that we can always append a packet to the data stream file. Platform initialization function:: + [source,c] ---- struct my_platform_ctx *my_platform_init(const unsigned int buf_size, const char * const data_stream_file_path) { /* ... */ } ---- Platform finalization function:: + [source,c] ---- void my_platform_fini(struct my_platform_ctx * const platform_ctx) { if (barectf_packet_is_open(&platform_ctx->ctx) && !barectf_packet_is_empty(&platform_ctx->ctx)) { close_packet(platform_ctx); } /* ... */ } ---- barectf context pointer access function:: + [source,c] ---- struct barectf_my_stream_ctx *my_platform_get_barectf_ctx( struct my_platform_ctx * const platform_ctx) { return &platform_ctx->ctx; } ---- == Other platform examples Have a look at: * The https://github.com/efficios/barectf/tree/stable-{page-component-version}/platforms/linux-fs[Linux FS platform]. * The https://github.com/efficios/barectf/blob/{page-component-version}/examples/barectf-tracepoint/barectf-platform-qemu-arm-uart.c[`barectf-platform-qemu-arm-uart.c`] file, which is part of the `barectf-tracepoint.h` usage example. * The https://github.com/efficios/barectf/tree/v2.3.1/platforms/parallella[Parallella platform]. + The project no longer maintains this platform as it was an experiment to trace the Epiphany cores of the https://www.parallella.org/[Parallella board]. + That being said, this platform can still prove interesting to understand how to implement a barectf platform using an asynchronous producer-consumer model. barectf-3.1.2/docs/modules/platform/pages/index.adoc000066400000000000000000000112541443101201700224010ustar00rootroot00000000000000= Write a barectf platform :us: _ A **_barectf platform_** is: * Callback functions to xref:api.adoc#cb-open[open] and xref:api.adoc#cb-close[close] xref:how-barectf-works:ctf-primer.adoc#pkt[packets]. + Those functions allow the platform to control where the xref:how-barectf-works:ctf-primer.adoc#ds[data streams] are stored (called the _back end_) and how full packets are appended to them. + The back end can be anything: files, memory, network, serial, and more. * A callback function to indicate xref:api.adoc#cb-is-back-end-full[whether or not the back end is full]. * Data stream xref:how-barectf-works:ctf-primer.adoc#def-clk[default clock] xref:api.adoc#cb-clk-src[source callback functions]. * An API for applications to: ** Initialize the platform. ** xref:tracing-funcs:index.adoc#obtain-ctx-ptr[Obtain a barectf context pointer]. ** Finalize the platform. The purpose of a barectf platform is to decouple the packet storing and clock sourcing operations from the xref:how-barectf-works:ctf-primer.adoc#er[event record] writing operations. xref:tracing-funcs:index.adoc[Tracing functions], which the application calls, handle the latter. See xref:example.adoc[] for a complete barectf platform example. == Steps To write a barectf platform: . Write the xref:api.adoc#cbs[platform callback functions]. + Each function receives some platform context pointer as its first parameter. . Write a platform initialization function. + This function needs to allocate one or more xref:api.adoc#ctx[barectf contexts], xref:api.adoc#init[initialize them] with the platform callback functions of step{nbsp}1, and store them. + This function typically xref:api.adoc#open[opens] the first packet. + This function can return a pointer to a platform context structure. This structure can also be global if needed. . Write a platform finalization function. + This function can accept a platform context pointer parameter. + This function typically starts with this, for each barectf context of the platform: + [source,c] ---- if (barectf_packet_is_open(barectf_ctx) && !barectf_packet_is_empty(barectf_ctx)) { /* Close the packet here */ } ---- + where `barectf_ctx` is a pointer to a xref:api.adoc#ctx[barectf context]. + This function also needs to deallocate the platform's xref:api.adoc#ctx[barectf contexts]. . Write one or more xref:api.adoc#ctx[barectf context] pointer accessor functions. + This function can accept a platform context pointer parameter. It returns the requested barectf context pointer. See xref:example.adoc[] for a complete barectf platform example. == YAML configuration file recommandation The barectf project recommends that you create a partial YAML file containing a base xref:yaml:trace-type-obj.adoc[trace type object] as its document for your platform. This platform's base trace type object can be configured so that it matches what your platform expects, for example: * The xref:yaml:trace-type-obj.adoc#native-bo-prop[native byte order] * Specific xref:yaml:clk-type-obj.adoc[clock type objects] * Specific xref:yaml:dst-obj.adoc[Data stream type objects], possibly with: ** xref:yaml:dst-obj.adoc#def-clk-type-name-prop[Default clock types] ** xref:yaml:dst-obj.adoc#pkt-ctx-ft-extra-members-prop[Extra packet context field type members] An application-specific xref:yaml:index.adoc[YAML configuration files] can then xref:yaml:include.adoc[include] the platform's trace type partial YAML file and augment it. ==== Consider this partial YAML file: .`my-platform-trace-type.yaml` [source,yaml] ---- native-byte-order: little-endian clock-types: sys3: frequency: 8000000 precision: 80 origin-is-unix-epoch: false data-stream-types: main: $default-clock-type-name: sys3 packet-context-field-type-extra-members: - load: int8 - node_id: uint16 ---- An application-specific YAML configuration file can xref:yaml:include.adoc[include] `my-platform-trace-type.yaml` at the xref:yaml:trace-type-obj.adoc[trace type object] level: [source,yaml] ---- --- ! trace: type: $include: - my-platform-trace-type.yaml - stdint.yaml - stdmisc.yaml $field-type-aliases: ipv4-addr: class: static-array length: 4 element-field-type: uint8 data-stream-types: main: $is-default: true event-record-types: on_send: payload-field-type: class: structure members: - msg: string - dst_ip_addr: ipv4-addr on_recv: payload-field-type: class: structure members: - msg: string - src_ip_addr: ipv4-addr ---- ==== barectf-3.1.2/docs/modules/tracing-funcs/000077500000000000000000000000001443101201700202575ustar00rootroot00000000000000barectf-3.1.2/docs/modules/tracing-funcs/pages/000077500000000000000000000000001443101201700213565ustar00rootroot00000000000000barectf-3.1.2/docs/modules/tracing-funcs/pages/index.adoc000066400000000000000000000150141443101201700233160ustar00rootroot00000000000000= Use the generated C{nbsp}tracing functions :us: _ include::ROOT:partial$def-prefix-note.adoc[] The public `barectf.h` header which barectf xref:cli:index.adoc[generates] contains two groups of function prototypes: [[tracing-funcs]]Tracing functions:: barectf generates one tracing function per configured xref:yaml:ert-obj.adoc[event record type]. + A tracing function is named `barectf_trace{us}__DSTNAME__{us}__ERTNAME__()`, where `__DSTNAME__` is the xref:yaml:dst-obj.adoc[data stream type] name and `__ERTNAME__` the event record type name. + NOTE: If your configuration has a xref:yaml:dst-obj.adoc#is-def-prop[default data stream type] named `__DEFDSTNAME__`, then barectf also generates C{nbsp}preprocessor definitions named `barectf_trace{us}__ERTNAME__` which are set to `barectf_trace{us}__DEFDSTNAME__{us}__ERTNAME__`. + Those are the functions which your application can call to write xref:how-barectf-works:ctf-primer.adoc#er[CTF event records] to xref:how-barectf-works:ctf-primer.adoc#ds[data streams]. Tracing control functions:: barectf generates the `+barectf_is_tracing_enabled()+` and `+barectf_enable_tracing()+` functions to <> the tracing activity for a given barectf context. xref:platform:api.adoc[Platform API] functions:: barectf generates one xref:platform:api.adoc#open[packet opening] and one xref:platform:api.adoc#close[packet closing] function per configured xref:yaml:dst-obj.adoc[data stream type]. + It also generates a xref:platform:api.adoc#init[barectf context initialization] function and a few xref:platform:api.adoc#accessors[context property getters and setters]. + The suggested barectf approach is for a xref:platform:index.adoc[platform] to handle the barectf context initialization, packet opening and packet closing operations. + This hides the details of how packets are written to the back end from the application so that it only calls <> and <> functions. [[obtain-ctx-ptr]] == Obtain a barectf context pointer <> and <> functions accept a **_barectf context_** pointer as their first parameter. For example: [source,c] ---- void barectf_my_stream_trace_my_event(struct barectf_my_stream_ctx *sctx, uint8_t p_user_id, const char *p_msg); int barectf_is_tracing_enabled(const void *vctx); void barectf_enable_tracing(void *vctx, int enable); ---- A barectf context represents a xref:how-barectf-works:ctf-primer.adoc#ds[CTF data stream]. The suggested barectf approach is for a xref:platform:index.adoc[platform]'s API to offer a function to obtain a pointer to an initialized barectf context. For example, the https://github.com/efficios/barectf/tree/stable-{page-component-version}/platforms/linux-fs[Linux FS] demonstration platform offers the `+barectf_platform_linux_fs_get_barectf_ctx()+` function to obtain a barectf context pointer from a platform context. == Tracing function parameters As explained in <>, a tracing function's first parameter is always a barectf context pointer. The other parameters depend on the xref:yaml:index.adoc[configuration]. For a given xref:yaml:dst-obj.adoc[data stream type] and xref:yaml:ert-obj.adoc[event record type], the generated tracing function parameters are, in this order: . For each member `__NAME__` of the xref:yaml:dst-obj.adoc#er-common-ctx-ft-prop[event record common context structure field type], a parameter named `cc{us}__NAME__`. . For each member `__NAME__` of the xref:yaml:ert-obj.adoc#spec-ctx-ft-prop[event record specific context structure field type], a parameter named `sc{us}__NAME__`. . For each member `__NAME__` of the xref:yaml:ert-obj.adoc#payload-ft-prop[event record payload structure field type], a parameter named `p{us}__NAME__`. See xref:yaml:ft-obj.adoc#gen-c-types[Generated C{nbsp}types] to determine the exact C{nbsp}type of each parameter. Note that a member with a xref:yaml:dyn-array-ft-obj.adoc[dynamic array field type] actually makes barectf generate _two_ adjacent parameters: . One for the dynamic array's length. + Example: `uint32_t p___my_array_len` . One for the dynamic array's data. + Example: `const uint8_t *p_my_array` ==== Consider this xref:yaml:dst-obj.adoc[data stream type object] named `my_stream`: [source,yaml] ---- event-record-common-context-field-type: class: structure members: - pid: uint32 - t_level: double event-record-types: my_event: specific-context-field-type: class: structure members: - count: uint16 payload-field-type: class: structure members: - msg: string - src_ip_addr: field-type: class: static-array length: 4 element-field-type: uint8 ---- The generated tracing prototype for the `my_event` event record type is: [source,c] ---- void barectf_my_stream_trace_my_event(struct barectf_my_stream_ctx *sctx, uint32_t cc_pid, double cc_t_level, uint16_t sc_count, const char *p_msg, const uint8_t *p_src_ip_addr); ---- ==== [[control]] == Control tracing You can control the tracing activity for a given <> with the following functions: * {empty} + [source,c] ---- int barectf_is_tracing_enabled(const void *vctx); ---- + Returns whether or not tracing is currenty enabled for the barectf context `vctx`. * {empty} + [source,c] ---- void barectf_enable_tracing(void *vctx, int enable); ---- + Enables (if `enable` is{nbsp}1) or disables (if `enable` is{nbsp}0) tracing for the barectf context `vctx`. When tracing is disabled for a given barectf context, the <> have no effect for this context. == Concurrent access safety The C{nbsp}source code which barectf generates doesn't guarantee any concurrent access safety (thread safety, reentrancy). Because barectf generates general ANSI{nbsp}C code with no dependencies, it can't know how to synchronize accesses to <> structures. As of barectf{nbsp}{page-component-version}, you need to protect tracing function calls for a given barectf context with your own synchronization primitives. Note, however, that xref:how-barectf-works:ctf-primer.adoc[CTF] is designed for fast multicore/multithread tracing: dedicate one barectf context (one xref:how-barectf-works:ctf-primer.adoc#ds[data stream]) per core/thread to avoid tracing function locking. barectf-3.1.2/docs/modules/yaml/000077500000000000000000000000001443101201700164565ustar00rootroot00000000000000barectf-3.1.2/docs/modules/yaml/pages/000077500000000000000000000000001443101201700175555ustar00rootroot00000000000000barectf-3.1.2/docs/modules/yaml/pages/cfg-obj.adoc000066400000000000000000000102611443101201700217140ustar00rootroot00000000000000= YAML configuration object The _**configuration object**_ is the root of a barectf YAML configuration document. It describes a complete barectf configuration. The configuration object must have the YAML tag `tag:barectf.org,2020/3/config`. The configuration object has a mandatory xref:trace-obj.adoc[trace object] and <>. == Properties [%autowidth.stretch] |=== |Name |Type |Description |{req-abbr} |Default |`options` |<> |Configuration options. |No |See <> for default values. |[[trace-prop]]`trace` |xref:trace-obj.adoc[Trace object] |Configuration's trace. |Yes | |=== [[opts-obj]] == Options object The options of a configuration object. === Properties [%autowidth.stretch] |=== |Name |Type |Description |Default |`code-generation` |<> |Code generation options. |See <> for default values. |=== [[code-gen-opts-obj]] == Code generation options object The code generation options of a configuration object. === Properties All the properties are optional. [%autowidth.stretch, cols="d,d,a,d"] |=== |Name |Type |Description |Default |[[prefix-prop]]`prefix` |String or <> |Identifier and file name prefixes. If the value is the string `__PREFIX__`, then the identifier prefix is `__PREFIX___` and the file name prefix is `__PREFIX__`. |The identifier prefix `barectf_` and the file name prefix `barectf`. |`header` |<> |C{nbsp}header generation options. |See <> default values. |=== [[prefix-obj]] == Prefix object Identifier and file name prefixes. === Properties All the properties are required. [%autowidth.stretch, cols="d,d,a"] |=== |Name |Type |Description |`file-name` |String |Prefix of any C{nbsp}file which barectf generates. barectf adds `-` between this prefix and other file name parts if needed. This prefix must only contain valid characters for a file name. |`identifier` |String |Prefix of any public C identifier which barectf generates. barectf does _not_ add anything between this prefix and the rest of the identifier. For example, if this prefix is `acme_corp_`, then a tracing function name could be `+acme_corp_trace_my_event()+`. This prefix must be a valid C{nbsp}identifier. |=== [[code-gen-header-opts-obj]] == Code generation header options object The C{nbsp}header generation options of a configuration object. === Properties All the properties are optional. [%autowidth.stretch, cols="d,d,a,d", role="can-break"] |=== |Name |Type |Description |Default |[[iden-prefix-def-prop]]`identifier-prefix-definition` |Boolean |If this property is true, then barectf generates a public C{nbsp}preprocessor definition named `_BARECTF_IDENTIFIER_PREFIX` which is set to the configuration's <>. |False |[[def-dst-name-def-prop]]`default-data-stream-type-name-definition` |Boolean |If this property is true, then barectf generates a public C{nbsp}preprocessor definition named `_BARECTF_DEFAULT_DATA_STREAM_TYPE_NAME` which is set to the name of the trace type's xref:dst-obj.adoc#is-def-prop[default data stream type]. |False |=== == Examples NOTE: The following examples omit the <> for clarity. .Basic configuration object. ==== [source,yaml] ---- --- ! trace: # ... ---- ==== .Configuration object with custom <>. ==== [source,yaml] ---- --- ! options: code-generation: prefix: file-name: acme-corp identifier: acme_corp_ trace: # ... ---- ==== .Configuration object with <>. ==== [source,yaml] ---- --- ! options: code-generation: header: identifier-prefix-definition: true default-data-stream-type-name-definition: true trace: # ... ---- ==== .Basic configuration object with a YAML directive. ==== This https://yaml.org/spec/1.2/spec.html#id2781553[YAML directive] indicates that the YAML document honours the YAML{nbsp}1.2 specification. [source,yaml] ---- %YAML 1.2 --- ! trace: # ... ---- ==== barectf-3.1.2/docs/modules/yaml/pages/clk-type-obj.adoc000066400000000000000000000051531443101201700227110ustar00rootroot00000000000000= YAML clock type object A _**clock type object**_ is the type of data stream xref:how-barectf-works:ctf-primer.adoc#def-clk[clocks]. Clock type objects are only found under the xref:trace-type-obj.adoc#clk-types-prop[`clock-types` property] of a trace type object. The only purpose of a clock type is to be a xref:dst-obj.adoc[data stream type object]'s default clock type. [[props]] == Properties All the properties are optional. [%autowidth.stretch, cols="d,d,a,d", role="can-break"] |=== |Name |Type |Description |Default |[[freq-prop]]`frequency` |Integer, greater than{nbsp}0 |Frequency of instances (Hz). |1,000,000,000 (1{nbsp}GHz) |[[offset-prop]]`offset` |<> |Offset of instances. |See <> for default values. |`origin-is-unix-epoch` |Boolean |True if the origin of instances is the Unix epoch. |True |`precision` |Positive integer |Precision of instances (cycles). |0 |`uuid` |xref:common-values.adoc#uuid[UUID] |Clock type's UUID. |No UUID |`description` |String |Clock type's description. |No description |[[c-type-prop]]`$c-type` |String |Return C{nbsp}type of the clock source function for this clock type. See xref:platform:index.adoc[] to learn more. |`uint32_t` |[[include-prop]]`$include` |Sequence of strings. |See xref:include.adoc[]. |No inclusions |=== [[offset-obj]] == Clock type offset object Offset information of a clock type's instances. === Properties All the properties are optional. [%autowidth.stretch, cols="d,d,a,d"] |=== |Name |Type |Description |Default |`seconds` |Integer |Offset in seconds. |0 |`cycles` |Positive integer |Offset in cycles. |0 |=== The two properties form an effective offset (from the clock's origin) as such: ---- seconds + cycles / frequency ---- `frequency` is a <>. == Examples .Basic 1{nbsp}GHz clock type object. ==== This empty mapping, when used where a clock type is expected, is a valid, default clock type. [source,yaml] ---- {} ---- ==== .Basic <> clock type object. ==== [source,yaml] ---- frequency: 100000 ---- ==== .Basic <> clock type object with an `unsigned long long` <>. ==== [source,yaml] ---- $c-type: unsigned long long ---- ==== .Complete clock type object. ==== [source,yaml] ---- frequency: 8000000 offset: seconds: 1600463226 cycles: 200000 origin-is-unix-epoch: false precision: 8 uuid: 79e49040-21b5-42d4-a873-677261696e65 description: System clock $c-type: uint64_t ---- ==== .Clock type object with an <>. ==== [source,yaml] ---- $include: [base-clock-type.yaml] frequency: 8000000 ---- ==== barectf-3.1.2/docs/modules/yaml/pages/common-values.adoc000066400000000000000000000011711443101201700231720ustar00rootroot00000000000000= Common YAML values As of barectf{nbsp}{page-component-version}, the only common values are the <> and the <>. [[byte-order]] == Byte order A byte order or endianness. Type:: String Value:: One of: `little-endian`::: `little`::: `le`::: Little-endian byte order. `big-endian`::: `big`::: `be`::: Big-endian byte order. [[uuid]] == UUID A https://en.wikipedia.org/wiki/Universally_unique_identifier[universally unique identifier]. Type:: String Value:: The canonical textual representation of the UUID, for example: + ---- 79e49040-21b5-42d4-a873-677261696e65 ---- barectf-3.1.2/docs/modules/yaml/pages/dst-obj.adoc000066400000000000000000000273701443101201700217600ustar00rootroot00000000000000= YAML data stream type object A _**data stream type object**_ is the type of a xref:how-barectf-works:ctf-primer.adoc#ds[data stream]. A data stream type describes everything a CTF consumer needs to decode its instances (data streams). Data stream type objects are only found under the xref:trace-type-obj.adoc#dsts-prop[`data-stream-types` property] of a trace type object. [[props]] == Properties [%autowidth.stretch, cols="d,d,a,d,d", role="can-break"] |=== |Name |Type |Description |{req-abbr} |Default |[[is-def-prop]]`$is-default` |Boolean |If this property is true, then this data stream type is its xref:trace-type-obj.adoc[trace type]'s default data stream type. For a generated tracing function `__F__` named `+barectf_trace_my_stream_my_event()+`, where `my_stream` is the name of the default data stream type, barectf also generates a public C{nbsp}preprocessor definition named `barectf_trace_my_event` and set to `__F__`. For a given trace type object, a single data stream type object can have this property set to true. See also the code generation header option object's xref:cfg-obj.adoc#def-dst-name-def-prop[`def-dst-name-def-prop` property]. |No |False |[[def-clk-type-name-prop]]`$default-clock-type-name` |String |Name of the xref:clk-type-obj.adoc[clock type] which describes the default clock of this data stream type's instances. This property's value must be an existing key within this trace type's xref:trace-type-obj.adoc#clk-types-prop[`clock-types`] mapping. When a data stream type has a default clock type, all its instances (xref:how-barectf-works:ctf-primer.adoc#ds[data streams]) have their own default clock. A data stream clock is an integral counter of _cycles_. With the clock's type's xref:clk-type-obj.adoc#freq-prop[frequency] and type's xref:clk-type-obj.adoc#offset-prop[offset] properties, you can convert a clock value to seconds from its origin. The header fields of CTF xref:how-barectf-works:ctf-primer.adoc#pkt[packets] and xref:how-barectf-works:ctf-primer.adoc#er[event records] can contain snapshots, named _timestamps_, of the value of their data stream's default clock. |No |No default clock type |`$features` |<> |Features of this data stream type's instances. |No |See <> for default values. |[[pkt-ctx-ft-extra-members-prop]]`packet-context-field-type-extra-members` |Type of the structure field type object's xref:struct-ft-obj.adoc#members-prop[`members` property] |Extra, user-defined members to be appended to this data stream type's packet context structure field type. For each member name `__NAME__` of this property, the packet opening function which barectf generates for this data stream type has an additional parameter named `pc___NAME__`. Member names must be valid xref:index.adoc#tsdl-ident[TSDL identifiers]. |No |No packet context field type extra members |[[er-common-ctx-ft-prop]]`event-record-common-context-field-type` |xref:struct-ft-obj.adoc[Structure field type object] or string | xref:how-barectf-works:ctf-primer.adoc#er[Event record common context field] type of this data stream type. If this property's value is a string, it must be the name of an existing xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. For each member `__NAME__` of this property, all the xref:tracing-funcs:index.adoc[tracing functions] which barectf generates for this data stream type have an additional parameter named `cc___NAME__`. Member names must be valid xref:index.adoc#tsdl-ident[TSDL identifiers]. |No |No event record common context field type |[[erts-prop]]`event-record-types` |Mapping of string keys to xref:ert-obj.adoc[event record type objects] |Event record types of this data stream type. Keys of this mapping are event record type names. They must be valid C{nbsp}identifiers. This mapping must contain at least one entry. |Yes | |[[include-prop]]`$include` |Sequence of strings. |See xref:include.adoc[]. |No |No inclusions |=== [[features-obj]] == Features object The features of a data stream type object. === Properties All the properties are optional. [%autowidth.stretch] |=== |Name |Type |Description |Default |`packet` |<> |Features related to xref:how-barectf-works:ctf-primer.adoc#pkt[CTF packets]. |See <> for default values. |`event-record` |<> |Features related to xref:how-barectf-works:ctf-primer.adoc#er[CTF event records]. |See <> for default values. |=== [[pkt-features-obj]] == Packet features object The packet features of a data stream type object. As of barectf{nbsp}{page-component-version}, each feature controls whether or not some information will be part of the context of each xref:how-barectf-works:ctf-primer.adoc#pkt[CTF packet] which the generated tracer produces. You can enable or disable a feature. When you enable one, you can set its xref:ft-obj.adoc[field type] explicitly or make barectf choose a sane default. === Properties For all the feature properties below, if the value is a boolean: True:: Make barectf use a default field type. False:: Disable the feature (if possible). All the properties are optional. [%autowidth.stretch, cols="d,d,a,d", role="can-break"] |=== |Name |Type |Description |Default |[[total-size-ft-prop]]`total-size-field-type` |Unsigned xref:int-ft-obj.adoc[integer field type object], string, or boolean |Type of packet context's total size field. If this property's value is a string, it must be the name of an existing xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. The size of this feature's integer field type must be greater than or equal to the size of the `content-size-field-type` property's field type. You **can't** disable this feature. |Use a default field type (true) |[[content-size-ft-prop]]`content-size-field-type` |Unsigned xref:int-ft-obj.adoc[integer field type object], string, or boolean |Type of packet context's content size field. If this property's value is a string, it must be the name of an existing xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. The size of this feature's integer field type must be less than or equal to the size of the `total-size-field-type` property's field type. You **can't** disable this feature. |Use a default field type (true) |[[beginning-ts-ft-prop]]`beginning-timestamp-field-type` |Unsigned xref:int-ft-obj.adoc[integer field type object], string, or boolean |Type of packet context's beginning timestamp field. If this property's value is a string, it must be the name of an existing xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. |Use a default field type (true) if this data stream type has a <>, or false otherwise |[[end-ts-ft-prop]]`end-timestamp-field-type` |Unsigned xref:int-ft-obj.adoc[integer field type object], string, or boolean |Type of packet context's end timestamp field. If this property's value is a string, it must be the name of an existing xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. |Use a default field type (true) if this data stream type has a <>, or false otherwise |[[disc-er-counter-snapshot-ft-prop]]`discarded-event-records-counter-snapshot-field-type` |Unsigned xref:int-ft-obj.adoc[integer field type object], string, or boolean |Type of packet context's xref:how-barectf-works:ctf-primer.adoc#disc-er-counter[discarded event record counter] snapshot field. If this property's value is a string, it must be the name of an existing xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. |Use a default field type (true) |[[seq-num-ft-prop]]`sequence-number-field-type` |Unsigned xref:int-ft-obj.adoc[integer field type object], string, or boolean |Type of packet context's sequence number field. If this property's value is a string, it must be the name of an existing xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. |Disabled (false) |=== [[er-features-obj]] == Event record features object The event records features of a data stream type object. As of barectf{nbsp}{page-component-version}, each feature controls whether or not some information will be part of the header of each xref:how-barectf-works:ctf-primer.adoc#er[CTF event record] which the generated tracer produces. You can enable or disable a feature. When you enable one, you can set its xref:ft-obj.adoc[field type] explicitly or make barectf choose a sane default. === Properties For all the feature properties below, if the value is a boolean: True:: Make barectf use a default field type. False:: Disable the feature. All the properties are optional. [%autowidth.stretch, cols="d,d,a,d", role="can-break"] |=== |Name |Type |Description |Default |[[type-id-ft-prop]]`type-id-field-type` |Unsigned xref:int-ft-obj.adoc[integer field type object], string, or boolean |Type of event header's xref:ert-obj.adoc[event record type] ID field. If this property's value is a string, it must be the name of an existing xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. This feature is required when this data stream type has more than one event record type (<>). |Use a default field type (true) |[[ts-prop]]`timestamp-field-type` |Unsigned xref:int-ft-obj.adoc[integer field type object], string, or boolean |Type of event header's timestamp field. If this property's value is a string, it must be the name of an existing xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. |Use a default field type (true) if this data stream type has a <>, or false otherwise |=== == Examples NOTE: The following examples can omit <> for clarity. .Basic data stream type object. ==== [source,yaml] ---- event-record-types: # ... ---- ==== .Basic <> data stream type object. ==== [source,yaml] ---- $is-default: true event-record-types: # ... ---- ==== .Data stream type object with a <>. ==== [source,yaml] ---- $default-clock-type-name: sys_clock2 event-record-types: # ... ---- ==== .Data stream type object with a disabled packet <>. ==== [source,yaml] ---- $features: packet: discarded-event-records-counter-snapshot-field-type: false event-record-types: # ... ---- ==== .Data stream type object with an enabled packet <>. ==== [source,yaml] ---- $features: packet: sequence-number-field-type: true event-record-types: # ... ---- ==== .Data stream type object with 16-bit packet <> and <>. ==== [source,yaml] ---- $features: packet: total-size-field-type: uint16 content-size-field-type: uint16 event-record-types: # ... ---- ==== .Data stream type object with a disabled event record <>. ==== [source,yaml] ---- $features: event-record: timestamp-field-type: false event-record-types: # ... ---- ==== .Data stream type object with <>. ==== [source,yaml] ---- packet-context-field-type-extra-members: - cur_load: int8 - node_id: uint16 - node_addr: string event-record-types: # ... ---- ==== .Data stream type object with an <>. ==== [source,yaml] ---- event-record-common-context-field-type: class: structure members: - pid: uint32 - level: double event-record-types: # ... ---- ==== .Data stream type object with <>. ==== [source,yaml] ---- event-record-types: # ... $include: - project-b-event-record-types.yaml - common-data-stream-type-features.yaml ---- ==== barectf-3.1.2/docs/modules/yaml/pages/dyn-array-ft-obj.adoc000066400000000000000000000043271443101201700235000ustar00rootroot00000000000000= YAML dynamic array field type objects A _**dynamic array field type object**_ is the type of dynamic (variable-length) array data fields, found in xref:how-barectf-works:ctf-primer.adoc#ds[data streams]. A dynamic array data field is a sequence of data fields, or _elements_. In CTF, the number of elements in a dynamic array data field (its length) is the value of a prior integer data field. [[props]] == Properties [%autowidth.stretch, cols="d,d,a,d"] |=== |Name |Type |Description |{req-abbr} |[[class-prop]]`class` |String |This property's value must be `dynamic-array`. |Yes if the <> property is not set. include::partial$ft-obj-inherit-prop.adoc[] |[[element-ft-prop]]`element-field-type` |xref:ft-obj.adoc[Field type object] (except a xref:struct-ft-obj.adoc[structure field type object] and a dynamic array field type object) or string |Type of each element (data fields) in this field type's instances. If this property's value is a string, it must be the name of an existing xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. This field type must _not_ be a structure field type or a dynamic array field type. |Yes |=== == Generated C{nbsp}types barectf always generates two packet opening or tracing function parameters for a dynamic array field type object. Their C{nbsp}types are: Dynamic array's length:: `uint32_t` Dynamic array's data:: Pointer to `const __T__`, where `__T__` is the generated C{nbsp}type for the field type object of the <>. + include::partial$array-ft-obj-gen-c-types-example.adoc[] == Examples .Dynamic array field type object: 8-bit unsigned xref:int-ft-obj.adoc[integers]. ==== [source,yaml] ---- class: dynamic-array element-field-type: uint8 ---- ==== .Dynamic array field type object: xref:str-ft-obj.adoc[strings]. ==== [source,yaml] ---- class: dynamic-array element-field-type: class: string ---- ==== .Dynamic array field type object: xref:static-array-ft-obj.adoc[static arrays] of 32{nbsp}double-precision xref:real-ft-obj.adoc[reals]. ==== [source,yaml] ---- class: dynamic-array element-field-type: class: static-array length: 32 element-field-type: class: real size: 64 ---- ==== barectf-3.1.2/docs/modules/yaml/pages/enum-ft-obj.adoc000066400000000000000000000054661443101201700225430ustar00rootroot00000000000000= YAML enumeration field type objects _**Enumeration field type objects**_ are the types of enumeration data fields, found in xref:how-barectf-works:ctf-primer.adoc#ds[data streams]. An enumeration data field is an integer data field. An enumeration field type is an integer field type with <>. An enumeration field type mapping is a labeled set of integer ranges. An enumeration data field can have zero or more labels depending on its value. [[props]] == Properties [%autowidth.stretch, cols="d,d,a,d,a", role="can-break"] |=== |Name |Type |Description |{req-abbr} |Default |[[class-prop]]`class` |String |This property's value must be one of: `unsigned-enumeration`:: `unsigned-enum`:: `uenum`:: Unsigned enumeration field type `signed-enumeration`:: `signed-enum`:: `senum`:: Signed enumeration field type |Yes if the <> property is not set. | include::partial$int-ft-obj-base-props.adoc[] |[[mappings-prop]]`mappings` |Mapping of string keys to <> |Mappings of this enumeration field type. Each mapping assigns a label to a set of integer ranges. This mapping must contain at least one entry. |Yes | |=== [[enum-ft-mapping-seq]] == Enumeration field type mapping sequence A YAML sequence of integer ranges, which can be: A sequence of two integers:: The first integer is the range's lower value (included). + The second integer is the range's upper value (included). An integer:: This is equivalent to a sequence of two identical integers. + In other words, `17` is equivalent to `+[17, 17]+`. This sequence must contain at least one item. == Generated C{nbsp}types include::partial$int-ft-obj-c-types-table.adoc[] == Examples .Basic <> unsigned enumeration field type object with a single <> ==== [source,yaml] ---- class: unsigned-enumeration size: 8 mappings: A: [0] ---- ==== .<> signed enumeration field type object with simple <>. ==== [source,yaml] ---- class: signed-enumeration size: 23 mappings: A: [2] B: [5] C: [9] ---- ==== .32-bit-<> <> signed enumeration field type object with <>. ==== [source,yaml] ---- class: signed-enumeration size: 16 alignment: 32 mappings: RUNNING: - 17 - [19, 24] - -144 WAITING: - 18 - [-32, -25] STOPPED: [202] ---- ==== .<> unsigned enumeration field type object with a hexadecimal <> and <>. ==== [source,yaml] ---- class: unsigned-enumeration size: 32 preferred-display-base: hexadecimal mappings: steam-machine: [18] on/off: - 15 - [200, 1000] the-prime-time-of-your-life: [2] ---- ==== barectf-3.1.2/docs/modules/yaml/pages/ert-obj.adoc000066400000000000000000000071031443101201700217500ustar00rootroot00000000000000= YAML event record type object An _**event record type object**_ is the type of an xref:how-barectf-works:ctf-primer.adoc#er[event record]. An event record type describes parts (specific context and payload fields) of what a CTF consumer needs to decode its instances (event records). The other parts (header and common context) are described by the xref:dst-obj.adoc[data stream type] which contains the event record type. Event record type objects are only found under the xref:dst-obj.adoc#erts-prop[`event-record-types` property] of a data stream type object. barectf generates one xref:tracing-funcs:index.adoc[tracing function] per event record type. [[props]] == Properties All the properties are optional. [%autowidth.stretch, cols="d,d,a,d", role="can-break"] |=== |Name |Type |Description |Default |[[ll-prop]]`log-level` |Positive integer or string |Numeric log level of this event record type's instances. If this property's value is a string, it's the name of an existing xref:trace-type-obj.adoc#ll-aliases-prop[log level alias]. |No log level |[[spec-ctx-ft-prop]]`specific-context-field-type` |xref:struct-ft-obj.adoc[Structure field type object] or string | xref:how-barectf-works:ctf-primer.adoc#er[Specific context field] type of this event record type. If this property's value is a string, it must be the name of an existing xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. For each member `__NAME__` of this property, the xref:tracing-funcs:index.adoc[tracing function] which barectf generates for this event record type has an additional parameter named `sc___NAME__`. Member names must be valid xref:index.adoc#tsdl-ident[TSDL identifiers]. |No specific context field type |[[payload-ft-prop]]`payload-field-type` |xref:struct-ft-obj.adoc[Structure field type object] or string | xref:how-barectf-works:ctf-primer.adoc#er[Payload field] type of this event record type. If this property's value is a string, it must be the name of an existing xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. For each member `__NAME__` of this property, the xref:tracing-funcs:index.adoc[tracing function] which barectf generates for this event record type has an additional parameter named `p___NAME__`. Member names must be valid xref:index.adoc#tsdl-ident[TSDL identifiers]. |No payload field type |[[include-prop]]`$include` |Sequence of strings. |See xref:include.adoc[]. |No inclusions |=== == Examples .Basic event record type object. ==== [source,yaml] ---- payload-field-type: class: structure members: - msg: string ---- ==== .Event record type object with a <>. ==== [source,yaml] ---- log-level: 12 payload-field-type: class: structure members: - msg: string ---- ==== .Event record type object with a <> (using a xref:trace-type-obj.adoc#ll-aliases-prop[log level alias]). ==== [source,yaml] ---- log-level: CRITICAL payload-field-type: class: structure members: - msg: string ---- ==== .Event record type object with a <>. ==== [source,yaml] ---- specific-context-field-type: class: structure members: - count: field-type: class: signed-integer size: 32 payload-field-type: class: structure members: - msg: string ---- ==== .Event record type object with <>. ==== [source,yaml] ---- payload-field-type: class: structure members: - msg: string - ip_addr: field-type: class: static-array length: 4 element-field-type: uint8 $include: [net-ctx.yaml] ---- ==== barectf-3.1.2/docs/modules/yaml/pages/ft-obj.adoc000066400000000000000000000166241443101201700215770ustar00rootroot00000000000000= YAML field type object A _**field type object**_ is the type of data field, found in xref:how-barectf-works:ctf-primer.adoc#ds[data streams]. A field type object describes what a CTF consumer needs to decode a data field. You can use a xref:trace-type-obj.adoc#ft-aliases-prop[field type alias] name (a string) anywhere a field type object is expected. == Expected usage locations A field type object is expected at the following locations: Within another field type object:: + -- * The xref:struct-ft-obj.adoc#member-ft-prop[`field-type` property] of a structure field type member object. * The `element-field-type` property of a xref:static-array-ft-obj.adoc#element-ft-prop[static] or xref:dyn-array-ft-obj.adoc#element-ft-prop[dynamic field type object]. -- Within a xref:trace-type-obj.adoc[trace type object]:: + -- * A value of a xref:trace-type-obj.adoc#ft-aliases-prop[field type alias] mapping entry. * Any property of a xref:trace-type-obj.adoc#features-obj[features object]. -- Within a xref:dst-obj.adoc[data stream type object]:: + -- * Any property of a xref:dst-obj.adoc#pkt-features-obj[packet features object]. * Any property of an xref:dst-obj.adoc#er-features-obj[event record features object]. * The xref:dst-obj.adoc#er-common-ctx-ft-prop[`event-record-common-context-field-type` property]. -- Within an xref:ert-obj.adoc[event record type object]:: + -- * The xref:ert-obj.adoc#spec-ctx-ft-prop[`specific-context-field-type` property]. * The xref:ert-obj.adoc#payload-ft-prop[`payload-field-type` property]. -- == Available field type objects As of barectf{nbsp}{page-component-version}, the available field type objects are: xref:int-ft-obj.adoc[Integer field type objects]:: Describes unsigned and signed integer data fields. xref:enum-ft-obj.adoc[Enumeration field type objects]:: Describes unsigned and signed enumeration data fields. xref:real-ft-obj.adoc[Real field type object]:: Describes single-precision and double-precision real data fields. xref:str-ft-obj.adoc[String field type object]:: Describes null-terminated string data fields. xref:struct-ft-obj.adoc[Structure field type object]:: Describes structure data fields. xref:static-array-ft-obj.adoc[Static array field type object]:: Describes array data fields with a static length. xref:dyn-array-ft-obj.adoc[Dynamic array field type object]:: Describes array data fields with a dynamic (variable) length. [[gen-c-types]] == Generated C{nbsp}types barectf uses configured field types to generate user data parameters of packet opening and tracing functions. Each field type object page indicates the field type's corresponding C{nbsp}type(s). Here's a summary: [%autowidth.stretch, cols="d,a"] |=== |Field type |C type |Unsigned xref:int-ft-obj.adoc[integer]/xref:enum-ft-obj.adoc[enumeration field type] |Depending on the `size` property: [1,{nbsp}8]:: `uint8_t` [9,{nbsp}16]:: `uint16_t` [17,{nbsp}32]:: `uint32_t` [33,{nbsp}64]:: `uint64_t` |Signed xref:int-ft-obj.adoc[integer]/xref:enum-ft-obj.adoc[enumeration field type] |Depending on the `size` property: [1,{nbsp}8]:: `int8_t` [9,{nbsp}16]:: `int16_t` [17,{nbsp}32]:: `int32_t` [33,{nbsp}64]:: `int64_t` |xref:real-ft-obj.adoc[Real field type] |Depending on the xref:real-ft-obj.adoc#size-prop[`size` property]: 32:: `float` 64:: `double` |xref:str-ft-obj.adoc[String field type] |`const char *` |xref:static-array-ft-obj.adoc[Static array field type] |Pointer to `const __T__`, where `__T__` is the generated C{nbsp}type for the field type object of the xref:static-array-ft-obj.adoc#element-ft-prop[`element-field-type` property]. |xref:dyn-array-ft-obj.adoc[Dynamic array field type] |Two adjacent parameters: Dynamic length:: `uint32_t` Element:: Pointer to `const __T__`, where `__T__` is the generated C{nbsp}type for the field type object of the xref:dyn-array-ft-obj.adoc#element-ft-prop[`element-field-type` property]. |=== [[inherit]] == Inherit a field type object A field type object can _inherit_ the properties of another field type object with the common <>. When a field type object __**A**__ inherits another field type object __**B**__, the _effective_ field type object is __**A**__ "`patching`" __**B**__. include::partial$patching-rules-table.adoc[] === Examples In the examples below, the name of the base field type object's alias is `base`. .Override scalar property. ==== .Base field type object [source,yaml] ---- class: unsigned-integer size: 32 alignment: 8 ---- .Overlay field type object [source,yaml] ---- $inherit: base size: 16 ---- .Effective field type object [source,yaml] ---- class: unsigned-integer size: 16 alignment: 8 ---- ==== .Add and override scalar properties. ==== .Base field type object [source,yaml] ---- class: unsigned-integer size: 32 alignment: 8 ---- .Overlay field type object [source,yaml] ---- $inherit: base size: 16 preferred-display-base: hexadecimal ---- .Effective field type object [source,yaml] ---- class: unsigned-integer size: 16 alignment: 8 preferred-display-base: hexadecimal ---- ==== .Append to sequence property. ==== .Base field type object [source,yaml] ---- class: signed-enumeration mappings: COMPOSE: - 56 - [100, 299] DIRTY: [0] ---- .Overlay field type object [source,yaml] ---- $inherit: base size: 16 mappings: COMPOSE: - -22 ---- .Effective field type object [source,yaml] ---- class: signed-enumeration size: 16 mappings: COMPOSE: - 56 - [100, 299] - -22 DIRTY: [0] ---- ==== .Add to nested mapping property. ==== .Base field type object [source,yaml] ---- class: structure members: - msg: string - user_id: uint16 ---- .Overlay field type object [source,yaml] ---- $inherit: base members: - src_ip_addr: field-type: class: static-array length: 4 element-field-type: uint8 - user_id: int8 ---- .Effective field type object [source,yaml] ---- class: structure members: - msg: string - user_id: int8 - src_ip_addr: field-type: class: static-array length: 4 element-field-type: uint8 ---- ==== [[props]] == Common properties All field type objects require that the <> _or_ the <> be set, but not both. [%autowidth.stretch, cols="d,d,a,d"] |=== |Name |Type |Description |Required? |[[class-prop]]`class` |String |Class of this field type amongst: `unsigned-integer`:: `unsigned-int`:: `uint`:: Unsigned xref:int-ft-obj.adoc[integer field type] `signed-integer`:: `signed-int`:: `sint`:: Signed xref:int-ft-obj.adoc[integer field type] `unsigned-enumeration`:: `unsigned-enum`:: `uenum`:: Unsigned xref:enum-ft-obj.adoc[enumeration field type] `signed-enumeration`:: `signed-enum`:: `senum`:: Signed xref:enum-ft-obj.adoc[enumeration field type] `real`:: xref:real-ft-obj.adoc[Real field type] `string`:: `str`:: xref:str-ft-obj.adoc[String field type] `structure`:: `struct`:: xref:struct-ft-obj.adoc[Structure field type] `static-array`:: xref:static-array-ft-obj.adoc[Static array field type] `dynamic-array`:: xref:dyn-array-ft-obj.adoc[Dynamic array field type] |Yes if the <> property is not set. |[[inherit-prop]]`$inherit` |String |Name of a xref:trace-type-obj.adoc#ft-aliases-prop[field type alias] from which to <>. |Yes if the <> property is not set. |=== barectf-3.1.2/docs/modules/yaml/pages/include.adoc000066400000000000000000000124771443101201700220430ustar00rootroot00000000000000= Include partial YAML files You can include a partial YAML file from specific objects within the xref:cfg-obj.adoc[configuration object]: * xref:trace-obj.adoc[Trace object] * xref:trace-type-obj.adoc[Trace type object] * xref:clk-type-obj.adoc[Clock type object] * xref:dst-obj.adoc[Data stream type object] * xref:ert-obj.adoc[Event record type object] Each of the objects above can have an `$include` property which is a sequence of names of files to include. By choosing where to include partial YAML files strategically, you can split a configuration object into multiple reusable parts for different systems or projects. == Inclusion file search barectf tries to find each file of an `$include` property sequence in specific directories. When using the `barectf` CLI tool's xref:cli:usage.adoc#generate-command[`generate`] or xref:cli:usage.adoc#show-effective-configuration-command[`show-effective-configuration`] commands, the inclusion directory search order is: . The value of each xref:cli:usage.adoc#generate-include-dir-option[`+--include-dir+`] option, in order. . The current working directory. . The directory containing the <> (like `stdint.yaml` and `stdmisc.yaml`). By default, if `barectf` can't find an inclusion file, the command prints an error and xref:cli:usage.adoc#exit-status[exits] with a non-zero status. Force `barectf` to continue silently instead with its xref:cli:usage.adoc#generate-ignore-include-not-found-option[`+--ignore-include-not-found+`] option. == Inclusion rules With the `$include` property, an object _includes_ the properties of one or more YAML documents. barectf processes the items of the `$include` property sequence in order. When an object __**A**__ includes a YAML document __**B**__, the _effective_ object is __**A**__ "`patching`" __**B**__. include::partial$patching-rules-table.adoc[] === Examples .Override scalar property (xref:ert-obj.adoc[event record type object]). ==== .`base.yaml` [source,yaml] ---- log-level: WARN payload-field-type: class: structure members: - msg: string - msg_id: uint16 ---- .Overlay event record type object [source,yaml] ---- $include: [base.yaml] log-level: ERROR ---- .Effective event record type object [source,yaml] ---- log-level: ERROR payload-field-type: class: structure members: - msg: string - msg_id: uint16 ---- ==== .Add and override scalar properties (xref:clk-type-obj.adoc[clock type object]). ==== .`base.yaml` [source,yaml] ---- frequency: 1000000 offset: seconds: 1992839 ---- .Overlay clock type object [source,yaml] ---- $include: [base.yaml] frequency: 8000000 origin-is-unix-epoch: false ---- .Effective clock type object [source,yaml] ---- frequency: 8000000 offset: seconds: 1992839 origin-is-unix-epoch: false ---- ==== .Append to sequence property (xref:trace-type-obj.adoc[trace type object]). ==== .`base.yaml` [source,yaml] ---- $field-type-aliases: my-enum: class: signed-enumeration mappings: COMPOSE: - 56 - [100, 299] DIRTY: [0] ---- .Overlay trace type object [source,yaml] ---- $include: [base.yaml] $field-type-aliases: my-enum: size: 16 mappings: COMPOSE: - -22 # ... ---- .Effective trace type object [source,yaml] ---- $field-type-aliases: my-enum: class: signed-enumeration size: 16 mappings: COMPOSE: - 56 - [100, 299] - -22 DIRTY: [0] # ... ---- ==== .Add to nested mapping property (event record type object). ==== .`base.yaml` [source,yaml] ---- specific-context-field-type: class: structure members: - msg: string - user_id: uint16 ---- .Overlay event record type object [source,yaml] ---- $include: [base.yaml] specific-context-field-type: class: structure members: - src_ip_addr: field-type: class: static-array length: 4 element-field-type: uint8 - user_id: int8 ---- .Effective event record type object [source,yaml] ---- specific-context-field-type: class: structure members: - msg: string - user_id: int8 - src_ip_addr: field-type: class: static-array length: 4 element-field-type: uint8 ---- ==== [[std]] == Standard partial YAML files The barectf project ships with a few "`standard`" partial YAML files to be included from a xref:trace-type-obj.adoc[trace type object]: https://github.com/efficios/barectf/blob/stable-{page-component-version}/barectf/include/3/stdint.yaml[`stdint.yaml`]:: Standard xref:int-ft-obj.adoc[integer] xref:trace-type-obj.adoc#ft-aliases-prop[field type aliases], like `uint8`, `byte-packed-sint16`, and `bit-packed-uint64`. https://github.com/efficios/barectf/blob/stable-{page-component-version}/barectf/include/3/stdreal.yaml[`stdreal.yaml`]:: Standard xref:real-ft-obj.adoc[real] field type aliases, like `float` and `double`. https://github.com/efficios/barectf/blob/stable-{page-component-version}/barectf/include/3/stdmisc.yaml[`stdmisc.yaml`]:: The `string` and `str` xref:str-ft-obj.adoc[string] field type aliases. https://github.com/efficios/barectf/blob/stable-{page-component-version}/barectf/include/3/lttng-ust-log-levels.yaml[`lttng-ust-log-levels.yaml`]:: xref:trace-type-obj.adoc#ll-aliases-prop[Log level aliases] which correspond to the https://lttng.org/[LTTng-UST] log levels. barectf-3.1.2/docs/modules/yaml/pages/index.adoc000066400000000000000000000057441443101201700215260ustar00rootroot00000000000000= Write a barectf YAML configuration file A barectf configuration controls how barectf generates a tracer, for example: * What are the event record types for which to generate xref:tracing-funcs:index.adoc[tracing functions]? + In other words, what are the tracing function names and what are their parameter types and names? * Does a data stream have a clock source? If so, what's the clock source function's return C{nbsp}type? * What's the identifier prefix for the C{nbsp}source code which barectf generates? + By default, a tracing function name could be `+barectf_trace_my_stream_my_event()+`, but it can also be `+my_company_trace_my_stream_my_event()+`. barectf supports two methods to write a configuration: . Create and assemble configuration objects with the barectf Python API (`barectf` package). . Write a configuration in https://yaml.org/[YAML]. This section is about method{nbsp}2. Read xref:yaml-primer.adoc[] to learn more about the YAML language. A barectf YAML configuration document is a xref:yaml:cfg-obj.adoc[configuration object]. [NOTE] ==== In a barectf YAML configuration, a xref:yaml-primer.adoc#scalar[null value] always means to use the default value. This is useful when taking into account the xref:include.adoc[partial YAML file inclusion] or xref:ft-obj.adoc#inherit[field type object inheritance] features: the overriding object can reset properties to their default values. ==== [[stages]] == Processing stages barectf goes through the following stages when it processes a YAML configuration: . xref:include.adoc[Include], recursively, partial YAML files. . Expand xref:trace-type-obj.adoc#ft-aliases-prop[field type aliases]. + Replace every field type alias with its full xref:ft-obj.adoc[field type object], recursively. . Apply xref:ft-obj.adoc#inherit[field type object inheritance]. . Expand xref:trace-type-obj.adoc#ll-aliases-prop[log level aliases]. + Replace every log level alias with its numeric value. . Normalize property values. + If more than one value mean the same thing (for example, xref:common-values.adoc#byte-order[`be` and `big-endian`]), prefer one version. A xref:cfg-obj.adoc[configuration object], after step{nbsp}5, is known as an _effective configuration object_. The xref:cli:usage.adoc#show-effective-configuration-command[`barectf show-effective-configuration` CLI command] shows the effective version of a YAML configuration file. [[tsdl-ident]] == TSDL identifier Many barectf YAML objects require that a given string key or value be a valid TSDL (Trace Stream Description Language) identifier. As per https://diamon.org/ctf/v1.8.3/[CTF{nbsp}1.8.3], a valid TSDL identifier is any valid C{nbsp}identifier which is __not__ one of: * `align` * `callsite` * `const` * `char` * `clock` * `double` * `enum` * `env` * `event` * `floating_point` * `float` * `integer` * `int` * `long` * `short` * `signed` * `stream` * `string` * `struct` * `trace` * `typealias` * `typedef` * `unsigned` * `variant` * `void` * `_Bool` * `_Complex` * `_Imaginary` barectf-3.1.2/docs/modules/yaml/pages/int-ft-obj.adoc000066400000000000000000000025471443101201700223660ustar00rootroot00000000000000= YAML integer field type objects _**Integer field type objects**_ are the types of integer data fields, found in xref:how-barectf-works:ctf-primer.adoc#ds[data streams]. [[props]] == Properties [%autowidth.stretch, cols="d,d,a,d,a", role="can-break"] |=== |Name |Type |Description |{req-abbr} |Default |[[class-prop]]`class` |String |This property's value must be one of: `unsigned-integer`:: `unsigned-int`:: `uint`:: Unsigned integer field type `signed-integer`:: `signed-int`:: `sint`:: Signed integer field type |Yes if the <> property is not set. | include::partial$int-ft-obj-base-props.adoc[] |=== == Generated C{nbsp}types include::partial$int-ft-obj-c-types-table.adoc[] == Examples .Basic <> unsigned integer field type object. ==== [source,yaml] ---- class: unsigned-integer size: 8 ---- ==== .<> signed integer field type object. ==== [source,yaml] ---- class: signed-integer size: 23 ---- ==== .32-bit-<> <> signed integer field type object. ==== [source,yaml] ---- class: signed-integer size: 16 alignment: 32 ---- ==== .<> unsigned integer field type object with a hexadecimal <>. ==== [source,yaml] ---- class: unsigned-integer size: 32 preferred-display-base: hexadecimal ---- ==== barectf-3.1.2/docs/modules/yaml/pages/real-ft-obj.adoc000066400000000000000000000031311443101201700225050ustar00rootroot00000000000000= YAML real field type object A _**real field type object**_ is the type of floating point number data fields, found in xref:how-barectf-works:ctf-primer.adoc#ds[data streams]. [[props]] == Properties [%autowidth.stretch, cols="d,d,a,d,a"] |=== |Name |Type |Description |{req-abbr} |Default |[[class-prop]]`class` |String |This property's value must be `real`. |Yes if the <> property is not set. | include::partial$ft-obj-inherit-prop.adoc[] | |[[size-prop]]`size` |Positive integer |Size of this field type's instances (bits). This property's value must be one of: 32:: https://en.wikipedia.org/wiki/Single-precision_floating-point_format[Single-precision floating point number] instances (binary32). 64:: https://en.wikipedia.org/wiki/Double-precision_floating-point_format[Double-precision floating point number] instances (binary64). |Yes | |[[align-prop]]`alignment` |Power-of-two integer |Alignment of the first bit of this field type's instances within a xref:how-barectf-works:ctf-primer.adoc#pkt[CTF{nbsp}packet] (bits). |No |8 |=== == Generated C{nbsp}types Depending on the value of the <>: 32:: `float` 64:: `double` == Examples .Basic <> real field type object. ==== [source,yaml] ---- class: real size: 32 ---- ==== .Basic <> real field type object. ==== [source,yaml] ---- class: real size: 64 ---- ==== .64-bit-<> <> real field type object. ==== [source,yaml] ---- class: real size: 32 alignment: 64 ---- ==== barectf-3.1.2/docs/modules/yaml/pages/static-array-ft-obj.adoc000066400000000000000000000043071443101201700241730ustar00rootroot00000000000000= YAML static array field type objects A _**static array field type object**_ is the type of static array data fields, found in xref:how-barectf-works:ctf-primer.adoc#ds[data streams]. A static array data field is a sequence of data fields, or _elements_. In CTF, the number of elements in a static array data field (its length) is found in the xref:how-barectf-works:ctf-primer.adoc#trace[metadata stream]. [[props]] == Properties [%autowidth.stretch, cols="d,d,a,d"] |=== |Name |Type |Description |{req-abbr} |[[class-prop]]`class` |String |This property's value must be `static-array`. |Yes if the <> property is not set. include::partial$ft-obj-inherit-prop.adoc[] |[[length-prop]]`length` |Positive integer |Number of elements in this field type's instances. |Yes |[[element-ft-prop]]`element-field-type` |xref:ft-obj.adoc[Field type object] (except a xref:struct-ft-obj.adoc[structure field type object] and a xref:dyn-array-ft-obj.adoc[dynamic array field type object]) or string |Type of each element (data fields) in this field type's instances. If this property's value is a string, it must be the name of an existing xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. This field type must _not_ be a structure field type or a dynamic array field type. |Yes |=== == Generated C{nbsp}types Pointer to `const __T__`, where `__T__` is the generated C{nbsp}type for the field type object of the <>. include::partial$array-ft-obj-gen-c-types-example.adoc[] == Examples .Static array field type object: <> 8-bit unsigned xref:int-ft-obj.adoc[integers]. ==== [source,yaml] ---- class: static-array length: 4 element-field-type: uint8 ---- ==== .Static array field type object: <>{nbsp}xref:str-ft-obj.adoc[strings]. ==== [source,yaml] ---- class: static-array length: 22 element-field-type: class: string ---- ==== .Static array field type object: <> static arrays of 32{nbsp}double-precision xref:real-ft-obj.adoc[reals]. ==== [source,yaml] ---- class: static-array length: 5 element-field-type: class: static-array length: 32 element-field-type: class: real size: 64 ---- ==== barectf-3.1.2/docs/modules/yaml/pages/str-ft-obj.adoc000066400000000000000000000011611443101201700223730ustar00rootroot00000000000000= YAML string field type object A _**string field type object**_ is the type of null-terminated string data fields, found in xref:how-barectf-works:ctf-primer.adoc#ds[data streams]. [[props]] == Properties [%autowidth.stretch, cols="d,d,a,d"] |=== |Name |Type |Description |Required? |[[class-prop]]`class` |String |This property's value must be one of: * `string` * `str` |Yes if the <> property is not set. include::partial$ft-obj-inherit-prop.adoc[] |=== == Generated C{nbsp}type `const char *` == Example .Basic string field type object. ==== [source,yaml] ---- class: string ---- ==== barectf-3.1.2/docs/modules/yaml/pages/struct-ft-obj.adoc000066400000000000000000000055651443101201700231230ustar00rootroot00000000000000= YAML structure field type objects A _**structure field type object**_ is the type of structure data fields, found in xref:how-barectf-works:ctf-primer.adoc#ds[data streams]. A structure data field is a sequence of named data fields, or _members_. In CTF, the names of those members are found in the xref:how-barectf-works:ctf-primer.adoc#trace[metadata stream]. [[props]] == Properties [%autowidth.stretch, cols="d,a,a,d,a"] |=== |Name |Type |Description |{req-abbr} |Default |[[class-prop]]`class` |String |This property's value must be one of: * `structure` * `struct` |Yes if the <> property is not set. | include::partial$ft-obj-inherit-prop.adoc[] | |[[min-align-prop]]`minimum-alignment` |Power-of-two integer |_Minimum_ alignment of the first bit of this field type's instances within a xref:how-barectf-works:ctf-primer.adoc#pkt[CTF{nbsp}packet] (bits). |No |1 |[[members-prop]]`members` |Sequence of mappings, where each mapping has a single entry: Key:: Member's name. Value:: <> or string. This sequence is considered to be an _ordered mapping_, similar to YAML's https://yaml.org/type/omap.html[`+!!omap+`] type. Therefore, each mapping key must be unique. |Members of this structure field type. If a mapping's value is a string, it must be the name of an existing xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. This field type must _not_ be a structure field type. |No |No members |=== [[struct-ft-member-obj]] == Structure field type member object A member within a structure field type object. === Properties [%autowidth.stretch, cols="d,d,a,d"] |=== |Name |Type |Description |{req-abbr} |[[member-ft-prop]]`field-type` |xref:ft-obj.adoc[Field type object] (except a structure field type object) or string |Member's field type. If this property's value is a string, it must be the name of an existing xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. This field type must _not_ be a structure field type. |Yes |=== == Examples .Basic structure field type object with no <>. ==== [source,yaml] ---- class: structure ---- ==== .Structure field type object with three <> using xref:trace-type-obj.adoc#ft-aliases-prop[field type aliases]. ==== [source,yaml] ---- class: structure members: - msg: string - msg_id: uint32 - src_ip_addr: ipv4 ---- ==== .Structure field type object with one <>. ==== [source,yaml] ---- class: structure members: - msg: string - msg_id: field-type: class: unsigned-integer size: 32 - src_ip_addr: ipv4 ---- ==== .Structure field type object with an explicit <>. ==== [source,yaml] ---- class: structure minimum-alignment: 64 members: - msg: string - msg_id: uint32 - src_ip_addr: ipv4 ---- ==== barectf-3.1.2/docs/modules/yaml/pages/trace-obj.adoc000066400000000000000000000026111443101201700222530ustar00rootroot00000000000000= YAML trace object A _**trace object**_ represents a xref:how-barectf-works:ctf-primer.adoc[CTF trace]. A trace object has a xref:trace-type-obj.adoc[type] and an optional environment. As of barectf{nbsp}{page-component-version}, a xref:cfg-obj.adoc[configuration object] has a single trace object. == Properties [%autowidth.stretch, cols="d,d,a,d,d"] |=== |Name |Type |Description |{req-abbr} |Default |[[type-prop]]`type` |xref:trace-type-obj.adoc[Trace type object] |Type of this trace (metadata part). |Yes | |[[env-prop]]`environment` |Mapping of string keys to integer or string values |This trace's environment variables. Keys of this mapping are environment variable names. They must be valid xref:index.adoc#tsdl-ident[TSDL identifiers]. A CTF trace reader can read the variables of this mapping. |No |Empty mapping |[[include-prop]]`$include` |Sequence of strings. |See xref:include.adoc[]. |No |No inclusions |=== == Examples NOTE: The following examples omit the <> for clarity. .Basic trace object. ==== [source,yaml] ---- type: # ... ---- ==== .Trace object with <>. ==== [source,yaml] ---- type: # ... environment: my_program_version_major: 1 my_program_version_minor: 6 os: Palm OS ---- ==== .Trace object with an <>. ==== [source,yaml] ---- type: # ... $include: [my-env.yaml] ---- ==== barectf-3.1.2/docs/modules/yaml/pages/trace-type-obj.adoc000066400000000000000000000173711443101201700232430ustar00rootroot00000000000000= YAML trace type object A _**trace type object**_ is the type of a xref:trace-obj.adoc[trace object]. A trace type describes everything a CTF consumer needs to decode all the trace's xref:how-barectf-works:ctf-primer.adoc#ds[data streams]. A trace type object is only found as the xref:trace-obj.adoc#type-prop[`type` property] of a trace object. [[props]] == Properties [%autowidth.stretch, cols="d,d,a,d,d", role="can-break"] |=== |Name |Type |Description |{req-abbr} |Default |[[native-bo-prop]]`native-byte-order` |xref:common-values.adoc#byte-order[Byte order] |Native byte order of the system which produces this trace type's instance's xref:how-barectf-works:ctf-primer.adoc#ds[data streams]. You must not use this property and the <> property at the same time. |Yes, if the `trace-byte-order` property is missing | |[[trace-bo-prop]]`trace-byte-order` |xref:common-values.adoc#byte-order[Byte order] |Byte order of fields of this trace type's instance's xref:how-barectf-works:ctf-primer.adoc#ds[data streams]. [IMPORTANT] ==== This property exists to support barectf{nbsp}2 configurations. Prefer the <> property instead, as enforcing the trace byte order could result in a less efficient generated tracer. ==== You must not use this property and the `native-byte-order` property at the same time. |Yes, if the `native-byte-order` property is missing | |[[uuid-prop]]`uuid` |xref:common-values.adoc#uuid[UUID] or string |UUID of this trace type. If this property's value is the string `auto`, barectf generates a UUID. |No |No UUID |[[ft-aliases-prop]]`$field-type-aliases` |Mapping of string keys to xref:ft-obj.adoc[field type objects] or strings |Field type aliases. Keys of this mapping are field type alias names. If an entry's value is a string, it must be the name of an existing field type alias. You can use a field type alias name anywhere you can use a xref:ft-obj.adoc[field type object]. |No |Empty mapping |[[ll-aliases-prop]]`$log-level-aliases` |Mapping of string keys to integers |Log level aliases. Keys of this mapping are log level alias names. Values of this mapping are positive integral log levels. You can use a log level alias name as the value of an event record type object's xref:ert-obj.adoc#ll-prop[`log-level` property]. |No |Empty mapping |`$features` |<> |Features of this trace type's instance (trace). |No |See <> for default values. |[[clk-types-prop]]`clock-types` |Mapping of string keys to xref:clk-type-obj.adoc[clock type objects] |Clock type store for this trace type. Keys of this mapping are clock type names. They must be valid xref:index.adoc#tsdl-ident[TSDL identifiers]. The xref:dst-obj.adoc#def-clk-type-name-prop[`$default-clock-type-name` property] of a data stream type object refers to a key of this mapping. |No |No clock type store |[[dsts-prop]]`data-stream-types` |Mapping of string keys to xref:dst-obj.adoc[data stream type objects] |Data stream types of this trace type. Keys of this mapping are data stream type names. They must be valid C{nbsp}identifiers. This mapping must contain at least one entry. |Yes | |[[include-prop]]`$include` |Sequence of strings. |See xref:include.adoc[]. |No |No inclusions |=== [[features-obj]] == Features object The features of a trace type object. As of barectf{nbsp}{page-component-version}, each feature controls whether or not some information will be part of the header of each xref:how-barectf-works:ctf-primer.adoc#pkt[CTF packet] which the generated tracer produces. You can enable or disable a feature. When you enable one, you can set its xref:ft-obj.adoc[field type] explicitly or make barectf choose a sane default. === Properties For all the feature properties below, if the value is a boolean: True:: Make barectf use a default field type. False:: Disable the feature. All the properties are optional. [%autowidth.stretch, cols="d,d,a,d", role="can-break"] |=== |Name |Type |Description |Default |[[magic-ft-prop]]`magic-field-type` |32-bit{nbsp}unsigned xref:int-ft-obj.adoc[integer field type object], string, or boolean |Type of packet header's magic number field. If this property's value is a string, it must be the name of an existing <>. |Use a default field type (true) |[[uuid-ft-prop]]`uuid-field-type` |xref:static-array-ft-obj.adoc[Static array field type object] of 16{nbsp}8-bit{nbsp}unsigned xref:int-ft-obj.adoc[integer field type objects] (8-bit{nbsp}alignment), string, or boolean |Type of packet header's trace type UUID field. If this property's value is a string, it must be the name of an existing <>. |Use a default field type (true) if this trace type has a <>, or false otherwise |[[dst-id-ft-prop]]`data-stream-type-id-field-type` |Unsigned xref:int-ft-obj.adoc[integer field type object], string, or boolean |Type of packet header's xref:dst-obj.adoc[data stream type] ID field. If this property's value is a string, it must be the name of an existing <>. This feature is required when this trace type has more than one data stream type (<>). |Use a default field type (true) |=== == Examples NOTE: The following examples can omit <> for clarity. .Basic trace type object. ==== [source,yaml] ---- native-byte-order: little-endian data-stream-types: # ... ---- ==== .Trace type object with a specific <>. ==== [source,yaml] ---- native-byte-order: little-endian uuid: 1b706833-b56c-4960-b5f7-e43651ff01fb data-stream-types: # ... ---- ==== .Trace type object with an automatic <>. ==== [source,yaml] ---- native-byte-order: little-endian uuid: auto data-stream-types: # ... ---- ==== .Trace type object with a disabled <>. ==== [source,yaml] ---- native-byte-order: little-endian $features: magic-field-type: false data-stream-types: # ... ---- ==== .Trace type object with a specific <>. ==== [source,yaml] ---- native-byte-order: little-endian $features: data-stream-type-id-field-type: class: unsigned-integer size: 8 data-stream-types: # ... ---- ==== .Trace type object with a <>. ==== [source,yaml] ---- native-byte-order: little-endian clock-types: sys_clock: frequency: 8000000 description: Clock A13 (8 MHz) origin-is-unix-epoch: false data-stream-types: my_stream: $default-clock-type-name: sys_clock # ... # ... ---- ==== .Trace type object with <>. ==== [source,yaml] ---- native-byte-order: little-endian $field-type-aliases: hex-uint8: $inherit: uint8 preferred-display-base: hexadecimal string-array: class: dynamic-array element-field-type: class: string $features: magic-field-type: hex-uint8 data-stream-types: my_stream: event-record-types: my_event: payload-field-type: client_id: hex-uint8 messages: string-array # ... # ... # ... ---- ==== .Trace type object with a <>. ==== [source,yaml] ---- native-byte-order: little-endian $log-level-aliases: WARN: 17 data-stream-types: my_stream: event-record-types: my_event: log-level: WARN # ... # ... # ... # ... ---- ==== .Trace type object with <>. ==== [source,yaml] ---- native-byte-order: little-endian data-stream-types: # ... $include: - stdint.yaml - stdmisc.yaml - network-field-type-aliases.yaml - sched-field-type-aliases.yaml - default-log-levels.yaml - project-b-data-stream-types.yaml ---- ==== barectf-3.1.2/docs/modules/yaml/pages/yaml-primer.adoc000066400000000000000000000122531443101201700226460ustar00rootroot00000000000000= YAML primer https://yaml.org/[YAML] is a human-readable data serialization format, like https://www.json.org/json-en.html[JSON]. In fact, YAML is a superset of JSON: you can also write a barectf configuration in JSON. YAML has many features which are outside the scope of the barectf documentation. This page is a simple introduction to the https://yaml.org/spec/1.2/spec.html[YAML{nbsp}1.2] language. YAML uses indentation for scoping, much like Python. The root of a YAML document is a <>. [[mapping]] == Mapping A YAML mapping is an unordered list of key-value pairs. Within a mapping, `:` delimits the value from the key. .A YAML mapping with four entries. ==== [source,yaml] ---- Castonguay: Huguette Delisle Létourneau: Gaétan Delisle Robitaille: Serge Paquette Gonthier-Hyndman: Micheline Paquette ---- ==== .A YAML mapping with a nested mapping. ==== [source,yaml] ---- title: C'est comme ça que je t'aime country: Canada language: French release-date: 6 March 2020 cast: Castonguay: Huguette Delisle Létourneau: Gaétan Delisle Robitaille: Serge Paquette Gonthier-Hyndman: Micheline Paquette ---- ==== You can also write a mapping on a single line, delimiting key-value pairs with `,`, beginning with `{` and ending with `}`: .A single-line YAML mapping with four entries. ==== [source,yaml] ---- {Marilyn: Huguette, François: Gaétan, Karine: Micheline, Patrice: Serge} ---- ==== .A YAML mapping with a nested single-line mapping. ==== [source,yaml] ---- title: C'est comme ça que je t'aime country: Canada language: French release-date: 6 March 2020 cast: {Marilyn: Huguette, François: Gaétan, Karine: Micheline, Patrice: Serge} ---- ==== Although the keys of a mapping can be any value, barectf only uses strings. Each key of a given mapping must be unique. [[sequence]] == Sequence A YAML sequence is an ordered list of values. Each item begins with `-`. .A YAML sequence with four items. ==== [source,yaml] ---- - Corvette Express - Québec Deli - Boulangerie Fanfare - Marché Méli-Mélo ---- ==== .A YAML sequence. The third item is a <>. ==== [source,yaml] ---- - Le poète des temps gris - Aidez-moi - name: Granby album: Toutte est temporaire year: 2014 - La patente ---- ==== You can also write a sequence on a single line, delimiting items with a comma (`,`), beginning with `[` and ending with `]`: .A single-line YAML sequence with four items. ==== [source,yaml] ---- [Corvette Express, Québec Deli, Boulangerie Fanfare, Marché Méli-Mélo] ---- ==== .A single-line YAML sequence. The third item is a single-line <>. ==== [source,yaml] ---- [Le poète des temps gris, Aidez-moi, {name: Granby, year: 2014}, La patente] ---- ==== [[scalar]] == Null, boolean, integer, and string values The basic YAML scalar values which are of interest to write a barectf configuration are: Null:: `null`, `Null`, `NULL`, `+~+`, or nothing. + In a barectf YAML configuration, a null value always means to use the default value. Boolean:: `true`, `True`, `TRUE`, `false`, `False`, or `FALSE`. Integer:: Anything matching these regular expressions: + ** `+[-+]?[0-9]++` (decimal) ** `+0o[0-7]++` (octal) ** `+0x[0-9a-fA-F]++` (hexadecimal) + Examples: `23`, `0x45fc1`, `-17`, `0o644`. String:: Double-quoted or single-quoted sequence of characters, or unquoted sequence of characters when it doesn't match the form of another value. + Examples: + ** `+"Whoever is happy will make others happy too."+` ** `+'Life is either a daring adventure or nothing at all.'+` ** `+Only a life lived for others is a life worthwhile.+` .A YAML mapping with null, boolean, integer, and string values. ==== [source,yaml] ---- 'null': null booleans: [true, false] integers: [23, 0x45fc1, -17, 0o644] strings: - "Whoever is happy will make others happy too." - 'Life is either a daring adventure or nothing at all.' - Only a life lived for others is a life worthwhile ---- ==== == Comment A YAML comment starts with `+#+` and ends at the end of the line. .A YAML mapping with comments. ==== [source,yaml] ---- title: C'est comme ça que je t'aime # This is actually a Québec production. country: Canada language: French release-date: 6 March 2020 cast: Castonguay: Huguette Delisle Létourneau: Gaétan Delisle # also cowrote Série noire Robitaille: Serge Paquette Gonthier-Hyndman: Micheline Paquette ---- ==== [[tag]] == Tags Any YAML value has a tag to indicate its meaning. If you don't write any tag, it's implicit from the value's form. .A YAML value with a tag. ==== The second `true` value below is actually a string instead of a boolean because it has an explicit YAML string tag: [source,yaml] ---- a boolean: true actually a string: ! true ---- ==== In the example above, `tag:yaml.org,2002:str` is the standard YAML tag for string values. barectf requires that the configuration file's root <> be tagged with `tag:barectf.org,2020/3/config` to identify the whole mapping as a barectf configuration object. You can tag the root mapping by tagging the YAML document itself: .A tagged YAML document. ==== [source,yaml] ---- --- ! trace: type: # ... ---- ==== barectf-3.1.2/docs/modules/yaml/partials/000077500000000000000000000000001443101201700202755ustar00rootroot00000000000000barectf-3.1.2/docs/modules/yaml/partials/array-ft-obj-gen-c-types-example.adoc000066400000000000000000000012611443101201700272040ustar00rootroot00000000000000.Generated C{nbsp}types for various element field types. ==== [%autowidth.stretch] |=== |Element field type |Generated C{nbsp}type |8-bit unsigned xref:int-ft-obj.adoc[integer] |`const uint8_t *` |32-bit signed integer |`const int32_t *` |Single-precision xref:real-ft-obj.adoc[real] |`const float *` |xref:str-ft-obj.adoc[String] |`const char * const *` |xref:static-array-ft-obj.adoc[Static array] of 16-bit signed integers |`const int16_t * const *` |Static array of double-precision reals |`const double * const *` |Static array of strings |`const char * const * const *` |Static array of static arrays of 32-bit unsigned integers |`const uint32_t * const * const *` |=== ==== barectf-3.1.2/docs/modules/yaml/partials/ft-obj-inherit-prop.adoc000066400000000000000000000003231443101201700247220ustar00rootroot00000000000000|[[inherit-prop]]`$inherit` |String |Name of a xref:trace-type-obj.adoc#ft-aliases-prop[field type alias] from which to xref:ft-obj.adoc#inherit[inherit]. |Yes if the <> property is not set. barectf-3.1.2/docs/modules/yaml/partials/int-ft-obj-base-props.adoc000066400000000000000000000016271443101201700251550ustar00rootroot00000000000000include::partial$ft-obj-inherit-prop.adoc[] | |[[size-prop]]`size` |Positive integer |Size of this field type's instances (bits). This property's value must be in the [1,{nbsp}64] range. |Yes | |[[align-prop]]`alignment` |Power-of-two integer |Alignment of the first bit of this field type's instances within a xref:how-barectf-works:ctf-primer.adoc#pkt[CTF{nbsp}packet] (bits). |No |8 if the <> is a multiple of{nbsp}8, or{nbsp}1 otherwise. |[[pref-disp-base-prop]]`preferred-display-base` |String | The preferred base (radix) to use when displaying this field type's instances. The value of this property is only a _hint_ to CTF consumers; they don't have to consider it. This property's value must be one of: `bin`:: `binary`:: Binary. `oct`:: `octal`:: Octal. `dec`:: `decimal`:: Decimal. `hex`:: `hexadecimal`:: Hexadecimal. |No |Decimal preferred display base barectf-3.1.2/docs/modules/yaml/partials/int-ft-obj-c-types-table.adoc000066400000000000000000000005501443101201700255450ustar00rootroot00000000000000Depending on the signedness of the integer field type and on the value of its <>: [%autowidth.stretch] |=== |__Signedness__{nbsp}/{nbsp}__Size (bits)__ |[1,{nbsp}8] |[9,{nbsp}16] |[17,{nbsp}32] |[33,{nbsp}64] |**Unsigned** |`uint8_t` |`uint16_t` |`uint32_t` |`uint64_t` |**Signed** |`int8_t` |`int16_t` |`int32_t` |`int64_t` |=== barectf-3.1.2/docs/modules/yaml/partials/patching-rules-table.adoc000066400000000000000000000023771443101201700251500ustar00rootroot00000000000000For a given property of __**A**__, the patching rules are: [%autowidth.stretch, cols="d,a,a"] |=== |__**A**__'s property type |A's property exists in B |A's property doesn't exist in B |Null, boolean, integer, and string |Replace __**B**__'s property with __**A**__'s property. |Keep __**A**__'s property. |Sequence | __**B**__'s property is also a sequence:: Append the items of __**A**__'s property to __**B**__'s property. + A structure field type object's xref:struct-ft-obj.adoc#members-prop[`members` property] is an exception: __**A**__'s property is considered to be an _ordered mapping_, therefore apply the mapping patching rules. __**B**__'s property is _not_ a sequence:: Replace __**B**__'s property with __**A**__'s property. |Keep __**A**__'s property. |Mapping | __**B**__'s property is also a mapping:: Patch __**A**__'s property over __**B**__'s property according to those rules. __**B**__'s property is _not_ a mapping:: Replace __**B**__'s property with __**A**__'s property. |Keep __**A**__'s property. |=== NOTE: When __**A**__'s property replaces __**B**__'s property and the value of __**A**__'s property is null, this effectively "`resets`" the property to its default value. barectf-3.1.2/examples/000077500000000000000000000000001443101201700147325ustar00rootroot00000000000000barectf-3.1.2/examples/.gitignore000066400000000000000000000000601443101201700167160ustar00rootroot00000000000000barectf.c barectf.h barectf-bitfield.h metadata barectf-3.1.2/examples/barectf-tracepoint/000077500000000000000000000000001443101201700205065ustar00rootroot00000000000000barectf-3.1.2/examples/barectf-tracepoint/.gitignore000066400000000000000000000002111443101201700224700ustar00rootroot00000000000000barectf-tracepoint-barectf-linux-fs barectf-tracepoint-barectf-qemu-arm-uart barectf-tracepoint-lttng-ust ctf-linux-fs ctf-qemu-arm-uart barectf-3.1.2/examples/barectf-tracepoint/Makefile000066400000000000000000000024471443101201700221550ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2014-2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. .PHONY: all clean all: make -f Makefile.barectf-linux-fs make -f Makefile.lttng-ust clean: make -f Makefile.barectf-linux-fs clean make -f Makefile.lttng-ust clean barectf-3.1.2/examples/barectf-tracepoint/Makefile.barectf-linux-fs000066400000000000000000000040311443101201700253140ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. BARECTF ?= barectf RM = rm -rf MKDIR = mkdir -p PLATFORM_DIR = ../../platforms/linux-fs EXTRA_DIR = ../../extra CFLAGS = -O2 -Wall -pedantic -I$(PLATFORM_DIR) -I$(EXTRA_DIR) -I. VERSION = linux-fs TARGET = barectf-tracepoint-barectf-$(VERSION) OBJS = $(TARGET).o barectf-$(VERSION).o barectf-platform-linux-fs.o TRACEDIR = ctf-$(VERSION) .PHONY: all clean all: $(TARGET) $(TRACEDIR): $(MKDIR) $@ $(TARGET): $(OBJS) $(CC) -o $@ $^ $(TRACEDIR)/metadata barectf-bitfield.h barectf.h barectf.c: config.yaml $(TRACEDIR) $(BARECTF) $< -m $(TRACEDIR) barectf-$(VERSION).o: barectf.c $(CC) -o $@ $(CFLAGS) -c $< barectf-platform-linux-fs.o: $(PLATFORM_DIR)/barectf-platform-linux-fs.c $(CC) $(CFLAGS) -c $< $(TARGET).o: barectf-tracepoint.c barectf-tracepoint-$(VERSION).h barectf.h barectf-bitfield.h $(CC) -o $@ $(CFLAGS) -c $< clean: $(RM) $(TARGET) $(OBJS) $(TRACEDIR) $(RM) barectf.h barectf-bitfield.h barectf.c barectf-3.1.2/examples/barectf-tracepoint/Makefile.barectf-qemu-arm-uart000066400000000000000000000043151443101201700262510ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. BARECTF ?= barectf ARCH = arm-none-eabi RM = rm -rf MKDIR = mkdir -p CC = $(ARCH)-gcc VERSION = qemu-arm-uart CPU=arm926ej-s EXTRA_DIR = ../../extra CFLAGS = -DWITH_QEMU_ARM_UART=1 -ffunction-sections -mcpu=$(CPU) -O2 -Wall -pedantic -I$(EXTRA_DIR) -I. LDFLAGS= -T barectf-platform-$(VERSION).ld -lc -lnosys TARGET = barectf-tracepoint-barectf-$(VERSION) OBJS = $(TARGET).o barectf-$(VERSION).o barectf-platform-$(VERSION).o TRACEDIR = ctf-$(VERSION) .PHONY: all clean sim all: $(TARGET) $(TRACEDIR): $(MKDIR) $@ $(TARGET): $(OBJS) $(CC) -o $@ $^ $(LDFLAGS) $(TRACEDIR)/metadata barectf-bitfield.h barectf.h barectf.c: config.yaml $(TRACEDIR) $(BARECTF) $< -m $(TRACEDIR) barectf-$(VERSION).o: barectf.c $(CC) -o $@ $(CFLAGS) -c $< barectf-platform-$(VERSION).o: barectf-platform-$(VERSION).c $(CC) $(CFLAGS) -c $< $(TARGET).o: barectf-tracepoint.c barectf-tracepoint-$(VERSION).h barectf.h barectf-bitfield.h $(CC) -o $@ $(CFLAGS) -c $< clean: $(RM) $(TARGET) $(OBJS) $(TRACEDIR) $(RM) barectf.h barectf-bitfield.h barectf.c sim: $(TARGET) ./barectf-tracepoint-barectf-qemu-arm-uart.sh barectf-3.1.2/examples/barectf-tracepoint/Makefile.lttng-ust000066400000000000000000000030441443101201700241070ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. RM = rm -rf CFLAGS := -O2 -Wall -pedantic $(CFLAGS) LDFLAGS := -llttng-ust -ldl $(LDFLAGS) TARGET = barectf-tracepoint-lttng-ust OBJS = $(TARGET).o tp.o .PHONY: all clean all: $(TARGET) $(TARGET): $(OBJS) $(CC) -o $@ $^ $(LDFLAGS) tp.o: tp.c $(CC) -c $(CFLAGS) -I. $< $(TARGET).o: barectf-tracepoint.c barectf-tracepoint-lttng-ust.h tp.h $(CC) -c -o $@ $(CFLAGS) -DWITH_LTTNG_UST=1 $< clean: $(RM) $(TARGET) $(OBJS) barectf-3.1.2/examples/barectf-tracepoint/README.md000066400000000000000000000102471443101201700217710ustar00rootroot00000000000000# Example using `barectf-tracepoint.h` This example is based on the [linux-fs-simple example](../linux-fs-simple) example, but it uses the `tracepoint()` macro defined in [`barectf-tracepoint.h`](../../../extra/barectf-tracepoint.h) instead of calling the generated tracing functions directly. This example also shows the compatibility with [LTTng-UST](http://lttng.org/) that this `barectf-tracepoint.h` allows. This example also includes a QEMU ARM target to simulate barectf used by a true bare-metal application. All the targets of this example use the same application source: [`barectf-tracepoint.c`](barectf-tracepoint.c). ## barectf tracing ### linux-fs platform #### Building Do: make -f Makefile.barectf-linux-fs #### Running Run this example: ./barectf-tracepoint-barectf-linux-fs The complete CTF trace is written to the `ctf-linux-fs` directory. You may run the example with any arguments; they will be recorded, as string fields in the events of the binary stream, e.g.: ./barectf-tracepoint-barectf-linux-fs this argument and this one will be recorded ### QEMU ARM platform #### Building To build this example, you need an ARM cross-compiler toolchain (`gcc-arm-none-eabi`, `binutils-arm-none-eabi`, and `libnewlib-arm-none-eabi` Ubuntu packages), then do: make -f Makefile.barectf-qemu-arm-uart #### Running To run this example, you need `qemu-system-arm` (`qemu-system-arm` Ubuntu package). Run this example: make -f Makefile.barectf-qemu-arm-uart sim The complete CTF trace is written to the `ctf-qemu-arm-uart` directory. #### What happens when running? When you run this example, here's what happens: 1. The `barectf-tracepoint-barectf-qemu-arm-uart.sh` Bash script is executed. 2. This Bash script executes `qemu-system-arm` with the appropriate options to simulate the bare-metal application on an ARM system. The simulated board is a Versatile platform baseboard from ARM. The simulated CPU is an ARM926EJ-S. This is a 2001 ARM9 core implementing the ARMv5TE architecture. QEMU is set to execute the `barectf-tracepoint-barectf-qemu-arm-uart` ELF file (previously built), and to connect the board's first UART with QEMU's standard input/output streams, and the board's second UART to the `ctf-qemu-arm-uart/stream` file (output only). The Bash script reads each line printed by QEMU, and kills the QEMU process when it reads the ending line written by the bare-metal application. 3. QEMU starts. Eventually, the bare-metal application's `main()` function is called. 4. `main()` calls `init_tracing()`, which for this example, calls `barectf_platform_qemu_arm_uart_init()`. This is a custom barectf platform created specifically for this example. The platform initializes a barectf context to get its clock source from a timer on the simulated board, and to flush its packets by writing the bytes to the second UART (which is connected to the `ctf-qemu-arm-uart/stream` file by QEMU). The platform uses a global buffer of 4 kiB to hold the current packet. 5. `main()` calls `trace_stuff()` which contains the `tracepoint()` macro invocations. Events are recorded to the current packet by the barectf machinery. When this packet is full, it is flushed by the platform to the second UART. 6. `main()` calls `fini_tracing()`, which calls `barectf_platform_qemu_arm_uart_fini()`, which prints the ending line that `barectf-tracepoint-barectf-qemu-arm-uart.sh` is waiting for to kill QEMU. ## LTTng-UST tracing ### Building Make sure [LTTng-UST](http://lttng.org/) is installed. Do: make -f Makefile.lttng-ust ### Running Create an LTTng tracing session: lttng create my-session Enable the events of this example: lttng enable-event --userspace 'barectf_tp:*' Start tracing: lttng start Run this example: ./barectf-tracepoint-lttng-ust You may run the example with any arguments; they will be recorded, as string fields in the events of the binary stream, e.g.: ./barectf-tracepoint-lttng-ust this argument and this one will be recorded Stop tracing and inspect the recorded events: lttng stop lttng view barectf-3.1.2/examples/barectf-tracepoint/barectf-platform-qemu-arm-uart.c000066400000000000000000000065461443101201700266100ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2016 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include "barectf-platform-qemu-arm-uart.h" #define BUF_SIZE 4096 #define TIMER_CTRL_32BIT (1 << 1) #define TIMER_CTRL_ENABLE (1 << 7) volatile uint32_t * const uart0 = (uint32_t *) 0x101f1000; volatile uint32_t * const uart1 = (uint32_t *) 0x101f2000; volatile uint32_t * const timer0_ctrl = (uint32_t *) 0x101e2008; volatile uint32_t * const timer0_value = (uint32_t *) 0x101e2004; static struct barectf_default_ctx barectf_ctx; static uint8_t buf[BUF_SIZE]; static uint64_t get_clock(void* data) { return (uint64_t) -*timer0_value; } static void flush_packet(void) { size_t i; /* flush packet to UART 1 */ for (i = 0; i < BUF_SIZE; ++i) { *uart1 = (uint32_t) buf[i]; } } static int is_backend_full(void *data) { return 0; } static void open_packet(void *data) { barectf_default_open_packet(&barectf_ctx); } static void close_packet(void *data) { /* close packet now */ barectf_default_close_packet(&barectf_ctx); /* flush current packet */ flush_packet(); } void barectf_platform_qemu_arm_uart_init(void) { struct barectf_platform_callbacks cbs = { .default_clock_get_value = get_clock, .is_backend_full = is_backend_full, .open_packet = open_packet, .close_packet = close_packet, }; /* enable/start timer (clock source) */ *timer0_ctrl |= TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE; /* initialize barectf context */ barectf_init(&barectf_ctx, buf, BUF_SIZE, cbs, NULL); /* open first packet */ open_packet(NULL); /* indicate that tracing is starting */ puts("tracing: starting"); } void barectf_platform_qemu_arm_uart_fini(void) { /* close last packet if it contains at least one event */ if (barectf_packet_is_open(&barectf_ctx) && !barectf_packet_is_empty(&barectf_ctx)) { close_packet(NULL); } /* indicate that tracing is done */ puts("tracing: done"); } struct barectf_default_ctx *barectf_platform_qemu_arm_uart_get_barectf_ctx() { return &barectf_ctx; } #define STDOUT 1 #define STDERR 2 /* custom write "syscall" for newlib's stdio: write to UART 0 */ int _write(int file, char *ptr, int len) { if (file == STDOUT || file == STDERR) { int i; for (i = 0; i < len; i++) { *uart0 = (uint32_t) ptr[i]; } } return 0; } barectf-3.1.2/examples/barectf-tracepoint/barectf-platform-qemu-arm-uart.h000066400000000000000000000027331443101201700266070ustar00rootroot00000000000000#ifndef _BARECTF_PLATFORM_QEMU_ARM_UART #define _BARECTF_PLATFORM_QEMU_ARM_UART /* * The MIT License (MIT) * * Copyright (c) 2016 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include void barectf_platform_qemu_arm_uart_init(void); void barectf_platform_qemu_arm_uart_fini(void); struct barectf_default_ctx *barectf_platform_qemu_arm_uart_get_barectf_ctx(void); #endif /* _BARECTF_PLATFORM_QEMU_ARM_UART */ barectf-3.1.2/examples/barectf-tracepoint/barectf-platform-qemu-arm-uart.ld000066400000000000000000000033631443101201700267570ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2016 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ MEMORY { SDRAM (XRW) : ORIGIN = 0x00000000, LENGTH = 0x08000000 } /* heap size */ heap_size = 0x10000; /* define stack base (grows downwards), used in newlib's crt0.S */ __stack = ORIGIN(SDRAM) + LENGTH(SDRAM); /* libc's entry point */ ENTRY(_mainCRTStartup); SECTIONS { /* QEMU starts executing at 0x10000 */ . = 0x10000; .text : { *(.text) *(.text.*) } > SDRAM .data : { *(.data) *(.data.*) } > SDRAM .bss : { __bss_start__ = .; *(.bss) *(.bss.*) *(COMMON) __bss_end__ = .; } > SDRAM /* "end" symbol needed by newlib's _sbrk */ end = .; } barectf-3.1.2/examples/barectf-tracepoint/barectf-tracepoint-barectf-qemu-arm-uart.sh000077500000000000000000000026751443101201700307320ustar00rootroot00000000000000#!/usr/bin/env bash # The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. qemu-system-arm -M versatilepb -m 128M -nographic -monitor none \ -kernel barectf-tracepoint-barectf-qemu-arm-uart \ -serial stdio -serial file:ctf-qemu-arm-uart/stream | { while read line; do echo "$line" if [ x"$line" = x"tracing: done" ]; then pkill -nf file:ctf-qemu-arm-uart fi done } barectf-3.1.2/examples/barectf-tracepoint/barectf-tracepoint-linux-fs.h000066400000000000000000000046421443101201700262040ustar00rootroot00000000000000#ifndef _BARECTF_TRACEPOINT_LINUX_FS #define _BARECTF_TRACEPOINT_LINUX_FS /* * The MIT License (MIT) * * Copyright (c) 2016 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include /* * Include generated barectf header file: this contains the prefix and * default stream name to be used by the tracepoint() macro. */ #include "barectf.h" /* define how the context is to be found by tracepoint() calls */ #define BARECTF_TRACEPOINT_CTX (global_barectf_ctx) /* then include this: */ #include /* global barectf context (default stream) */ static struct barectf_default_ctx *global_barectf_ctx; /* global barectf platform context */ static struct barectf_platform_linux_fs_ctx *global_barectf_platform_ctx; /* init function for this version */ static void init_tracing(void) { /* initialize platform */ global_barectf_platform_ctx = barectf_platform_linux_fs_init(512, "ctf-linux-fs/stream", 1, 2, 7); if (!global_barectf_platform_ctx) { fprintf(stderr, "Error: could not initialize platform\n"); exit(1); } global_barectf_ctx = barectf_platform_linux_fs_get_barectf_ctx( global_barectf_platform_ctx); } /* finalization function for this version */ static void fini_tracing(void) { /* finalize platform */ barectf_platform_linux_fs_fini(global_barectf_platform_ctx); } #endif /* _BARECTF_TRACEPOINT_LINUX_FS */ barectf-3.1.2/examples/barectf-tracepoint/barectf-tracepoint-lttng-ust.h000066400000000000000000000026651443101201700264030ustar00rootroot00000000000000#ifndef _BARECTF_TRACEPOINT_LTTNG_UST #define _BARECTF_TRACEPOINT_LTTNG_UST /* * The MIT License (MIT) * * Copyright (c) 2016 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* tracepoint provider header */ #include "tp.h" /* empty init_tracing() and fini_tracing() function for this version */ #define init_tracing() #define fini_tracing() #endif /* _BARECTF_TRACEPOINT_LTTNG_UST */ barectf-3.1.2/examples/barectf-tracepoint/barectf-tracepoint-qemu-arm-uart.h000066400000000000000000000041431443101201700271300ustar00rootroot00000000000000#ifndef _BARECTF_TRACEPOINT_QEMU_ARM_UART #define _BARECTF_TRACEPOINT_QEMU_ARM_UART /* * The MIT License (MIT) * * Copyright (c) 2016 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include /* * Include generated barectf header file: this contains the prefix and * default stream name to be used by the tracepoint() macro. */ #include "barectf.h" /* define how the context is to be found by tracepoint() calls */ #define BARECTF_TRACEPOINT_CTX (global_barectf_ctx) /* then include this: */ #include /* global barectf context (default stream) */ static struct barectf_default_ctx *global_barectf_ctx; /* init function for this version */ static void init_tracing(void) { /* initialize platform */ barectf_platform_qemu_arm_uart_init(); global_barectf_ctx = barectf_platform_qemu_arm_uart_get_barectf_ctx(); } /* finalization function for this version */ static void fini_tracing(void) { /* finalize platform */ barectf_platform_qemu_arm_uart_fini(); } #endif /* _BARECTF_TRACEPOINT_QEMU_ARM_UART */ barectf-3.1.2/examples/barectf-tracepoint/barectf-tracepoint.c000066400000000000000000000047041443101201700244330ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2016 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include #if defined(WITH_LTTNG_UST) #include "barectf-tracepoint-lttng-ust.h" #elif defined(WITH_QEMU_ARM_UART) #include "barectf-tracepoint-qemu-arm-uart.h" #else #include "barectf-tracepoint-linux-fs.h" #endif enum state_t { NEW, TERMINATED, READY, RUNNING, WAITING, }; static void trace_stuff(int argc, char *argv[]) { int i; const char *str; /* record 40000 events */ for (i = 0; i < 5000; ++i) { str = argv[i % argc]; tracepoint(barectf_tp, simple_uint32, i * 1500); tracepoint(barectf_tp, simple_int16, -i * 2); tracepoint(barectf_tp, simple_float, (float) i / 1.23); tracepoint(barectf_tp, simple_string, str); tracepoint(barectf_tp, simple_enum, RUNNING); tracepoint(barectf_tp, a_few_fields, -1, 301, -3.14159, str, NEW); tracepoint(barectf_tp, bit_packed_integers, 1, -1, 3, -2, 2, 7, 23, -55, 232); tracepoint(barectf_tp, simple_enum, TERMINATED); } } #define NUM_STRINGS 5 static char *strings[] = { "orange", "mandarine", "lemon", "lime", "grapefruit", }; int main(int argc, char *argv[]) { init_tracing(); if (argc <= 1) { /* use static strings if there's nothing interesting in argv */ argc = NUM_STRINGS; argv = strings; } trace_stuff(argc, argv); fini_tracing(); return 0; } barectf-3.1.2/examples/barectf-tracepoint/config.yaml000066400000000000000000000102451443101201700226410ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. version: '2.2' options: gen-prefix-def: true gen-default-stream-def: true metadata: $include: - stdint.yaml - stdfloat.yaml - stdmisc.yaml - lttng-ust-log-levels.yaml type-aliases: clock-int: $inherit: uint64 property-mappings: - type: clock name: default property: value state: class: enum value-type: uint8 members: - NEW - TERMINATED - READY - RUNNING - WAITING clocks: default: freq: 1000000000 offset: seconds: 1434072888 $return-ctype: uint64_t trace: $include: trace-basic.yaml byte-order: le streams: default: $default: true packet-context-type: class: struct fields: timestamp_begin: clock-int timestamp_end: clock-int packet_size: uint32 content_size: uint32 events_discarded: uint32 event-header-type: class: struct fields: timestamp: clock-int id: uint16 events: barectf_tp_simple_uint32: log-level: CRIT payload-type: class: struct fields: value: uint32 barectf_tp_simple_int16: payload-type: class: struct fields: value: int16 barectf_tp_simple_float: payload-type: class: struct fields: value: float barectf_tp_simple_string: log-level: WARNING payload-type: class: struct fields: value: class: string barectf_tp_simple_enum: payload-type: class: struct fields: value: state barectf_tp_a_few_fields: payload-type: class: struct fields: int32: int32 uint16: uint16 dbl: double str: class: string state: state barectf_tp_bit_packed_integers: log-level: 513 payload-type: class: struct min-align: 8 fields: uint1: $inherit: uint8 size: 1 align: 1 int1: $inherit: int8 size: 1 align: 1 uint2: $inherit: uint8 size: 2 align: 1 int3: $inherit: int8 size: 3 align: 1 uint4: $inherit: uint8 size: 4 align: 1 int5: $inherit: int8 size: 5 align: 1 uint6: $inherit: uint8 size: 6 align: 1 int7: $inherit: int8 size: 7 align: 1 uint8: $inherit: uint8 align: 1 barectf-3.1.2/examples/barectf-tracepoint/tp.c000066400000000000000000000023401443101201700212740ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2016 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #define TRACEPOINT_CREATE_PROBES #define TRACEPOINT_DEFINE #include "tp.h" barectf-3.1.2/examples/barectf-tracepoint/tp.h000066400000000000000000000066221443101201700213100ustar00rootroot00000000000000#undef TRACEPOINT_PROVIDER #define TRACEPOINT_PROVIDER barectf_tp #undef TRACEPOINT_INCLUDE #define TRACEPOINT_INCLUDE "./tp.h" #if !defined(_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TP_H /* * The MIT License (MIT) * * Copyright (c) 2016 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include TRACEPOINT_EVENT( barectf_tp, simple_uint32, TP_ARGS( uint32_t, value ), TP_FIELDS( ctf_integer(uint32_t, value, value) ) ) TRACEPOINT_LOGLEVEL(barectf_tp, simple_uint32, TRACE_CRIT) TRACEPOINT_EVENT( barectf_tp, simple_int16, TP_ARGS( int16_t, value ), TP_FIELDS( ctf_integer(int16_t, value, value) ) ) TRACEPOINT_EVENT( barectf_tp, simple_float, TP_ARGS( float, value ), TP_FIELDS( ctf_float(float, value, value) ) ) TRACEPOINT_EVENT( barectf_tp, simple_string, TP_ARGS( const char *, value ), TP_FIELDS( ctf_string(value, value) ) ) TRACEPOINT_LOGLEVEL(barectf_tp, simple_string, TRACE_WARNING) TRACEPOINT_ENUM( barectf_tp, state, TP_ENUM_VALUES( ctf_enum_value("NEW", 0) ctf_enum_value("TERMINATED", 1) ctf_enum_value("READY", 2) ctf_enum_value("RUNNING", 3) ctf_enum_value("WAITING", 4) ) ) TRACEPOINT_EVENT( barectf_tp, simple_enum, TP_ARGS( int, value ), TP_FIELDS( ctf_enum(barectf_tp, state, int, value, value) ) ) TRACEPOINT_EVENT( barectf_tp, a_few_fields, TP_ARGS( int32_t, int32, uint16_t, int16, double, dbl, const char *, str, int, state ), TP_FIELDS( ctf_integer(int32_t, int32, int32) ctf_integer(int16_t, int16, int16) ctf_float(double, dbl, dbl) ctf_string(str, str) ctf_enum(barectf_tp, state, int, state, state) ) ) TRACEPOINT_EVENT( barectf_tp, bit_packed_integers, TP_ARGS( uint8_t, uint1, int8_t, int1, uint8_t, uint2, int8_t, int3, uint8_t, uint4, int8_t, int5, uint8_t, uint6, int8_t, int7, uint8_t, uint8 ), TP_FIELDS( ctf_integer(uint8_t, uint1, uint1) ctf_integer(int8_t, int1, int1) ctf_integer(uint8_t, uint2, uint2) ctf_integer(int8_t, int3, int3) ctf_integer(uint8_t, uint4, uint4) ctf_integer(int8_t, int5, int5) ctf_integer(uint8_t, uint6, uint6) ctf_integer(int8_t, int7, int7) ctf_integer(uint8_t, uint8, uint8) ) ) TRACEPOINT_LOGLEVEL(barectf_tp, bit_packed_integers, 513) #endif /* _TP_H */ #include barectf-3.1.2/examples/linux-fs-simple/000077500000000000000000000000001443101201700177665ustar00rootroot00000000000000barectf-3.1.2/examples/linux-fs-simple/.gitignore000066400000000000000000000000261443101201700217540ustar00rootroot00000000000000trace linux-fs-simple barectf-3.1.2/examples/linux-fs-simple/Makefile000066400000000000000000000036141443101201700214320ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. BARECTF ?= barectf RM = rm -rf MKDIR = mkdir PLATFORM_DIR = ../../platforms/linux-fs CFLAGS = -O2 -Wall -pedantic -I$(PLATFORM_DIR) -I. TRACE_DIR = trace TARGET = linux-fs-simple OBJS = $(TARGET).o barectf.o barectf-platform-linux-fs.o .PHONY: all all: $(TARGET) $(TRACE_DIR): $(MKDIR) $(TRACE_DIR) $(TARGET): $(OBJS) $(CC) -o $@ $^ $(TRACE_DIR)/metadata barectf-bitfield.h barectf.h barectf.c: config.yaml $(TRACE_DIR) $(BARECTF) $< -m $(TRACE_DIR) barectf.o: barectf.c $(CC) $(CFLAGS) -ansi -c $< barectf-platform-linux-fs.o: $(PLATFORM_DIR)/barectf-platform-linux-fs.c barectf.h $(CC) $(CFLAGS) -c $< $(TARGET).o: $(TARGET).c barectf.h barectf-bitfield.h $(CC) $(CFLAGS) -c $< clean: $(RM) $(TARGET) $(OBJS) $(TRACE_DIR) $(RM) barectf.h barectf-bitfield.h barectf.c barectf-3.1.2/examples/linux-fs-simple/README.adoc000066400000000000000000000013521443101201700215540ustar00rootroot00000000000000// Render with Asciidoctor = Linux FS simple example Philippe Proulx 16 September 2020 :toc: left This simple example shows how to use the barectf link:../../platforms/linux-fs[Linux FS platform]. == Build Make sure barectf is installed. Build this example: ---- $ make ---- == Run Run this example: ---- $ ./linux-fs-simple ---- The complete CTF trace is the `trace` directory. [NOTE] ==== You can run the example with arguments; they will be recorded as string fields in the event records of the `trace/stream` data stream. For example: ---- $ ./linux-fs-simple dolore excepteur eiusmod commodo incididunt ---- ==== == Read Read the resulting trace with https://babeltrace.org/[Babeltrace{nbsp}2]: ---- $ babeltrace2 trace ---- barectf-3.1.2/examples/linux-fs-simple/config.yaml000066400000000000000000000102751443101201700221240ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. %YAML 1.2 --- ! trace: type: native-byte-order: little-endian $include: - stdint.yaml - stdreal.yaml - stdmisc.yaml - lttng-ust-log-levels.yaml $field-type-aliases: state: class: unsigned-enumeration size: 8 mappings: NEW: [0] TERMINATED: [1] READY: [2] RUNNING: [3] WAITING: [4] clock-types: default: $c-type: uint64_t data-stream-types: default: $is-default: true $default-clock-type-name: default event-record-types: simple_uint32: log-level: CRIT payload-field-type: class: structure members: - value: uint32 simple_int16: payload-field-type: class: structure members: - value: int16 simple_float: payload-field-type: class: structure members: - value: float simple_string: log-level: WARNING payload-field-type: class: structure members: - value: string simple_enum: payload-field-type: class: structure members: - value: state context_no_payload: specific-context-field-type: class: structure members: - a: uint32 - b: string no_context_no_payload: {} a_few_fields: payload-field-type: class: structure members: - int32: int32 - uint16: uint16 - dbl: double - str: string - state: state bit_packed_integers: log-level: 513 payload-field-type: class: structure members: - uint1: field-type: $inherit: bit-packed-uint8 size: 1 - int1: field-type: $inherit: bit-packed-int8 size: 1 - uint2: field-type: $inherit: bit-packed-uint8 size: 2 - int3: field-type: $inherit: bit-packed-int8 size: 3 - uint4: field-type: $inherit: bit-packed-uint8 size: 4 - int5: field-type: $inherit: bit-packed-int8 size: 5 - uint6: field-type: $inherit: bit-packed-uint8 size: 6 - int7: field-type: $inherit: bit-packed-int8 size: 7 - uint8: bit-packed-uint8 barectf-3.1.2/examples/linux-fs-simple/linux-fs-simple.c000066400000000000000000000053541443101201700231750ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2016-2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include #include "barectf-platform-linux-fs.h" #include "barectf.h" enum state_t { NEW, TERMINATED, READY, RUNNING, WAITING, }; static void trace_stuff(struct barectf_default_ctx * const ctx, const int argc, const char * const argv[]) { int i; const char *str; /* Record 40,000 events */ for (i = 0; i < 5000; ++i) { barectf_trace_simple_uint32(ctx, i * 1500); barectf_trace_simple_int16(ctx, -i * 2); barectf_trace_simple_float(ctx, (float) i / 1.23); if (argc > 0) { str = argv[i % argc]; } else { str = "hello there!"; } barectf_trace_simple_string(ctx, str); barectf_trace_context_no_payload(ctx, i, "ctx"); barectf_trace_simple_enum(ctx, RUNNING); barectf_trace_a_few_fields(ctx, -1, 301, -3.14159, str, NEW); barectf_trace_bit_packed_integers(ctx, 1, -1, 3, -2, 2, 7, 23, -55, 232); barectf_trace_no_context_no_payload(ctx); barectf_trace_simple_enum(ctx, TERMINATED); } } int main(const int argc, const char * const argv[]) { struct barectf_platform_linux_fs_ctx *platform_ctx; int exit_status = 0; /* Initialize platform */ platform_ctx = barectf_platform_linux_fs_init(512, "trace/stream", 1, 2, 7); if (!platform_ctx) { fprintf(stderr, "Error: failed to initialize Linux FS platform.\n"); exit_status = 1; goto end; } /* Trace stuff (will create/write packets as it executes) */ trace_stuff(barectf_platform_linux_fs_get_barectf_ctx(platform_ctx), argc, argv); /* Finalize platform */ barectf_platform_linux_fs_fini(platform_ctx); end: return exit_status; } barectf-3.1.2/extra/000077500000000000000000000000001443101201700142375ustar00rootroot00000000000000barectf-3.1.2/extra/barectf-tracepoint.h000066400000000000000000000054171443101201700201730ustar00rootroot00000000000000#ifndef _BARECTF_TRACEPOINT_H #define _BARECTF_TRACEPOINT_H /* * The MIT License (MIT) * * Copyright (c) 2016-2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /* Get identifier prefix */ #ifdef BARECTF_TRACEPOINT_PREFIX # define _BARECTF_TRACEPOINT_PREFIX BARECTF_TRACEPOINT_PREFIX #else # ifdef _BARECTF_IDENTIFIER_PREFIX # define _BARECTF_TRACEPOINT_PREFIX _BARECTF_IDENTIFIER_PREFIX # else # error You must define `BARECTF_TRACEPOINT_PREFIX` to use this header. # endif #endif /* Get data stream type name to use */ #ifdef BARECTF_TRACEPOINT_STREAM # define _BARECTF_TRACEPOINT_DST_NAME BARECTF_TRACEPOINT_STREAM #elif defined(BARECTF_TRACEPOINT_DATA_STREAM_TYPE_NAME) # define _BARECTF_TRACEPOINT_DST_NAME BARECTF_TRACEPOINT_DATA_STREAM_TYPE_NAME #else # ifdef _BARECTF_DEFAULT_DATA_STREAM_TYPE_NAME # define _BARECTF_TRACEPOINT_DST_NAME _BARECTF_DEFAULT_DATA_STREAM_TYPE_NAME # else # error You must define `BARECTF_TRACEPOINT_DATA_STREAM_TYPE_NAME` to use this header. # endif #endif /* Get context to use */ #ifndef BARECTF_TRACEPOINT_CTX # error You must define `BARECTF_TRACEPOINT_CTX` to use this header. #endif /* * Combines 6 token. Inspired by __TP_COMBINE_TOKENS4() in * . See sections 6.10.3 and 6.10.3.1 of * ISO/IEC 9899:1999. */ #define __COMBINE_TOKENS6(_a, _b, _c, _d, _e, _f) \ _a ## _b ## _c ## _d ## _e ## _f #define _COMBINE_TOKENS6(_a, _b, _c, _d, _e, _f) \ __COMBINE_TOKENS6(_a, _b, _c, _d, _e, _f) /* tracepoint() used by the user */ #undef tracepoint #define tracepoint(_prov_name, _tp_name, ...) \ _COMBINE_TOKENS6(_BARECTF_TRACEPOINT_PREFIX, _BARECTF_TRACEPOINT_DST_NAME, _trace_, _prov_name, _, _tp_name)(BARECTF_TRACEPOINT_CTX, ##__VA_ARGS__) #endif /* _BARECTF_TRACEPOINT_H */ barectf-3.1.2/platforms/000077500000000000000000000000001443101201700151235ustar00rootroot00000000000000barectf-3.1.2/platforms/linux-fs/000077500000000000000000000000001443101201700166705ustar00rootroot00000000000000barectf-3.1.2/platforms/linux-fs/README.adoc000066400000000000000000000123751443101201700204650ustar00rootroot00000000000000// Render with Asciidoctor = barectf Linux FS platform Philippe Proulx 23 September 2020 :toc: left The barectf Linux FS platform is a very simple platform used to demonstrate barectf. The platform writes the CTF packets to a data stream file on the file system. This platform can also simulate a full back-end randomly with a configurable ratio. == barectf configuration requirements * The default `barectf` file name prefix. * The default `barectf_` identifier prefix. * A single data stream type named `default`: ** No extra packet context field type members. ** A default clock type named `default`: Frequency:::: 1000000000 (default) Offsets:::: 0 (default) Origin is Unix epoch?:::: Yes (default) C{nbsp}type:::: `uint64_t` .Compatible YAML configuration ==== [source,yaml] ---- --- ! trace: type: $include: - stdint.yaml target-byte-order: le clock-types: default: $c-type: uint64_t data-stream-types: default: $is-default: true $default-clock-type-name: default event-record-types: my_event: payload-field-type: class: struct members: - number: uint32 ---- ==== == C API === Initialization ==== Prototype [source,c] ---- struct barectf_platform_linux_fs_ctx *barectf_platform_linux_fs_init( unsigned int buf_size, const char *data_stream_file_path, int simulate_full_backend, unsigned int full_backend_rand_max, unsigned int full_backend_rand_lt); ---- ==== Parameters [cols="d,a"] |==== |Name |Description |`buf_size` |Size of the packet buffer to allocate (bytes). |`data_stream_file_path` |Path of the data stream file to which to append packets. |`simulate_full_backend` | 0:: Disable full back-end simulation. 1:: Enable full back-end simulation. |`full_backend_rand_max` |If `simulate_full_backend` is 1, maximum random value. |`full_backend_rand_lt` |If `simulate_full_backend` is 1, the back-end is considered full if the random value is less than `full_backend_rand_lt`. |==== When `simulate_full_backend` is 1, `full_backend_rand_lt` and `full_backend_rand_max` form a ratio. For example, if `full_backend_rand_max` is 5 and `full_backend_rand_lt` is 3, then the probability of having a full back-end is 3/5. ==== Return Success:: An allocated Linux FS platform context. + Call <> to finalize and free it. Failure:: `NULL`. [[api-fini]] === Finalization ==== Prototype [source,c] ---- void barectf_platform_linux_fs_fini(struct barectf_platform_linux_fs_ctx *ctx); ---- ==== Parameter |==== |Name |Description |`ctx` |Linux FS platform context to finalize and free. |==== === barectf context access ==== Prototype [source,c] ---- struct barectf_default_ctx *barectf_platform_linux_fs_get_barectf_ctx( struct barectf_platform_linux_fs_ctx *ctx); ---- ==== Parameter |==== |Name |Description |`ctx` |Linux FS platform context. |==== ==== Return The barectf context to pass to your tracing functions (`+barectf_default_trace_*()+`). == Usage example .`config.yaml` [source,yaml] ---- --- ! trace: type: $include: - stdint.yaml target-byte-order: le clock-types: default: $c-type: uint64_t data-stream-types: default: $is-default: true $default-clock-type-name: default event-record-types: my_event: payload-field-type: class: struct members: - number: uint32 ---- .`example.c` [source,c] ---- #include #include "barectf-platform-linux-fs.h" #include "barectf.h" int main(void) { struct barectf_platform_linux_fs_ctx *platform_ctx; struct barectf_default_ctx *barectf_ctx; unsigned int i; platform_ctx = barectf_platform_linux_fs_init(256, "trace/stream", 0, 0, 0); assert(platform_ctx); barectf_ctx = barectf_platform_linux_fs_get_barectf_ctx(platform_ctx); for (i = 0; i < 50; ++i) { barectf_trace_my_event(barectf_ctx, i); } barectf_platform_linux_fs_fini(platform_ctx); return 0; } ---- .Command lines to build and execute the example ---- $ mkdir trace $ barectf --metadata-dir=trace config.yaml $ gcc -o example -I. example.c barectf.c barectf-platform-linux-fs.c $ ./example ---- The complete CTF trace is the `trace` directory. Read it with https://babeltrace.org/[Babeltrace{nbsp}2], for example: ---- $ babeltrace2 trace ---- ---- [20:55:29.539931489] (+?.?????????) my_event: { number = 0 } [20:55:29.539932347] (+0.000000858) my_event: { number = 1 } [20:55:29.539932698] (+0.000000351) my_event: { number = 2 } [20:55:29.539932985] (+0.000000287) my_event: { number = 3 } [20:55:29.539933379] (+0.000000394) my_event: { number = 4 } [20:55:29.539933684] (+0.000000305) my_event: { number = 5 } ... [20:55:29.539965071] (+0.000000277) my_event: { number = 44 } [20:55:29.539965356] (+0.000000285) my_event: { number = 45 } [20:55:29.539965622] (+0.000000266) my_event: { number = 46 } [20:55:29.539965903] (+0.000000281) my_event: { number = 47 } [20:55:29.539966181] (+0.000000278) my_event: { number = 48 } [20:55:29.539966518] (+0.000000337) my_event: { number = 49 } ---- barectf-3.1.2/platforms/linux-fs/barectf-platform-linux-fs.c000066400000000000000000000112771443101201700240370ustar00rootroot00000000000000/* * Copyright (c) 2015 EfficiOS Inc. and Linux Foundation * Copyright (c) 2015-2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include #include #include #include "barectf-platform-linux-fs.h" #include "barectf.h" #ifdef __cplusplus # define _FROM_VOID_PTR(_type, _value) static_cast<_type *>(_value) #else # define _FROM_VOID_PTR(_type, _value) ((_type *) (_value)) #endif struct barectf_platform_linux_fs_ctx { struct barectf_default_ctx ctx; FILE *fh; int simulate_full_backend; unsigned int full_backend_rand_lt; unsigned int full_backend_rand_max; }; static uint64_t get_clock(void * const data) { struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); return ts.tv_sec * 1000000000ULL + ts.tv_nsec; } static void write_packet(const struct barectf_platform_linux_fs_ctx * const platform_ctx) { const size_t nmemb = fwrite(barectf_packet_buf(&platform_ctx->ctx), barectf_packet_buf_size(&platform_ctx->ctx), 1, platform_ctx->fh); assert(nmemb == 1); } static int is_backend_full(void * const data) { int is_backend_full = 0; const struct barectf_platform_linux_fs_ctx * const platform_ctx = _FROM_VOID_PTR(const struct barectf_platform_linux_fs_ctx, data); if (platform_ctx->simulate_full_backend) { if (rand() % platform_ctx->full_backend_rand_max < platform_ctx->full_backend_rand_lt) { is_backend_full = 1; goto end; } } end: return is_backend_full; } static void open_packet(void * const data) { struct barectf_platform_linux_fs_ctx * const platform_ctx = _FROM_VOID_PTR(struct barectf_platform_linux_fs_ctx, data); barectf_default_open_packet(&platform_ctx->ctx); } static void close_packet(void * const data) { struct barectf_platform_linux_fs_ctx * const platform_ctx = _FROM_VOID_PTR(struct barectf_platform_linux_fs_ctx, data); /* Close packet now */ barectf_default_close_packet(&platform_ctx->ctx); /* Write packet to file */ write_packet(platform_ctx); } struct barectf_platform_linux_fs_ctx *barectf_platform_linux_fs_init( const unsigned int buf_size, const char * const data_stream_file_path, const int simulate_full_backend, const unsigned int full_backend_rand_lt, const unsigned int full_backend_rand_max) { uint8_t *buf = NULL; struct barectf_platform_linux_fs_ctx *platform_ctx; struct barectf_platform_callbacks cbs; cbs.default_clock_get_value = get_clock; cbs.is_backend_full = is_backend_full; cbs.open_packet = open_packet; cbs.close_packet = close_packet; platform_ctx = _FROM_VOID_PTR(struct barectf_platform_linux_fs_ctx, malloc(sizeof(*platform_ctx))); if (!platform_ctx) { goto error; } buf = _FROM_VOID_PTR(uint8_t, malloc(buf_size)); if (!buf) { goto error; } platform_ctx->fh = fopen(data_stream_file_path, "wb"); if (!platform_ctx->fh) { goto error; } platform_ctx->simulate_full_backend = simulate_full_backend; platform_ctx->full_backend_rand_lt = full_backend_rand_lt; platform_ctx->full_backend_rand_max = full_backend_rand_max; barectf_init(&platform_ctx->ctx, buf, buf_size, cbs, platform_ctx); open_packet(platform_ctx); goto end; error: free(platform_ctx); free(buf); end: return platform_ctx; } void barectf_platform_linux_fs_fini(struct barectf_platform_linux_fs_ctx * const platform_ctx) { if (barectf_packet_is_open(&platform_ctx->ctx) && !barectf_packet_is_empty(&platform_ctx->ctx)) { close_packet(platform_ctx); } fclose(platform_ctx->fh); free(barectf_packet_buf(&platform_ctx->ctx)); free(platform_ctx); } struct barectf_default_ctx *barectf_platform_linux_fs_get_barectf_ctx( struct barectf_platform_linux_fs_ctx * const platform_ctx) { return &platform_ctx->ctx; } barectf-3.1.2/platforms/linux-fs/barectf-platform-linux-fs.h000066400000000000000000000035731443101201700240440ustar00rootroot00000000000000#ifndef _BARECTF_PLATFORM_LINUX_FS_H #define _BARECTF_PLATFORM_LINUX_FS_H /* * Copyright (c) 2015 EfficiOS Inc. and Linux Foundation * Copyright (c) 2015-2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #ifdef __cplusplus extern "C" { #endif struct barectf_default_ctx; struct barectf_platform_linux_fs_ctx; struct barectf_platform_linux_fs_ctx *barectf_platform_linux_fs_init( unsigned int buf_size, const char *data_stream_file_path, int simulate_full_backend, unsigned int full_backend_rand_max, unsigned int full_backend_rand_lt); void barectf_platform_linux_fs_fini(struct barectf_platform_linux_fs_ctx *ctx); struct barectf_default_ctx *barectf_platform_linux_fs_get_barectf_ctx( struct barectf_platform_linux_fs_ctx *ctx); #ifdef __cplusplus } #endif #endif /* _BARECTF_PLATFORM_LINUX_FS_H */ barectf-3.1.2/poetry.lock000066400000000000000000001742361443101201700153250ustar00rootroot00000000000000# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. [[package]] name = "astroid" version = "2.11.7" description = "An abstract syntax tree for Python with inference support." category = "dev" optional = false python-versions = ">=3.6.2" files = [ {file = "astroid-2.11.7-py3-none-any.whl", hash = "sha256:86b0a340a512c65abf4368b80252754cda17c02cdbbd3f587dddf98112233e7b"}, {file = "astroid-2.11.7.tar.gz", hash = "sha256:bb24615c77f4837c707669d16907331374ae8a964650a66999da3f5ca68dc946"}, ] [package.dependencies] lazy-object-proxy = ">=1.4.0" setuptools = ">=20.0" typed-ast = {version = ">=1.4.0,<2.0", markers = "implementation_name == \"cpython\" and python_version < \"3.8\""} typing-extensions = {version = ">=3.10", markers = "python_version < \"3.10\""} wrapt = ">=1.11,<2" [[package]] name = "atomicwrites" version = "1.4.1" description = "Atomic file writes." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, ] [[package]] name = "attrs" version = "22.2.0" description = "Classes Without Boilerplate" category = "main" optional = false python-versions = ">=3.6" files = [ {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"}, {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"}, ] [package.extras] cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"] dev = ["attrs[docs,tests]"] docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope.interface"] tests = ["attrs[tests-no-zope]", "zope.interface"] tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy (>=0.971,<0.990)", "mypy (>=0.971,<0.990)", "pympler", "pympler", "pytest (>=4.3.0)", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-mypy-plugins", "pytest-xdist[psutil]", "pytest-xdist[psutil]"] [[package]] name = "colorama" version = "0.4.5" description = "Cross-platform colored terminal text." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, ] [[package]] name = "dill" version = "0.3.4" description = "serialize all of python" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*" files = [ {file = "dill-0.3.4-py2.py3-none-any.whl", hash = "sha256:7e40e4a70304fd9ceab3535d36e58791d9c4a776b38ec7f7ec9afc8d3dca4d4f"}, {file = "dill-0.3.4.zip", hash = "sha256:9f9734205146b2b353ab3fec9af0070237b6ddae78452af83d2fca84d739e675"}, ] [package.extras] graph = ["objgraph (>=1.7.2)"] [[package]] name = "execnet" version = "1.9.0" description = "execnet: rapid multi-Python deployment" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ {file = "execnet-1.9.0-py2.py3-none-any.whl", hash = "sha256:a295f7cc774947aac58dde7fdc85f4aa00c42adf5d8f5468fc630c1acf30a142"}, {file = "execnet-1.9.0.tar.gz", hash = "sha256:8f694f3ba9cc92cab508b152dcfe322153975c29bda272e2fd7f3f00f36e47c5"}, ] [package.extras] testing = ["pre-commit"] [[package]] name = "flake8" version = "5.0.4" description = "the modular source code checker: pep8 pyflakes and co" category = "dev" optional = false python-versions = ">=3.6.1" files = [ {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"}, {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"}, ] [package.dependencies] importlib-metadata = {version = ">=1.1.0,<4.3", markers = "python_version < \"3.8\""} mccabe = ">=0.7.0,<0.8.0" pycodestyle = ">=2.9.0,<2.10.0" pyflakes = ">=2.5.0,<2.6.0" [[package]] name = "importlib-metadata" version = "4.2.0" description = "Read metadata from Python packages" category = "main" optional = false python-versions = ">=3.6" files = [ {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"}, {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"}, ] [package.dependencies] typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"] testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pep517", "pyfakefs", "pytest (>=4.6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy"] [[package]] name = "iniconfig" version = "1.1.1" description = "iniconfig: brain-dead simple config-ini parsing" category = "dev" optional = false python-versions = "*" files = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] [[package]] name = "isort" version = "5.10.1" description = "A Python utility / library to sort Python imports." category = "dev" optional = false python-versions = ">=3.6.1,<4.0" files = [ {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"}, {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, ] [package.extras] colors = ["colorama (>=0.4.3,<0.5.0)"] pipfile-deprecated-finder = ["pipreqs", "requirementslib"] plugins = ["setuptools"] requirements-deprecated-finder = ["pip-api", "pipreqs"] [[package]] name = "jinja2" version = "3.0.3" description = "A very fast and expressive template engine." category = "main" optional = false python-versions = ">=3.6" files = [ {file = "Jinja2-3.0.3-py3-none-any.whl", hash = "sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8"}, {file = "Jinja2-3.0.3.tar.gz", hash = "sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7"}, ] [package.dependencies] MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] [[package]] name = "jsonschema" version = "3.2.0" description = "An implementation of JSON Schema validation for Python" category = "main" optional = false python-versions = "*" files = [ {file = "jsonschema-3.2.0-py2.py3-none-any.whl", hash = "sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163"}, {file = "jsonschema-3.2.0.tar.gz", hash = "sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a"}, ] [package.dependencies] attrs = ">=17.4.0" importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} pyrsistent = ">=0.14.0" setuptools = "*" six = ">=1.11.0" [package.extras] format = ["idna", "jsonpointer (>1.13)", "rfc3987", "strict-rfc3339", "webcolors"] format-nongpl = ["idna", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "webcolors"] [[package]] name = "lazy-object-proxy" version = "1.7.1" description = "A fast and thorough lazy object proxy." category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "lazy-object-proxy-1.7.1.tar.gz", hash = "sha256:d609c75b986def706743cdebe5e47553f4a5a1da9c5ff66d76013ef396b5a8a4"}, {file = "lazy_object_proxy-1.7.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bb8c5fd1684d60a9902c60ebe276da1f2281a318ca16c1d0a96db28f62e9166b"}, {file = "lazy_object_proxy-1.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a57d51ed2997e97f3b8e3500c984db50a554bb5db56c50b5dab1b41339b37e36"}, {file = "lazy_object_proxy-1.7.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd45683c3caddf83abbb1249b653a266e7069a09f486daa8863fb0e7496a9fdb"}, {file = "lazy_object_proxy-1.7.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:8561da8b3dd22d696244d6d0d5330618c993a215070f473b699e00cf1f3f6443"}, {file = "lazy_object_proxy-1.7.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fccdf7c2c5821a8cbd0a9440a456f5050492f2270bd54e94360cac663398739b"}, {file = "lazy_object_proxy-1.7.1-cp310-cp310-win32.whl", hash = "sha256:898322f8d078f2654d275124a8dd19b079080ae977033b713f677afcfc88e2b9"}, {file = "lazy_object_proxy-1.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:85b232e791f2229a4f55840ed54706110c80c0a210d076eee093f2b2e33e1bfd"}, {file = "lazy_object_proxy-1.7.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:46ff647e76f106bb444b4533bb4153c7370cdf52efc62ccfc1a28bdb3cc95442"}, {file = "lazy_object_proxy-1.7.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:12f3bb77efe1367b2515f8cb4790a11cffae889148ad33adad07b9b55e0ab22c"}, {file = "lazy_object_proxy-1.7.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c19814163728941bb871240d45c4c30d33b8a2e85972c44d4e63dd7107faba44"}, {file = "lazy_object_proxy-1.7.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:e40f2013d96d30217a51eeb1db28c9ac41e9d0ee915ef9d00da639c5b63f01a1"}, {file = "lazy_object_proxy-1.7.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:2052837718516a94940867e16b1bb10edb069ab475c3ad84fd1e1a6dd2c0fcfc"}, {file = "lazy_object_proxy-1.7.1-cp36-cp36m-win32.whl", hash = "sha256:6a24357267aa976abab660b1d47a34aaf07259a0c3859a34e536f1ee6e76b5bb"}, {file = "lazy_object_proxy-1.7.1-cp36-cp36m-win_amd64.whl", hash = "sha256:6aff3fe5de0831867092e017cf67e2750c6a1c7d88d84d2481bd84a2e019ec35"}, {file = "lazy_object_proxy-1.7.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:6a6e94c7b02641d1311228a102607ecd576f70734dc3d5e22610111aeacba8a0"}, {file = "lazy_object_proxy-1.7.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4ce15276a1a14549d7e81c243b887293904ad2d94ad767f42df91e75fd7b5b6"}, {file = "lazy_object_proxy-1.7.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e368b7f7eac182a59ff1f81d5f3802161932a41dc1b1cc45c1f757dc876b5d2c"}, {file = "lazy_object_proxy-1.7.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:6ecbb350991d6434e1388bee761ece3260e5228952b1f0c46ffc800eb313ff42"}, {file = "lazy_object_proxy-1.7.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:553b0f0d8dbf21890dd66edd771f9b1b5f51bd912fa5f26de4449bfc5af5e029"}, {file = "lazy_object_proxy-1.7.1-cp37-cp37m-win32.whl", hash = "sha256:c7a683c37a8a24f6428c28c561c80d5f4fd316ddcf0c7cab999b15ab3f5c5c69"}, {file = "lazy_object_proxy-1.7.1-cp37-cp37m-win_amd64.whl", hash = "sha256:df2631f9d67259dc9620d831384ed7732a198eb434eadf69aea95ad18c587a28"}, {file = "lazy_object_proxy-1.7.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:07fa44286cda977bd4803b656ffc1c9b7e3bc7dff7d34263446aec8f8c96f88a"}, {file = "lazy_object_proxy-1.7.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4dca6244e4121c74cc20542c2ca39e5c4a5027c81d112bfb893cf0790f96f57e"}, {file = "lazy_object_proxy-1.7.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:91ba172fc5b03978764d1df5144b4ba4ab13290d7bab7a50f12d8117f8630c38"}, {file = "lazy_object_proxy-1.7.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:043651b6cb706eee4f91854da4a089816a6606c1428fd391573ef8cb642ae4f7"}, {file = "lazy_object_proxy-1.7.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b9e89b87c707dd769c4ea91f7a31538888aad05c116a59820f28d59b3ebfe25a"}, {file = "lazy_object_proxy-1.7.1-cp38-cp38-win32.whl", hash = "sha256:9d166602b525bf54ac994cf833c385bfcc341b364e3ee71e3bf5a1336e677b55"}, {file = "lazy_object_proxy-1.7.1-cp38-cp38-win_amd64.whl", hash = "sha256:8f3953eb575b45480db6568306893f0bd9d8dfeeebd46812aa09ca9579595148"}, {file = "lazy_object_proxy-1.7.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:dd7ed7429dbb6c494aa9bc4e09d94b778a3579be699f9d67da7e6804c422d3de"}, {file = "lazy_object_proxy-1.7.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:70ed0c2b380eb6248abdef3cd425fc52f0abd92d2b07ce26359fcbc399f636ad"}, {file = "lazy_object_proxy-1.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7096a5e0c1115ec82641afbdd70451a144558ea5cf564a896294e346eb611be1"}, {file = "lazy_object_proxy-1.7.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f769457a639403073968d118bc70110e7dce294688009f5c24ab78800ae56dc8"}, {file = "lazy_object_proxy-1.7.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:39b0e26725c5023757fc1ab2a89ef9d7ab23b84f9251e28f9cc114d5b59c1b09"}, {file = "lazy_object_proxy-1.7.1-cp39-cp39-win32.whl", hash = "sha256:2130db8ed69a48a3440103d4a520b89d8a9405f1b06e2cc81640509e8bf6548f"}, {file = "lazy_object_proxy-1.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:677ea950bef409b47e51e733283544ac3d660b709cfce7b187f5ace137960d61"}, {file = "lazy_object_proxy-1.7.1-pp37.pp38-none-any.whl", hash = "sha256:d66906d5785da8e0be7360912e99c9188b70f52c422f9fc18223347235691a84"}, ] [[package]] name = "markupsafe" version = "2.0.1" description = "Safely add untrusted strings to HTML/XML markup." category = "main" optional = false python-versions = ">=3.6" files = [ {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b"}, {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a"}, {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a"}, {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f"}, {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194"}, {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047"}, {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e"}, {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, ] [[package]] name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, ] [[package]] name = "mypy" version = "0.971" description = "Optional static typing for Python" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "mypy-0.971-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f2899a3cbd394da157194f913a931edfd4be5f274a88041c9dc2d9cdcb1c315c"}, {file = "mypy-0.971-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:98e02d56ebe93981c41211c05adb630d1d26c14195d04d95e49cd97dbc046dc5"}, {file = "mypy-0.971-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:19830b7dba7d5356d3e26e2427a2ec91c994cd92d983142cbd025ebe81d69cf3"}, {file = "mypy-0.971-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:02ef476f6dcb86e6f502ae39a16b93285fef97e7f1ff22932b657d1ef1f28655"}, {file = "mypy-0.971-cp310-cp310-win_amd64.whl", hash = "sha256:25c5750ba5609a0c7550b73a33deb314ecfb559c350bb050b655505e8aed4103"}, {file = "mypy-0.971-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d3348e7eb2eea2472db611486846742d5d52d1290576de99d59edeb7cd4a42ca"}, {file = "mypy-0.971-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3fa7a477b9900be9b7dd4bab30a12759e5abe9586574ceb944bc29cddf8f0417"}, {file = "mypy-0.971-cp36-cp36m-win_amd64.whl", hash = "sha256:2ad53cf9c3adc43cf3bea0a7d01a2f2e86db9fe7596dfecb4496a5dda63cbb09"}, {file = "mypy-0.971-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:855048b6feb6dfe09d3353466004490b1872887150c5bb5caad7838b57328cc8"}, {file = "mypy-0.971-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:23488a14a83bca6e54402c2e6435467a4138785df93ec85aeff64c6170077fb0"}, {file = "mypy-0.971-cp37-cp37m-win_amd64.whl", hash = "sha256:4b21e5b1a70dfb972490035128f305c39bc4bc253f34e96a4adf9127cf943eb2"}, {file = "mypy-0.971-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:9796a2ba7b4b538649caa5cecd398d873f4022ed2333ffde58eaf604c4d2cb27"}, {file = "mypy-0.971-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5a361d92635ad4ada1b1b2d3630fc2f53f2127d51cf2def9db83cba32e47c856"}, {file = "mypy-0.971-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b793b899f7cf563b1e7044a5c97361196b938e92f0a4343a5d27966a53d2ec71"}, {file = "mypy-0.971-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d1ea5d12c8e2d266b5fb8c7a5d2e9c0219fedfeb493b7ed60cd350322384ac27"}, {file = "mypy-0.971-cp38-cp38-win_amd64.whl", hash = "sha256:23c7ff43fff4b0df93a186581885c8512bc50fc4d4910e0f838e35d6bb6b5e58"}, {file = "mypy-0.971-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1f7656b69974a6933e987ee8ffb951d836272d6c0f81d727f1d0e2696074d9e6"}, {file = "mypy-0.971-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d2022bfadb7a5c2ef410d6a7c9763188afdb7f3533f22a0a32be10d571ee4bbe"}, {file = "mypy-0.971-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef943c72a786b0f8d90fd76e9b39ce81fb7171172daf84bf43eaf937e9f220a9"}, {file = "mypy-0.971-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d744f72eb39f69312bc6c2abf8ff6656973120e2eb3f3ec4f758ed47e414a4bf"}, {file = "mypy-0.971-cp39-cp39-win_amd64.whl", hash = "sha256:77a514ea15d3007d33a9e2157b0ba9c267496acf12a7f2b9b9f8446337aac5b0"}, {file = "mypy-0.971-py3-none-any.whl", hash = "sha256:0d054ef16b071149917085f51f89555a576e2618d5d9dd70bd6eea6410af3ac9"}, {file = "mypy-0.971.tar.gz", hash = "sha256:40b0f21484238269ae6a57200c807d80debc6459d444c0489a102d7c6a75fa56"}, ] [package.dependencies] mypy-extensions = ">=0.4.3" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typed-ast = {version = ">=1.4.0,<2", markers = "python_version < \"3.8\""} typing-extensions = ">=3.10" [package.extras] dmypy = ["psutil (>=4.0)"] python2 = ["typed-ast (>=1.4.0,<2)"] reports = ["lxml"] [[package]] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." category = "dev" optional = false python-versions = ">=3.5" files = [ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] [[package]] name = "packaging" version = "21.3" description = "Core utilities for Python packages" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, ] [package.dependencies] pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" [[package]] name = "platformdirs" version = "2.4.0" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "platformdirs-2.4.0-py3-none-any.whl", hash = "sha256:8868bbe3c3c80d42f20156f22e7131d2fb321f5bc86a2a345375c6481a67021d"}, {file = "platformdirs-2.4.0.tar.gz", hash = "sha256:367a5e80b3d04d2428ffa76d33f124cf11e8fff2acdaa9b43d545f5c7d661ef2"}, ] [package.extras] docs = ["Sphinx (>=4)", "furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)"] test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] [[package]] name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] [package.dependencies] importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] [[package]] name = "py" version = "1.11.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, ] [[package]] name = "pycodestyle" version = "2.9.1" description = "Python style guide checker" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"}, {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"}, ] [[package]] name = "pyflakes" version = "2.5.0" description = "passive checker of Python programs" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"}, {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"}, ] [[package]] name = "pylint" version = "2.13.9" description = "python code static checker" category = "dev" optional = false python-versions = ">=3.6.2" files = [ {file = "pylint-2.13.9-py3-none-any.whl", hash = "sha256:705c620d388035bdd9ff8b44c5bcdd235bfb49d276d488dd2c8ff1736aa42526"}, {file = "pylint-2.13.9.tar.gz", hash = "sha256:095567c96e19e6f57b5b907e67d265ff535e588fe26b12b5ebe1fc5645b2c731"}, ] [package.dependencies] astroid = ">=2.11.5,<=2.12.0-dev0" colorama = {version = "*", markers = "sys_platform == \"win32\""} dill = ">=0.2" isort = ">=4.2.5,<6" mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} [package.extras] testutil = ["gitpython (>3)"] [[package]] name = "pyparsing" version = "3.0.7" description = "Python parsing module" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, {file = "pyparsing-3.0.7.tar.gz", hash = "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea"}, ] [package.extras] diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pyrsistent" version = "0.18.0" description = "Persistent/Functional/Immutable data structures" category = "main" optional = false python-versions = ">=3.6" files = [ {file = "pyrsistent-0.18.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f4c8cabb46ff8e5d61f56a037974228e978f26bfefce4f61a4b1ac0ba7a2ab72"}, {file = "pyrsistent-0.18.0-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:da6e5e818d18459fa46fac0a4a4e543507fe1110e808101277c5a2b5bab0cd2d"}, {file = "pyrsistent-0.18.0-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:5e4395bbf841693eaebaa5bb5c8f5cdbb1d139e07c975c682ec4e4f8126e03d2"}, {file = "pyrsistent-0.18.0-cp36-cp36m-win32.whl", hash = "sha256:527be2bfa8dc80f6f8ddd65242ba476a6c4fb4e3aedbf281dfbac1b1ed4165b1"}, {file = "pyrsistent-0.18.0-cp36-cp36m-win_amd64.whl", hash = "sha256:2aaf19dc8ce517a8653746d98e962ef480ff34b6bc563fc067be6401ffb457c7"}, {file = "pyrsistent-0.18.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:58a70d93fb79dc585b21f9d72487b929a6fe58da0754fa4cb9f279bb92369396"}, {file = "pyrsistent-0.18.0-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:4916c10896721e472ee12c95cdc2891ce5890898d2f9907b1b4ae0f53588b710"}, {file = "pyrsistent-0.18.0-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:73ff61b1411e3fb0ba144b8f08d6749749775fe89688093e1efef9839d2dcc35"}, {file = "pyrsistent-0.18.0-cp37-cp37m-win32.whl", hash = "sha256:b29b869cf58412ca5738d23691e96d8aff535e17390128a1a52717c9a109da4f"}, {file = "pyrsistent-0.18.0-cp37-cp37m-win_amd64.whl", hash = "sha256:097b96f129dd36a8c9e33594e7ebb151b1515eb52cceb08474c10a5479e799f2"}, {file = "pyrsistent-0.18.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:772e94c2c6864f2cd2ffbe58bb3bdefbe2a32afa0acb1a77e472aac831f83427"}, {file = "pyrsistent-0.18.0-cp38-cp38-manylinux1_i686.whl", hash = "sha256:c1a9ff320fa699337e05edcaae79ef8c2880b52720bc031b219e5b5008ebbdef"}, {file = "pyrsistent-0.18.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:cd3caef37a415fd0dae6148a1b6957a8c5f275a62cca02e18474608cb263640c"}, {file = "pyrsistent-0.18.0-cp38-cp38-win32.whl", hash = "sha256:e79d94ca58fcafef6395f6352383fa1a76922268fa02caa2272fff501c2fdc78"}, {file = "pyrsistent-0.18.0-cp38-cp38-win_amd64.whl", hash = "sha256:a0c772d791c38bbc77be659af29bb14c38ced151433592e326361610250c605b"}, {file = "pyrsistent-0.18.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d5ec194c9c573aafaceebf05fc400656722793dac57f254cd4741f3c27ae57b4"}, {file = "pyrsistent-0.18.0-cp39-cp39-manylinux1_i686.whl", hash = "sha256:6b5eed00e597b5b5773b4ca30bd48a5774ef1e96f2a45d105db5b4ebb4bca680"}, {file = "pyrsistent-0.18.0-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:48578680353f41dca1ca3dc48629fb77dfc745128b56fc01096b2530c13fd426"}, {file = "pyrsistent-0.18.0-cp39-cp39-win32.whl", hash = "sha256:f3ef98d7b76da5eb19c37fda834d50262ff9167c65658d1d8f974d2e4d90676b"}, {file = "pyrsistent-0.18.0-cp39-cp39-win_amd64.whl", hash = "sha256:404e1f1d254d314d55adb8d87f4f465c8693d6f902f67eb6ef5b4526dc58e6ea"}, {file = "pyrsistent-0.18.0.tar.gz", hash = "sha256:773c781216f8c2900b42a7b638d5b517bb134ae1acbebe4d1e8f1f41ea60eb4b"}, ] [[package]] name = "pytest" version = "6.2.5" description = "pytest: simple powerful testing with Python" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, ] [package.dependencies] atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" py = ">=1.8.2" toml = "*" [package.extras] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] [[package]] name = "pytest-forked" version = "1.4.0" description = "run tests in isolated forked subprocesses" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "pytest-forked-1.4.0.tar.gz", hash = "sha256:8b67587c8f98cbbadfdd804539ed5455b6ed03802203485dd2f53c1422d7440e"}, {file = "pytest_forked-1.4.0-py3-none-any.whl", hash = "sha256:bbbb6717efc886b9d64537b41fb1497cfaf3c9601276be8da2cccfea5a3c8ad8"}, ] [package.dependencies] py = "*" pytest = ">=3.10" [[package]] name = "pytest-xdist" version = "2.5.0" description = "pytest xdist plugin for distributed testing and loop-on-failing modes" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "pytest-xdist-2.5.0.tar.gz", hash = "sha256:4580deca3ff04ddb2ac53eba39d76cb5dd5edeac050cb6fbc768b0dd712b4edf"}, {file = "pytest_xdist-2.5.0-py3-none-any.whl", hash = "sha256:6fe5c74fec98906deb8f2d2b616b5c782022744978e7bd4695d39c8f42d0ce65"}, ] [package.dependencies] execnet = ">=1.1" pytest = ">=6.2.0" pytest-forked = "*" [package.extras] psutil = ["psutil (>=3.0)"] setproctitle = ["setproctitle"] testing = ["filelock"] [[package]] name = "pyyaml" version = "5.4.1" description = "YAML parser and emitter for Python" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ {file = "PyYAML-5.4.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922"}, {file = "PyYAML-5.4.1-cp27-cp27m-win32.whl", hash = "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393"}, {file = "PyYAML-5.4.1-cp27-cp27m-win_amd64.whl", hash = "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8"}, {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, ] [[package]] name = "setuptools" version = "59.6.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" category = "main" optional = false python-versions = ">=3.6" files = [ {file = "setuptools-59.6.0-py3-none-any.whl", hash = "sha256:4ce92f1e1f8f01233ee9952c04f6b81d1e02939d6e1b488428154974a4d0783e"}, {file = "setuptools-59.6.0.tar.gz", hash = "sha256:22c7348c6d2976a52632c67f7ab0cdf40147db7789f9aed18734643fe9cf3373"}, ] [package.extras] docs = ["furo", "jaraco.packaging (>=8.2)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx", "sphinx-inline-tabs", "sphinxcontrib-towncrier"] testing = ["flake8-2020", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mock", "paver", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy", "pytest-virtualenv (>=1.2.7)", "pytest-xdist", "sphinx", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] [[package]] name = "termcolor" version = "1.1.0" description = "ANSII Color formatting for output in terminal." category = "main" optional = false python-versions = "*" files = [ {file = "termcolor-1.1.0.tar.gz", hash = "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"}, ] [[package]] name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" files = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] [[package]] name = "tomli" version = "1.2.3" description = "A lil' TOML parser" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "tomli-1.2.3-py3-none-any.whl", hash = "sha256:e3069e4be3ead9668e21cb9b074cd948f7b3113fd9c8bba083f48247aab8b11c"}, {file = "tomli-1.2.3.tar.gz", hash = "sha256:05b6166bff487dc068d322585c7ea4ef78deed501cc124060e0f238e89a9231f"}, ] [[package]] name = "typed-ast" version = "1.5.4" description = "a fork of Python 2 and 3 ast modules with type comment support" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "typed_ast-1.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:669dd0c4167f6f2cd9f57041e03c3c2ebf9063d0757dc89f79ba1daa2bfca9d4"}, {file = "typed_ast-1.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:211260621ab1cd7324e0798d6be953d00b74e0428382991adfddb352252f1d62"}, {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:267e3f78697a6c00c689c03db4876dd1efdfea2f251a5ad6555e82a26847b4ac"}, {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c542eeda69212fa10a7ada75e668876fdec5f856cd3d06829e6aa64ad17c8dfe"}, {file = "typed_ast-1.5.4-cp310-cp310-win_amd64.whl", hash = "sha256:a9916d2bb8865f973824fb47436fa45e1ebf2efd920f2b9f99342cb7fab93f72"}, {file = "typed_ast-1.5.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:79b1e0869db7c830ba6a981d58711c88b6677506e648496b1f64ac7d15633aec"}, {file = "typed_ast-1.5.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a94d55d142c9265f4ea46fab70977a1944ecae359ae867397757d836ea5a3f47"}, {file = "typed_ast-1.5.4-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:183afdf0ec5b1b211724dfef3d2cad2d767cbefac291f24d69b00546c1837fb6"}, {file = "typed_ast-1.5.4-cp36-cp36m-win_amd64.whl", hash = "sha256:639c5f0b21776605dd6c9dbe592d5228f021404dafd377e2b7ac046b0349b1a1"}, {file = "typed_ast-1.5.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cf4afcfac006ece570e32d6fa90ab74a17245b83dfd6655a6f68568098345ff6"}, {file = "typed_ast-1.5.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed855bbe3eb3715fca349c80174cfcfd699c2f9de574d40527b8429acae23a66"}, {file = "typed_ast-1.5.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6778e1b2f81dfc7bc58e4b259363b83d2e509a65198e85d5700dfae4c6c8ff1c"}, {file = "typed_ast-1.5.4-cp37-cp37m-win_amd64.whl", hash = "sha256:0261195c2062caf107831e92a76764c81227dae162c4f75192c0d489faf751a2"}, {file = "typed_ast-1.5.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2efae9db7a8c05ad5547d522e7dbe62c83d838d3906a3716d1478b6c1d61388d"}, {file = "typed_ast-1.5.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7d5d014b7daa8b0bf2eaef684295acae12b036d79f54178b92a2b6a56f92278f"}, {file = "typed_ast-1.5.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:370788a63915e82fd6f212865a596a0fefcbb7d408bbbb13dea723d971ed8bdc"}, {file = "typed_ast-1.5.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4e964b4ff86550a7a7d56345c7864b18f403f5bd7380edf44a3c1fb4ee7ac6c6"}, {file = "typed_ast-1.5.4-cp38-cp38-win_amd64.whl", hash = "sha256:683407d92dc953c8a7347119596f0b0e6c55eb98ebebd9b23437501b28dcbb8e"}, {file = "typed_ast-1.5.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4879da6c9b73443f97e731b617184a596ac1235fe91f98d279a7af36c796da35"}, {file = "typed_ast-1.5.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3e123d878ba170397916557d31c8f589951e353cc95fb7f24f6bb69adc1a8a97"}, {file = "typed_ast-1.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebd9d7f80ccf7a82ac5f88c521115cc55d84e35bf8b446fcd7836eb6b98929a3"}, {file = "typed_ast-1.5.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98f80dee3c03455e92796b58b98ff6ca0b2a6f652120c263efdba4d6c5e58f72"}, {file = "typed_ast-1.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:0fdbcf2fef0ca421a3f5912555804296f0b0960f0418c440f5d6d3abb549f3e1"}, {file = "typed_ast-1.5.4.tar.gz", hash = "sha256:39e21ceb7388e4bb37f4c679d72707ed46c2fbf2a5609b8b8ebc4b067d977df2"}, ] [[package]] name = "typing-extensions" version = "4.1.1" description = "Backported and Experimental Type Hints for Python 3.6+" category = "main" optional = false python-versions = ">=3.6" files = [ {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, {file = "typing_extensions-4.1.1.tar.gz", hash = "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"}, ] [[package]] name = "wrapt" version = "1.15.0" description = "Module for decorators, wrappers and monkey patching." category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" files = [ {file = "wrapt-1.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ca1cccf838cd28d5a0883b342474c630ac48cac5df0ee6eacc9c7290f76b11c1"}, {file = "wrapt-1.15.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e826aadda3cae59295b95343db8f3d965fb31059da7de01ee8d1c40a60398b29"}, {file = "wrapt-1.15.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:5fc8e02f5984a55d2c653f5fea93531e9836abbd84342c1d1e17abc4a15084c2"}, {file = "wrapt-1.15.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:96e25c8603a155559231c19c0349245eeb4ac0096fe3c1d0be5c47e075bd4f46"}, {file = "wrapt-1.15.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:40737a081d7497efea35ab9304b829b857f21558acfc7b3272f908d33b0d9d4c"}, {file = "wrapt-1.15.0-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:f87ec75864c37c4c6cb908d282e1969e79763e0d9becdfe9fe5473b7bb1e5f09"}, {file = "wrapt-1.15.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:1286eb30261894e4c70d124d44b7fd07825340869945c79d05bda53a40caa079"}, {file = "wrapt-1.15.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:493d389a2b63c88ad56cdc35d0fa5752daac56ca755805b1b0c530f785767d5e"}, {file = "wrapt-1.15.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:58d7a75d731e8c63614222bcb21dd992b4ab01a399f1f09dd82af17bbfc2368a"}, {file = "wrapt-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:21f6d9a0d5b3a207cdf7acf8e58d7d13d463e639f0c7e01d82cdb671e6cb7923"}, {file = "wrapt-1.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ce42618f67741d4697684e501ef02f29e758a123aa2d669e2d964ff734ee00ee"}, {file = "wrapt-1.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41d07d029dd4157ae27beab04d22b8e261eddfc6ecd64ff7000b10dc8b3a5727"}, {file = "wrapt-1.15.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:54accd4b8bc202966bafafd16e69da9d5640ff92389d33d28555c5fd4f25ccb7"}, {file = "wrapt-1.15.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fbfbca668dd15b744418265a9607baa970c347eefd0db6a518aaf0cfbd153c0"}, {file = "wrapt-1.15.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:76e9c727a874b4856d11a32fb0b389afc61ce8aaf281ada613713ddeadd1cfec"}, {file = "wrapt-1.15.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e20076a211cd6f9b44a6be58f7eeafa7ab5720eb796975d0c03f05b47d89eb90"}, {file = "wrapt-1.15.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a74d56552ddbde46c246b5b89199cb3fd182f9c346c784e1a93e4dc3f5ec9975"}, {file = "wrapt-1.15.0-cp310-cp310-win32.whl", hash = "sha256:26458da5653aa5b3d8dc8b24192f574a58984c749401f98fff994d41d3f08da1"}, {file = "wrapt-1.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:75760a47c06b5974aa5e01949bf7e66d2af4d08cb8c1d6516af5e39595397f5e"}, {file = "wrapt-1.15.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ba1711cda2d30634a7e452fc79eabcadaffedf241ff206db2ee93dd2c89a60e7"}, {file = "wrapt-1.15.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:56374914b132c702aa9aa9959c550004b8847148f95e1b824772d453ac204a72"}, {file = "wrapt-1.15.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a89ce3fd220ff144bd9d54da333ec0de0399b52c9ac3d2ce34b569cf1a5748fb"}, {file = "wrapt-1.15.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3bbe623731d03b186b3d6b0d6f51865bf598587c38d6f7b0be2e27414f7f214e"}, {file = "wrapt-1.15.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3abbe948c3cbde2689370a262a8d04e32ec2dd4f27103669a45c6929bcdbfe7c"}, {file = "wrapt-1.15.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b67b819628e3b748fd3c2192c15fb951f549d0f47c0449af0764d7647302fda3"}, {file = "wrapt-1.15.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:7eebcdbe3677e58dd4c0e03b4f2cfa346ed4049687d839adad68cc38bb559c92"}, {file = "wrapt-1.15.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:74934ebd71950e3db69960a7da29204f89624dde411afbfb3b4858c1409b1e98"}, {file = "wrapt-1.15.0-cp311-cp311-win32.whl", hash = "sha256:bd84395aab8e4d36263cd1b9308cd504f6cf713b7d6d3ce25ea55670baec5416"}, {file = "wrapt-1.15.0-cp311-cp311-win_amd64.whl", hash = "sha256:a487f72a25904e2b4bbc0817ce7a8de94363bd7e79890510174da9d901c38705"}, {file = "wrapt-1.15.0-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:4ff0d20f2e670800d3ed2b220d40984162089a6e2c9646fdb09b85e6f9a8fc29"}, {file = "wrapt-1.15.0-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:9ed6aa0726b9b60911f4aed8ec5b8dd7bf3491476015819f56473ffaef8959bd"}, {file = "wrapt-1.15.0-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:896689fddba4f23ef7c718279e42f8834041a21342d95e56922e1c10c0cc7afb"}, {file = "wrapt-1.15.0-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:75669d77bb2c071333417617a235324a1618dba66f82a750362eccbe5b61d248"}, {file = "wrapt-1.15.0-cp35-cp35m-win32.whl", hash = "sha256:fbec11614dba0424ca72f4e8ba3c420dba07b4a7c206c8c8e4e73f2e98f4c559"}, {file = "wrapt-1.15.0-cp35-cp35m-win_amd64.whl", hash = "sha256:fd69666217b62fa5d7c6aa88e507493a34dec4fa20c5bd925e4bc12fce586639"}, {file = "wrapt-1.15.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b0724f05c396b0a4c36a3226c31648385deb6a65d8992644c12a4963c70326ba"}, {file = "wrapt-1.15.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bbeccb1aa40ab88cd29e6c7d8585582c99548f55f9b2581dfc5ba68c59a85752"}, {file = "wrapt-1.15.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:38adf7198f8f154502883242f9fe7333ab05a5b02de7d83aa2d88ea621f13364"}, {file = "wrapt-1.15.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:578383d740457fa790fdf85e6d346fda1416a40549fe8db08e5e9bd281c6a475"}, {file = "wrapt-1.15.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:a4cbb9ff5795cd66f0066bdf5947f170f5d63a9274f99bdbca02fd973adcf2a8"}, {file = "wrapt-1.15.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:af5bd9ccb188f6a5fdda9f1f09d9f4c86cc8a539bd48a0bfdc97723970348418"}, {file = "wrapt-1.15.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:b56d5519e470d3f2fe4aa7585f0632b060d532d0696c5bdfb5e8319e1d0f69a2"}, {file = "wrapt-1.15.0-cp36-cp36m-win32.whl", hash = "sha256:77d4c1b881076c3ba173484dfa53d3582c1c8ff1f914c6461ab70c8428b796c1"}, {file = "wrapt-1.15.0-cp36-cp36m-win_amd64.whl", hash = "sha256:077ff0d1f9d9e4ce6476c1a924a3332452c1406e59d90a2cf24aeb29eeac9420"}, {file = "wrapt-1.15.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5c5aa28df055697d7c37d2099a7bc09f559d5053c3349b1ad0c39000e611d317"}, {file = "wrapt-1.15.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a8564f283394634a7a7054b7983e47dbf39c07712d7b177b37e03f2467a024e"}, {file = "wrapt-1.15.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:780c82a41dc493b62fc5884fb1d3a3b81106642c5c5c78d6a0d4cbe96d62ba7e"}, {file = "wrapt-1.15.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e169e957c33576f47e21864cf3fc9ff47c223a4ebca8960079b8bd36cb014fd0"}, {file = "wrapt-1.15.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b02f21c1e2074943312d03d243ac4388319f2456576b2c6023041c4d57cd7019"}, {file = "wrapt-1.15.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f2e69b3ed24544b0d3dbe2c5c0ba5153ce50dcebb576fdc4696d52aa22db6034"}, {file = "wrapt-1.15.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d787272ed958a05b2c86311d3a4135d3c2aeea4fc655705f074130aa57d71653"}, {file = "wrapt-1.15.0-cp37-cp37m-win32.whl", hash = "sha256:02fce1852f755f44f95af51f69d22e45080102e9d00258053b79367d07af39c0"}, {file = "wrapt-1.15.0-cp37-cp37m-win_amd64.whl", hash = "sha256:abd52a09d03adf9c763d706df707c343293d5d106aea53483e0ec8d9e310ad5e"}, {file = "wrapt-1.15.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cdb4f085756c96a3af04e6eca7f08b1345e94b53af8921b25c72f096e704e145"}, {file = "wrapt-1.15.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:230ae493696a371f1dbffaad3dafbb742a4d27a0afd2b1aecebe52b740167e7f"}, {file = "wrapt-1.15.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63424c681923b9f3bfbc5e3205aafe790904053d42ddcc08542181a30a7a51bd"}, {file = "wrapt-1.15.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6bcbfc99f55655c3d93feb7ef3800bd5bbe963a755687cbf1f490a71fb7794b"}, {file = "wrapt-1.15.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c99f4309f5145b93eca6e35ac1a988f0dc0a7ccf9ccdcd78d3c0adf57224e62f"}, {file = "wrapt-1.15.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b130fe77361d6771ecf5a219d8e0817d61b236b7d8b37cc045172e574ed219e6"}, {file = "wrapt-1.15.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:96177eb5645b1c6985f5c11d03fc2dbda9ad24ec0f3a46dcce91445747e15094"}, {file = "wrapt-1.15.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5fe3e099cf07d0fb5a1e23d399e5d4d1ca3e6dfcbe5c8570ccff3e9208274f7"}, {file = "wrapt-1.15.0-cp38-cp38-win32.whl", hash = "sha256:abd8f36c99512755b8456047b7be10372fca271bf1467a1caa88db991e7c421b"}, {file = "wrapt-1.15.0-cp38-cp38-win_amd64.whl", hash = "sha256:b06fa97478a5f478fb05e1980980a7cdf2712015493b44d0c87606c1513ed5b1"}, {file = "wrapt-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2e51de54d4fb8fb50d6ee8327f9828306a959ae394d3e01a1ba8b2f937747d86"}, {file = "wrapt-1.15.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0970ddb69bba00670e58955f8019bec4a42d1785db3faa043c33d81de2bf843c"}, {file = "wrapt-1.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76407ab327158c510f44ded207e2f76b657303e17cb7a572ffe2f5a8a48aa04d"}, {file = "wrapt-1.15.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cd525e0e52a5ff16653a3fc9e3dd827981917d34996600bbc34c05d048ca35cc"}, {file = "wrapt-1.15.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d37ac69edc5614b90516807de32d08cb8e7b12260a285ee330955604ed9dd29"}, {file = "wrapt-1.15.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:078e2a1a86544e644a68422f881c48b84fef6d18f8c7a957ffd3f2e0a74a0d4a"}, {file = "wrapt-1.15.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:2cf56d0e237280baed46f0b5316661da892565ff58309d4d2ed7dba763d984b8"}, {file = "wrapt-1.15.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7dc0713bf81287a00516ef43137273b23ee414fe41a3c14be10dd95ed98a2df9"}, {file = "wrapt-1.15.0-cp39-cp39-win32.whl", hash = "sha256:46ed616d5fb42f98630ed70c3529541408166c22cdfd4540b88d5f21006b0eff"}, {file = "wrapt-1.15.0-cp39-cp39-win_amd64.whl", hash = "sha256:eef4d64c650f33347c1f9266fa5ae001440b232ad9b98f1f43dfe7a79435c0a6"}, {file = "wrapt-1.15.0-py3-none-any.whl", hash = "sha256:64b1df0f83706b4ef4cfb4fb0e4c2669100fd7ecacfb59e091fad300d4e04640"}, {file = "wrapt-1.15.0.tar.gz", hash = "sha256:d06730c6aed78cee4126234cf2d071e01b44b915e725a6cb439a879ec9754a3a"}, ] [[package]] name = "zipp" version = "3.6.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false python-versions = ">=3.6" files = [ {file = "zipp-3.6.0-py3-none-any.whl", hash = "sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc"}, {file = "zipp-3.6.0.tar.gz", hash = "sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832"}, ] [package.extras] docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"] testing = ["func-timeout", "jaraco.itertools", "pytest (>=4.6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy"] [metadata] lock-version = "2.0" python-versions = '>=3.6.2, <4' content-hash = "791bab8d46d04dff4bd674b8d6ae5eaf80da1182e0f20b8a066df12718fb3469" barectf-3.1.2/pyproject.toml000066400000000000000000000050001443101201700160230ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. [build-system] requires = ['poetry-core'] build-backend = 'poetry.core.masonry.api' [tool.poetry] name = 'barectf' version = '3.1.2' description = 'Generator of ANSI C tracers which output CTF data streams' license = 'MIT' authors = ['Philippe Proulx '] homepage = 'https://barectf.org/' repository = 'https://github.com/efficios/barectf/' keywords = [ 'ctf', 'generator', 'tracing', 'bare-metal', 'bare-machine', ] classifiers = [ 'Development Status :: 6 - Mature', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: C', 'Topic :: Software Development :: Code Generators', ] packages = [{include = 'barectf'}] [tool.poetry.dependencies] python = '>=3.6.2, <4' termcolor = '^1.1' pyyaml = '^5.3' jsonschema = '^3.2' setuptools = '*' jinja2 = '^3.0' [tool.poetry.dev-dependencies] flake8 = '*' pylint = '^2.13' mypy = '*' pytest = '^6' pytest-xdist = '^2' [tool.poetry.scripts] barectf = 'barectf.cli:_run' [tool.poetry.urls] 'Bug tracker' = 'https://github.com/efficios/barectf/issues/' 'Code review' = 'https://review.lttng.org/admin/repos/barectf' 'Continuous integration' = 'https://ci.lttng.org/job/barectf_master_build/' 'Commercial support' = 'https://www.efficios.com/contact/' barectf-3.1.2/tests/000077500000000000000000000000001443101201700142565ustar00rootroot00000000000000barectf-3.1.2/tests/config/000077500000000000000000000000001443101201700155235ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/000077500000000000000000000000001443101201700164655ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/000077500000000000000000000000001443101201700166265ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/000077500000000000000000000000001443101201700202565ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/000077500000000000000000000000001443101201700211715ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/000077500000000000000000000000001443101201700222645ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/absolute-invalid-type.yaml000066400000000000000000000031371443101201700273750ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: absolute: [] barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/description-invalid-type.yaml000066400000000000000000000031421443101201700300760ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: description: 23 barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/ec-invalid-type.yaml000066400000000000000000000031471443101201700261470ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: error-cycles: string barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/ec-invalid.yaml000066400000000000000000000031441443101201700251650ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: error-cycles: -17 barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/freq-0.yaml000066400000000000000000000031321443101201700242410ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: freq: 0 barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/freq-invalid-type.yaml000066400000000000000000000031371443101201700265140ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: freq: string barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/freq-neg.yaml000066400000000000000000000031341443101201700246550ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: freq: -12 barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/offset-cycles-invalid-type.yaml000066400000000000000000000031611443101201700303220ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: offset: cycles: string barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/offset-cycles-neg.yaml000066400000000000000000000031561443101201700264720ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: offset: cycles: -17 barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/offset-invalid-type.yaml000066400000000000000000000031351443101201700270430ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: offset: 23 barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/offset-seconds-invalid-type.yaml000066400000000000000000000031621443101201700304770ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: offset: seconds: string barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/offset-seconds-neg.yaml000066400000000000000000000031571443101201700266470ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: offset: seconds: -17 barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/offset-unknown-prop.yaml000066400000000000000000000031611443101201700271120ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: offset: unknown: false barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/rct-invalid-type.yaml000066400000000000000000000031441443101201700263450ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: $return-ctype: 23 barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/unknown-prop.yaml000066400000000000000000000031621443101201700256270ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: freq: 1000 unknown: false barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/uuid-invalid-type.yaml000066400000000000000000000031341443101201700265220ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: uuid: -17 barectf-3.1.2/tests/config/yaml/2/configs/fail/clock/uuid-invalid.yaml000066400000000000000000000031351443101201700255440ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: my_clock: uuid: zoom barectf-3.1.2/tests/config/yaml/2/configs/fail/config/000077500000000000000000000000001443101201700224365ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/config/metadata-invalid-type.yaml000066400000000000000000000022271443101201700275100ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: 23 barectf-3.1.2/tests/config/yaml/2/configs/fail/config/metadata-no.yaml000066400000000000000000000022111443101201700255100ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' options-gen-default-stream-def-invalid-type.yaml000066400000000000000000000031321443101201700335560ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/config# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.2' options: gen-default-stream-def: 23 metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/config/options-gen-prefix-def-invalid-type.yaml000066400000000000000000000031251443101201700322170ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.2' options: gen-prefix-def: do it metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/config/options-invalid-type.yaml000066400000000000000000000031031443101201700274150ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.2' options: false metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/config/options-unknown-prop.yaml000066400000000000000000000031111443101201700274640ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.2' options: meow: mix metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/config/prefix-invalid-identifier.yaml000066400000000000000000000031121443101201700303600ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' prefix: 'some prefix' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/config/prefix-invalid-type.yaml000066400000000000000000000031001443101201700272140ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' prefix: -21 metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/config/unknown-prop.yaml000066400000000000000000000031031443101201700257740ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 unknown: false barectf-3.1.2/tests/config/yaml/2/configs/fail/config/version-invalid-19.yaml000066400000000000000000000030641443101201700266650ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '1.9' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/config/version-invalid-23.yaml000066400000000000000000000030641443101201700266600ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.3' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/config/version-invalid-type.yaml000066400000000000000000000030621443101201700274130ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: 2.1 metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/config/version-no.yaml000066400000000000000000000030451443101201700254230ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/event/000077500000000000000000000000001443101201700223125ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/event/ct-invalid-type.yaml000066400000000000000000000031171443101201700262110ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: context-type: 23 payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/event/ct-not-struct.yaml000066400000000000000000000031671443101201700257330ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: context-type: class: int size: 8 payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/event/ll-invalid-type.yaml000066400000000000000000000031161443101201700262110ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: log-level: true payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/event/ll-non-existing.yaml000066400000000000000000000031711443101201700262270ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: $log-levels: EMERG: 0 WARNING: 23 type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: log-level: EME payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/event/no-fields-at-all.yaml000066400000000000000000000026461443101201700262360ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: {} barectf-3.1.2/tests/config/yaml/2/configs/fail/event/pt-invalid-type.yaml000066400000000000000000000026771443101201700262400ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: -17 barectf-3.1.2/tests/config/yaml/2/configs/fail/event/pt-not-struct.yaml000066400000000000000000000027471443101201700257530ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/event/unknown-prop.yaml000066400000000000000000000031151443101201700256530ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: unknown: false payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/include/000077500000000000000000000000001443101201700226145ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/include/cycle.yaml000066400000000000000000000031241443101201700245770ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: $include: recursive1.inc.yaml type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/include/empty.inc.yaml000066400000000000000000000021751443101201700254130ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. {} barectf-3.1.2/tests/config/yaml/2/configs/fail/include/file-not-found-abs.yaml000066400000000000000000000031231443101201700270700ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: $include: /path/to/not/found type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/include/file-not-found-in-array.yaml000066400000000000000000000031441443101201700300500ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: $include: - empty.inc.yaml - yes.yaml type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/include/file-not-found-recursive.yaml000066400000000000000000000031331443101201700303330ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: $include: include-not-found.inc.yaml type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/include/file-not-found.yaml000066400000000000000000000031111443101201700263220ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: $include: yes.yaml type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/include/include-include-replace.yaml000066400000000000000000000031621443101201700301570ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: $include: empty.inc.yaml $include-replace: empty.inc.yaml type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/include/include-not-found.inc.yaml000066400000000000000000000022151443101201700276020ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $include: yes.yaml barectf-3.1.2/tests/config/yaml/2/configs/fail/include/invalid-type.yaml000066400000000000000000000031031443101201700261020ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: $include: 23 type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/include/recursive-sym1.inc.yaml000066400000000000000000000022341443101201700271470ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $include: recursive-sym2.inc.yaml barectf-3.1.2/tests/config/yaml/2/configs/fail/include/recursive-sym2.inc.yaml000066400000000000000000000022341443101201700271500ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $include: recursive-sym3.inc.yaml barectf-3.1.2/tests/config/yaml/2/configs/fail/include/recursive1.inc.yaml000066400000000000000000000022301443101201700263350ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $include: recursive2.inc.yaml barectf-3.1.2/tests/config/yaml/2/configs/fail/include/recursive2.inc.yaml000066400000000000000000000022301443101201700263360ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $include: recursive3.inc.yaml barectf-3.1.2/tests/config/yaml/2/configs/fail/include/recursive3.inc.yaml000066400000000000000000000022301443101201700263370ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $include: recursive1.inc.yaml barectf-3.1.2/tests/config/yaml/2/configs/fail/include/replace-file-not-found-in-array.yaml000066400000000000000000000031541443101201700314620ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: $include-replace: - empty.inc.yaml - yes.yaml type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/include/replace-file-not-found.yaml000066400000000000000000000031211443101201700277340ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: $include-replace: yes.yaml type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/000077500000000000000000000000001443101201700227515ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/clocks-invalid-type.yaml000066400000000000000000000031011443101201700275110ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: 23 barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/clocks-key-invalid-identifier.yaml000066400000000000000000000031411443101201700314440ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 clocks: 'some clock': freq: 1000 barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/default-stream-invalid-type.yaml000066400000000000000000000031121443101201700311520ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.2' metadata: $default-stream: 23 type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/default-stream-stream-default-duplicate.yaml000066400000000000000000000036471443101201700334470ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.2' metadata: $default-stream: my_stream type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 other_stream: $default: true packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/default-stream-unknown-stream.yaml000066400000000000000000000031231443101201700315370ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.2' metadata: $default-stream: some_stream type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/env-invalid-type.yaml000066400000000000000000000030761443101201700270360ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 env: 17 barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/env-key-invalid-identifier.yaml000066400000000000000000000031251443101201700307600ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 env: 'yes sir miller': bug barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/env-value-invalid-type.yaml000066400000000000000000000031431443101201700301430ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 env: yes-sir-miller: - a - b barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/ll-invalid-type.yaml000066400000000000000000000031111443101201700266430ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 $log-levels: hello barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/ll-value-invalid-type.yaml000066400000000000000000000031361443101201700277640ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 $log-levels: 'yes sir miller': meow barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/multiple-streams-trace-ph-no-stream-id.yaml000066400000000000000000000032501443101201700331420ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: $include: - stdint.yaml - stdmisc.yaml type-aliases: pct: class: struct fields: packet_size: uint32 content_size: uint32 pt: class: struct fields: a: uint32 trace: byte-order: le packet-header-type: class: struct fields: magic: ctf-magic streams: s1: packet-context-type: pct events: ev1: payload-type: pt s2: packet-context-type: pct events: ev2: payload-type: pt barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/streams-empty.yaml000066400000000000000000000022751443101201700264550ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: {} barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/streams-invalid-type.yaml000066400000000000000000000023721443101201700277220ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: -17 barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/streams-key-invalid-identifier.yaml000066400000000000000000000030701443101201700316450ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: 'some stream': packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/streams-no.yaml000066400000000000000000000022571443101201700257330ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/ta-invalid-type.yaml000066400000000000000000000030721443101201700266460ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: - uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/trace-empty.yaml000066400000000000000000000030441443101201700260700ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: {} streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/trace-invalid-type.yaml000066400000000000000000000030501443101201700273340ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: switch streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/trace-no.yaml000066400000000000000000000027341443101201700253530ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/metadata/unknown-prop.yaml000066400000000000000000000031051443101201700263110ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 unknown: false barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/000077500000000000000000000000001443101201700224645ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/default-invalid-type.yaml000066400000000000000000000031071443101201700274000ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.2' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: $default: 23 packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/ect-invalid-type.yaml000066400000000000000000000027231443101201700265320ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: event-context-type: 23 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/ect-not-struct.yaml000066400000000000000000000027461443101201700262540ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: event-context-type: class: string events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/eht-id-no-multiple-events.yaml000066400000000000000000000033701443101201700302720ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 my_other_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/eht-id-not-int.yaml000066400000000000000000000032661443101201700261170ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 event-header-type: class: struct fields: id: class: string events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/eht-id-too-small.yaml000066400000000000000000000042201443101201700264250ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 event-header-type: class: struct min-align: 8 fields: id: class: int size: 2 events: my_event: payload-type: class: struct fields: my_field: uint16 my_event2: payload-type: class: struct fields: my_field: uint16 my_event3: payload-type: class: struct fields: my_field: uint16 my_event4: payload-type: class: struct fields: my_field: uint16 my_event5: payload-type: class: struct fields: my_field: uint16 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/eht-id-wrong-signed.yaml000066400000000000000000000033411443101201700271240ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 event-header-type: class: struct fields: id: class: int size: 16 signed: true events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/eht-invalid-type.yaml000066400000000000000000000027221443101201700265360ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: event-header-type: 23 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/eht-not-struct.yaml000066400000000000000000000027451443101201700262600ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: event-header-type: class: string events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/eht-timestamp-not-int.yaml000066400000000000000000000032751443101201700275260ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 event-header-type: class: struct fields: timestamp: class: string events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/eht-timestamp-wrong-pm.yaml000066400000000000000000000033171443101201700277010ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 event-header-type: class: struct fields: timestamp: class: int size: 16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/eht-timestamp-wrong-signed.yaml000066400000000000000000000035421443101201700305360ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 event-header-type: class: struct fields: timestamp: class: int size: 16 signed: true property-mappings: - type: clock name: my_clock property: value events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/events-empty.yaml000066400000000000000000000023321443101201700260100ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: {} barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/events-invalid-type.yaml000066400000000000000000000026261443101201700272650ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: 23.5 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/events-key-invalid-identifier.yaml000066400000000000000000000030651443101201700312120ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: a_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: 'my event': payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/events-no.yaml000066400000000000000000000026211443101201700252670ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: class: int size: 16 content_size: class: int size: 16 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-cs-not-int.yaml000066400000000000000000000031071443101201700261300ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: class: string packet_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-cs-wrong-signed.yaml000066400000000000000000000032151443101201700271430ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: class: int size: 16 signed: true packet_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-cs-yes-ps-no.yaml000066400000000000000000000030261443101201700263720ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-ed-not-int.yaml000066400000000000000000000030551443101201700261150ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: events_discarded: class: string events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-ed-wrong-signed.yaml000066400000000000000000000031631443101201700271300ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: events_discarded: class: int size: 16 signed: true events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-invalid-type.yaml000066400000000000000000000027241443101201700265460ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: 23 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-no.yaml000066400000000000000000000027211443101201700245520ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-not-struct.yaml000066400000000000000000000027471443101201700262700ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: string events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-ps-not-int.yaml000066400000000000000000000031071443101201700261450ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: class: string content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-ps-wrong-signed.yaml000066400000000000000000000032151443101201700271600ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: class: int size: 16 signed: true content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-ps-yes-cs-no.yaml000066400000000000000000000030251443101201700263710ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-tb-not-int.yaml000066400000000000000000000031511443101201700261270ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 timestamp_begin: class: string events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-tb-te-different-clocks.yaml000066400000000000000000000037541443101201700304000ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} my_other_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 timestamp_begin: class: int size: 32 property-mappings: - type: clock name: my_clock property: value timestamp_end: class: int size: 32 property-mappings: - type: clock name: my_other_clock property: value events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-tb-wrong-pm.yaml000066400000000000000000000032261443101201700263100ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 timestamp_begin: class: int size: 16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-tb-wrong-signed.yaml000066400000000000000000000034511443101201700271450ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 timestamp_begin: class: int size: 16 signed: true property-mappings: - type: clock name: my_clock property: value events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-tb-yes-te-no.yaml000066400000000000000000000034201443101201700263560ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 timestamp_begin: class: int size: 32 property-mappings: - type: clock name: my_clock property: value events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-te-not-int.yaml000066400000000000000000000031471443101201700261370ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 timestamp_end: class: string events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-te-wrong-pm.yaml000066400000000000000000000032241443101201700263110ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 timestamp_end: class: int size: 16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-te-wrong-signed.yaml000066400000000000000000000034471443101201700271550ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 timestamp_end: class: int size: 16 signed: true property-mappings: - type: clock name: my_clock property: value events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/pct-te-yes-tb-no.yaml000066400000000000000000000034161443101201700263630ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 timestamp_end: class: int size: 32 property-mappings: - type: clock name: my_clock property: value events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/stream/unknown-prop.yaml000066400000000000000000000031101443101201700260200ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le streams: my_stream: unknown: true packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/000077500000000000000000000000001443101201700222675ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/bo-invalid-type.yaml000066400000000000000000000030641443101201700261610ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: 23 streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/bo-invalid.yaml000066400000000000000000000030641443101201700252020ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: ze streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/bo-no.yaml000066400000000000000000000030441443101201700241660ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: {} streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/ph-magic-not-int.yaml000066400000000000000000000032251443101201700262300ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: be packet-header-type: class: struct fields: magic: class: string streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/ph-magic-wrong-signed.yaml000066400000000000000000000032741443101201700272470ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: be packet-header-type: class: struct fields: magic: class: int size: 32 signed: true streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/ph-magic-wrong-size.yaml000066400000000000000000000032451443101201700267460ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: be packet-header-type: class: struct fields: magic: class: int size: 16 streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/ph-not-struct.yaml000066400000000000000000000031541443101201700257050ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: be packet-header-type: class: int size: 32 streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/ph-streamid-not-int.yaml000066400000000000000000000032311443101201700267550ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: be packet-header-type: class: struct fields: stream_id: class: string streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/ph-streamid-too-small.yaml000066400000000000000000000064031443101201700273000ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: clocks: my_clock: {} type-aliases: uint16: class: int size: 16 trace: byte-order: le packet-header-type: class: struct min-align: 8 fields: stream_id: class: int size: 2 streams: my_stream: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 event-header-type: class: struct min-align: 8 fields: id: uint16 events: my_event: payload-type: class: struct fields: my_field: uint16 my_stream2: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 event-header-type: class: struct min-align: 8 fields: id: uint16 events: my_event: payload-type: class: struct fields: my_field: uint16 my_stream3: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 event-header-type: class: struct min-align: 8 fields: id: uint16 events: my_event: payload-type: class: struct fields: my_field: uint16 my_stream4: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 event-header-type: class: struct min-align: 8 fields: id: uint16 events: my_event: payload-type: class: struct fields: my_field: uint16 my_stream5: packet-context-type: class: struct fields: content_size: uint16 packet_size: uint16 event-header-type: class: struct min-align: 8 fields: id: uint16 events: my_event: payload-type: class: struct fields: my_field: uint16 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/ph-streamid-wrong-signed.yaml000066400000000000000000000033001443101201700277650ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: be packet-header-type: class: struct fields: stream_id: class: int size: 16 signed: true streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/ph-uuid-et-not-int.yaml000066400000000000000000000033511443101201700265240ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: uuid: auto byte-order: be packet-header-type: class: struct fields: uuid: class: array length: 16 element-type: class: string streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/ph-uuid-et-wrong-align.yaml000066400000000000000000000034201443101201700273550ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: uuid: auto byte-order: be packet-header-type: class: struct fields: uuid: class: array length: 16 element-type: class: int size: 8 align: 16 streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/ph-uuid-et-wrong-signed.yaml000066400000000000000000000034231443101201700275370ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: uuid: auto byte-order: be packet-header-type: class: struct fields: uuid: class: array length: 16 element-type: class: int size: 8 signed: true streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/ph-uuid-et-wrong-size.yaml000066400000000000000000000033721443101201700272430ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: uuid: auto byte-order: be packet-header-type: class: struct fields: uuid: class: array length: 16 element-type: class: int size: 4 streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/ph-uuid-not-array.yaml000066400000000000000000000032221443101201700264370ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: uuid: auto byte-order: be packet-header-type: class: struct fields: uuid: uint16 streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/ph-uuid-wrong-length.yaml000066400000000000000000000033721443101201700271440ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: uuid: auto byte-order: be packet-header-type: class: struct fields: uuid: class: array length: 17 element-type: class: int size: 8 streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/unknown-prop.yaml000066400000000000000000000031071443101201700256310ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: be unknown: false streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/uuid-invalid-type.yaml000066400000000000000000000031011443101201700265170ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: uuid: 12 byte-order: be streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/trace/uuid-invalid-uuid.yaml000066400000000000000000000031101443101201700265040ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: uuid: something byte-order: be streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-enum/000077500000000000000000000000001443101201700231145ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/type-enum/members-el-invalid-type.yaml000066400000000000000000000030311443101201700304300ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: enum value-type: class: int size: 8 members: - HELLO - 23 - ZOOM barectf-3.1.2/tests/config/yaml/2/configs/fail/type-enum/members-el-member-label-invalid-type.yaml000066400000000000000000000030751443101201700327620ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: enum value-type: class: int size: 8 members: - HELLO - label: 65 value: 6 - ZOOM barectf-3.1.2/tests/config/yaml/2/configs/fail/type-enum/members-el-member-unknown-prop.yaml000066400000000000000000000031401443101201700317460ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: enum value-type: class: int size: 8 members: - HELLO - label: six value: 6 unknown: true - ZOOM barectf-3.1.2/tests/config/yaml/2/configs/fail/type-enum/members-el-member-value-invalid-type.yaml000066400000000000000000000031031443101201700330070ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: enum value-type: class: int size: 8 members: - HELLO - label: label value: meow - ZOOM members-el-member-value-outside-range-signed.yaml000066400000000000000000000031421443101201700343430ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/type-enum# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: enum value-type: class: int size: 8 signed: true members: - HELLO - label: label value: -129 - ZOOM members-el-member-value-outside-range-unsigned.yaml000066400000000000000000000031021443101201700347020ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/type-enum# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: enum value-type: class: int size: 8 members: - HELLO - label: label value: 256 - ZOOM barectf-3.1.2/tests/config/yaml/2/configs/fail/type-enum/members-empty.yaml000066400000000000000000000027221443101201700265710ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: enum value-type: class: int size: 8 members: [] barectf-3.1.2/tests/config/yaml/2/configs/fail/type-enum/members-invalid-type.yaml000066400000000000000000000027261443101201700300440ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: enum value-type: class: int size: 8 members: string barectf-3.1.2/tests/config/yaml/2/configs/fail/type-enum/members-no.yaml000066400000000000000000000026661443101201700260560ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: enum value-type: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-enum/members-overlap.yaml000066400000000000000000000031371443101201700271040ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: enum value-type: class: int size: 8 signed: true members: - HELLO - ZOOM - label: MAGOG value: 0 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-enum/unknown-prop.yaml000066400000000000000000000030101443101201700264470ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: enum value-type: class: int size: 8 members: - HELLO unknown: false barectf-3.1.2/tests/config/yaml/2/configs/fail/type-enum/vt-invalid-type.yaml000066400000000000000000000026651443101201700270450ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: enum value-type: 23 members: - HELLO barectf-3.1.2/tests/config/yaml/2/configs/fail/type-enum/vt-no.yaml000066400000000000000000000026261443101201700250510ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: enum members: - HELLO barectf-3.1.2/tests/config/yaml/2/configs/fail/type-float/000077500000000000000000000000001443101201700232555ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/type-float/align-0.yaml000066400000000000000000000027071443101201700253760ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: float size: exp: 8 mant: 24 align: 0 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-float/align-3.yaml000066400000000000000000000027071443101201700254010ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: float size: exp: 8 mant: 24 align: 3 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-float/align-invalid-type.yaml000066400000000000000000000027141443101201700276420ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: float size: exp: 8 mant: 24 align: string barectf-3.1.2/tests/config/yaml/2/configs/fail/type-float/bo-invalid-type.yaml000066400000000000000000000027151443101201700271510ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: float size: exp: 8 mant: 24 byte-order: 17 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-float/bo-invalid.yaml000066400000000000000000000027151443101201700261720ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: float size: exp: 8 mant: 24 byte-order: ze barectf-3.1.2/tests/config/yaml/2/configs/fail/type-float/size-exp-mant-wrong-sum.yaml000066400000000000000000000026561443101201700306070ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: float size: exp: 5 mant: 21 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-float/size-exp-no.yaml000066400000000000000000000026251443101201700263240ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: float size: mant: 24 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-float/size-invalid-type.yaml000066400000000000000000000026011443101201700275150ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: float size: string barectf-3.1.2/tests/config/yaml/2/configs/fail/type-float/size-mant-no.yaml000066400000000000000000000026231443101201700264650ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: float size: exp: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-float/size-no.yaml000066400000000000000000000025441443101201700255320ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: float barectf-3.1.2/tests/config/yaml/2/configs/fail/type-float/size-unknown-prop.yaml000066400000000000000000000027171443101201700275750ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: float size: exp: 8 mant: 24 unknown: false barectf-3.1.2/tests/config/yaml/2/configs/fail/type-float/unknown-prop.yaml000066400000000000000000000027151443101201700266230ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: float size: exp: 8 mant: 24 unknown: false barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/000077500000000000000000000000001443101201700227425ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/align-0.yaml000066400000000000000000000026241443101201700250610ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int size: 32 align: 0 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/align-3.yaml000066400000000000000000000026241443101201700250640ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int size: 32 align: 3 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/align-invalid-type.yaml000066400000000000000000000026001443101201700273210ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int align: string barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/base-invalid-type.yaml000066400000000000000000000026261443101201700271510ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 base: 17.34 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/base-invalid.yaml000066400000000000000000000026271443101201700261730ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int size: 32 base: inval barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/bo-invalid-type.yaml000066400000000000000000000026041443101201700266330ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int byte-order: 17.34 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/bo-invalid.yaml000066400000000000000000000026321443101201700256550ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int size: 32 byte-order: ze barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/pm-invalid-type.yaml000066400000000000000000000026131443101201700266470ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int property-mappings: hello barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/pm-property-invalid.yaml000066400000000000000000000030361443101201700275520ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le clocks: my_clock: {} streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 property-mappings: - type: clock name: my_clock property: type barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/pm-type-invalid.yaml000066400000000000000000000030341443101201700266450ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le clocks: my_clock: {} streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 property-mappings: - type: stream name: zala property: value barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/pm-unknown-clock.yaml000066400000000000000000000030331443101201700270270ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le clocks: my_clock: {} streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 property-mappings: - type: clock name: zala property: value barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/signed-invalid-type.yaml000066400000000000000000000026011443101201700275010ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int signed: string barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/size-0.yaml000066400000000000000000000025721443101201700247430ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int size: 0 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/size-65.yaml000066400000000000000000000026241443101201700250340ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int size: 65 align: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/size-invalid-type.yaml000066400000000000000000000025771443101201700272160ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int size: string barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/size-no.yaml000066400000000000000000000025421443101201700252150ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int barectf-3.1.2/tests/config/yaml/2/configs/fail/type-int/unknown-prop.yaml000066400000000000000000000026311443101201700263050ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 unknown: false barectf-3.1.2/tests/config/yaml/2/configs/fail/type-string/000077500000000000000000000000001443101201700234565ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/type-string/unknown-prop.yaml000066400000000000000000000026041443101201700270210ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: string unknown: false barectf-3.1.2/tests/config/yaml/2/configs/fail/type-struct/000077500000000000000000000000001443101201700234745ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/type-struct/fields-field-invalid-identifier.yaml000066400000000000000000000025731443101201700324620ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: 'a field': class: int size: 1 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-struct/fields-invalid-type.yaml000066400000000000000000000024621443101201700302350ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: 23 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-struct/ma-0.yaml000066400000000000000000000024641443101201700251200ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct min-align: 0 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-struct/ma-3.yaml000066400000000000000000000024641443101201700251230ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct min-align: 3 barectf-3.1.2/tests/config/yaml/2/configs/fail/type-struct/ma-invalid-type.yaml000066400000000000000000000024671443101201700273710ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct min-align: true barectf-3.1.2/tests/config/yaml/2/configs/fail/type-struct/unknown-prop.yaml000066400000000000000000000026241443101201700270410ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct unknown: true fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/type/000077500000000000000000000000001443101201700221525ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/type/inherit-forward.yaml000066400000000000000000000027251443101201700261500ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: $inherit: meow size: 16 meow: class: int trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/type/inherit-unknown.yaml000066400000000000000000000026751443101201700262070ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: $inherit: unknown size: 16 trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/type/invalid-type.yaml000066400000000000000000000030271443101201700254450ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: an-int: 23 trace: byte-order: le streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/type/no-class.yaml000066400000000000000000000025371443101201700245640ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: trace: byte-order: le streams: my_stream: events: my_event: payload-type: class: struct fields: my_field: size: 8 barectf-3.1.2/tests/config/yaml/2/configs/fail/yaml/000077500000000000000000000000001443101201700221335ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/fail/yaml/invalid.yaml000066400000000000000000000031001443101201700244370ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.1' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: le: - 23 streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 barectf-3.1.2/tests/config/yaml/2/configs/pass/000077500000000000000000000000001443101201700212245ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/pass/everything/000077500000000000000000000000001443101201700234105ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/2/configs/pass/everything/clock.inc.yaml000066400000000000000000000023141443101201700261370ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. freq: 123456789 offset: seconds: 18 absolute: true $return-ctype: unsigned long barectf-3.1.2/tests/config/yaml/2/configs/pass/everything/config.yaml000066400000000000000000000056311443101201700255460ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. version: '2.2' prefix: bctf_ options: gen-prefix-def: true gen-default-stream-def: true metadata: $include: - metadata.inc.yaml - stdmisc.yaml - lttng-ust-log-levels.yaml type-aliases: my-clock-int: $inherit: uint32 property-mappings: - type: clock name: some_clock property: value my-special-int: size: 19 base: hex $log-levels: couch: 0755 trace: $include: trace.inc.yaml byte-order: be clocks: some_clock: $include: clock.inc.yaml description: this is my favorite clock offset: cycles: 91827439187 absolute: null streams: my_stream: packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 timestamp_begin: my-clock-int timestamp_end: my-clock-int events: my_event: payload-type: class: struct fields: my_field: class: int size: 8 my_other_stream: $include: stream.inc.yaml packet-context-type: class: struct fields: packet_size: uint32 content_size: uint32 events_discarded: uint16 event-header-type: class: struct fields: id: uint8 timestamp: my-clock-int events: my_event: $include: event.inc.yaml context-type: null payload-type: class: struct fields: my_field: class: int size: 8 oh_henry_event: payload-type: class: struct fields: s1: string s2: string s3: string s4: string barectf-3.1.2/tests/config/yaml/2/configs/pass/everything/event.inc.yaml000066400000000000000000000023041443101201700261640ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. log-level: WARNING context-type: class: struct fields: fff: float barectf-3.1.2/tests/config/yaml/2/configs/pass/everything/metadata.inc.yaml000066400000000000000000000033531443101201700266300ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $include: - stdint.yaml - stdfloat.yaml type-aliases: my-special-int: class: int size: 23 align: 2 struct32: class: struct min-align: 32 def-payload-type: $inherit: struct32 fields: haha: float hihi: uint32 huhu: uint16 hoho: double streams: my_other_stream: events: this_event: payload-type: class: struct fields: special: my-special-int more_special: $inherit: my-special-int align: 32 $log-levels: couch: 23 tv: 199 thread: 0x28aff env: salut: lol meow: mix barectf-3.1.2/tests/config/yaml/2/configs/pass/everything/stream.inc.yaml000066400000000000000000000026341443101201700263440ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. event-context-type: class: struct fields: i: int32 f: float d: double s: string m: ctf-magic events: evev: payload-type: def-payload-type context_no_payload: context-type: class: struct fields: str: string no_context_no_payload: {} barectf-3.1.2/tests/config/yaml/2/configs/pass/everything/trace.inc.yaml000066400000000000000000000023111443101201700261370ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. $include: trace-basic.yaml packet-header-type: fields: soy_sauce: uint64 barectf-3.1.2/tests/config/yaml/2/test_pass_everything.py000066400000000000000000000056501443101201700234570ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import os import os.path import barectf import subprocess def test_everything(request, tmpdir): yaml_path = os.path.join(os.path.dirname(request.fspath), 'configs', 'pass', 'everything', 'config.yaml') yaml_dir = os.path.dirname(yaml_path) with open(yaml_path) as f: cfg = barectf.configuration_from_file(f, inclusion_directories=[yaml_dir]) cg = barectf.CodeGenerator(cfg) files = cg.generate_c_headers() files += cg.generate_c_sources() for file in files: with open(os.path.join(tmpdir, file.name), 'w') as f: f.write(file.contents) cc = os.environ.get('CC', 'cc') o_file = 'obj.o' subprocess.check_call([cc, '-c', '-o', o_file, files[-1].name], cwd=tmpdir) nm = os.environ.get('NM', 'nm') syms = subprocess.check_output([nm, o_file], cwd=tmpdir, universal_newlines=True) syms_to_check = [ 'bctf_init', 'bctf_my_other_stream_close_packet', 'bctf_my_other_stream_open_packet', 'bctf_my_other_stream_trace_context_no_payload', 'bctf_my_other_stream_trace_evev', 'bctf_my_other_stream_trace_my_event', 'bctf_my_other_stream_trace_no_context_no_payload', 'bctf_my_other_stream_trace_oh_henry_event', 'bctf_my_other_stream_trace_this_event', 'bctf_my_stream_close_packet', 'bctf_my_stream_open_packet', 'bctf_my_stream_trace_my_event', 'bctf_packet_buf', 'bctf_packet_buf_addr', 'bctf_packet_buf_size', 'bctf_packet_events_discarded', 'bctf_discarded_event_records_count', 'bctf_packet_is_empty', 'bctf_packet_is_full', 'bctf_packet_is_open', 'bctf_packet_set_buf', 'bctf_packet_size', ] for sym in syms_to_check: assert sym in syms barectf-3.1.2/tests/config/yaml/3/000077500000000000000000000000001443101201700166275ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/3/configs/000077500000000000000000000000001443101201700202575ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/3/configs/fail/000077500000000000000000000000001443101201700211725ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/3/configs/fail/type/000077500000000000000000000000001443101201700221535ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/3/configs/fail/type/byte-order-no.yaml000066400000000000000000000034161443101201700255310ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # Copyright (c) 2023 Erica Bugden # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # Tests that configuration parsing fails when no trace type byte order # property exists (neither `native-byte-order` nor `trace-byte-order`). %YAML 1.2 --- ! trace: type: data-stream-types: my_stream: $is-default: true $features: packet: discarded-event-records-counter-snapshot-field-type: false event-record-types: my_event: payload-field-type: class: structure members: - my_field: field-type: class: string barectf-3.1.2/tests/config/yaml/3/configs/fail/type/byte-order-yes-two-properties.yaml000066400000000000000000000035671443101201700307250ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # Copyright (c) 2023 Erica Bugden # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # Tests that configuration parsing fails when both `native-byte-order` # and `trace-byte-order` trace type properties exist: barectf accepts # one or the other, but not both. %YAML 1.2 --- ! trace: type: native-byte-order: little-endian trace-byte-order: little-endian data-stream-types: my_stream: $is-default: true $features: packet: discarded-event-records-counter-snapshot-field-type: false event-record-types: my_event: payload-field-type: class: structure members: - my_field: field-type: class: string barectf-3.1.2/tests/config/yaml/3/configs/pass/000077500000000000000000000000001443101201700212255ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/3/configs/pass/type/000077500000000000000000000000001443101201700222065ustar00rootroot00000000000000barectf-3.1.2/tests/config/yaml/3/configs/pass/type/byte-order-yes.yaml000066400000000000000000000034431443101201700257500ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # Copyright (c) 2023 Erica Bugden # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # Tests that configuration parsing succeeds if only one trace type byte # order property exists (`trace-byte-order` in this case). %YAML 1.2 --- ! trace: type: trace-byte-order: big-endian data-stream-types: my_stream: $is-default: true $features: packet: discarded-event-records-counter-snapshot-field-type: false event-record-types: my_event: payload-field-type: class: structure members: - my_field: field-type: class: string barectf-3.1.2/tests/config/yaml/conftest.py000066400000000000000000000070551443101201700206730ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import pytest import os.path import barectf def pytest_collect_file(parent, path): yaml_ext = '.yaml' if path.ext != yaml_ext: # not a YAML file: cancel return if path.fnmatch('*.inc.yaml'): # not a top-level test file (partial inclusion YAML file) return # At the end of this loop, if `path` is # `/home/jo/barectf/tests/config/yaml/2/configs/fail/stream/pct-no.yaml`, # for example, then `elems` is: # # * `pct-no.yaml` # * `stream` # * `fail` path_str = str(path) elems = [] while True: elem = os.path.basename(path_str) if elem == 'configs': break elems.append(elem) path_str = os.path.dirname(path_str) # create a unique test name name = f'test-{"-".join(reversed(elems))}'.replace(yaml_ext, '') # create the file node if 'fail' in elems: return _YamlFileFail.from_parent(parent, fspath=path, name=name) elif 'pass' in elems: return _YamlFilePass.from_parent(parent, fspath=path, name=name) else: # YAML file is not a test case return class _YamlItem(pytest.Item): def runtest(self): yaml_dir = self.fspath.dirname with open(str(self.fspath)) as f: self._runtest(f, yaml_dir) def reportinfo(self): return self.fspath, None, self.name class _YamlItemFail(_YamlItem): def _runtest(self, f, yaml_dir): with pytest.raises(barectf._ConfigurationParseError): barectf.configuration_from_file(f, inclusion_directories=[yaml_dir]) def repr_failure(self, excinfo, style=None): return f'`{self.fspath}` did not make barectf.configuration_from_file() raise `barectf._ConfigurationParseError`: {excinfo}.' class _YamlItemPass(_YamlItem): def _runtest(self, f, yaml_dir): barectf.configuration_from_file(f, inclusion_directories=[yaml_dir]) def repr_failure(self, excinfo, style=None): return f'`{self.fspath}` barectf.configuration_from_file() raised an exception.: {excinfo}.' class _YamlFile(pytest.File): def __init__(self, parent, fspath, name): super().__init__(parent=parent, fspath=fspath) self._name = name def collect(self): # yield a single item yield self._item_cls.from_parent(self, name=self._name) class _YamlFileFail(_YamlFile): _item_cls = _YamlItemFail class _YamlFilePass(_YamlFile): _item_cls = _YamlItemPass barectf-3.1.2/tests/tracing/000077500000000000000000000000001443101201700157055ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/000077500000000000000000000000001443101201700173355ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/basic-extra-pc-ft-members/000077500000000000000000000000001443101201700241765ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/basic-extra-pc-ft-members/extra-pc-ft-members/000077500000000000000000000000001443101201700277605ustar00rootroot00000000000000extra-pc-ft-members.yaml000066400000000000000000000023301443101201700343450ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/basic-extra-pc-ft-members/extra-pc-ft-members# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml barectf-3.1.2/tests/tracing/configs/basic/000077500000000000000000000000001443101201700204165ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/basic/byte-order/000077500000000000000000000000001443101201700224725ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/basic/byte-order/trace-byte-order-big-endian.yaml000066400000000000000000000037441443101201700305310ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # Copyright (c) 2023 Erica Bugden # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # Tests that barectf generates a tracer which produces a valid trace on # a little-endian system given a barectf 2 configuration having its # `byte-order` trace type property set to `big-endian`. # # NOTE: This test does not validate that it runs on a little-endian # system, but we can assume that that is the case since it is what the # barectf tests currently require. version: '2.2' metadata: type-aliases: uint16: class: int size: 16 trace: byte-order: big-endian streams: default: $default: true packet-context-type: class: struct fields: packet_size: uint16 content_size: uint16 events: my_event: payload-type: class: struct fields: my_field: class: str barectf-3.1.2/tests/tracing/configs/basic/ds/000077500000000000000000000000001443101201700210245ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/basic/ds/no-dst-id.yaml000066400000000000000000000046751443101201700235220ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # Copyright (c) 2023 Erica Bugden # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # Test Purpose # # This test configuration aims to verify that when the config property # 'data-stream-type-id-field-type' is set to false, that the metadata # file generated by barectf will not mention the type id (in either the # stream type description or in the event type descriptions). # # This makes sure that two common CTF trace readers (Babeltrace and # Trace Compass) will be able to read the traces produced. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdmisc.yaml $features: magic-field-type: false uuid-field-type: false data-stream-type-id-field-type: false data-stream-types: default: $features: packet: total-size-field-type: class: unsigned-integer size: 16 content-size-field-type: class: unsigned-integer size: 16 beginning-timestamp-field-type: false end-timestamp-field-type: false event-record: type-id-field-type: false timestamp-field-type: false event-record-types: my_event: payload-field-type: class: structure members: - my_field: string barectf-3.1.2/tests/tracing/configs/basic/ds/two-packets.yaml000066400000000000000000000026511443101201700241550ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdmisc.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - s: str barectf-3.1.2/tests/tracing/configs/basic/dynamic-array/000077500000000000000000000000001443101201700231565ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/basic/dynamic-array/nested-5-uint8.yaml000066400000000000000000000040571443101201700265410ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: dynamic-array element-field-type: class: static-array length: 2 element-field-type: class: static-array length: 2 element-field-type: class: static-array length: 2 element-field-type: class: static-array length: 2 element-field-type: uint8 barectf-3.1.2/tests/tracing/configs/basic/dynamic-array/of-double.yaml000066400000000000000000000030451443101201700257200ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdreal.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: dynamic-array element-field-type: double barectf-3.1.2/tests/tracing/configs/basic/dynamic-array/of-static-array-of-double.yaml000066400000000000000000000032371443101201700307260ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdreal.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: dynamic-array element-field-type: class: static-array length: 3 element-field-type: double barectf-3.1.2/tests/tracing/configs/basic/dynamic-array/of-static-array-of-str.yaml000066400000000000000000000032341443101201700302610ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdmisc.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: dynamic-array element-field-type: class: static-array length: 3 element-field-type: str barectf-3.1.2/tests/tracing/configs/basic/dynamic-array/of-static-array-of-uint8.yaml000066400000000000000000000032351443101201700305210ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: dynamic-array element-field-type: class: static-array length: 3 element-field-type: uint8 barectf-3.1.2/tests/tracing/configs/basic/dynamic-array/of-str.yaml000066400000000000000000000030421443101201700252530ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdmisc.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: dynamic-array element-field-type: str barectf-3.1.2/tests/tracing/configs/basic/dynamic-array/of-uint3-middle.yaml000066400000000000000000000032641443101201700267470ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml - stdmisc.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - before: uint32 - array: field-type: class: dynamic-array element-field-type: class: uint size: 3 - after: str barectf-3.1.2/tests/tracing/configs/basic/dynamic-array/of-uint3.yaml000066400000000000000000000031411443101201700255050ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: dynamic-array element-field-type: class: uint size: 3 barectf-3.1.2/tests/tracing/configs/basic/dynamic-array/of-uint8.yaml000066400000000000000000000030431443101201700255130ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: dynamic-array element-field-type: uint8 barectf-3.1.2/tests/tracing/configs/basic/dynamic-array/zero-len.yaml000066400000000000000000000033061443101201700255770ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - before: uint8 - array: field-type: class: dynamic-array element-field-type: class: uint size: 8 alignment: 64 - after: uint8 barectf-3.1.2/tests/tracing/configs/basic/enum/000077500000000000000000000000001443101201700213625ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/basic/enum/senum16.yaml000066400000000000000000000031051443101201700235430ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - e: field-type: class: senum size: 16 mappings: A: [0] barectf-3.1.2/tests/tracing/configs/basic/enum/senum32.yaml000066400000000000000000000031051443101201700235410ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - e: field-type: class: senum size: 32 mappings: A: [0] barectf-3.1.2/tests/tracing/configs/basic/enum/senum64.yaml000066400000000000000000000031051443101201700235460ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - e: field-type: class: senum size: 64 mappings: A: [0] barectf-3.1.2/tests/tracing/configs/basic/enum/senum8.yaml000066400000000000000000000031041443101201700234630ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - e: field-type: class: senum size: 8 mappings: A: [0] barectf-3.1.2/tests/tracing/configs/basic/enum/uenum16.yaml000066400000000000000000000031051443101201700235450ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - e: field-type: class: uenum size: 16 mappings: A: [0] barectf-3.1.2/tests/tracing/configs/basic/enum/uenum32.yaml000066400000000000000000000031051443101201700235430ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - e: field-type: class: uenum size: 32 mappings: A: [0] barectf-3.1.2/tests/tracing/configs/basic/enum/uenum64.yaml000066400000000000000000000031051443101201700235500ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - e: field-type: class: uenum size: 64 mappings: A: [0] barectf-3.1.2/tests/tracing/configs/basic/enum/uenum8.yaml000066400000000000000000000030601443101201700234660ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - e: field-type: class: uenum size: 8 mappings: A: [0] barectf-3.1.2/tests/tracing/configs/basic/int/000077500000000000000000000000001443101201700212105ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/basic/int/sint-bit-fields-wrap.yaml000066400000000000000000000046711443101201700260500ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - i1: field-type: class: sint size: 1 - i3: field-type: class: sint size: 3 - i2: field-type: class: sint size: 2 - i5: field-type: class: sint size: 5 - i4: field-type: class: sint size: 4 - i7: field-type: class: sint size: 7 - i6: field-type: class: sint size: 6 - i23: field-type: class: sint size: 23 - i55: field-type: class: sint size: 55 barectf-3.1.2/tests/tracing/configs/basic/int/sint-bit-fields.yaml000066400000000000000000000046711443101201700251010ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - i1: field-type: class: sint size: 1 - i3: field-type: class: sint size: 3 - i2: field-type: class: sint size: 2 - i5: field-type: class: sint size: 5 - i4: field-type: class: sint size: 4 - i7: field-type: class: sint size: 7 - i6: field-type: class: sint size: 6 - i23: field-type: class: sint size: 23 - i55: field-type: class: sint size: 55 barectf-3.1.2/tests/tracing/configs/basic/int/sint16.yaml000066400000000000000000000026531443101201700232260ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - i: sint16 barectf-3.1.2/tests/tracing/configs/basic/int/sint32.yaml000066400000000000000000000026531443101201700232240ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - i: sint32 barectf-3.1.2/tests/tracing/configs/basic/int/sint64.yaml000066400000000000000000000026531443101201700232310ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - i: sint64 barectf-3.1.2/tests/tracing/configs/basic/int/sint8.yaml000066400000000000000000000026521443101201700231460ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - i: sint8 barectf-3.1.2/tests/tracing/configs/basic/int/uint-bit-fields-wrap.yaml000066400000000000000000000046711443101201700260520ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - u1: field-type: class: uint size: 1 - u3: field-type: class: uint size: 3 - u2: field-type: class: uint size: 2 - u5: field-type: class: uint size: 5 - u4: field-type: class: uint size: 4 - u7: field-type: class: uint size: 7 - u6: field-type: class: uint size: 6 - u23: field-type: class: uint size: 23 - u55: field-type: class: uint size: 55 barectf-3.1.2/tests/tracing/configs/basic/int/uint-bit-fields.yaml000066400000000000000000000046711443101201700251030ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - u1: field-type: class: uint size: 1 - u3: field-type: class: uint size: 3 - u2: field-type: class: uint size: 2 - u5: field-type: class: uint size: 5 - u4: field-type: class: uint size: 4 - u7: field-type: class: uint size: 7 - u6: field-type: class: uint size: 6 - u23: field-type: class: uint size: 23 - u55: field-type: class: uint size: 55 barectf-3.1.2/tests/tracing/configs/basic/int/uint16.yaml000066400000000000000000000026531443101201700232300ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - u: uint16 barectf-3.1.2/tests/tracing/configs/basic/int/uint32.yaml000066400000000000000000000026531443101201700232260ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - u: uint32 barectf-3.1.2/tests/tracing/configs/basic/int/uint64.yaml000066400000000000000000000026531443101201700232330ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - u: uint64 barectf-3.1.2/tests/tracing/configs/basic/int/uint8.yaml000066400000000000000000000026521443101201700231500ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - u: uint8 barectf-3.1.2/tests/tracing/configs/basic/real/000077500000000000000000000000001443101201700213415ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/basic/real/double.yaml000066400000000000000000000026541443101201700235060ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdreal.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - r: double barectf-3.1.2/tests/tracing/configs/basic/real/float.yaml000066400000000000000000000026531443101201700233400ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdreal.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - r: float barectf-3.1.2/tests/tracing/configs/basic/static-array/000077500000000000000000000000001443101201700230215ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/basic/static-array/nested-5-uint8.yaml000066400000000000000000000041161443101201700264000ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: static-array length: 2 element-field-type: class: static-array length: 2 element-field-type: class: static-array length: 2 element-field-type: class: static-array length: 2 element-field-type: class: static-array length: 2 element-field-type: uint8 barectf-3.1.2/tests/tracing/configs/basic/static-array/of-double.yaml000066400000000000000000000031041443101201700255570ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdreal.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: static-array length: 4 element-field-type: double barectf-3.1.2/tests/tracing/configs/basic/static-array/of-static-array-of-double.yaml000066400000000000000000000032761443101201700305740ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdreal.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: static-array length: 2 element-field-type: class: static-array length: 3 element-field-type: double barectf-3.1.2/tests/tracing/configs/basic/static-array/of-static-array-of-str.yaml000066400000000000000000000032731443101201700301270ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdmisc.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: static-array length: 2 element-field-type: class: static-array length: 3 element-field-type: str barectf-3.1.2/tests/tracing/configs/basic/static-array/of-static-array-of-uint8.yaml000066400000000000000000000032741443101201700303670ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: static-array length: 2 element-field-type: class: static-array length: 3 element-field-type: uint8 barectf-3.1.2/tests/tracing/configs/basic/static-array/of-str.yaml000066400000000000000000000031011443101201700251120ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdmisc.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: static-array length: 3 element-field-type: str barectf-3.1.2/tests/tracing/configs/basic/static-array/of-uint3-middle.yaml000066400000000000000000000033231443101201700266060ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml - stdmisc.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - before: uint32 - array: field-type: class: static-array length: 5 element-field-type: class: uint size: 3 - after: str barectf-3.1.2/tests/tracing/configs/basic/static-array/of-uint3.yaml000066400000000000000000000032001443101201700253440ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: static-array length: 5 element-field-type: class: uint size: 3 barectf-3.1.2/tests/tracing/configs/basic/static-array/of-uint8.yaml000066400000000000000000000031021443101201700253520ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - array: field-type: class: static-array length: 7 element-field-type: uint8 barectf-3.1.2/tests/tracing/configs/basic/static-array/zero-len.yaml000066400000000000000000000033451443101201700254450ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - before: uint8 - array: field-type: class: static-array length: 0 element-field-type: class: uint size: 8 alignment: 64 - after: uint8 barectf-3.1.2/tests/tracing/configs/basic/string/000077500000000000000000000000001443101201700217245ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/basic/string/empty.yaml000066400000000000000000000026511443101201700237520ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdmisc.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - s: str barectf-3.1.2/tests/tracing/configs/basic/string/string.yaml000066400000000000000000000026511443101201700241220ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdmisc.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - s: str barectf-3.1.2/tests/tracing/configs/basic/struct/000077500000000000000000000000001443101201700217425ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/basic/struct/empty.yaml000066400000000000000000000025711443101201700237710ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdmisc.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct barectf-3.1.2/tests/tracing/configs/basic/struct/five-members.yaml000066400000000000000000000033311443101201700252070ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdint.yaml - stdreal.yaml - stdmisc.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - m1: uint8 - m2: double - m3: str - m4: field-type: class: static-array length: 4 element-field-type: float - m5: sint32 barectf-3.1.2/tests/tracing/configs/basic/struct/one-member.yaml000066400000000000000000000026511443101201700246600ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base.yaml - stdmisc.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: struct members: - s: str barectf-3.1.2/tests/tracing/configs/counter-clock/000077500000000000000000000000001443101201700221055ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/counter-clock/dst-er-features/000077500000000000000000000000001443101201700251175ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/counter-clock/dst-er-features/ts-uint32.yaml000066400000000000000000000025621443101201700275600ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml - stdint.yaml data-stream-types: default: $features: event-record: timestamp-field-type: uint32 barectf-3.1.2/tests/tracing/configs/counter-clock/dst-er-features/ts.yaml000066400000000000000000000025341443101201700264350ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml data-stream-types: default: $features: event-record: timestamp-field-type: true barectf-3.1.2/tests/tracing/configs/counter-clock/dst-er-features/type-id-uint8.yaml000066400000000000000000000025571443101201700304340ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml - stdint.yaml data-stream-types: default: $features: event-record: type-id-field-type: uint8 barectf-3.1.2/tests/tracing/configs/counter-clock/dst-packet-features/000077500000000000000000000000001443101201700257605ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/counter-clock/dst-packet-features/beg-end-ts-multi.yaml000066400000000000000000000026131443101201700317230ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml data-stream-types: default: $features: packet: beginning-timestamp-field-type: true end-timestamp-field-type: true barectf-3.1.2/tests/tracing/configs/counter-clock/dst-packet-features/beg-end-ts.yaml000066400000000000000000000026131443101201700305730ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml data-stream-types: default: $features: packet: beginning-timestamp-field-type: true end-timestamp-field-type: true barectf-3.1.2/tests/tracing/configs/counter-clock/dst-packet-features/beg-ts-multi.yaml000066400000000000000000000025401443101201700311560ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml data-stream-types: default: $features: packet: beginning-timestamp-field-type: true barectf-3.1.2/tests/tracing/configs/counter-clock/dst-packet-features/beg-ts-uint32.yaml000066400000000000000000000025661443101201700311600ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml - stdint.yaml data-stream-types: default: $features: packet: beginning-timestamp-field-type: uint32 barectf-3.1.2/tests/tracing/configs/counter-clock/dst-packet-features/beg-ts.yaml000066400000000000000000000025401443101201700300260ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml data-stream-types: default: $features: packet: beginning-timestamp-field-type: true disc-er-counter-snapshot-uint8.yaml000066400000000000000000000026121443101201700344730ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/counter-clock/dst-packet-features# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml - stdint.yaml data-stream-types: default: $features: packet: discarded-event-records-counter-snapshot-field-type: uint8 barectf-3.1.2/tests/tracing/configs/counter-clock/dst-packet-features/disc-er-counter-snapshot.yaml000066400000000000000000000026111443101201700335040ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml - stdint.yaml data-stream-types: default: $features: packet: discarded-event-records-counter-snapshot-field-type: true barectf-3.1.2/tests/tracing/configs/counter-clock/dst-packet-features/end-ts-multi.yaml000066400000000000000000000025321443101201700311700ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml data-stream-types: default: $features: packet: end-timestamp-field-type: true barectf-3.1.2/tests/tracing/configs/counter-clock/dst-packet-features/end-ts-uint32.yaml000066400000000000000000000025601443101201700311630ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml - stdint.yaml data-stream-types: default: $features: packet: end-timestamp-field-type: uint32 barectf-3.1.2/tests/tracing/configs/counter-clock/dst-packet-features/end-ts.yaml000066400000000000000000000025321443101201700300400ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml data-stream-types: default: $features: packet: end-timestamp-field-type: true barectf-3.1.2/tests/tracing/configs/counter-clock/dst-packet-features/none.yaml000066400000000000000000000023441443101201700276060ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml barectf-3.1.2/tests/tracing/configs/counter-clock/dst-packet-features/seq-num.yaml000066400000000000000000000030431443101201700302310ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2022 Jon Lamb # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml data-stream-types: default: $features: packet: sequence-number-field-type: true event-record-types: ev: payload-field-type: class: struct members: - s: field-type: class: string barectf-3.1.2/tests/tracing/configs/counter-clock/dst-packet-features/sizes-uint16.yaml000066400000000000000000000026311443101201700311270ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml - stdint.yaml data-stream-types: default: $features: packet: total-size-field-type: uint16 content-size-field-type: uint16 barectf-3.1.2/tests/tracing/configs/counter-clock/dst/000077500000000000000000000000001443101201700226775ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/counter-clock/dst/er-common-ctx.yaml000066400000000000000000000026761443101201700262660ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml - stdint.yaml - stdmisc.yaml data-stream-types: default: event-record-common-context-field-type: class: structure members: - s: str - u: uint32 barectf-3.1.2/tests/tracing/configs/counter-clock/ert/000077500000000000000000000000001443101201700226775ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/counter-clock/ert/ll.yaml000066400000000000000000000027231443101201700241760ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml - stdint.yaml data-stream-types: default: event-record-types: ev: log-level: 7 payload-field-type: class: structure members: - u: uint32 barectf-3.1.2/tests/tracing/configs/counter-clock/ert/payload.yaml000066400000000000000000000027501443101201700252200ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml - stdint.yaml - stdmisc.yaml data-stream-types: default: event-record-types: ev: payload-field-type: class: structure members: - s: str - u: uint32 barectf-3.1.2/tests/tracing/configs/counter-clock/ert/spec-ctx-payload.yaml000066400000000000000000000031071443101201700267410ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml - stdint.yaml - stdmisc.yaml data-stream-types: default: event-record-types: ev: specific-context-field-type: class: structure members: - s: str payload-field-type: class: structure members: - u: uint32 barectf-3.1.2/tests/tracing/configs/counter-clock/ert/spec-ctx.yaml000066400000000000000000000027611443101201700253170ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml - stdint.yaml - stdmisc.yaml data-stream-types: default: event-record-types: ev: specific-context-field-type: class: structure members: - s: str - u: uint32 barectf-3.1.2/tests/tracing/configs/counter-clock/trace-type-features/000077500000000000000000000000001443101201700257765ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/counter-clock/trace-type-features/dst-id-uint8.yaml000066400000000000000000000024631443101201700311200ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml - stdint.yaml $features: data-stream-type-id-field-type: uint8 barectf-3.1.2/tests/tracing/configs/counter-clock/trace-type-features/magic-hex.yaml000066400000000000000000000025341443101201700305300ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml - stdint.yaml $features: magic-field-type: $inherit: uint32 preferred-display-base: hex barectf-3.1.2/tests/tracing/configs/counter-clock/trace-type-features/magic.yaml000066400000000000000000000024201443101201700277400ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml $features: magic-field-type: true barectf-3.1.2/tests/tracing/configs/counter-clock/trace-type-features/none.yaml000066400000000000000000000023441443101201700276240ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml barectf-3.1.2/tests/tracing/configs/counter-clock/trace-type-features/uuid-hex.yaml000066400000000000000000000027301443101201700304140ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml - stdint.yaml $features: uuid-field-type: class: static-array length: 16 element-field-type: $inherit: uint8 preferred-display-base: hex uuid: 79e49040-21b5-42d4-a83b-646f78666b62 barectf-3.1.2/tests/tracing/configs/counter-clock/trace-type-features/uuid.yaml000066400000000000000000000024761443101201700276410ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - base-no-features.yaml $features: uuid-field-type: true uuid: 79e49040-21b5-42d4-a83b-646f78666b62 barectf-3.1.2/tests/tracing/configs/packet-set-buf/000077500000000000000000000000001443101201700221475ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/packet-set-buf/packet-set-buf/000077500000000000000000000000001443101201700247615ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/configs/packet-set-buf/packet-set-buf/packet-set-buf.yaml000066400000000000000000000035231443101201700304620ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. %YAML 1.2 --- ! trace: type: $include: - stdint.yaml - stdmisc.yaml native-byte-order: le $features: magic-field-type: false uuid-field-type: false data-stream-type-id-field-type: uint8 data-stream-types: default: $is-default: true $features: packet: total-size-field-type: uint8 content-size-field-type: uint8 discarded-event-records-counter-snapshot-field-type: false event-record: type-id-field-type: uint8 event-record-types: ev: payload-field-type: class: struct members: - s: str barectf-3.1.2/tests/tracing/conftest.py000066400000000000000000000160431443101201700201100ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import pytest import os import os.path import barectf import shutil import subprocess import tempfile def pytest_collect_file(parent, path): yaml_ext = '.yaml' if path.ext != yaml_ext: # not a YAML file: cancel return # If `path` is # `/home/jo/barectf/tests/tracing/configs/basic/static-array/of-str.yaml`, # for example, then: # # `cat`: # `basic` # # `subcat`: # `static-array` # # `file_name`: # `of-str.yaml` path_str = str(path) file_name = os.path.basename(path_str) subcat_dir = os.path.dirname(path_str) subcat = os.path.basename(subcat_dir) cat_dir = os.path.dirname(subcat_dir) cat = os.path.basename(cat_dir) configs_dir = os.path.dirname(cat_dir) valid_cats = { 'basic', 'counter-clock', 'basic-extra-pc-ft-members', } if cat not in valid_cats or os.path.basename(configs_dir) != 'configs': # not a YAML configuration test return # create C source, expectation file, and support directory paths base_dir = os.path.dirname(configs_dir) base_name = file_name.replace(yaml_ext, '') subcat_rel_dir = os.path.join(cat, subcat) src_path = os.path.join(base_dir, 'src', subcat_rel_dir, f'{base_name}.c') data_expect_path = os.path.join(base_dir, 'expect', subcat_rel_dir, f'{base_name}.data.expect') metadata_expect_path = os.path.join(base_dir, 'expect', subcat_rel_dir, f'{base_name}.metadata.expect') support_dir_path = os.path.join(base_dir, 'support', cat) # create the file node return _YamlFile.from_parent(parent, fspath=path, src_path=src_path, data_expect_path=data_expect_path, metadata_expect_path=metadata_expect_path, support_dir_path=support_dir_path, name=f'test-{cat}-{subcat}-{base_name}') class _YamlFile(pytest.File): def __init__(self, parent, fspath, src_path, data_expect_path, metadata_expect_path, support_dir_path, name): super().__init__(parent=parent, fspath=fspath) self._name = name self._src_path = src_path self._data_expect_path = data_expect_path self._metadata_expect_path = metadata_expect_path self._support_dir_path = support_dir_path def collect(self): # yield a single item yield _YamlItem.from_parent(self, name=self._name, src_path=self._src_path, data_expect_path=self._data_expect_path, metadata_expect_path=self._metadata_expect_path, support_dir_path=self._support_dir_path) class _YamlItem(pytest.Item): def __init__(self, parent, name, src_path, data_expect_path, metadata_expect_path, support_dir_path): super().__init__(parent=parent, name=name) self._src_path = src_path self._data_expect_path = data_expect_path self._metadata_expect_path = metadata_expect_path self._support_dir_path = support_dir_path def runtest(self): # create a temporary directory tmpdir = tempfile.TemporaryDirectory(prefix='pytest-barectf') # create barectf configuration with open(self.fspath) as f: cfg = barectf.configuration_from_file(f, inclusion_directories=[self._support_dir_path]) # generate and write C code files cg = barectf.CodeGenerator(cfg) files = cg.generate_c_headers() files += cg.generate_c_sources() for file in files: with open(os.path.join(tmpdir.name, file.name), 'w') as f: f.write(file.contents) # generate metadata stream, stripping the version and date file = cg.generate_metadata_stream() lines = file.contents.split('\n') new_lines = [] discard_patterns = [ 'Copyright (c)', 'The following code was generated', '* on ', 'barectf_gen_date =', 'tracer_major =', 'tracer_minor =', 'tracer_patch =', 'tracer_pre =', ] for line in lines: skip = False for pattern in discard_patterns: if pattern in line: skip = True if skip: continue new_lines.append(line) actual_metadata = '\n'.join(new_lines) # copy Makefile to build directory shutil.copy(os.path.join(self._support_dir_path, 'Makefile'), tmpdir.name) # copy platform files to build directory shutil.copy(os.path.join(self._support_dir_path, 'test-platform.c'), tmpdir.name) shutil.copy(os.path.join(self._support_dir_path, 'test-platform.h'), tmpdir.name) # copy specific source code file to build directory shutil.copy(self._src_path, os.path.join(tmpdir.name, 'test.c')) # build the test subprocess.check_output(['make'], cwd=tmpdir.name) # run the test (produce the data stream) subprocess.check_output(['./test'], cwd=tmpdir.name) # read actual stream with open(os.path.join(tmpdir.name, 'stream'), 'rb') as f: actual_stream = f.read() # read data stream expectation file with open(self._data_expect_path, 'rb') as f: expected_stream = f.read() # read metadata stream expectation file with open(self._metadata_expect_path, 'r') as f: expected_metadata = f.read() # validate streams assert actual_metadata == expected_metadata assert actual_stream == expected_stream # delete temporary directory tmpdir.cleanup() def repr_failure(self, excinfo, style=None): return f'`{self.fspath}` failed: {excinfo}.' def reportinfo(self): return self.fspath, None, self.name barectf-3.1.2/tests/tracing/expect/000077500000000000000000000000001443101201700171755ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/basic-extra-pc-ft-members/000077500000000000000000000000001443101201700240365ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/basic-extra-pc-ft-members/extra-pc-ft-members/000077500000000000000000000000001443101201700276205ustar00rootroot00000000000000extra-pc-ft-members.data.expect000066400000000000000000000010001443101201700354340ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/basic-extra-pc-ft-members/extra-pc-ft-membersÁüÁ0salutextra-pc-ft-members.metadata.expect000066400000000000000000000044761443101201700363270ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/basic-extra-pc-ft-members/extra-pc-ft-members/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } a; string { encoding = UTF8; } b; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/000077500000000000000000000000001443101201700202565ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/basic/byte-order/000077500000000000000000000000001443101201700223325ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/basic/byte-order/trace-byte-order-big-endian.data.expect000066400000000000000000000004001443101201700316110ustar00rootroot00000000000000ØWhen she was younger, Akko went to a magic show hosted by a witch named Shiny Chariot.0Akko was so inspired that she dreamed to someday be a cool witch.barectf-3.1.2/tests/tracing/expect/basic/byte-order/trace-byte-order-big-endian.metadata.expect000066400000000000000000000035341443101201700324730ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = be; packet.header := struct { } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { packet.context := struct { integer { signed = false; size = 16; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 16; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { } align(8); }; event { id = 0; name = "my_event"; fields := struct { string { encoding = UTF8; } my_field; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/ds/000077500000000000000000000000001443101201700206645ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/basic/ds/no-dst-id.data.expect000066400000000000000000000004001443101201700245760ustar00rootroot00000000000000ØWhen she was younger, Akko went to a magic show hosted by a witch named Shiny Chariot.0Akko was so inspired that she dreamed to someday be a cool witch.barectf-3.1.2/tests/tracing/expect/basic/ds/no-dst-id.metadata.expect000066400000000000000000000035341443101201700254600ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { packet.context := struct { integer { signed = false; size = 16; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 16; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { } align(8); }; event { id = 0; name = "my_event"; fields := struct { string { encoding = UTF8; } my_field; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/ds/two-packets.data.expect000066400000000000000000000004001443101201700252410ustar00rootroot00000000000000ÁüÁThe things you used to own, now they own you.ÁüÁhMay I never be complete. May I never be content. May I never be perfect.barectf-3.1.2/tests/tracing/expect/basic/ds/two-packets.metadata.expect000066400000000000000000000042551443101201700261240ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { string { encoding = UTF8; } s; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/000077500000000000000000000000001443101201700230165ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/nested-5-uint8.data.expect000066400000000000000000000010001443101201700276200ustar00rootroot00000000000000ÁüÁÀ   barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/nested-5-uint8.metadata.expect000066400000000000000000000045751443101201700305130ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } __array_len; integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } array[__array_len][2][2][2][2]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-double.data.expect000066400000000000000000000010001443101201700270030ustar00rootroot00000000000000ÁüÁ€…ëQ¸ @{®Gáz@JxÞ±Aœ¢#¹ü‡Ì?barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-double.metadata.expect000066400000000000000000000045561443101201700276750ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } __array_len; floating_point { mant_dig = 53; exp_dig = 11; align = 64; byte_order = native; } array[__array_len]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-static-array-of-double.data.expect000066400000000000000000000010001443101201700320060ustar00rootroot00000000000000ÁüÁÀ€1Àö(\Âõ.@H@Qkšwœ¢Ã?= ×£p\@eÍÍA€1Àö(\Âõ.@H@barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-static-array-of-double.metadata.expect000066400000000000000000000045611443101201700326740ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } __array_len; floating_point { mant_dig = 53; exp_dig = 11; align = 64; byte_order = native; } array[__array_len][3]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-static-array-of-str.data.expect000066400000000000000000000010001443101201700313440ustar00rootroot00000000000000ÁüÁ€OfficiasitlaboreExcepteurlaborenonbarectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-static-array-of-str.metadata.expect000066400000000000000000000044631443101201700322330ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } __array_len; string { encoding = UTF8; } array[__array_len][3]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-static-array-of-uint8.data.expect000066400000000000000000000010001443101201700316030ustar00rootroot00000000000000ÁüÁˆbarectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-static-array-of-uint8.metadata.expect000066400000000000000000000045641443101201700324740ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } __array_len; integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } array[__array_len][3]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-str.data.expect000066400000000000000000000010001443101201700263410ustar00rootroot00000000000000ÁüÁÈLoremipsumquisbarectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-str.metadata.expect000066400000000000000000000044601443101201700272250ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } __array_len; string { encoding = UTF8; } array[__array_len]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-uint3-middle.data.expect000066400000000000000000000010001443101201700300270ustar00rootroot00000000000000ÁüÁ¨@âïhello!barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-uint3-middle.metadata.expect000066400000000000000000000050111443101201700307040ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 32; align = 32; byte_order = native; base = 10; } before; integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } __array_len; integer { signed = false; size = 3; align = 1; byte_order = native; base = 10; } array[__array_len]; string { encoding = UTF8; } after; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-uint3.data.expect000066400000000000000000000010001443101201700265730ustar00rootroot00000000000000ÁüÁUïbarectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-uint3.metadata.expect000066400000000000000000000045611443101201700274610ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } __array_len; integer { signed = false; size = 3; align = 1; byte_order = native; base = 10; } array[__array_len]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-uint8.data.expect000066400000000000000000000010001443101201700266000ustar00rootroot00000000000000ÁüÁx barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/of-uint8.metadata.expect000066400000000000000000000045611443101201700274660ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } __array_len; integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } array[__array_len]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/zero-len.data.expect000066400000000000000000000010001443101201700266620ustar00rootroot00000000000000ÁüÁˆ±barectf-3.1.2/tests/tracing/expect/basic/dynamic-array/zero-len.metadata.expect000066400000000000000000000051111443101201700275400ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } before; integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } __array_len; integer { signed = false; size = 8; align = 64; byte_order = native; base = 10; } array[__array_len]; integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } after; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/enum/000077500000000000000000000000001443101201700212225ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/basic/enum/senum16.data.expect000066400000000000000000000010001443101201700246310ustar00rootroot00000000000000ÁüÁ0™Ôbarectf-3.1.2/tests/tracing/expect/basic/enum/senum16.metadata.expect000066400000000000000000000044071443101201700255160ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { enum : integer { signed = true; size = 16; align = 8; byte_order = native; base = 10; } { "A" = 0, } e; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/enum/senum32.data.expect000066400000000000000000000010001443101201700246270ustar00rootroot00000000000000ÁüÁ@ë2¤øbarectf-3.1.2/tests/tracing/expect/basic/enum/senum32.metadata.expect000066400000000000000000000044071443101201700255140ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { enum : integer { signed = true; size = 32; align = 8; byte_order = native; base = 10; } { "A" = 0, } e; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/enum/senum64.data.expect000066400000000000000000000010001443101201700246340ustar00rootroot00000000000000ÁüÁ`AR!5!1õbarectf-3.1.2/tests/tracing/expect/basic/enum/senum64.metadata.expect000066400000000000000000000044071443101201700255210ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { enum : integer { signed = true; size = 64; align = 8; byte_order = native; base = 10; } { "A" = 0, } e; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/enum/senum8.data.expect000066400000000000000000000010001443101201700245520ustar00rootroot00000000000000ÁüÁ(€barectf-3.1.2/tests/tracing/expect/basic/enum/senum8.metadata.expect000066400000000000000000000044061443101201700254360ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { enum : integer { signed = true; size = 8; align = 8; byte_order = native; base = 10; } { "A" = 0, } e; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/enum/uenum16.data.expect000066400000000000000000000010001443101201700246330ustar00rootroot00000000000000ÁüÁ0õjbarectf-3.1.2/tests/tracing/expect/basic/enum/uenum16.metadata.expect000066400000000000000000000044101443101201700255120ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { enum : integer { signed = false; size = 16; align = 8; byte_order = native; base = 10; } { "A" = 0, } e; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/enum/uenum32.data.expect000066400000000000000000000010001443101201700246310ustar00rootroot00000000000000ÁüÁ@ï¾­Þbarectf-3.1.2/tests/tracing/expect/basic/enum/uenum32.metadata.expect000066400000000000000000000044101443101201700255100ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { enum : integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } { "A" = 0, } e; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/enum/uenum64.data.expect000066400000000000000000000010001443101201700246360ustar00rootroot00000000000000ÁüÁ`ï¾­ÞÊÞÎúbarectf-3.1.2/tests/tracing/expect/basic/enum/uenum64.metadata.expect000066400000000000000000000044101443101201700255150ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { enum : integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } { "A" = 0, } e; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/enum/uenum8.data.expect000066400000000000000000000010001443101201700245540ustar00rootroot00000000000000ÁüÁ(barectf-3.1.2/tests/tracing/expect/basic/enum/uenum8.metadata.expect000066400000000000000000000044071443101201700254410ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { enum : integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } { "A" = 0, } e; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/int/000077500000000000000000000000001443101201700210505ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/basic/int/sint-bit-fields-wrap.data.expect000066400000000000000000000010001443101201700271250ustar00rootroot00000000000000ÁüÁŠ)D barectf-3.1.2/tests/tracing/expect/basic/int/sint-bit-fields-wrap.metadata.expect000066400000000000000000000060521443101201700300100ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = true; size = 1; align = 1; byte_order = native; base = 10; } i1; integer { signed = true; size = 3; align = 1; byte_order = native; base = 10; } i3; integer { signed = true; size = 2; align = 1; byte_order = native; base = 10; } i2; integer { signed = true; size = 5; align = 1; byte_order = native; base = 10; } i5; integer { signed = true; size = 4; align = 1; byte_order = native; base = 10; } i4; integer { signed = true; size = 7; align = 1; byte_order = native; base = 10; } i7; integer { signed = true; size = 6; align = 1; byte_order = native; base = 10; } i6; integer { signed = true; size = 23; align = 1; byte_order = native; base = 10; } i23; integer { signed = true; size = 55; align = 1; byte_order = native; base = 10; } i55; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/int/sint-bit-fields.data.expect000066400000000000000000000010001443101201700261560ustar00rootroot00000000000000ÁüÁŠ›.§Äõ¸U[ŸŠd?barectf-3.1.2/tests/tracing/expect/basic/int/sint-bit-fields.metadata.expect000066400000000000000000000060521443101201700270410ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = true; size = 1; align = 1; byte_order = native; base = 10; } i1; integer { signed = true; size = 3; align = 1; byte_order = native; base = 10; } i3; integer { signed = true; size = 2; align = 1; byte_order = native; base = 10; } i2; integer { signed = true; size = 5; align = 1; byte_order = native; base = 10; } i5; integer { signed = true; size = 4; align = 1; byte_order = native; base = 10; } i4; integer { signed = true; size = 7; align = 1; byte_order = native; base = 10; } i7; integer { signed = true; size = 6; align = 1; byte_order = native; base = 10; } i6; integer { signed = true; size = 23; align = 1; byte_order = native; base = 10; } i23; integer { signed = true; size = 55; align = 1; byte_order = native; base = 10; } i55; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/int/sint16.data.expect000066400000000000000000000010001443101201700243050ustar00rootroot00000000000000ÁüÁ0™Ôbarectf-3.1.2/tests/tracing/expect/basic/int/sint16.metadata.expect000066400000000000000000000043571443101201700251760ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = true; size = 16; align = 16; byte_order = native; base = 10; } i; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/int/sint32.data.expect000066400000000000000000000010001443101201700243030ustar00rootroot00000000000000ÁüÁ@ë2¤øbarectf-3.1.2/tests/tracing/expect/basic/int/sint32.metadata.expect000066400000000000000000000043571443101201700251740ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = true; size = 32; align = 32; byte_order = native; base = 10; } i; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/int/sint64.data.expect000066400000000000000000000010001443101201700243100ustar00rootroot00000000000000ÁüÁ€AR!5!1õbarectf-3.1.2/tests/tracing/expect/basic/int/sint64.metadata.expect000066400000000000000000000043571443101201700252010ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = true; size = 64; align = 64; byte_order = native; base = 10; } i; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/int/sint8.data.expect000066400000000000000000000010001443101201700242260ustar00rootroot00000000000000ÁüÁ(€barectf-3.1.2/tests/tracing/expect/basic/int/sint8.metadata.expect000066400000000000000000000043551443101201700251150ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = true; size = 8; align = 8; byte_order = native; base = 10; } i; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/int/uint-bit-fields-wrap.data.expect000066400000000000000000000010001443101201700271270ustar00rootroot00000000000000ÁüÁŠbarectf-3.1.2/tests/tracing/expect/basic/int/uint-bit-fields-wrap.metadata.expect000066400000000000000000000060631443101201700300140ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 1; align = 1; byte_order = native; base = 10; } u1; integer { signed = false; size = 3; align = 1; byte_order = native; base = 10; } u3; integer { signed = false; size = 2; align = 1; byte_order = native; base = 10; } u2; integer { signed = false; size = 5; align = 1; byte_order = native; base = 10; } u5; integer { signed = false; size = 4; align = 1; byte_order = native; base = 10; } u4; integer { signed = false; size = 7; align = 1; byte_order = native; base = 10; } u7; integer { signed = false; size = 6; align = 1; byte_order = native; base = 10; } u6; integer { signed = false; size = 23; align = 1; byte_order = native; base = 10; } u23; integer { signed = false; size = 55; align = 1; byte_order = native; base = 10; } u55; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/int/uint-bit-fields.data.expect000066400000000000000000000010001443101201700261600ustar00rootroot00000000000000ÁüÁŠ{KrKâÿÿÿÿÿÿÿÿbarectf-3.1.2/tests/tracing/expect/basic/int/uint-bit-fields.metadata.expect000066400000000000000000000060631443101201700270450ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 1; align = 1; byte_order = native; base = 10; } u1; integer { signed = false; size = 3; align = 1; byte_order = native; base = 10; } u3; integer { signed = false; size = 2; align = 1; byte_order = native; base = 10; } u2; integer { signed = false; size = 5; align = 1; byte_order = native; base = 10; } u5; integer { signed = false; size = 4; align = 1; byte_order = native; base = 10; } u4; integer { signed = false; size = 7; align = 1; byte_order = native; base = 10; } u7; integer { signed = false; size = 6; align = 1; byte_order = native; base = 10; } u6; integer { signed = false; size = 23; align = 1; byte_order = native; base = 10; } u23; integer { signed = false; size = 55; align = 1; byte_order = native; base = 10; } u55; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/int/uint16.data.expect000066400000000000000000000010001443101201700243070ustar00rootroot00000000000000ÁüÁ0õjbarectf-3.1.2/tests/tracing/expect/basic/int/uint16.metadata.expect000066400000000000000000000043601443101201700251720ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 16; align = 16; byte_order = native; base = 10; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/int/uint32.data.expect000066400000000000000000000010001443101201700243050ustar00rootroot00000000000000ÁüÁ@ï¾­Þbarectf-3.1.2/tests/tracing/expect/basic/int/uint32.metadata.expect000066400000000000000000000043601443101201700251700ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 32; align = 32; byte_order = native; base = 10; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/int/uint64.data.expect000066400000000000000000000010001443101201700243120ustar00rootroot00000000000000ÁüÁ€ï¾­ÞÊÞÎúbarectf-3.1.2/tests/tracing/expect/basic/int/uint64.metadata.expect000066400000000000000000000043601443101201700251750ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 64; align = 64; byte_order = native; base = 10; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/int/uint8.data.expect000066400000000000000000000010001443101201700242300ustar00rootroot00000000000000ÁüÁ(barectf-3.1.2/tests/tracing/expect/basic/int/uint8.metadata.expect000066400000000000000000000043561443101201700251200ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/real/000077500000000000000000000000001443101201700212015ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/basic/real/double.data.expect000066400000000000000000000010001443101201700245640ustar00rootroot00000000000000ÁüÁ€DATû! @barectf-3.1.2/tests/tracing/expect/basic/real/double.metadata.expect000066400000000000000000000043531443101201700254510ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { floating_point { mant_dig = 53; exp_dig = 11; align = 64; byte_order = native; } r; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/real/float.data.expect000066400000000000000000000010001443101201700244170ustar00rootroot00000000000000ÁüÁ@ÛI@barectf-3.1.2/tests/tracing/expect/basic/real/float.metadata.expect000066400000000000000000000043521443101201700253030ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { floating_point { mant_dig = 24; exp_dig = 8; align = 32; byte_order = native; } r; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/static-array/000077500000000000000000000000001443101201700226615ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/basic/static-array/nested-5-uint8.data.expect000066400000000000000000000010001443101201700274630ustar00rootroot00000000000000ÁüÁ   barectf-3.1.2/tests/tracing/expect/basic/static-array/nested-5-uint8.metadata.expect000066400000000000000000000044011443101201700303420ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } array[2][2][2][2][2]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/static-array/of-double.data.expect000066400000000000000000000010001443101201700266460ustar00rootroot00000000000000ÁüÁ@…ëQ¸ @{®Gáz@JxÞ±Aœ¢#¹ü‡Ì?barectf-3.1.2/tests/tracing/expect/basic/static-array/of-double.metadata.expect000066400000000000000000000043621443101201700275330ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { floating_point { mant_dig = 53; exp_dig = 11; align = 64; byte_order = native; } array[4]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/static-array/of-static-array-of-double.data.expect000066400000000000000000000010001443101201700316510ustar00rootroot00000000000000ÁüÁÀ€1Àö(\Âõ.@H@Qkšwœ¢Ã?= ×£p\@eÍÍAbarectf-3.1.2/tests/tracing/expect/basic/static-array/of-static-array-of-double.metadata.expect000066400000000000000000000043651443101201700325410ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { floating_point { mant_dig = 53; exp_dig = 11; align = 64; byte_order = native; } array[2][3]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/static-array/of-static-array-of-str.data.expect000066400000000000000000000010001443101201700312070ustar00rootroot00000000000000ÁüÁ`OfficiasitlaboreExcepteurlaborenonbarectf-3.1.2/tests/tracing/expect/basic/static-array/of-static-array-of-str.metadata.expect000066400000000000000000000042671443101201700321000ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { string { encoding = UTF8; } array[2][3]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/static-array/of-static-array-of-uint8.data.expect000066400000000000000000000010001443101201700314460ustar00rootroot00000000000000ÁüÁPbarectf-3.1.2/tests/tracing/expect/basic/static-array/of-static-array-of-uint8.metadata.expect000066400000000000000000000043701443101201700323320ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } array[2][3]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/static-array/of-str.data.expect000066400000000000000000000010001443101201700262040ustar00rootroot00000000000000ÁüÁ¨Loremipsumquisbarectf-3.1.2/tests/tracing/expect/basic/static-array/of-str.metadata.expect000066400000000000000000000042641443101201700270720ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { string { encoding = UTF8; } array[3]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/static-array/of-uint3-middle.data.expect000066400000000000000000000010001443101201700276720ustar00rootroot00000000000000ÁüÁˆ@âïhello!barectf-3.1.2/tests/tracing/expect/basic/static-array/of-uint3-middle.metadata.expect000066400000000000000000000046151443101201700305600ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 32; align = 32; byte_order = native; base = 10; } before; integer { signed = false; size = 3; align = 1; byte_order = native; base = 10; } array[5]; string { encoding = UTF8; } after; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/static-array/of-uint3.data.expect000066400000000000000000000010001443101201700264360ustar00rootroot00000000000000ÁüÁ/ïbarectf-3.1.2/tests/tracing/expect/basic/static-array/of-uint3.metadata.expect000066400000000000000000000043651443101201700273260ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 3; align = 1; byte_order = native; base = 10; } array[5]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/static-array/of-uint8.data.expect000066400000000000000000000010001443101201700264430ustar00rootroot00000000000000ÁüÁX barectf-3.1.2/tests/tracing/expect/basic/static-array/of-uint8.metadata.expect000066400000000000000000000043651443101201700273330ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } array[7]; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/static-array/zero-len.data.expect000066400000000000000000000010001443101201700265250ustar00rootroot00000000000000ÁüÁˆ±barectf-3.1.2/tests/tracing/expect/basic/static-array/zero-len.metadata.expect000066400000000000000000000047151443101201700274140ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } before; integer { signed = false; size = 8; align = 64; byte_order = native; base = 10; } array[0]; integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } after; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/string/000077500000000000000000000000001443101201700215645ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/basic/string/empty.data.expect000066400000000000000000000010001443101201700250330ustar00rootroot00000000000000ÁüÁ(barectf-3.1.2/tests/tracing/expect/basic/string/empty.metadata.expect000066400000000000000000000042551443101201700257210ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { string { encoding = UTF8; } s; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/string/string.data.expect000066400000000000000000000010001443101201700252030ustar00rootroot00000000000000ÁüÁÈYou are not special.barectf-3.1.2/tests/tracing/expect/basic/string/string.metadata.expect000066400000000000000000000042551443101201700260710ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { string { encoding = UTF8; } s; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/struct/000077500000000000000000000000001443101201700216025ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/basic/struct/empty.data.expect000066400000000000000000000010001443101201700250510ustar00rootroot00000000000000ÁüÁ barectf-3.1.2/tests/tracing/expect/basic/struct/empty.metadata.expect000066400000000000000000000042071443101201700257340ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/struct/five-members.data.expect000066400000000000000000000010001443101201700262740ustar00rootroot00000000000000ÁüÁàw¾Ÿ/Ý^@This was freedom. Losing all hope was freedom.€? @zDáú›ÂA1õbarectf-3.1.2/tests/tracing/expect/basic/struct/five-members.metadata.expect000066400000000000000000000051131443101201700271540ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } m1; floating_point { mant_dig = 53; exp_dig = 11; align = 64; byte_order = native; } m2; string { encoding = UTF8; } m3; floating_point { mant_dig = 24; exp_dig = 8; align = 32; byte_order = native; } m4[4]; integer { signed = true; size = 32; align = 32; byte_order = native; base = 10; } m5; } align(1); }; barectf-3.1.2/tests/tracing/expect/basic/struct/one-member.data.expect000066400000000000000000000010001443101201700257410ustar00rootroot00000000000000ÁüÁxThe lower you fall, the higher you'll fly.barectf-3.1.2/tests/tracing/expect/basic/struct/one-member.metadata.expect000066400000000000000000000042551443101201700266270ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { string { encoding = UTF8; } s; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/000077500000000000000000000000001443101201700217455ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/counter-clock/dst-er-features/000077500000000000000000000000001443101201700247575ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/counter-clock/dst-er-features/ts-uint32.data.expect000066400000000000000000000010001443101201700306400ustar00rootroot00000000000000phelloworld!barectf-3.1.2/tests/tracing/expect/counter-clock/dst-er-features/ts-uint32.metadata.expect000066400000000000000000000045031443101201700315220ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; integer { signed = false; size = 32; align = 32; byte_order = native; base = 10; map = clock.default.value; } timestamp; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/dst-er-features/ts.data.expect000066400000000000000000000010001443101201700275160ustar00rootroot00000000000000°helloworld!barectf-3.1.2/tests/tracing/expect/counter-clock/dst-er-features/ts.metadata.expect000066400000000000000000000045021443101201700303770ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; map = clock.default.value; } timestamp; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/dst-er-features/type-id-uint8.data.expect000066400000000000000000000010001443101201700315100ustar00rootroot00000000000000øhellobarectf-3.1.2/tests/tracing/expect/counter-clock/dst-er-features/type-id-uint8.metadata.expect000066400000000000000000000042631443101201700323750ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/000077500000000000000000000000001443101201700256205ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/beg-end-ts-multi.data.expect000066400000000000000000000004001443101201700330110ustar00rootroot00000000000000Àbarectf˜is°great !beg-end-ts-multi.metadata.expect000066400000000000000000000047321443101201700336150ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; map = clock.default.value; } timestamp_begin; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; map = clock.default.value; } timestamp_end; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/beg-end-ts.data.expect000066400000000000000000000010001443101201700316560ustar00rootroot00000000000000@barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/beg-end-ts.metadata.expect000066400000000000000000000047321443101201700325440ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; map = clock.default.value; } timestamp_begin; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; map = clock.default.value; } timestamp_end; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/beg-ts-multi.data.expect000066400000000000000000000004001443101201700322450ustar00rootroot00000000000000€barectfXispgreatP!barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/beg-ts-multi.metadata.expect000066400000000000000000000045101443101201700331220ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; map = clock.default.value; } timestamp_begin; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/beg-ts-uint32.data.expect000066400000000000000000000010001443101201700322340ustar00rootroot00000000000000àbarectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/beg-ts-uint32.metadata.expect000066400000000000000000000045111443101201700331150ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; integer { signed = false; size = 32; align = 32; byte_order = native; base = 10; map = clock.default.value; } timestamp_begin; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/beg-ts.data.expect000066400000000000000000000010001443101201700311120ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/beg-ts.metadata.expect000066400000000000000000000045101443101201700317720ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; map = clock.default.value; } timestamp_begin; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; disc-er-counter-snapshot-uint8.data.expect000066400000000000000000000010001443101201700355570ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-featuresÈdisc-er-counter-snapshot-uint8.metadata.expect000066400000000000000000000044521443101201700364440ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } events_discarded; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; disc-er-counter-snapshot.data.expect000066400000000000000000000010001443101201700345120ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-featuresdisc-er-counter-snapshot.metadata.expect000066400000000000000000000044531443101201700354000ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } events_discarded; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/end-ts-multi.data.expect000066400000000000000000000004001443101201700322560ustar00rootroot00000000000000€barectfXispgreatP!barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/end-ts-multi.metadata.expect000066400000000000000000000045061443101201700331400ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; map = clock.default.value; } timestamp_end; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/end-ts-uint32.data.expect000066400000000000000000000010001443101201700322450ustar00rootroot00000000000000àbarectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/end-ts-uint32.metadata.expect000066400000000000000000000045071443101201700331330ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; integer { signed = false; size = 32; align = 32; byte_order = native; base = 10; map = clock.default.value; } timestamp_end; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/end-ts.data.expect000066400000000000000000000010001443101201700311230ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/end-ts.metadata.expect000066400000000000000000000045061443101201700320100ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; map = clock.default.value; } timestamp_end; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/none.data.expect000066400000000000000000000010001443101201700306700ustar00rootroot00000000000000Àbarectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/none.metadata.expect000066400000000000000000000042641443101201700315560ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/seq-num.data.expect000066400000000000000000000004001443101201700313210ustar00rootroot00000000000000ÀI feel special.ÀI feel special.ÀI feel special.ÀI feel special.barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/seq-num.metadata.expect000066400000000000000000000046431443101201700322050ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_seq_num; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; event { stream_id = 0; id = 1; name = "ev"; fields := struct { string { encoding = UTF8; } s; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/sizes-uint16.data.expect000066400000000000000000000010001443101201700322120ustar00rootroot00000000000000`barectf-3.1.2/tests/tracing/expect/counter-clock/dst-packet-features/sizes-uint16.metadata.expect000066400000000000000000000042661443101201700331020ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 16; align = 16; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 16; align = 16; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/dst/000077500000000000000000000000001443101201700225375ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/counter-clock/dst/er-common-ctx.data.expect000066400000000000000000000010001443101201700273400ustar00rootroot00000000000000Ðsome context¾¾¾¾hellobarectf-3.1.2/tests/tracing/expect/counter-clock/dst/er-common-ctx.metadata.expect000066400000000000000000000045531443101201700302270ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); event.context := struct { string { encoding = UTF8; } s; integer { signed = false; size = 32; align = 32; byte_order = native; base = 10; } u; } align(1); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/ert/000077500000000000000000000000001443101201700225375ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/counter-clock/ert/ll.data.expect000066400000000000000000000010001443101201700252570ustar00rootroot00000000000000 ÞÀ­Þbarectf-3.1.2/tests/tracing/expect/counter-clock/ert/ll.metadata.expect000066400000000000000000000046001443101201700261370ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; event { stream_id = 0; id = 1; name = "ev"; loglevel = 7; fields := struct { integer { signed = false; size = 32; align = 32; byte_order = native; base = 10; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/ert/payload.data.expect000066400000000000000000000010001443101201700263010ustar00rootroot00000000000000 some context¾¾¾¾barectf-3.1.2/tests/tracing/expect/counter-clock/ert/payload.metadata.expect000066400000000000000000000046271443101201700271720ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; event { stream_id = 0; id = 1; name = "ev"; fields := struct { string { encoding = UTF8; } s; integer { signed = false; size = 32; align = 32; byte_order = native; base = 10; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/ert/spec-ctx-payload.data.expect000066400000000000000000000010001443101201700300250ustar00rootroot00000000000000 some context¾¾¾¾barectf-3.1.2/tests/tracing/expect/counter-clock/ert/spec-ctx-payload.metadata.expect000066400000000000000000000046711443101201700307150ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; event { stream_id = 0; id = 1; name = "ev"; context := struct { string { encoding = UTF8; } s; } align(1); fields := struct { integer { signed = false; size = 32; align = 32; byte_order = native; base = 10; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/ert/spec-ctx.data.expect000066400000000000000000000010001443101201700263760ustar00rootroot00000000000000 some context¾¾¾¾barectf-3.1.2/tests/tracing/expect/counter-clock/ert/spec-ctx.metadata.expect000066400000000000000000000046301443101201700272610ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; event { stream_id = 0; id = 1; name = "ev"; context := struct { string { encoding = UTF8; } s; integer { signed = false; size = 32; align = 32; byte_order = native; base = 10; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/trace-type-features/000077500000000000000000000000001443101201700256365ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/counter-clock/trace-type-features/dst-id-uint8.data.expect000066400000000000000000000010001443101201700322000ustar00rootroot00000000000000ˆbarectf-3.1.2/tests/tracing/expect/counter-clock/trace-type-features/dst-id-uint8.metadata.expect000066400000000000000000000042631443101201700330650ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/trace-type-features/magic-hex.data.expect000066400000000000000000000010001443101201700316110ustar00rootroot00000000000000ÁüÁàbarectf-3.1.2/tests/tracing/expect/counter-clock/trace-type-features/magic-hex.metadata.expect000066400000000000000000000044411443101201700324740ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 32; byte_order = native; base = 16; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/trace-type-features/magic.data.expect000066400000000000000000000010001443101201700310270ustar00rootroot00000000000000ÁüÁàbarectf-3.1.2/tests/tracing/expect/counter-clock/trace-type-features/magic.metadata.expect000066400000000000000000000044401443101201700317110ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 32; align = 8; byte_order = native; base = 10; } magic; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/trace-type-features/none.data.expect000066400000000000000000000010001443101201700307060ustar00rootroot00000000000000Àbarectf-3.1.2/tests/tracing/expect/counter-clock/trace-type-features/none.metadata.expect000066400000000000000000000042641443101201700315740ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/trace-type-features/uuid-hex.data.expect000066400000000000000000000010001443101201700314770ustar00rootroot00000000000000yä@!µBÔ¨;doxfkb@barectf-3.1.2/tests/tracing/expect/counter-clock/trace-type-features/uuid-hex.metadata.expect000066400000000000000000000045221443101201700323620ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; uuid = "79e49040-21b5-42d4-a83b-646f78666b62"; packet.header := struct { integer { signed = false; size = 8; align = 8; byte_order = native; base = 16; } uuid[16]; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/counter-clock/trace-type-features/uuid.data.expect000066400000000000000000000010001443101201700307150ustar00rootroot00000000000000yä@!µBÔ¨;doxfkb@barectf-3.1.2/tests/tracing/expect/counter-clock/trace-type-features/uuid.metadata.expect000066400000000000000000000045221443101201700316000ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; uuid = "79e49040-21b5-42d4-a83b-646f78666b62"; packet.header := struct { integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } uuid[16]; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; clock { name = default; freq = 1000000000; precision = 0; offset_s = 0; offset = 0; absolute = false; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 64; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "dummy"; fields := struct { string { encoding = UTF8; } u; } align(1); }; barectf-3.1.2/tests/tracing/expect/packet-set-buf/000077500000000000000000000000001443101201700220075ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/packet-set-buf/packet-set-buf/000077500000000000000000000000001443101201700246215ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/expect/packet-set-buf/packet-set-buf/packet-set-buf.data.expect000066400000000000000000000000401443101201700315470ustar00rootroot00000000000000€€abcdefghijk€€01234567890barectf-3.1.2/tests/tracing/expect/packet-set-buf/packet-set-buf/packet-set-buf.metadata.expect000066400000000000000000000040751443101201700324320ustar00rootroot00000000000000/* CTF 1.8 */ /* * The MIT License (MIT) * * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * * For more details, see . */ trace { major = 1; minor = 8; byte_order = le; packet.header := struct { integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } stream_id; } align(8); }; env { domain = "bare"; tracer_name = "barectf"; }; /* Data stream type `default` */ stream { id = 0; packet.context := struct { integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } packet_size; integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } content_size; } align(8); event.header := struct { integer { signed = false; size = 8; align = 8; byte_order = native; base = 10; } id; } align(8); }; event { stream_id = 0; id = 0; name = "ev"; fields := struct { string { encoding = UTF8; } s; } align(1); }; barectf-3.1.2/tests/tracing/src/000077500000000000000000000000001443101201700164745ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/basic-extra-pc-ft-members/000077500000000000000000000000001443101201700233355ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/basic-extra-pc-ft-members/extra-pc-ft-members/000077500000000000000000000000001443101201700271175ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/basic-extra-pc-ft-members/extra-pc-ft-members/extra-pc-ft-members.c000066400000000000000000000026271443101201700330540ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/000077500000000000000000000000001443101201700175555ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/basic/byte-order/000077500000000000000000000000001443101201700216315ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/basic/byte-order/trace-byte-order-big-endian.c000066400000000000000000000032721443101201700271440ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(128); assert(platform_ctx); barectf_default_trace_my_event(test_platform_barectf_ctx(platform_ctx), "When she was younger, Akko went to a magic show hosted by a witch named Shiny Chariot."); barectf_default_trace_my_event(test_platform_barectf_ctx(platform_ctx), "Akko was so inspired that she dreamed to someday be a cool witch."); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/ds/000077500000000000000000000000001443101201700201635ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/basic/ds/no-dst-id.c000066400000000000000000000032721443101201700221310ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(128); assert(platform_ctx); barectf_default_trace_my_event(test_platform_barectf_ctx(platform_ctx), "When she was younger, Akko went to a magic show hosted by a witch named Shiny Chariot."); barectf_default_trace_my_event(test_platform_barectf_ctx(platform_ctx), "Akko was so inspired that she dreamed to someday be a cool witch."); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/ds/two-packets.c000066400000000000000000000032201443101201700225650ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(128); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), "The things you used to own, now they own you."); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), "May I never be complete. May I never be content. May I never be perfect."); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/dynamic-array/000077500000000000000000000000001443101201700223155ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/basic/dynamic-array/nested-5-uint8.c000066400000000000000000000070671443101201700251640ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const uint8_t subsubsubsubarray1[] = {1, 2}; const uint8_t subsubsubsubarray2[] = {3, 4}; const uint8_t subsubsubsubarray3[] = {5, 6}; const uint8_t subsubsubsubarray4[] = {7, 8}; const uint8_t subsubsubsubarray5[] = {9, 10}; const uint8_t subsubsubsubarray6[] = {11, 12}; const uint8_t subsubsubsubarray7[] = {13, 14}; const uint8_t subsubsubsubarray8[] = {15, 16}; const uint8_t subsubsubsubarray9[] = {17, 18}; const uint8_t subsubsubsubarray10[] = {19, 20}; const uint8_t subsubsubsubarray11[] = {21, 22}; const uint8_t subsubsubsubarray12[] = {23, 24}; const uint8_t subsubsubsubarray13[] = {25, 26}; const uint8_t subsubsubsubarray14[] = {27, 28}; const uint8_t subsubsubsubarray15[] = {29, 30}; const uint8_t subsubsubsubarray16[] = {31, 32}; const uint8_t * const subsubsubarray1[] = {subsubsubsubarray1, subsubsubsubarray2}; const uint8_t * const subsubsubarray2[] = {subsubsubsubarray3, subsubsubsubarray4}; const uint8_t * const subsubsubarray3[] = {subsubsubsubarray5, subsubsubsubarray6}; const uint8_t * const subsubsubarray4[] = {subsubsubsubarray7, subsubsubsubarray8}; const uint8_t * const subsubsubarray5[] = {subsubsubsubarray9, subsubsubsubarray10}; const uint8_t * const subsubsubarray6[] = {subsubsubsubarray11, subsubsubsubarray12}; const uint8_t * const subsubsubarray7[] = {subsubsubsubarray13, subsubsubsubarray14}; const uint8_t * const subsubsubarray8[] = {subsubsubsubarray15, subsubsubsubarray16}; const uint8_t * const * const subsubarray1[] = {subsubsubarray1, subsubsubarray2}; const uint8_t * const * const subsubarray2[] = {subsubsubarray3, subsubsubarray4}; const uint8_t * const * const subsubarray3[] = {subsubsubarray5, subsubsubarray6}; const uint8_t * const * const subsubarray4[] = {subsubsubarray7, subsubsubarray8}; const uint8_t * const * const * const subarray1[] = {subsubarray1, subsubarray2}; const uint8_t * const * const * const subarray2[] = {subsubarray3, subsubarray4}; const uint8_t * const * const * const subarray3[] = {subsubarray1, subsubarray4}; const uint8_t * const * const * const * const array[] = {subarray1, subarray2, subarray3}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 3, array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/dynamic-array/of-double.c000066400000000000000000000030131443101201700243320ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const double array[] = {3.14, 6.62, 299792458., 0.2229}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 4, array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/dynamic-array/of-static-array-of-double.c000066400000000000000000000031721443101201700273430ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const double subarray1[] = {-17.5, 15.48, 1001.}; const double subarray2[] = {.1534, 555.555, 1e9}; const double * const array[] = {subarray1, subarray2, subarray1}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 3, array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/dynamic-array/of-static-array-of-str.c000066400000000000000000000031751443101201700267040ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const char * const str1[] = {"Officia", "sit", "labore"}; const char * const str2[] = {"Excepteur", "labore", "non"}; const char * const * const array[] = {str1, str2}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 2, array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/dynamic-array/of-static-array-of-uint8.c000066400000000000000000000031711443101201700271370ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const uint8_t subarray1[] = {1, 2, 3}; const uint8_t subarray2[] = {4, 5, 6}; const uint8_t * const array[] = {subarray1, subarray2, subarray1}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 3, array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/dynamic-array/of-str.c000066400000000000000000000030131443101201700236700ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const char * const array[] = {"Lorem", "ipsum", "quis"}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 3, array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/dynamic-array/of-uint3-middle.c000066400000000000000000000030431443101201700253610ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const uint8_t array[] = {7, 5, 3, 2, 1}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 123456, 5, array, "hello!"); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/dynamic-array/of-uint3.c000066400000000000000000000030251443101201700241250ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const uint8_t array[] = {7, 5, 3, 2, 1, 0, 4}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 7, array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/dynamic-array/of-uint8.c000066400000000000000000000030261443101201700241330ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const uint8_t array[] = {1, 1, 2, 3, 5, 8, 13}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 7, array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/dynamic-array/zero-len.c000066400000000000000000000027571443101201700242270ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 23, 0, NULL, 177); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/enum/000077500000000000000000000000001443101201700205215ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/basic/enum/senum16.c000066400000000000000000000027331443101201700221700ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), -11111); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/enum/senum32.c000066400000000000000000000027371443101201700221720ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), -123456789); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/enum/senum64.c000066400000000000000000000027631443101201700221760ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), UINT64_C(-0xacedecadeadbeef)); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/enum/senum8.c000066400000000000000000000027311443101201700221070ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), -128); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/enum/uenum16.c000066400000000000000000000027321443101201700221710ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 27381); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/enum/uenum32.c000066400000000000000000000027371443101201700221740ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 0xdeadbeef); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/enum/uenum64.c000066400000000000000000000027631443101201700222000ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), UINT64_C(0xfacedecadeadbeef)); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/enum/uenum8.c000066400000000000000000000027301443101201700221100ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 144); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/int/000077500000000000000000000000001443101201700203475ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/basic/int/sint-bit-fields-wrap.c000066400000000000000000000030231443101201700244550ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 1, 4, 2, 16, 8, 64, 32, 4194304, UINT64_C(18014398509481984)); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/int/sint-bit-fields.c000066400000000000000000000030231443101201700235060ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), -1, -3, 1, -6, 5, -50, 18, -2388132, UINT64_C(8712631872362)); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/int/sint16.c000066400000000000000000000027331443101201700216440ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), -11111); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/int/sint32.c000066400000000000000000000027371443101201700216460ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), -123456789); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/int/sint64.c000066400000000000000000000027631443101201700216520ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), UINT64_C(-0xacedecadeadbeef)); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/int/sint8.c000066400000000000000000000027311443101201700215630ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), -128); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/int/uint-bit-fields-wrap.c000066400000000000000000000030251443101201700244610ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 2, 8, 4, 32, 16, 128, 64, 8388608, UINT64_C(36028797018963968)); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/int/uint-bit-fields.c000066400000000000000000000030241443101201700235110ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 1, 5, 3, 13, 9, 100, 45, 8388132, UINT64_C(36028797018963967)); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/int/uint16.c000066400000000000000000000027321443101201700216450ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 27381); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/int/uint32.c000066400000000000000000000027371443101201700216500ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 0xdeadbeef); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/int/uint64.c000066400000000000000000000027631443101201700216540ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), UINT64_C(0xfacedecadeadbeef)); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/int/uint8.c000066400000000000000000000027301443101201700215640ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 144); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/real/000077500000000000000000000000001443101201700205005ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/basic/real/double.c000066400000000000000000000027151443101201700221230ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 3.1415926535); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/real/float.c000066400000000000000000000027161443101201700217570ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 3.1415926535f); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/static-array/000077500000000000000000000000001443101201700221605ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/basic/static-array/nested-5-uint8.c000066400000000000000000000067261443101201700250300ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const uint8_t subsubsubsubarray1[] = {1, 2}; const uint8_t subsubsubsubarray2[] = {3, 4}; const uint8_t subsubsubsubarray3[] = {5, 6}; const uint8_t subsubsubsubarray4[] = {7, 8}; const uint8_t subsubsubsubarray5[] = {9, 10}; const uint8_t subsubsubsubarray6[] = {11, 12}; const uint8_t subsubsubsubarray7[] = {13, 14}; const uint8_t subsubsubsubarray8[] = {15, 16}; const uint8_t subsubsubsubarray9[] = {17, 18}; const uint8_t subsubsubsubarray10[] = {19, 20}; const uint8_t subsubsubsubarray11[] = {21, 22}; const uint8_t subsubsubsubarray12[] = {23, 24}; const uint8_t subsubsubsubarray13[] = {25, 26}; const uint8_t subsubsubsubarray14[] = {27, 28}; const uint8_t subsubsubsubarray15[] = {29, 30}; const uint8_t subsubsubsubarray16[] = {31, 32}; const uint8_t * const subsubsubarray1[] = {subsubsubsubarray1, subsubsubsubarray2}; const uint8_t * const subsubsubarray2[] = {subsubsubsubarray3, subsubsubsubarray4}; const uint8_t * const subsubsubarray3[] = {subsubsubsubarray5, subsubsubsubarray6}; const uint8_t * const subsubsubarray4[] = {subsubsubsubarray7, subsubsubsubarray8}; const uint8_t * const subsubsubarray5[] = {subsubsubsubarray9, subsubsubsubarray10}; const uint8_t * const subsubsubarray6[] = {subsubsubsubarray11, subsubsubsubarray12}; const uint8_t * const subsubsubarray7[] = {subsubsubsubarray13, subsubsubsubarray14}; const uint8_t * const subsubsubarray8[] = {subsubsubsubarray15, subsubsubsubarray16}; const uint8_t * const * const subsubarray1[] = {subsubsubarray1, subsubsubarray2}; const uint8_t * const * const subsubarray2[] = {subsubsubarray3, subsubsubarray4}; const uint8_t * const * const subsubarray3[] = {subsubsubarray5, subsubsubarray6}; const uint8_t * const * const subsubarray4[] = {subsubsubarray7, subsubsubarray8}; const uint8_t * const * const * const subarray1[] = {subsubarray1, subsubarray2}; const uint8_t * const * const * const subarray2[] = {subsubarray3, subsubarray4}; const uint8_t * const * const * const * const array[] = {subarray1, subarray2}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/static-array/of-double.c000066400000000000000000000030101443101201700241720ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const double array[] = {3.14, 6.62, 299792458., 0.2229}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/static-array/of-static-array-of-double.c000066400000000000000000000031541443101201700272060ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const double subarray1[] = {-17.5, 15.48, 1001.}; const double subarray2[] = {.1534, 555.555, 1e9}; const double * const array[] = {subarray1, subarray2}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/static-array/of-static-array-of-str.c000066400000000000000000000031721443101201700265440ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const char * const str1[] = {"Officia", "sit", "labore"}; const char * const str2[] = {"Excepteur", "labore", "non"}; const char * const * const array[] = {str1, str2}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/static-array/of-static-array-of-uint8.c000066400000000000000000000031531443101201700270020ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const uint8_t subarray1[] = {1, 2, 3}; const uint8_t subarray2[] = {4, 5, 6}; const uint8_t * const array[] = {subarray1, subarray2}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/static-array/of-str.c000066400000000000000000000030101443101201700235300ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const char * const array[] = {"Lorem", "ipsum", "quis"}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/static-array/of-uint3-middle.c000066400000000000000000000030401443101201700252210ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const uint8_t array[] = {7, 5, 3, 2, 1}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 123456, array, "hello!"); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/static-array/of-uint3.c000066400000000000000000000030141443101201700237660ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const uint8_t array[] = {7, 5, 3, 2, 1}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/static-array/of-uint8.c000066400000000000000000000030231443101201700237730ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; const uint8_t array[] = {1, 1, 2, 3, 5, 8, 13}; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), array); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/static-array/zero-len.c000066400000000000000000000027521443101201700240650ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx *platform_ctx; platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 23, NULL, 177); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/string/000077500000000000000000000000001443101201700210635ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/basic/string/empty.c000066400000000000000000000027031443101201700223670ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), ""); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/string/string.c000066400000000000000000000027311443101201700225400ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), "You are not special."); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/struct/000077500000000000000000000000001443101201700211015ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/basic/struct/empty.c000066400000000000000000000026771443101201700224170ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx)); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/struct/five-members.c000066400000000000000000000031161443101201700236270ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { const float array[] = {1.f, 2.5f, 1000.423f, -77.99f}; struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 144, 123.456, "This was freedom. Losing all hope was freedom.", array, -0xacebeef); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/basic/struct/one-member.c000066400000000000000000000027571443101201700233060ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), "The lower you fall, the higher you'll fly."); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/000077500000000000000000000000001443101201700212445ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/counter-clock/dst-er-features/000077500000000000000000000000001443101201700242565ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/counter-clock/dst-er-features/ts-uint32.c000066400000000000000000000031371443101201700261760ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); struct barectf_default_ctx *ctx; assert(platform_ctx); ctx = test_platform_barectf_ctx(platform_ctx); assert(ctx); barectf_trace_dummy(ctx, "hello"); barectf_trace_dummy(ctx, "world"); barectf_trace_dummy(ctx, "!"); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst-er-features/ts.c000066400000000000000000000031371443101201700250540ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); struct barectf_default_ctx *ctx; assert(platform_ctx); ctx = test_platform_barectf_ctx(platform_ctx); assert(ctx); barectf_trace_dummy(ctx, "hello"); barectf_trace_dummy(ctx, "world"); barectf_trace_dummy(ctx, "!"); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst-er-features/type-id-uint8.c000066400000000000000000000030331443101201700270410ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); struct barectf_default_ctx *ctx; assert(platform_ctx); ctx = test_platform_barectf_ctx(platform_ctx); assert(ctx); barectf_trace_dummy(ctx, "hello"); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst-packet-features/000077500000000000000000000000001443101201700251175ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/counter-clock/dst-packet-features/beg-end-ts-multi.c000066400000000000000000000033741443101201700303470ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(64); struct barectf_default_ctx *ctx; assert(platform_ctx); ctx = test_platform_barectf_ctx(platform_ctx); assert(ctx); barectf_trace_dummy(ctx, "barectf"); test_platform_new_packet(platform_ctx); barectf_trace_dummy(ctx, "is"); test_platform_new_packet(platform_ctx); barectf_trace_dummy(ctx, "great"); test_platform_new_packet(platform_ctx); barectf_trace_dummy(ctx, "!"); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst-packet-features/beg-end-ts.c000066400000000000000000000026271443101201700272170ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst-packet-features/beg-ts-multi.c000066400000000000000000000033741443101201700276030ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(64); struct barectf_default_ctx *ctx; assert(platform_ctx); ctx = test_platform_barectf_ctx(platform_ctx); assert(ctx); barectf_trace_dummy(ctx, "barectf"); test_platform_new_packet(platform_ctx); barectf_trace_dummy(ctx, "is"); test_platform_new_packet(platform_ctx); barectf_trace_dummy(ctx, "great"); test_platform_new_packet(platform_ctx); barectf_trace_dummy(ctx, "!"); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst-packet-features/beg-ts-uint32.c000066400000000000000000000026271443101201700275750ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst-packet-features/beg-ts.c000066400000000000000000000026271443101201700264530ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst-packet-features/disc-er-counter-snapshot-uint8.c000066400000000000000000000026271443101201700331770ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst-packet-features/disc-er-counter-snapshot.c000066400000000000000000000026271443101201700321320ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst-packet-features/end-ts-multi.c000066400000000000000000000033741443101201700276140ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(64); struct barectf_default_ctx *ctx; assert(platform_ctx); ctx = test_platform_barectf_ctx(platform_ctx); assert(ctx); barectf_trace_dummy(ctx, "barectf"); test_platform_new_packet(platform_ctx); barectf_trace_dummy(ctx, "is"); test_platform_new_packet(platform_ctx); barectf_trace_dummy(ctx, "great"); test_platform_new_packet(platform_ctx); barectf_trace_dummy(ctx, "!"); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst-packet-features/end-ts-uint32.c000066400000000000000000000026271443101201700276060ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst-packet-features/end-ts.c000066400000000000000000000026271443101201700264640ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst-packet-features/none.c000066400000000000000000000026271443101201700262310ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst-packet-features/seq-num.c000066400000000000000000000040471443101201700266550ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2022 Jon Lamb * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(64); assert(platform_ctx); assert(barectf_packet_sequence_number(test_platform_barectf_ctx(platform_ctx)) == 0); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), "I feel special."); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), "I feel special."); assert(barectf_packet_sequence_number(test_platform_barectf_ctx(platform_ctx)) == 1); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), "I feel special."); assert(barectf_packet_sequence_number(test_platform_barectf_ctx(platform_ctx)) == 2); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), "I feel special."); assert(barectf_packet_sequence_number(test_platform_barectf_ctx(platform_ctx)) == 3); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst-packet-features/sizes-uint16.c000066400000000000000000000026271443101201700275530ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/dst/000077500000000000000000000000001443101201700220365ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/counter-clock/dst/er-common-ctx.c000066400000000000000000000027751443101201700247050ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_dummy(test_platform_barectf_ctx(platform_ctx), "some context", 0xbebebebe, "hello"); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/ert/000077500000000000000000000000001443101201700220365ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/counter-clock/ert/ll.c000066400000000000000000000027371443101201700226220ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), 0xdeadc0de); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/ert/payload.c000066400000000000000000000027611443101201700236410ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), "some context", 0xbebebebe); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/ert/spec-ctx-payload.c000066400000000000000000000027611443101201700253650ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), "some context", 0xbebebebe); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/ert/spec-ctx.c000066400000000000000000000027611443101201700237360ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), "some context", 0xbebebebe); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/trace-type-features/000077500000000000000000000000001443101201700251355ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/counter-clock/trace-type-features/dst-id-uint8.c000066400000000000000000000026271443101201700275410ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/trace-type-features/magic-hex.c000066400000000000000000000026271443101201700271520ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/trace-type-features/magic.c000066400000000000000000000026271443101201700263700ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/trace-type-features/none.c000066400000000000000000000026271443101201700262470ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/trace-type-features/uuid-hex.c000066400000000000000000000026271443101201700270400ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/counter-clock/trace-type-features/uuid.c000066400000000000000000000026271443101201700262560ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(512); assert(platform_ctx); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/src/packet-set-buf/000077500000000000000000000000001443101201700213065ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/packet-set-buf/packet-set-buf/000077500000000000000000000000001443101201700241205ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/src/packet-set-buf/packet-set-buf/packet-set-buf.c000066400000000000000000000030601443101201700270750ustar00rootroot00000000000000/* * The MIT License (MIT) * * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "test-platform.h" #include "barectf.h" int main(void) { struct test_platform_ctx * const platform_ctx = test_platform_init(16); assert(platform_ctx); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), "abcdefghijk"); barectf_trace_ev(test_platform_barectf_ctx(platform_ctx), "01234567890"); test_platform_fini(platform_ctx); return 0; } barectf-3.1.2/tests/tracing/support/000077500000000000000000000000001443101201700174215ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/support/basic-extra-pc-ft-members/000077500000000000000000000000001443101201700242625ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/support/basic-extra-pc-ft-members/Makefile000066400000000000000000000025201443101201700257210ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. CFLAGS += -O0 -g -Wall -pedantic -Wno-unused-function TARGET = test OBJS = $(TARGET).o barectf.o test-platform.o $(TARGET): $(OBJS) $(CC) -o $@ $(LDFLAGS) $^ barectf.o: barectf.c $(CC) $(CFLAGS) -ansi -c $< barectf-3.1.2/tests/tracing/support/basic-extra-pc-ft-members/base.yaml000066400000000000000000000010231443101201700260540ustar00rootroot00000000000000native-byte-order: le data-stream-types: default: $is-default: true $features: packet: discarded-event-records-counter-snapshot-field-type: false packet-context-field-type-extra-members: - a: field-type: class: uint size: 32 - b: field-type: class: str event-record-types: dummy: payload-field-type: class: struct members: - u: field-type: class: str barectf-3.1.2/tests/tracing/support/basic-extra-pc-ft-members/test-platform.c000066400000000000000000000060401443101201700272270ustar00rootroot00000000000000/* * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include #include #include #include "barectf.h" #include "test-platform.h" struct test_platform_ctx { struct barectf_default_ctx ctx; FILE *fh; }; static void write_packet(struct test_platform_ctx * const platform_ctx) { const size_t nmemb = fwrite(barectf_packet_buf(&platform_ctx->ctx), barectf_packet_buf_size(&platform_ctx->ctx), 1, platform_ctx->fh); assert(nmemb == 1); } static int is_backend_full(void * const data) { return 0; } static void open_packet(void * const data) { struct test_platform_ctx * const platform_ctx = (void *) data; memset(barectf_packet_buf(&platform_ctx->ctx), 0, barectf_packet_buf_size(&platform_ctx->ctx)); barectf_default_open_packet(&platform_ctx->ctx, 23, "salut"); } static void close_packet(void * const data) { struct test_platform_ctx * const platform_ctx = (void *) data; barectf_default_close_packet(&platform_ctx->ctx); write_packet(platform_ctx); } struct test_platform_ctx *test_platform_init(const size_t buf_size) { uint8_t *buf; struct test_platform_ctx *platform_ctx; struct barectf_platform_callbacks cbs; cbs.is_backend_full = is_backend_full; cbs.open_packet = open_packet; cbs.close_packet = close_packet; platform_ctx = malloc(sizeof(*platform_ctx)); assert(platform_ctx); buf = malloc(buf_size); assert(buf); platform_ctx->fh = fopen("stream", "wb"); assert(platform_ctx->fh); barectf_init(&platform_ctx->ctx, buf, buf_size, cbs, platform_ctx); open_packet(platform_ctx); return platform_ctx; } void test_platform_fini(struct test_platform_ctx * const platform_ctx) { if (barectf_packet_is_open(&platform_ctx->ctx)) { close_packet(platform_ctx); } fclose(platform_ctx->fh); free(barectf_packet_buf(&platform_ctx->ctx)); free(platform_ctx); } struct barectf_default_ctx *test_platform_barectf_ctx( struct test_platform_ctx * const platform_ctx) { return &platform_ctx->ctx; } barectf-3.1.2/tests/tracing/support/basic-extra-pc-ft-members/test-platform.h000066400000000000000000000030171443101201700272350ustar00rootroot00000000000000#ifndef _BARECTF_TEST_PLATFORM_H #define _BARECTF_TEST_PLATFORM_H /* * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include struct test_platform_ctx; struct barectf_default_ctx; struct test_platform_ctx *test_platform_init(size_t buf_size); void test_platform_fini(struct test_platform_ctx *platform_ctx); struct barectf_default_ctx *test_platform_barectf_ctx( struct test_platform_ctx *platform_ctx); #endif /* _BARECTF_TEST_PLATFORM_H */ barectf-3.1.2/tests/tracing/support/basic/000077500000000000000000000000001443101201700205025ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/support/basic/Makefile000066400000000000000000000025201443101201700221410ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. CFLAGS += -O0 -g -Wall -pedantic -Wno-unused-function TARGET = test OBJS = $(TARGET).o barectf.o test-platform.o $(TARGET): $(OBJS) $(CC) -o $@ $(LDFLAGS) $^ barectf.o: barectf.c $(CC) $(CFLAGS) -ansi -c $< barectf-3.1.2/tests/tracing/support/basic/base.yaml000066400000000000000000000002521443101201700222770ustar00rootroot00000000000000native-byte-order: le data-stream-types: default: $is-default: true $features: packet: discarded-event-records-counter-snapshot-field-type: false barectf-3.1.2/tests/tracing/support/basic/test-platform.c000066400000000000000000000061061443101201700234520ustar00rootroot00000000000000/* * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include #include #include #include "barectf.h" #include "test-platform.h" struct test_platform_ctx { struct barectf_default_ctx ctx; FILE *fh; }; static void write_packet(struct test_platform_ctx * const platform_ctx) { const size_t nmemb = fwrite(barectf_packet_buf(&platform_ctx->ctx), barectf_packet_buf_size(&platform_ctx->ctx), 1, platform_ctx->fh); assert(nmemb == 1); } static int is_backend_full(void * const data) { return 0; } static void open_packet(void * const data) { struct test_platform_ctx * const platform_ctx = (void *) data; memset(barectf_packet_buf(&platform_ctx->ctx), 0, barectf_packet_buf_size(&platform_ctx->ctx)); barectf_default_open_packet(&platform_ctx->ctx); } static void close_packet(void * const data) { struct test_platform_ctx * const platform_ctx = (void *) data; barectf_default_close_packet(&platform_ctx->ctx); write_packet(platform_ctx); } struct test_platform_ctx *test_platform_init(const size_t buf_size) { uint8_t *buf; struct test_platform_ctx *platform_ctx; struct barectf_platform_callbacks cbs; cbs.is_backend_full = is_backend_full; cbs.open_packet = open_packet; cbs.close_packet = close_packet; platform_ctx = malloc(sizeof(*platform_ctx)); assert(platform_ctx); buf = malloc(buf_size); assert(buf); platform_ctx->fh = fopen("stream", "wb"); assert(platform_ctx->fh); barectf_init(&platform_ctx->ctx, buf, buf_size, cbs, platform_ctx); open_packet(platform_ctx); return platform_ctx; } void test_platform_fini(struct test_platform_ctx * const platform_ctx) { if (barectf_packet_is_open(&platform_ctx->ctx) && !barectf_packet_is_empty(&platform_ctx->ctx)) { close_packet(platform_ctx); } fclose(platform_ctx->fh); free(barectf_packet_buf(&platform_ctx->ctx)); free(platform_ctx); } struct barectf_default_ctx *test_platform_barectf_ctx( struct test_platform_ctx * const platform_ctx) { return &platform_ctx->ctx; } barectf-3.1.2/tests/tracing/support/basic/test-platform.h000066400000000000000000000030171443101201700234550ustar00rootroot00000000000000#ifndef _BARECTF_TEST_PLATFORM_H #define _BARECTF_TEST_PLATFORM_H /* * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include struct test_platform_ctx; struct barectf_default_ctx; struct test_platform_ctx *test_platform_init(size_t buf_size); void test_platform_fini(struct test_platform_ctx *platform_ctx); struct barectf_default_ctx *test_platform_barectf_ctx( struct test_platform_ctx *platform_ctx); #endif /* _BARECTF_TEST_PLATFORM_H */ barectf-3.1.2/tests/tracing/support/counter-clock/000077500000000000000000000000001443101201700221715ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/support/counter-clock/Makefile000066400000000000000000000025201443101201700236300ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. CFLAGS += -O0 -g -Wall -pedantic -Wno-unused-function TARGET = test OBJS = $(TARGET).o barectf.o test-platform.o $(TARGET): $(OBJS) $(CC) -o $@ $(LDFLAGS) $^ barectf.o: barectf.c $(CC) $(CFLAGS) -ansi -c $< barectf-3.1.2/tests/tracing/support/counter-clock/base-no-features.yaml000066400000000000000000000005401443101201700262140ustar00rootroot00000000000000$include: [base.yaml] $features: magic-field-type: false uuid-field-type: false data-stream-types: default: $features: packet: beginning-timestamp-field-type: false end-timestamp-field-type: false discarded-event-records-counter-snapshot-field-type: false event-record: timestamp-field-type: false barectf-3.1.2/tests/tracing/support/counter-clock/base.yaml000066400000000000000000000005641443101201700237740ustar00rootroot00000000000000native-byte-order: le clock-types: default: origin-is-unix-epoch: false $c-type: uint64_t data-stream-types: default: $is-default: true $default-clock-type-name: default event-record-types: dummy: payload-field-type: class: struct members: - u: field-type: class: str barectf-3.1.2/tests/tracing/support/counter-clock/test-platform.c000066400000000000000000000070061443101201700251410ustar00rootroot00000000000000/* * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include #include #include #include "barectf.h" #include "test-platform.h" struct test_platform_ctx { struct barectf_default_ctx ctx; FILE *fh; uint64_t clock_val; }; static uint64_t get_clock_val(void * const data) { struct test_platform_ctx * const platform_ctx = (void *) data; const uint64_t ret = platform_ctx->clock_val; ++platform_ctx->clock_val; return ret; } static void write_packet(struct test_platform_ctx * const platform_ctx) { const size_t nmemb = fwrite(barectf_packet_buf(&platform_ctx->ctx), barectf_packet_buf_size(&platform_ctx->ctx), 1, platform_ctx->fh); assert(nmemb == 1); } static int is_backend_full(void * const data) { return 0; } static void open_packet(void * const data) { struct test_platform_ctx * const platform_ctx = (void *) data; memset(barectf_packet_buf(&platform_ctx->ctx), 0, barectf_packet_buf_size(&platform_ctx->ctx)); barectf_default_open_packet(&platform_ctx->ctx); } static void close_packet(void * const data) { struct test_platform_ctx * const platform_ctx = (void *) data; barectf_default_close_packet(&platform_ctx->ctx); write_packet(platform_ctx); } struct test_platform_ctx *test_platform_init(const size_t buf_size) { uint8_t *buf; struct test_platform_ctx *platform_ctx; struct barectf_platform_callbacks cbs; cbs.default_clock_get_value = get_clock_val; cbs.is_backend_full = is_backend_full; cbs.open_packet = open_packet; cbs.close_packet = close_packet; platform_ctx = malloc(sizeof(*platform_ctx)); assert(platform_ctx); platform_ctx->clock_val = 0; buf = malloc(buf_size); assert(buf); platform_ctx->fh = fopen("stream", "wb"); assert(platform_ctx->fh); barectf_init(&platform_ctx->ctx, buf, buf_size, cbs, platform_ctx); open_packet(platform_ctx); return platform_ctx; } void test_platform_fini(struct test_platform_ctx * const platform_ctx) { if (barectf_packet_is_open(&platform_ctx->ctx)) { close_packet(platform_ctx); } fclose(platform_ctx->fh); free(barectf_packet_buf(&platform_ctx->ctx)); free(platform_ctx); } struct barectf_default_ctx *test_platform_barectf_ctx( struct test_platform_ctx * const platform_ctx) { return &platform_ctx->ctx; } void test_platform_new_packet(struct test_platform_ctx * const platform_ctx) { if (barectf_packet_is_open(&platform_ctx->ctx)) { close_packet(platform_ctx); } open_packet(platform_ctx); } barectf-3.1.2/tests/tracing/support/counter-clock/test-platform.h000066400000000000000000000031261443101201700251450ustar00rootroot00000000000000#ifndef _BARECTF_TEST_PLATFORM_H #define _BARECTF_TEST_PLATFORM_H /* * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include struct test_platform_ctx; struct barectf_default_ctx; struct test_platform_ctx *test_platform_init(size_t buf_size); void test_platform_fini(struct test_platform_ctx *platform_ctx); struct barectf_default_ctx *test_platform_barectf_ctx( struct test_platform_ctx *platform_ctx); void test_platform_new_packet(struct test_platform_ctx *platform_ctx); #endif /* _BARECTF_TEST_PLATFORM_H */ barectf-3.1.2/tests/tracing/support/packet-set-buf/000077500000000000000000000000001443101201700222335ustar00rootroot00000000000000barectf-3.1.2/tests/tracing/support/packet-set-buf/Makefile000066400000000000000000000025201443101201700236720ustar00rootroot00000000000000# The MIT License (MIT) # # Copyright (c) 2016-2020 Philippe Proulx # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. CFLAGS += -O0 -g -Wall -pedantic -Wno-unused-function TARGET = test OBJS = $(TARGET).o barectf.o test-platform.o $(TARGET): $(OBJS) $(CC) -o $@ $(LDFLAGS) $^ barectf.o: barectf.c $(CC) $(CFLAGS) -ansi -c $< barectf-3.1.2/tests/tracing/support/packet-set-buf/test-platform.c000066400000000000000000000066021443101201700252040ustar00rootroot00000000000000/* * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include #include #include #include "barectf.h" #include "test-platform.h" struct test_platform_ctx { struct barectf_default_ctx ctx; uint8_t *buf; size_t buf_size; FILE *fh; }; static void write_packet(struct test_platform_ctx * const platform_ctx) { const size_t nmemb = fwrite(barectf_packet_buf(&platform_ctx->ctx), barectf_packet_buf_size(&platform_ctx->ctx), 1, platform_ctx->fh); assert(nmemb == 1); } static int is_backend_full(void * const data) { struct test_platform_ctx * const platform_ctx = (void *) data; barectf_packet_set_buf(&platform_ctx->ctx, platform_ctx->buf, platform_ctx->buf_size); return 0; } static void open_packet(void * const data) { struct test_platform_ctx * const platform_ctx = (void *) data; memset(barectf_packet_buf(&platform_ctx->ctx), 0, barectf_packet_buf_size(&platform_ctx->ctx)); barectf_default_open_packet(&platform_ctx->ctx); } static void close_packet(void * const data) { struct test_platform_ctx * const platform_ctx = (void *) data; barectf_default_close_packet(&platform_ctx->ctx); write_packet(platform_ctx); barectf_packet_set_buf(&platform_ctx->ctx, NULL, 512); } struct test_platform_ctx *test_platform_init(const size_t buf_size) { struct test_platform_ctx *platform_ctx; struct barectf_platform_callbacks cbs; cbs.is_backend_full = is_backend_full; cbs.open_packet = open_packet; cbs.close_packet = close_packet; platform_ctx = malloc(sizeof(*platform_ctx)); assert(platform_ctx); platform_ctx->buf_size = buf_size; platform_ctx->buf = malloc(platform_ctx->buf_size); assert(platform_ctx->buf); platform_ctx->fh = fopen("stream", "wb"); assert(platform_ctx->fh); barectf_init(&platform_ctx->ctx, platform_ctx->buf, platform_ctx->buf_size, cbs, platform_ctx); open_packet(platform_ctx); return platform_ctx; } void test_platform_fini(struct test_platform_ctx * const platform_ctx) { if (barectf_packet_is_open(&platform_ctx->ctx) && !barectf_packet_is_empty(&platform_ctx->ctx)) { close_packet(platform_ctx); } fclose(platform_ctx->fh); free(platform_ctx->buf); free(platform_ctx); } struct barectf_default_ctx *test_platform_barectf_ctx( struct test_platform_ctx * const platform_ctx) { return &platform_ctx->ctx; } barectf-3.1.2/tests/tracing/support/packet-set-buf/test-platform.h000066400000000000000000000030171443101201700252060ustar00rootroot00000000000000#ifndef _BARECTF_TEST_PLATFORM_H #define _BARECTF_TEST_PLATFORM_H /* * Copyright (c) 2020 Philippe Proulx * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include struct test_platform_ctx; struct barectf_default_ctx; struct test_platform_ctx *test_platform_init(size_t buf_size); void test_platform_fini(struct test_platform_ctx *platform_ctx); struct barectf_default_ctx *test_platform_barectf_ctx( struct test_platform_ctx *platform_ctx); #endif /* _BARECTF_TEST_PLATFORM_H */ barectf-3.1.2/tox.ini000066400000000000000000000014211443101201700144250ustar00rootroot00000000000000[tox] minversion = 3.18 isolated_build = true envlist = tests skipsdist = True [testenv] allowlist_externals = poetry passenv = TERM TERMINFO [testenv:tests] changedir = tests commands = poetry install -v poetry run py.test -v . [testenv:flake8] commands = poetry install -v poetry run flake8 barectf [flake8] # E123, E125 skipped as they are invalid PEP-8. # also ignore E501 because barectf has very long lines show-source = True ignore = E123,E125,E501 builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,templates.py [testenv:pylint] commands = poetry install -v poetry run pylint -f colorized -d all -e E,W -d W0212,W1618,W0622,W0201,W0703 barectf [testenv:mypy] commands = poetry install -v poetry run mypy barectf