s3-torture: introduce check_both_error()