Merge ~stanley31/plainbox-provider-checkbox:wwan_fixed into plainbox-provider-checkbox:master

Proposed by StanleyHuang
Status: Merged
Approved by: Jonathan Cave
Approved revision: 410a7e53749b41d649e57495c9f3ed5032c9149f
Merged at revision: eac6c51d45898c46a60961e5f5c2d4bca9a9d813
Proposed branch: ~stanley31/plainbox-provider-checkbox:wwan_fixed
Merge into: plainbox-provider-checkbox:master
Diff against target: 22 lines (+2/-2)
1 file modified
bin/wwan_tests.py (+2/-2)
Reviewer Review Type Date Requested Status
Jonathan Cave (community) Approve
Checkbox Developers Pending
Review via email: mp+406132@code.launchpad.net

Commit message

Description of the change

Attached test results and the the provider test logs.

# Test result with SIM card inserted:
Finalizing session that hasn't been submitted anywhere: checkbox-run-2021-07-23T07.01.38
==================================[ Results ]===================================
 ☑ : Gather device info about WWAN modems
 ☑ : Collect information about installed software packages
 ☑ : Hardware Manifest
 ☑ : Collect information about installed snap packages
 ☑ : Verify a GSM broadband modem can create a data connection
 ☑ : Check if a SIM card is present in a slot connected to the modem

# Test result without SIM card inserted:
-------------[ Running job 1 / 2. Estimated time left: 0:00:20 ]---------------
---------[ Verify a GSM broadband modem can create a data connection ]----------
ID: com.canonical.certification::wwan/gsm-connection-generic-MBIM [1EAC:1002]-864292050075850-auto
Category: com.canonical.certification::wwan
... 8< -------------------------------------------------------------------------
Connection 'GSMCONN' (ef763d84-7978-4d72-bf69-e1a6d8fc7c03) successfully added.
Error: Device for nexthop is not up.
Connection 'GSMCONN' (ef763d84-7978-4d72-bf69-e1a6d8fc7c03) successfully deleted.
==== Service units logs ====
------------------------------------------------------------------------- >8 ---
Outcome: job failed
--------------[ Running job 2 / 2. Estimated time left: 0:00:10 ]---------------
------[ Check if a SIM card is present in a slot connected to the modem ]-------
ID: com.canonical.certification::wwan/check-sim-present-generic-MBIM [1EAC:1002]-864292050075850-auto
Category: com.canonical.certification::wwan
... 8< -------------------------------------------------------------------------
INFO:root:SIM Path: /
------------------------------------------------------------------------- >8 ---
Outcome: job failed
Finalizing session that hasn't been submitted anywhere: checkbox-run-2021-07-23T06.31.10
==================================[ Results ]===================================
 ☑ : Gather device info about WWAN modems
 ☑ : Collect information about installed snap packages
 ☑ : Collect information about installed software packages
 ☑ : Hardware Manifest
 ☑ : Identify if WWAN module is missing
 ☒ : Verify a GSM broadband modem can create a data connection
 ☒ : Check if a SIM card is present in a slot connected to the modem

# Provider test logs:
u@u-Latitude-7420:/var/tmp/checkbox-providers/plainbox-provider-checkbox$ python3 manage.py test
...
test_flake8_/var/tmp/checkbox-providers/plainbox-provider-checkbox/bin/wwan_tests.py (plainbox.provider_manager.Flake8Tests) ... ok

u@u-Latitude-7420:/var/tmp/checkbox-providers/plainbox-provider-checkbox$ ./manage.py validate
WARNING plainbox.providers.__init__: Using sideloaded provider: plainbox-provider-checkbox, version 0.60.0.dev0 from /var/tmp/checkbox-providers/plainbox-provider-checkbox
warning: units/monitor/test-plan.pxu:192-212: test plan 'after-suspend-manual-monitor-integrated-gpu-cert-blockers', field 'name', please stay under 80 characters
NOTE: 1 advice was hidden
Run 'manage.py validate --strict --deprecated' for details
The provider seems to be valid

To post a comment you must log in.
Revision history for this message
Jonathan Cave (jocave) wrote :

A few requests to make this easier to process:

- the "task_type" mechanism seems a bit strange - it looks to me like you could just `raise SystemExit("<Fail info..>")` at the point the test fails and not do all this handling later on
- addition of logging could be considered an improvement, but not necessary to fix the bug and distracts from understanding the change, i would remove it for now
- please follow the contribution guide and make sure the commit message is the format requested

review: Needs Fixing
Revision history for this message
Jonathan Cave (jocave) wrote :

Could you also remove this other Jonathan Cave account from the reviewers I have no idea where that has come from

Revision history for this message
StanleyHuang (stanley31) wrote :

> Could you also remove this other Jonathan Cave account from the reviewers I
> have no idea where that has come from

it seems I could not remove a reviewer, so I just reassigned to me for now.
or do you think anybody who may fit to review this one?

Revision history for this message
Jonathan Cave (jocave) wrote :

Generally MRs should be made to checkbox-dev so that anyone from the team can pick them up. Obviously an individual can be added if they have some specific connection to the MR

Revision history for this message
StanleyHuang (stanley31) wrote :

Fixed the script per Jonathan's suggestion.

Revision history for this message
Jonathan Cave (jocave) wrote :

Commit message looks good, well formatted.

Fix is directly for the bug in question, LGTM.

Thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/wwan_tests.py b/bin/wwan_tests.py
2index 9bbf1e7..5790ad8 100755
3--- a/bin/wwan_tests.py
4+++ b/bin/wwan_tests.py
5@@ -282,7 +282,7 @@ class ThreeGppConnection():
6 pass
7 _destroy_3gpp_connection()
8 _wwan_radio_off()
9- return ret_code
10+ sys.exit(ret_code)
11
12
13 class CountModems():
14@@ -334,7 +334,7 @@ class SimPresent():
15 mm = MMDbus()
16 mm_id = mm.equipment_id_to_mm_id(args.hw_id)
17 if not mm.sim_present(mm_id):
18- return 1
19+ sys.exit(1)
20
21
22 class SimInfo():

Subscribers

People subscribed via source and target branches