Formation testing which may involve circulating mud in a pipe string from a mud pit through a port in the pipe string to a downhole diverter sub, wherein the pipe string is suspended in a wellbore extending into a subterranean formation, operating a downhole pump to pump formation fluid from the formation, wherein the formation fluid comprises gas, and mixing the pumped formation fluid with circulated mud such that a proportion of the pumped formation gas in the circulated mud is maintained below a threshold value.