diff --git a/lib/core/common.py b/lib/core/common.py index 00404f6b2..17a53a4ae 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -2447,7 +2447,7 @@ def getSortedInjectionTests(): messages """ - retVal = conf.tests + retVal = copy.deepcopy(conf.tests) def priorityFunction(test): retVal = SORT_ORDER.FIRST diff --git a/lib/core/datatype.py b/lib/core/datatype.py index c6d467955..91f50a472 100644 --- a/lib/core/datatype.py +++ b/lib/core/datatype.py @@ -66,12 +66,16 @@ class AttribDict(dict): def __deepcopy__(self, memo): retVal = self.__class__() memo[id(self)] = retVal + for attr in dir(self): if not attr.startswith('_'): value = getattr(self, attr) if not isinstance(value, (types.BuiltinFunctionType, types.BuiltinFunctionType, types.FunctionType, types.MethodType)): setattr(retVal, attr, copy.deepcopy(value, memo)) + for key, value in self.items(): + retVal.__setitem__(key, copy.deepcopy(value, memo)) + return retVal class InjectionDict(AttribDict):