use POSIX syntax for shell function definition in run_test

Signed-off-by: Qingping Hou <qingping.hou@gmail.com>