lisa.tests.base.FtraceTestBundle#

class lisa.tests.base.FtraceTestBundle(res_dir, plat_info)[source]#

Bases: FtraceTestBundleBase

Dummy subclass of FtraceTestBundleBase to be inherited from to override OptionalFtraceTestBundle in the inheritance tree.

Warning

Arbitrary code can be executed while loading an instance from a YAML or Pickle file. To include untrusted data in YAML, use the !untrusted tag along with a string

Note

As a subclass of lisa.tests.base.TestBundleBase, this class is considered as “application” and its API is therefore more subject to change than other parts of lisa.

Classes

__class__ inherited

Metaclass of TestBundleBase.

Attributes

ATTRIBUTES_SERIALIZATION inherited

Attributes to be treated specially during serialization.

DEFAULT_SERIALIZATION_FMT inherited

Default format used when serializing objects.

FTRACE_CONF inherited

TRACE_PATH inherited

Path to the trace-cmd trace.dat file in the result directory.

VERIFY_SERIALIZATION inherited

When True, this enforces a serialization/deserialization step in from_target().

YAML_ENCODING inherited

Encoding used for YAML files.

ftrace_conf inherited

Properties

_children_test_bundles inherited

logger inherited

Convenience short-hand for self.get_logger().

trace inherited

The Trace for the collected trace.dat file.

trace_path inherited

Path to the trace-cmd report trace.dat file.

Methods

__copy__() inherited

Regular shallow copy operation, without dropping any attributes.

__getstate__() inherited

Filter the instance’s attributes upon serialization.

__setstate__() inherited

_from_target() inherited

_get_filepath() inherited

add_undecided_filter() inherited

Turn any method returning a ResultBundleBase into a decorator that can be used as a test method filter.

can_create_from_target() inherited

returns:

Whether the given target can be used to create an instance of this class :rtype: bool.

check_from_target() inherited

Check whether the given target can be used to create an instance of this class.

from_dir() inherited

Wrapper around lisa.utils.Serializable.from_path().

from_path() inherited

Deserialize an object from a file.

from_target() inherited

Factory method to create a bundle using a live target.

get_logger() inherited

Provides a logging.Logger named after cls.

get_tags() inherited

Dictionary of tags and tag values.

get_trace() inherited

returns:

a lisa.trace.Trace collected in the standard location.

log_locals() inherited

Debugging aid: log the local variables of the calling function.

to_dir() inherited

See lisa.utils.Serializable.to_path().

to_path() inherited

Serialize the object to a file.

to_yaml() inherited

Return a YAML string with the serialized object.

Classes#

FtraceTestBundle.__class__#

alias of TestBundleMeta

Attributes#

FtraceTestBundle.ATTRIBUTES_SERIALIZATION = {'allowed': [], 'ignored': [], 'placeholders': {}}#

Inherited attribute, see lisa.utils.Serializable.ATTRIBUTES_SERIALIZATION

Attributes to be treated specially during serialization.

FtraceTestBundle.DEFAULT_SERIALIZATION_FMT = 'yaml'#

Inherited attribute, see lisa.utils.Serializable.DEFAULT_SERIALIZATION_FMT

Default format used when serializing objects.

FtraceTestBundle.FTRACE_CONF = <lisa.trace.FtraceConf object>#
FtraceTestBundle.TRACE_PATH = 'trace.dat'#

Inherited attribute, see lisa.tests.base.FtraceTestBundleBase.TRACE_PATH

Path to the trace-cmd trace.dat file in the result directory.

FtraceTestBundle.VERIFY_SERIALIZATION = True#

Inherited attribute, see lisa.tests.base.TestBundleBase.VERIFY_SERIALIZATION

When True, this enforces a serialization/deserialization step in from_target().

FtraceTestBundle.YAML_ENCODING = 'utf-8'#

Inherited attribute, see lisa.utils.Serializable.YAML_ENCODING

Encoding used for YAML files.

