This unit test fails without the fix:
https://github.com/rysto32/freebsd/blob/sysunit/tests/sys/sysunit/tcp_lro_test.cc#L381
$ ./tcp_lro --gtest_filter=*TestIncrPureAck
Running main() from /srcpool/src/rstone/worktree/sysunit/contrib/googletest/googletest/src/gtest_main.cc
Note: Google Test filter = *TestIncrPureAck
[==========] Running 2 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 1 test from TcpLroTestSuite/0, where TypeParam = IPv4
[ RUN ] TcpLroTestSuite/0.TestIncrPureAck
unknown file: Failure
Unexpected mock function call - returning directly.
Function call: if_input(0x38ca7d33e000)
Google Mock tried the following 1 expectation, but it didn't match:
/srcpool/src/rstone/worktree/sysunit/tests/sys/sysunit/tcp_lro_test.cc:400: EXPECT_CALL(*this->mockIfp, if_input(PacketMatcher(expected)))...
Expected arg #0: Ethernet/IPv4/TCP/Payload
Actual: 0x38ca7d33e000, TCP: th_ack field is 965 (expected 3854)
Expected: to be called once
Actual: never called - unsatisfied and active
/srcpool/src/rstone/worktree/sysunit/tests/sys/sysunit/tcp_lro_test.cc:400: Failure
Actual function call count doesn't match EXPECT_CALL(*this->mockIfp, if_input(PacketMatcher(expected)))...
Expected: to be called once
Actual: never called - unsatisfied and active
[ FAILED ] TcpLroTestSuite/0.TestIncrPureAck, where TypeParam = IPv4 (1 ms)
[----------] 1 test from TcpLroTestSuite/0 (1 ms total)
[----------] 1 test from TcpLroTestSuite/1, where TypeParam = IPv6
[ RUN ] TcpLroTestSuite/1.TestIncrPureAck
unknown file: Failure
Unexpected mock function call - returning directly.
Function call: if_input(0x38ca7d33e000)
Google Mock tried the following 1 expectation, but it didn't match:
/srcpool/src/rstone/worktree/sysunit/tests/sys/sysunit/tcp_lro_test.cc:400: EXPECT_CALL(*this->mockIfp, if_input(PacketMatcher(expected)))...
Expected arg #0: Ethernet/IPv6/TCP/Payload
Actual: 0x38ca7d33e000, TCP: th_ack field is 965 (expected 3854)
Expected: to be called once
Actual: never called - unsatisfied and active
/srcpool/src/rstone/worktree/sysunit/tests/sys/sysunit/tcp_lro_test.cc:400: Failure
Actual function call count doesn't match EXPECT_CALL(*this->mockIfp, if_input(PacketMatcher(expected)))...
Expected: to be called once
Actual: never called - unsatisfied and active
[ FAILED ] TcpLroTestSuite/1.TestIncrPureAck, where TypeParam = IPv6 (1 ms)
[----------] 1 test from TcpLroTestSuite/1 (1 ms total)
[----------] Global test environment tear-down
[==========] 2 tests from 2 test cases ran. (2 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 2 tests, listed below:
[ FAILED ] TcpLroTestSuite/0.TestIncrPureAck, where TypeParam = IPv4
[ FAILED ] TcpLroTestSuite/1.TestIncrPureAck, where TypeParam = IPv6
2 FAILED TESTS
It passes with the fix:
$ ./tcp_lro --gtest_filter=*TestIncrPureAck
Running main() from /srcpool/src/rstone/worktree/sysunit/contrib/googletest/googletest/src/gtest_main.cc
Note: Google Test filter = *TestIncrPureAck
[==========] Running 2 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 1 test from TcpLroTestSuite/0, where TypeParam = IPv4
[ RUN ] TcpLroTestSuite/0.TestIncrPureAck
[ OK ] TcpLroTestSuite/0.TestIncrPureAck (1 ms)
[----------] 1 test from TcpLroTestSuite/0 (1 ms total)
[----------] 1 test from TcpLroTestSuite/1, where TypeParam = IPv6
[ RUN ] TcpLroTestSuite/1.TestIncrPureAck
[ OK ] TcpLroTestSuite/1.TestIncrPureAck (0 ms)
[----------] 1 test from TcpLroTestSuite/1 (0 ms total)
[----------] Global test environment tear-down
[==========] 2 tests from 2 test cases ran. (1 ms total)
[ PASSED ] 2 tests.