[testMain] Use a more simple API.

When the pipe is not opened, g_sapwn_async() is sutaible, which
makes code more simple.