Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
lrstewart committed Sep 8, 2023
1 parent ef89981 commit 5169a89
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/unit/s2n_ktls_io_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include "tls/s2n_ktls.h"
#include "utils/s2n_random.h"

#include "tls/s2n_ktls_io.c"

#define S2N_TEST_TO_SEND 10
#define S2N_TEST_MSG_IOVLEN 5

Expand Down Expand Up @@ -825,6 +827,17 @@ int main(int argc, char **argv)
s2n_blocked_status blocked = S2N_NOT_BLOCKED;
ssize_t result = s2n_ktls_sendv_with_offset(conn,
test_iovecs.iovecs, test_iovecs.iovecs_count, offset, &blocked);
fprintf(stderr, "%li result = %li\n", offset, result);
fprintf(stderr, "%li sendmsg_fn=%li conn.io_context=%li out=%li", offset,
(uintptr_t) s2n_sendmsg_fn, (uintptr_t) conn->send_io_context, (uintptr_t) &out);
fprintf(stderr, "%li control.growable=%i data.growable=%i "
"data.allocated=%i data.write_cursor=%i "
"data.read_cursor=%i\n", offset,
out.ancillary_buffer.growable,
out.data_buffer.growable,
out.data_buffer.blob.allocated,
out.data_buffer.write_cursor,
out.data_buffer.read_cursor);
EXPECT_EQUAL(result, expected_sent);

EXPECT_EQUAL(out.sendmsg_invoked_count, 1);
Expand Down

0 comments on commit 5169a89

Please sign in to comment.