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

Netplan support network manager 2404 PC Desktop Test case/plan (New) #1313

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

seankingyang
Copy link
Contributor

@seankingyang seankingyang commented Jun 25, 2024

Description

This PR only change/add the test case/plan to support the netplan test cases can be run in the 24.04 PC desktop test plan.
It need the #1301 PR script will make the script can support on the NetworkManager.
This PR need to wait the #1324 PR, or it will meet this issue:OEMQA-4582 NetworkManager test case impact in 24.04 Desktop

Change the requires field in bellow test cases:

  • {after-suspend-}wireless/wireless_connection_{open|WPA}_{bg|n|ac}_np_.*
  • {after-suspend-}wireless/wireless_connection_{open|WPA|WPA3}_{ax|be}_np_.*

From:

requires:
 wireless_sta_protocol.{{ interface }}_be == 'supported'
 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd'

TO:

requires:
 wireless_sta_protocol.{{ interface }}_be == 'supported'
 (net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd') or lsb.release >= "24"

Add a new test plan {after-suspend-}wireless-netplan-cert-automated to support the following test cases:

  • {after-suspend-}wireless/wireless_connection_{open|WPA}_{bg|n|ac}_np_.*
  • {after-suspend-}wireless/wireless_connection_{open|WPA|WPA3}_{ax|be}_np_.*

Resolved issues

Documentation

Tests

Copy link

codecov bot commented Jun 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.81%. Comparing base (3ba7e2c) to head (d709a5b).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1313      +/-   ##
==========================================
- Coverage   47.10%   46.81%   -0.29%     
==========================================
  Files         368      367       -1     
  Lines       39435    39334     -101     
  Branches     6667     6650      -17     
==========================================
- Hits        18574    18413     -161     
- Misses      20156    20232      +76     
+ Partials      705      689      -16     
Flag Coverage Δ
provider-base 23.04% <ø> (ø)
provider-certification-client 57.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@seankingyang seankingyang changed the title Netplan support network manager 2404 Netplan support network manager 2404 PC Desktop Test case/plan (New) Jun 25, 2024
@fernando79513 fernando79513 self-assigned this Jul 16, 2024
@seankingyang seankingyang force-pushed the Netplan_support_NetworkManager_2404 branch from a5947ff to 2e11d89 Compare August 30, 2024 08:58
@seankingyang
Copy link
Contributor Author

Rebase

@seankingyang seankingyang marked this pull request as ready for review September 18, 2024 03:22
@fernando79513
Copy link
Collaborator

So the idea of this PR is that the netplan wireless tests are run in 24.04 onwards despite of the results of the net_if_management resource.
That's because the net_if_management resource does not work properly in 24.04?
Could it be possible to modify net_if_management.py to work in both cases and keep the syntax of the requires section as simple as possible?

wireless/wireless_connection_wpa_be_nm_interface certification-status=blocker
wireless/wireless_connection_wpa3_be_nm_interface certification-status=blocker
wireless/wireless_connection_open_be_nm_interface certification-status=blocker
wireless/wireless_connection_wpa_be_nm_.* certification-status=blocker
Copy link
Collaborator

Choose a reason for hiding this comment

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

The preferred way to do this now is using the template id ("wireless/wireless_connection_wpa_XX_nm_interface") to create the test plan instead of the regex pattern. Instead of changing this back to it's original state, please change the rest of the tests to use the template ID if you want to keep the previous order.

@seankingyang
Copy link
Contributor Author

seankingyang commented Sep 27, 2024

net_if_management can be run in the 24.04.
Here is the output:

===========================[ Running Selected Jobs ]============================
==============[ Running job 1 / 1. Estimated time left: 0:00:02 ]===============
-----[ Identify what service is managing each physical network interface ]------
ID: com.canonical.certification::net_if_management
Category: com.canonical.certification::information_gathering
... 8< -------------------------------------------------------------------------
device: eno1
managed_by: NetworkManager
master_mode_managed_by: not-applicable

device: wlp2s0f0
managed_by: NetworkManager
master_mode_managed_by: NetworkManager

------------------------------------------------------------------------- >8 ---
Outcome: job passed

wireless/wireless_connection_wpa_XX_netplan_* were supposed to run when management_by == 'networkd'.
In 24.04, it suppose to be run in both management_by == 'networkd' and management_by == 'NetworkManger'. (Netplan officially used in 24.04, not officially used before 24.04.)

(net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd') is for OS Version < 24.

Do you have any suggestion to change the way if not use complex syntax of requires section?
My ideal is put the conditional net_if_management.managed_by == 'networkd' or lsb.release >= "24" in the net_if_management.py, print netplan_supported: <True/False> in output:
so the format when OS < 24 will be like:

device: eno1
managed_by: networkd
master_mode_managed_by: not-applicable
netplan_supported: True

device: wlp2s0f0
managed_by: networkd
master_mode_managed_by: NetworkManager
netplan_supported: True

and

device: eno1
managed_by: NetworkManager
master_mode_managed_by: not-applicable
netplan_supported: False

device: wlp2s0f0
managed_by: NetworkManager
master_mode_managed_by: NetworkManager
netplan_supported: False

The for format when OS >=24 will be like:

device: eno1
managed_by: NetworkManager
master_mode_managed_by: not-applicable
netplan_supported: True

device: wlp2s0f0
managed_by: NetworkManager
master_mode_managed_by: NetworkManager
netplan_supported: True

@seankingyang
Copy link
Contributor Author

seankingyang commented Sep 27, 2024

After I use template-id, the order will be random, the test cases can't keep the order which is pre-defined in wireless-netplan-cert-automated and client-cert-desktop-24-04-automated.
The order is different in each time when I run the checkbox.

Please check the following attachment.

auto_certtestplan_with_template_id_1.log
auto_certtestplan_with_template_id_2.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants