diff options
| -rw-r--r-- | src/core/aio_test.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/aio_test.c b/src/core/aio_test.c index a41f608d..f9663903 100644 --- a/src/core/aio_test.c +++ b/src/core/aio_test.c @@ -435,6 +435,23 @@ test_aio_busy(void) NUTS_ASSERT(!nng_aio_busy(aio)); nng_aio_free(aio); } +void +test_aio_scatter_gather_too_many(void) +{ + nng_aio *aio; + nng_iov iov[32]; + + NUTS_PASS(nng_aio_alloc(&aio, NULL, NULL)); + + for (int i = 0; i < 32; i++) { + iov[i].iov_buf = "abc"; + iov[i].iov_len = 3; + } + + NUTS_FAIL(nng_aio_set_iov(aio, 32, iov), NNG_EINVAL); + + nng_aio_free(aio); +} NUTS_TESTS = { { "sleep", test_sleep }, @@ -453,5 +470,6 @@ NUTS_TESTS = { { "sleep loop", test_sleep_loop }, { "sleep cancel", test_sleep_cancel }, { "aio busy", test_aio_busy }, + { "scatter gather too many", test_aio_scatter_gather_too_many }, { NULL, NULL }, }; |
