##################################################
#
# Valgrind suppression file for acceptance tests
#
##################################################


##################################################
# libcrypto weirdness
##################################################
{
   libcrypto-leak
   Memcheck:Leak
   ...
   obj:*/libcrypto.so.*
}
{
   libcrypto-cond
   Memcheck:Cond
   ...
   obj:*/libcrypto.so.*
}
{
   libcrypto-value8
   Memcheck:Value8
   ...
   obj:*/libcrypto.so.*
}

################################################
# Lex weirdness
################################################
{
   lex-internal
   Memcheck:Leak
   ...
   fun:yylex
}

################################################
# libc weirdness
################################################

{
   # This can probably be fixed by giving it a static buffer
   gethostbyaddr-cannot-decide-on-const
   Memcheck:Leak
   ...
   fun:gethostbyaddr
   ...
}

{
   msgsnd_nocancel-param
   Memcheck:Param
   msgsnd(msgp->mtext)
   fun:__msgsnd_nocancel
   fun:send_fakem
   ...
}

################################################
# libxml2 weirdness
################################################

{
   # appears to do things right on our side
   libxml2-xmlDocDumpMemory
   Memcheck:Leak
   fun:malloc
   ...
   fun:xmlDocDumpFormatMemoryEnc
   fun:XmlDocsEqualMem
   ...
}

{
   # appears to do things right on our side
   libxml2-xmlSAXParseFileWithData
   Memcheck:Leak
   fun:malloc
   ...
   fun:xmlSAXParseFileWithData
   fun:LoadFileAsXmlDoc
   ...
}

{
   libxml2-dlopen-lzma
   Memcheck:Leak
   ...
   fun:_dl_open
   ...
   fun:__libxml2_xzread
}


################################################
# CFEngine specific suppressions
################################################

{
   cfe-enterprise-extensions-remain-open
   Memcheck:Leak
   ...
   fun:shlib_open
   fun:extension_library_open
   ...
}

{
   # Not sure why this is not cleaned, separate threads maybe
   cfe-private-logging-context
   Memcheck:Leak
   ...
   fun:xcalloc
   fun:GetCurrentThreadContext
   fun:LoggingPrivGetContext
   fun:EvalContextNew
   ...
}

{
   cfe-global-server-list
   Memcheck:Leak
   ...
   fun:SeqNew
   fun:GetGlobalServerList
   ...
}

{
   cfe-global-dbm-handles
   Memcheck:Leak
   ...
   fun:MapNameCopy
   fun:DBIdToPath
   fun:DBHandleGet
   ...
}

{
   cfe-global-children-fds
   Memcheck:Leak
   ...
   fun:xcalloc
   fun:InitChildrenFD
   fun:CreatePipeAndFork
   ...
}

{
   cfe-global-process-table
   Memcheck:Leak
   ...
   fun:AppendItem
   fun:LoadProcessTable
   ...
}

{
   cfe-global-mounted-fs
   Memcheck:Leak
   ...
   fun:SeqNew
   fun:GetGlobalMountedFSList
   ...
}

{
   cfe-global-edit-anchors
   Memcheck:Leak
   ...
   fun:PrependItem
   fun:PromiseRecheckAllConstraints
   ...
}

{
   cfe-global-repository
   Memcheck:Leak
   ...
   fun:xstrdup
   fun:SetRepositoryLocation
   ...
}

{
   cfe-global-varname-regex
   Memcheck:Leak
   ...
   fun:CompileRegex
   fun:IsValidVariableName
   ...
}