From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx> For the successful test case check that file descriptor is valid through fcntl which is cheap way. --- android/android-tester.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/android/android-tester.c b/android/android-tester.c index 3f763d8..2bb7d73 100644 --- a/android/android-tester.c +++ b/android/android-tester.c @@ -17,6 +17,7 @@ #include <stdlib.h> #include <unistd.h> +#include <fcntl.h> #include <glib.h> #include <sys/socket.h> @@ -757,6 +758,12 @@ static void test_generic_listen(const void *test_data) goto clean; } + /* Check that file descriptor is valid */ + if (status == BT_STATUS_SUCCESS && fcntl(sock_fd, F_GETFD) == -1) { + tester_test_failed(); + return; + } + tester_test_passed(); clean: -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html