From 7361893d3f2f9e3aef39529dad0caf08bfcbb78f Mon Sep 17 00:00:00 2001 From: Douglas RAILLARD Date: Wed, 10 Apr 2019 19:10:33 +0100 Subject: [PATCH] lisa.trace: Avoid stacking event checker wrappers When a function is decorated mutlitple times with required events, accumulate all the information in the top-level wrapper and discard inner levels of wrappers. --- lisa/trace.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisa/trace.py b/lisa/trace.py index a2f8d2486..83dfeab1a 100644 --- a/lisa/trace.py +++ b/lisa/trace.py @@ -1125,6 +1125,9 @@ class TraceEventCheckerBase(abc.ABC, Loggable): checker = self else: checker = AndTraceEventChecker([self, used_events]) + # remove a layer of wrapper, since we took its used_events into + # account already + f = f.__wrapped__ sig = inspect.signature(f) if sig.parameters: -- GitLab