lisa.tests.base.OptionalFtraceTestBundle#
- class lisa.tests.base.OptionalFtraceTestBundle(res_dir, plat_info)[source]#
Bases:
FtraceTestBundleBase,LoggableWarning
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 oflisa.Classes
__class__inheritedMetaclass of
TestBundleBase.Attributes
ATTRIBUTES_SERIALIZATIONinheritedAttributes to be treated specially during serialization.
DEFAULT_SERIALIZATION_FMTinheritedDefault format used when serializing objects.
FTRACE_CONFinheritedTRACE_PATHinheritedPath to the
trace-cmdtrace.dat file in the result directory.VERIFY_SERIALIZATIONinheritedWhen True, this enforces a serialization/deserialization step in
from_target().YAML_ENCODINGinheritedEncoding used for YAML files.
ftrace_confinheritedProperties
_children_test_bundlesinheritedloggerinheritedConvenience short-hand for
self.get_logger().traceinheritedThe
Tracefor the collected trace.dat file.trace_pathinheritedPath to the
trace-cmd reporttrace.dat file.Methods
__copy__()inheritedRegular shallow copy operation, without dropping any attributes.
__getstate__()inheritedFilter the instance’s attributes upon serialization.
__setstate__()inherited_from_target()inherited_get_filepath()inheritedadd_undecided_filter()inheritedTurn any method returning a
ResultBundleBaseinto 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()inheritedCheck whether the given target can be used to create an instance of this class.
from_dir()inheritedWrapper around
lisa.utils.Serializable.from_path().from_path()inheritedDeserialize an object from a file.
from_target()inheritedFactory method to create a bundle using a live target.
get_logger()inheritedProvides a
logging.Loggernamed aftercls.get_tags()inheritedDictionary of tags and tag values.
get_trace()inherited- returns:
a
lisa.trace.Tracecollected in the standard location.
log_locals()inheritedDebugging aid: log the local variables of the calling function.
to_dir()inheritedto_path()inheritedSerialize the object to a file.
to_yaml()inheritedReturn a YAML string with the serialized object.
Classes#
- OptionalFtraceTestBundle.__class__#
alias of
TestBundleMeta
Attributes#
- OptionalFtraceTestBundle.ATTRIBUTES_SERIALIZATION = {'allowed': [], 'ignored': [], 'placeholders': {}}#
Inherited attribute, see
lisa.utils.Serializable.ATTRIBUTES_SERIALIZATIONAttributes to be treated specially during serialization.
- OptionalFtraceTestBundle.DEFAULT_SERIALIZATION_FMT = 'yaml'#
Inherited attribute, see
lisa.utils.Serializable.DEFAULT_SERIALIZATION_FMTDefault format used when serializing objects.
- OptionalFtraceTestBundle.FTRACE_CONF = <lisa.trace.FtraceConf object>#
- OptionalFtraceTestBundle.TRACE_PATH = 'trace.dat'#
Inherited attribute, see
lisa.tests.base.FtraceTestBundleBase.TRACE_PATHPath to the
trace-cmdtrace.dat file in the result directory.
- OptionalFtraceTestBundle.VERIFY_SERIALIZATION = True#
Inherited attribute, see
lisa.tests.base.TestBundleBase.VERIFY_SERIALIZATIONWhen True, this enforces a serialization/deserialization step in
from_target().
- OptionalFtraceTestBundle.YAML_ENCODING = 'utf-8'#
Inherited attribute, see
lisa.utils.Serializable.YAML_ENCODINGEncoding used for YAML files.
- OptionalFtraceTestBundle.ftrace_conf = <lisa.trace.FtraceConf object>#
Properties#
- property OptionalFtraceTestBundle._children_test_bundles#
Inherited property, see
lisa.tests.base.TestBundleBase._children_test_bundles
- property OptionalFtraceTestBundle.logger#
Inherited property, see
lisa.utils.Loggable.loggerConvenience short-hand for
self.get_logger().
- property OptionalFtraceTestBundle.trace#
Inherited property, see
lisa.tests.base.FtraceTestBundleBase.traceThe
Tracefor the collected trace.dat file.
- property OptionalFtraceTestBundle.trace_path#
Inherited property, see
lisa.tests.base.FtraceTestBundleBase.trace_pathPath to the
trace-cmd reporttrace.dat file.
Methods#
- OptionalFtraceTestBundle.__copy__()#
Inherited method, see
lisa.utils.Serializable.__copy__()Regular shallow copy operation, without dropping any attributes.
- OptionalFtraceTestBundle.__getstate__()#
Inherited method, see
lisa.utils.Serializable.__getstate__()Filter the instance’s attributes upon serialization.
- OptionalFtraceTestBundle.__setstate__(dct)#
Inherited method, see
lisa.utils.Serializable.__setstate__()
- abstract classmethod OptionalFtraceTestBundle._from_target(target, *, res_dir)#
Inherited method, see
lisa.tests.base.TestBundleBase._from_target()
- classmethod OptionalFtraceTestBundle._get_filepath(res_dir)#
Inherited method, see
lisa.tests.base.TestBundleBase._get_filepath()
- OptionalFtraceTestBundle.add_undecided_filter()#
Inherited method, see
lisa.tests.base.TestBundleBase.add_undecided_filter()Turn any method returning a
ResultBundleBaseinto a decorator that can be used as a test method filter.
- classmethod OptionalFtraceTestBundle.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 OptionalFtraceTestBundle.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 OptionalFtraceTestBundle.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 OptionalFtraceTestBundle.from_path(filepath, fmt=None)#
Inherited method, see
lisa.utils.Serializable.from_path()Deserialize an object from a file.
- classmethod OptionalFtraceTestBundle.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 OptionalFtraceTestBundle.get_logger(suffix=None)#
Inherited method, see
lisa.utils.Loggable.get_logger()Provides a
logging.Loggernamed aftercls.
- OptionalFtraceTestBundle.get_tags()#
Inherited method, see
lisa.tests.base.TestBundleBase.get_tags()Dictionary of tags and tag values.
- OptionalFtraceTestBundle.get_trace(events=None, **kwargs)#
Inherited method, see
lisa.tests.base.FtraceTestBundleBase.get_trace()- Returns:
a
lisa.trace.Tracecollected in the standard location.
- classmethod OptionalFtraceTestBundle.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.
- OptionalFtraceTestBundle.to_dir(res_dir)#
Inherited method, see
lisa.tests.base.TestBundleBase.to_dir()
- OptionalFtraceTestBundle.to_path(filepath, fmt=None)#
Inherited method, see
lisa.utils.Serializable.to_path()Serialize the object to a file.
- OptionalFtraceTestBundle.to_yaml()#
Inherited method, see
lisa.utils.Serializable.to_yaml()Return a YAML string with the serialized object.