return -1 when test failed