Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass test allocator to through ntsu_socketutil test cases for zero-copy and timestamping #227

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions groups/nts/ntsu/ntsu_socketutil.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8129,7 +8129,7 @@ NTSCFG_TEST_FUNCTION(ntsu::SocketUtilTest::verifyCase27)
error = ntsu::SocketOptionUtil::setZeroCopy(handle, true);
NTSCFG_TEST_OK(error);

bsl::vector<char> message(msgSize, &ta);
bsl::vector<char> message(msgSize, NTSCFG_TEST_ALLOCATOR);
for (int i = 0; i < msgSize; ++i) {
message[i] = bsl::rand() % 100;
}
Expand All @@ -8146,8 +8146,8 @@ NTSCFG_TEST_FUNCTION(ntsu::SocketUtilTest::verifyCase27)
// NTSCFG_TEST_TRUE(endpoint.parse("[fe80::215:5dff:fe8d:6bd1]:5555"));
}

bsl::list<ntsa::ZeroCopy> feedback(&ta);
bsl::unordered_set<bsl::uint32_t> sendIDs(&ta);
bsl::list<ntsa::ZeroCopy> feedback(NTSCFG_TEST_ALLOCATOR);
bsl::unordered_set<bsl::uint32_t> sendIDs(NTSCFG_TEST_ALLOCATOR);

for (int i = 0; i < numMessagesToSend; ++i) {
ntsa::SendContext context;
Expand All @@ -8170,15 +8170,15 @@ NTSCFG_TEST_FUNCTION(ntsu::SocketUtilTest::verifyCase27)

SocketUtilTest::extractZeroCopyNotifications(&feedback,
handle,
&ta);
NTSCFG_TEST_ALLOCATOR);
}

// retrieve data from the socket error queue until all send system
// calls are acknowledged by the OS
while (!sendIDs.empty()) {
SocketUtilTest::extractZeroCopyNotifications(&feedback,
handle,
&ta);
NTSCFG_TEST_ALLOCATOR);

while (!feedback.empty()) {
const ntsa::ZeroCopy& zc = feedback.front();
Expand Down
Loading