FtraceTestBundle.ftrace_conf = <lisa.trace.FtraceConf object>#

Properties#

property FtraceTestBundle._children_test_bundles#

Inherited property, see lisa.tests.base.TestBundleBase._children_test_bundles

property FtraceTestBundle.logger#

Inherited property, see lisa.utils.Loggable.logger

Convenience short-hand for self.get_logger().

property FtraceTestBundle.trace#

Inherited property, see lisa.tests.base.FtraceTestBundleBase.trace

The Trace for the collected trace.dat file.

property FtraceTestBundle.trace_path#

Inherited property, see lisa.tests.base.FtraceTestBundleBase.trace_path

Path to the trace-cmd report trace.dat file.

Methods#

FtraceTestBundle.__copy__()#

Inherited method, see lisa.utils.Serializable.__copy__()

Regular shallow copy operation, without dropping any attributes.

FtraceTestBundle.__getstate__()#

Inherited method, see lisa.utils.Serializable.__getstate__()

Filter the instance’s attributes upon serialization.

FtraceTestBundle.__setstate__(dct)#

Inherited method, see lisa.utils.Serializable.__setstate__()

abstract classmethod FtraceTestBundle._from_target(target, *, res_dir)#

Inherited method, see lisa.tests.base.TestBundleBase._from_target()

classmethod FtraceTestBundle._get_filepath(res_dir)#

Inherited method, see lisa.tests.base.TestBundleBase._get_filepath()

FtraceTestBundle.add_undecided_filter()#

Inherited method, see lisa.tests.base.TestBundleBase.add_undecided_filter()

Turn any method returning a ResultBundleBase into a decorator that can be used as a test method filter.

classmethod FtraceTestBundle.can_create_from_target(target)#

Inherited method, see lisa.tests.base.TestBundleBase.can_create_from_target()

Returns:

Whether the given target can be used to create an instance of this class :rtype: bool.

classmethod FtraceTestBundle.check_from_target(target)#

Inherited method, see lisa.tests.base.TestBundleBase.check_from_target()

Check whether the given target can be used to create an instance of this class.

classmethod FtraceTestBundle.from_dir(res_dir, update_res_dir=True)#

Inherited method, see lisa.tests.base.TestBundleBase.from_dir()

Wrapper around lisa.utils.Serializable.from_path().

classmethod FtraceTestBundle.from_path(filepath, fmt=None)#

Inherited method, see lisa.utils.Serializable.from_path()

Deserialize an object from a file.

classmethod FtraceTestBundle.from_target(target: Target, *, res_dir: ArtifactPath = None, **kwargs)#

Inherited method, see lisa.tests.base.TestBundleBase.from_target()

Factory method to create a bundle using a live target.

classmethod FtraceTestBundle.get_logger(suffix=None)#

Inherited method, see lisa.utils.Loggable.get_logger()

Provides a logging.Logger named after cls.

FtraceTestBundle.get_tags()#

Inherited method, see lisa.tests.base.TestBundleBase.get_tags()

Dictionary of tags and tag values.

FtraceTestBundle.get_trace(events=None, **kwargs)#

Inherited method, see lisa.tests.base.FtraceTestBundleBase.get_trace()

Returns:

a lisa.trace.Trace collected in the standard location.

classmethod FtraceTestBundle.log_locals(var_names=None, level='debug')#

Inherited method, see lisa.utils.Loggable.log_locals()

Debugging aid: log the local variables of the calling function.

FtraceTestBundle.to_dir(res_dir)#

Inherited method, see lisa.tests.base.TestBundleBase.to_dir()

See lisa.utils.Serializable.to_path().

FtraceTestBundle.to_path(filepath, fmt=None)#

Inherited method, see lisa.utils.Serializable.to_path()

Serialize the object to a file.

FtraceTestBundle.to_yaml()#

Inherited method, see lisa.utils.Serializable.to_yaml()

Return a YAML string with the serialized object.