-
Notifications
You must be signed in to change notification settings - Fork 19
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
UT coverage to 95%, code improve and minor fix #34
Conversation
3bd2891
to
c98cdff
Compare
|
@jcaiMR Looks like build failed due to package dependency. Adding sudo apt-get update in .azure-pipelines/build.yml might fix it |
Build fix is in #35. |
@kellyyeh @saiarcot895 Thanks all for fix this. I guess it not due to my PR code change, I raised a master based pipeline it also failed at arm64 and armhf, which looks good several weeks ago. Is it due to something changed/updated in our build system ? |
Got it, just updated title and details in description. |
The failures were due to changes in the slave container builds that removed the apt package cache at the end of the build. This meant that any users of the slave image who wanted to install new packages would need to do an apt update first. |
Got it, thank you for the detailed explanation. |
test/mock_relay.cpp
Outdated
EXPECT_TRUE(false); | ||
} | ||
// same name to override static global variable | ||
uint8_t server_recv_buffer[BUFFER_SIZE] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you can override a static global variable in another .cpp file. Are you sure this is working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, Saikrishna, you are right. It's some dummy code I tried in my testing, I will remove them for less confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, my miss, will apply in latest diff.
test/mock_relay.cpp
Outdated
config.local_sock = -1; | ||
|
||
std::unordered_map<std::string, struct relay_config> vlans; | ||
|
||
uint8_t client_recv_buffer[] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this variable used? It doesn't seem like it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It only used to get a valid dhcp client packet size. I leave it there for an example of good dhcp client packet, maybe it would help to understand the original function meaning in future. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed in latest diff.
* Update package cache, and bail on the first error Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Incorrectly added line continuation Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> --------- Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
544f8b9
to
7ff9806
Compare
7ff9806
to
dfb8e92
Compare
Description:
a) remove unused functions handleSwssNotification(), stopSwssNotificationPoll()
b) change file name to GUN style, keep same style with the other files
a) DHCPv6Msg::MarshalBinary/RelayMsg::MarshalBinary add protection for super frame, case for new packet length > 65536
b) loop_relay() event base creation failure will call exit(EXIT_FAILURE)
c) shutdown() name changed to shutdown_relay() as name duplication with glibc library.
How I test it