diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2023-04-24 17:15:00 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2023-04-27 16:09:40 -0700 |
commit | 74206678a97bfa23ab6f8a9966bc88e798031e3c (patch) | |
tree | 385af03956bd9f198ab622709ed47a60b67db453 | |
parent | 614d6630271584a29c3de5f9e705bd4af656a5f8 (diff) | |
download | bluez-74206678a97bfa23ab6f8a9966bc88e798031e3c.tar.gz |
shared/tester: Add support for NULL PDUs
This adds support for NULL PDUs which can be used to skip a round of
TX/RX.
-rw-r--r-- | src/shared/tester.c | 6 | ||||
-rw-r--r-- | src/shared/tester.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/shared/tester.c b/src/shared/tester.c index 1feaba483..34f807556 100644 --- a/src/shared/tester.c +++ b/src/shared/tester.c @@ -914,8 +914,12 @@ static bool test_io_send(struct io *io, void *user_data) g_assert_cmpint(len, ==, iov->iov_len); - if (!test->iovcnt && test->io_complete_func) + if (!test->iovcnt && test->io_complete_func) { test->io_complete_func(test->test_data); + } else if (test->iovcnt && !test->iov->iov_base) { + test_get_iov(test); + return test_io_send(io, user_data); + } return false; } diff --git a/src/shared/tester.h b/src/shared/tester.h index 49610185a..16f41022d 100644 --- a/src/shared/tester.h +++ b/src/shared/tester.h @@ -21,6 +21,8 @@ .iov_len = sizeof(data(args)), \ } +#define IOV_NULL {} + void tester_init(int *argc, char ***argv); int tester_run(void); |