Add regression tests for imported socket functions