diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-08-03 10:20:25 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-08-04 09:25:32 -0700 |
commit | d9497e0001c050a7e3ef0fd87fb03bce7b331879 (patch) | |
tree | 320b76e603409400d5278822ed5af84bd26cefd0 /tools | |
parent | a65ddf710584f2b3dad04fb5e3d725ba340ea1ef (diff) |
iso-tester: Test BT_DEFER_SETUP works with getsockopt
This attempts to test BT_DEFER_SETUP is properly set when the test has
defer flag set.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/iso-tester.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/iso-tester.c b/tools/iso-tester.c index cae5fb4b7f..56c17b78b2 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; |