-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
test: Add TEST-85-NETWORK to run systemd-networkd-tests.py #32666
Conversation
Important An -rc1 tag has been created and a release is being prepared, so please note that PRs introducing new features and APIs will be held back until the new version has been released. |
@yuwata Any chance you'd be able to help debug some of these failures? I don't think they're transient since it's the same distributions that are failing and succeeding on a second run. (Ignore centos 9 that one is the mirror being messed up) |
c745863
to
1db84ef
Compare
The failure on Fedora rawhide is caused by torvalds/linux@3ddc223. |
Could you fix torvalds/linux@3ddc223 ? https://github.com/torvalds/linux/blob/3ddc2231c8108302a8229d3c5849ee792a63230d/net/ipv4/devinet.c#L1695 |
I missed that (struct ifaddrmsg)->ifa_flags was only 8bits, while (struct in_ifaddr)->ifa_flags is 32bits. Use a temporary 32bit variable as I did in set_ifa_lifetime() and check_lifetime(). Fixes: 3ddc223 ("inet: annotate data-races around ifa->ifa_flags") Reported-by: Yu Watanabe <watanabe.yu@gmail.com> Dianosed-by: Yu Watanabe <watanabe.yu@gmail.com> Closes: systemd/systemd#32666 (comment) Signed-off-by: Eric Dumazet <edumazet@google.com>
@DaanDeMeyer About the failure in CentOS, it seems the test wrongly detects that |
@yuwata First of all, thank you for all the test fixes and investigations! I will take a look at centos to see if I can figure out what's going on with the module. |
I missed that (struct ifaddrmsg)->ifa_flags was only 8bits, while (struct in_ifaddr)->ifa_flags is 32bits. Use a temporary 32bit variable as I did in set_ifa_lifetime() and check_lifetime(). Fixes: 3ddc223 ("inet: annotate data-races around ifa->ifa_flags") Reported-by: Yu Watanabe <watanabe.yu@gmail.com> Dianosed-by: Yu Watanabe <watanabe.yu@gmail.com> Closes: systemd/systemd#32666 (comment) Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com> Signed-off-by: NipaLocal <nipa@local>
Once #32766 is in I am going to rework this to define one meson test per test class in systemd-networkd-tests.py as running them all in a single virtual machine takes way too long. |
Ah, I understand the failure. For some reasons, the test generates many debugging logs. The test checks journal but the expected line is suppressed because of ratelimiting. As I disabled journal ratelimiting on my laptop, so I could not reproduce the issue. Unfortunately, the commit
Anyway, really disabling journal ratelimiting should make the test passed, hopefully. |
3f4897b
to
d12a771
Compare
I missed that (struct ifaddrmsg)->ifa_flags was only 8bits, while (struct in_ifaddr)->ifa_flags is 32bits. Use a temporary 32bit variable as I did in set_ifa_lifetime() and check_lifetime(). Fixes: 3ddc223 ("inet: annotate data-races around ifa->ifa_flags") Reported-by: Yu Watanabe <watanabe.yu@gmail.com> Dianosed-by: Yu Watanabe <watanabe.yu@gmail.com> Closes: systemd/systemd#32666 (comment) Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com> Reviewed-by: David Ahern <dsahern@kernel.org> Signed-off-by: NipaLocal <nipa@local>
I missed that (struct ifaddrmsg)->ifa_flags was only 8bits, while (struct in_ifaddr)->ifa_flags is 32bits. Use a temporary 32bit variable as I did in set_ifa_lifetime() and check_lifetime(). Fixes: 3ddc223 ("inet: annotate data-races around ifa->ifa_flags") Reported-by: Yu Watanabe <watanabe.yu@gmail.com> Dianosed-by: Yu Watanabe <watanabe.yu@gmail.com> Closes: systemd/systemd#32666 (comment) Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://lore.kernel.org/r/20240510072932.2678952-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
d12a771
to
5fe75f0
Compare
Again, I think we should add a dummy Makefile something like that in TEST-85: # SPDX-License-Identifier: LGPL-2.1-or-later
all setup run clean clean-again:
true
.PHONY: all setup run clean clean-again |
'NetworkdDHCPClientTests', | ||
'NetworkdDHCPPDTests', | ||
'NetworkdIPv6PrefixTests', | ||
'NetworkdMTUTests', |
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 it possible to get the list dynamically? Otherwise, newly added tests are easily forgotten.
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 tried but couldn't find a way to get it working. If you can figure out how to get the tests dynamically we can update this to use that.
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.
How about to call simple command something like the following?
sed -ne '/^class .*Tests/ { s/^class *//; s/(.*$//; p}' systemd-networkd-tests.py
But, it is OK to done later in another PR.
This adds a testsuite unit to run systemd-networkd-tests.py. This is mkosi only for now as python is not available in the images set up by the bash framework. We give the test a lower priority as it takes a while to run so we want to start it as soon as possible.
5fe75f0
to
aa09f30
Compare
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.
LGTM. Several further comments. But feel free to leave them to another PR.
'NetworkdDHCPClientTests', | ||
'NetworkdDHCPPDTests', | ||
'NetworkdIPv6PrefixTests', | ||
'NetworkdMTUTests', |
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.
How about to call simple command something like the following?
sed -ne '/^class .*Tests/ { s/^class *//; s/(.*$//; p}' systemd-networkd-tests.py
But, it is OK to done later in another PR.
Follow-up for systemd#32666.
Otherwise, several tests for networkd are skipped. Follow-up for systemd#32666.
Otherwise, several tests for networkd are skipped. Follow-up for systemd#32666.
Otherwise, several tests for networkd are skipped. Follow-up for systemd#32666.
Otherwise, several tests for networkd are skipped. Follow-up for systemd#32666.
Otherwise, several tests for networkd are skipped. Follow-up for systemd#32666.
[ Upstream commit 1af7f88 ] I missed that (struct ifaddrmsg)->ifa_flags was only 8bits, while (struct in_ifaddr)->ifa_flags is 32bits. Use a temporary 32bit variable as I did in set_ifa_lifetime() and check_lifetime(). Fixes: 3ddc223 ("inet: annotate data-races around ifa->ifa_flags") Reported-by: Yu Watanabe <watanabe.yu@gmail.com> Dianosed-by: Yu Watanabe <watanabe.yu@gmail.com> Closes: systemd/systemd#32666 (comment) Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://lore.kernel.org/r/20240510072932.2678952-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 1af7f88 ] I missed that (struct ifaddrmsg)->ifa_flags was only 8bits, while (struct in_ifaddr)->ifa_flags is 32bits. Use a temporary 32bit variable as I did in set_ifa_lifetime() and check_lifetime(). Fixes: 3ddc223 ("inet: annotate data-races around ifa->ifa_flags") Reported-by: Yu Watanabe <watanabe.yu@gmail.com> Dianosed-by: Yu Watanabe <watanabe.yu@gmail.com> Closes: systemd/systemd#32666 (comment) Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://lore.kernel.org/r/20240510072932.2678952-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 1af7f88 ] I missed that (struct ifaddrmsg)->ifa_flags was only 8bits, while (struct in_ifaddr)->ifa_flags is 32bits. Use a temporary 32bit variable as I did in set_ifa_lifetime() and check_lifetime(). Fixes: 3ddc223 ("inet: annotate data-races around ifa->ifa_flags") Reported-by: Yu Watanabe <watanabe.yu@gmail.com> Dianosed-by: Yu Watanabe <watanabe.yu@gmail.com> Closes: systemd/systemd#32666 (comment) Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://lore.kernel.org/r/20240510072932.2678952-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 1af7f88 ] I missed that (struct ifaddrmsg)->ifa_flags was only 8bits, while (struct in_ifaddr)->ifa_flags is 32bits. Use a temporary 32bit variable as I did in set_ifa_lifetime() and check_lifetime(). Fixes: 3ddc223 ("inet: annotate data-races around ifa->ifa_flags") Reported-by: Yu Watanabe <watanabe.yu@gmail.com> Dianosed-by: Yu Watanabe <watanabe.yu@gmail.com> Closes: systemd/systemd#32666 (comment) Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://lore.kernel.org/r/20240510072932.2678952-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This adds a testsuite unit to run systemd-networkd-tests.py. This is
mkosi only for now as python is not available in the images set up
by the bash framework. We give the test a lower priority as it takes
a while to run so we want to start it as soon as possible.