Skip to content
This repository was archived by the owner on Feb 18, 2023. It is now read-only.

Conversation

cspiel1
Copy link
Collaborator

@cspiel1 cspiel1 commented Jun 9, 2021

No description provided.

@cspiel1 cspiel1 changed the title net: add test for net_dst_is_source_addr() IPv6 link local support Jun 10, 2021
@cspiel1
Copy link
Collaborator Author

cspiel1 commented Jun 11, 2021

@sreimers Currently trying to increase the test coverage of net.c. Does the test machine have a network interface with IPv6ll, IPv4 address and which is UP?

@sreimers
Copy link
Member

Does the test machine have a network interface with IPv6ll, IPv4 address and which is UP?

I think we should/can not rely on this for unit tests. Maybe we could make a new test category like test_integration. After this we can try to define a docker or qemu based image with special test conditions.

@cspiel1
Copy link
Collaborator Author

cspiel1 commented Jun 11, 2021

You mean a new option in main.c like -o Run OOM memory tests and a function like test_oom()?

src/net.c Outdated
@@ -40,3 +56,47 @@ int test_net_dst_source_addr_get(void)
out:
return err;
}


int test_net_dst_is_source_addr(void)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this test needed since baresip/re@56d21fa removed net_dst_is_source_addr?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, sorry. Now I will work on the tests. You're right! The last commit is obsolete and also the test.

@cspiel1
Copy link
Collaborator Author

cspiel1 commented Jun 15, 2021

Now I have

  • 52.7% with branches ipv6ll_support (re, retest) compared to
  • 52.2% with master.

The boundary of 54.3% is not reached in master.

"build (clang, macos-latest)" fails. Maybe again the udp_connect() to a destination with unset port?

  • TODO: put IPv6ll test to another test class

@cspiel1 cspiel1 marked this pull request as draft June 15, 2021 13:19
@cspiel1 cspiel1 marked this pull request as ready for review June 16, 2021 08:06
@cspiel1
Copy link
Collaborator Author

cspiel1 commented Jun 16, 2021

Put IPv6ll tests into new test group "network specific tests". Github workflow for code coverage reaches now 54.3%.

@cspiel1
Copy link
Collaborator Author

cspiel1 commented Jul 1, 2021

@sreimers Fixed the test. Please re-run the workflow!

@sreimers sreimers merged commit 34d1486 into baresip:master Jul 15, 2021
@cspiel1 cspiel1 deleted the ipv6ll_support branch November 11, 2021 13:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants