Skip to content

Commit

Permalink
Fix a failure in bio_dgram_test on the NonStop platform
Browse files Browse the repository at this point in the history
The size of the datagram header is significantly larger that we might
expect on NonStop (probably driven by sizeof(BIO_ADDR)). We adjust the
assumptions in the test about how many datagrams we can fit into the
default buffer size.

Fixes openssl#22013
  • Loading branch information
mattcaswell committed Sep 11, 2023
1 parent aff9922 commit 67e5fc2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/bio_dgram_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,10 +559,16 @@ static int test_bio_dgram_pair(int idx)
goto err;

/*
* Should be able to fit at least 9 datagrams in default write buffer size
* in worst case
* The number of datagrams we can fit depends on the size of the default
* write buffer size, the size of the datagram header and the size of the
* payload data we send in each datagram. The max payload data is based on
* the mtu (1472). On most systems we expect the header size to be small,
* but on one platform (NonStop) we had a report of a very large header
* (2064 bytes) - probably driven by sizeof(BIO_ADDR). The default write
* buffer size is 17408. So in the very worst case we should be able to fit
* at least 4 datagrams into the write buffer.
*/
if (!TEST_int_ge(i, 9))
if (!TEST_int_ge(i, 4))
goto err;

/* Check we read back the same data */
Expand Down

0 comments on commit 67e5fc2

Please sign in to comment.