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

test: Add TEST-85-NETWORK to run systemd-networkd-tests.py #32666

Merged
merged 3 commits into from May 15, 2024

Conversation

DaanDeMeyer
Copy link
Contributor

@DaanDeMeyer DaanDeMeyer commented May 6, 2024

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.

@github-actions github-actions bot added build-system tests meson please-review PR is ready for (re-)review by a maintainer labels May 6, 2024
Copy link

github-actions bot commented May 6, 2024

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.

@bluca bluca added ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR and removed please-review PR is ready for (re-)review by a maintainer labels May 6, 2024
@github-actions github-actions bot added please-review PR is ready for (re-)review by a maintainer and removed ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR labels May 6, 2024
@bluca bluca added ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR and removed please-review PR is ready for (re-)review by a maintainer labels May 6, 2024
@github-actions github-actions bot added please-review PR is ready for (re-)review by a maintainer and removed ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR labels May 6, 2024
@DaanDeMeyer
Copy link
Contributor Author

@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)

@DaanDeMeyer DaanDeMeyer mentioned this pull request May 6, 2024
@DaanDeMeyer DaanDeMeyer force-pushed the mkosi-network branch 2 times, most recently from c745863 to 1db84ef Compare May 7, 2024 19:22
@bluca bluca added the ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR label May 8, 2024
@github-actions github-actions bot removed the ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR label May 9, 2024
@yuwata
Copy link
Member

yuwata commented May 10, 2024

The failure on Fedora rawhide is caused by torvalds/linux@3ddc223.

@yuwata
Copy link
Member

yuwata commented May 10, 2024

intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request May 10, 2024
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 <[email protected]>
Dianosed-by: Yu Watanabe <[email protected]>
Closes: systemd/systemd#32666 (comment)
Signed-off-by: Eric Dumazet <[email protected]>
@yuwata
Copy link
Member

yuwata commented May 10, 2024

@DaanDeMeyer About the failure in CentOS, it seems the test wrongly detects that sch_fq_codel module does not exist. But, from https://gitlab.com/redhat/centos-stream/rpms/kernel/-/blob/c9s/kernel-x86_64-rhel.config, sch_fq_codel is enabled and built-in.
Maybe modprobe is broken??

@DaanDeMeyer
Copy link
Contributor Author

@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.

kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request May 10, 2024
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 <[email protected]>
Dianosed-by: Yu Watanabe <[email protected]>
Closes: systemd/systemd#32666 (comment)
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: Larysa Zaremba <[email protected]>
Signed-off-by: NipaLocal <nipa@local>
kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request May 13, 2024
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 <[email protected]>
Dianosed-by: Yu Watanabe <[email protected]>
Closes: systemd/systemd#32666 (comment)
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: Larysa Zaremba <[email protected]>
Reviewed-by: David Ahern <[email protected]>
Signed-off-by: NipaLocal <nipa@local>
@yuwata
Copy link
Member

yuwata commented May 13, 2024

@DaanDeMeyer Thanks.

[ 1289.041546] systemd-networkd-tests.py[453]:   test_activation_policy_required_for_online (__main__.NetworkdNetworkTests.test_activation_policy_required_for_online) (policy='always-down', required='yes') ... FAIL
[ 1289.057316] systemd-journald[300]: [🡕] Suppressed 3126 messages from systemd-networkd.service

Huh...

@yuwata
Copy link
Member

yuwata commented May 13, 2024

The test generates so many debugging logs. Could you add something like the following?

# /etc/systemd/journald.conf.d/disable-ratelimit.conf
[Journal]
RateLimitIntervalSec=0
RateLimitBurst=0

@DaanDeMeyer
Copy link
Contributor Author

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.

@yuwata
Copy link
Member

yuwata commented May 13, 2024

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 mkosi: Disable journald rate-limiting does not work, and still some lines are dropped.
From https://github.com/systemd/systemd/actions/runs/9068670883/job/24916498168?pr=32791

[   55.913557] systemd-networkd-tests.py[430]:   test_activation_policy_required_for_online (__main__.NetworkdNetworkTests.test_activation_policy_required_for_online) (policy='always-down', required='yes') ... FAIL
[   55.928592] systemd-journald[299]: [🡕] Suppressed 2112 messages from systemd-networkd.service

Anyway, really disabling journal ratelimiting should make the test passed, hopefully.

kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request May 13, 2024
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 <[email protected]>
Dianosed-by: Yu Watanabe <[email protected]>
Closes: systemd/systemd#32666 (comment)
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: Larysa Zaremba <[email protected]>
Reviewed-by: David Ahern <[email protected]>
Signed-off-by: NipaLocal <nipa@local>
kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request May 14, 2024
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 <[email protected]>
Dianosed-by: Yu Watanabe <[email protected]>
Closes: systemd/systemd#32666 (comment)
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: Larysa Zaremba <[email protected]>
Reviewed-by: David Ahern <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
@yuwata
Copy link
Member

yuwata commented May 14, 2024

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',
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.
Copy link
Member

@yuwata yuwata left a 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.

test/test-network/systemd-networkd-tests.py Show resolved Hide resolved
'NetworkdDHCPClientTests',
'NetworkdDHCPPDTests',
'NetworkdIPv6PrefixTests',
'NetworkdMTUTests',
Copy link
Member

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.

@DaanDeMeyer DaanDeMeyer merged commit 985ea31 into systemd:main May 15, 2024
40 of 44 checks passed
@DaanDeMeyer DaanDeMeyer deleted the mkosi-network branch May 15, 2024 05:30
@github-actions github-actions bot removed the please-review PR is ready for (re-)review by a maintainer label May 15, 2024
yuwata added a commit to yuwata/systemd that referenced this pull request May 17, 2024
yuwata added a commit that referenced this pull request May 17, 2024
yuwata added a commit to yuwata/systemd that referenced this pull request May 19, 2024
Otherwise, several tests for networkd are skipped.

Follow-up for systemd#32666.
yuwata added a commit to yuwata/systemd that referenced this pull request May 20, 2024
Otherwise, several tests for networkd are skipped.

Follow-up for systemd#32666.
yuwata added a commit to yuwata/systemd that referenced this pull request May 20, 2024
Otherwise, several tests for networkd are skipped.

Follow-up for systemd#32666.
yuwata added a commit to yuwata/systemd that referenced this pull request May 20, 2024
Otherwise, several tests for networkd are skipped.

Follow-up for systemd#32666.
yuwata added a commit to yuwata/systemd that referenced this pull request May 20, 2024
Otherwise, several tests for networkd are skipped.

Follow-up for systemd#32666.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants