fix cgo build
fix testcase