diff --git a/cakefuzzer/instrumentation/__init__.py b/cakefuzzer/instrumentation/__init__.py index 8a0ea9c..2605b39 100644 --- a/cakefuzzer/instrumentation/__init__.py +++ b/cakefuzzer/instrumentation/__init__.py @@ -28,15 +28,13 @@ class InstrumentationError(CakeFuzzerError): async def apply(*args: Instrumentation) -> List[Instrumentation]: - _, unapplied = await check(*args) - await asyncio.gather(*[p.apply() for p in unapplied]) - return unapplied + await asyncio.gather(*[p.apply() for p in args]) + return args async def revert(*args: Instrumentation) -> List[Instrumentation]: - applied, _ = await check(*args) - await asyncio.gather(*[p.revert() for p in applied]) - return applied + await asyncio.gather(*[p.revert() for p in args]) + return args async def check( diff --git a/cakefuzzer/instrumentation/instrumentator.py b/cakefuzzer/instrumentation/instrumentator.py index b996e7c..c043702 100644 --- a/cakefuzzer/instrumentation/instrumentator.py +++ b/cakefuzzer/instrumentation/instrumentator.py @@ -175,11 +175,11 @@ async def revert(self) -> None: applied, unapplied = await check(*annotation_removal) await revert(*applied, *unapplied) - print("Annotations Reverted", len(applied)) + print("Annotations Reverted", len(applied) + len(unapplied)) applied, unapplied = await check(*frenames) await revert(*applied, *unapplied) - print("FunctionCall Renames Reverted", len(applied)) + print("FunctionCall Renames Reverted", len(applied) + len(unapplied)) applied, _ = await check(*patches) await revert(*applied)