From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> This attempts to test BT_DEFER_SETUP is properly set when the test has defer flag set. --- tools/iso-tester.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/iso-tester.c b/tools/iso-tester.c index cae5fb4b7..56c17b78b 100644 --- a/tools/iso-tester.c +++ b/tools/iso-tester.c @@ -1240,6 +1240,19 @@ static void setup_connect(struct test_data *data, uint8_t num, GIOFunc func) } if (isodata->defer) { + int defer; + socklen_t len; + + /* Check if socket has DEFER_SETUP set */ + len = sizeof(defer); + if (getsockopt(sk, SOL_BLUETOOTH, BT_DEFER_SETUP, &defer, + &len) < 0) { + tester_warn("getsockopt: %s (%d)", strerror(errno), + errno); + tester_test_failed(); + return; + } + memset(&pfd, 0, sizeof(pfd)); pfd.fd = sk; pfd.events = POLLOUT; -- 2.37.1