Skip to content

wwan_resource output is not RFC822 compliant if firmware revision is multi-line #1505

@pieqq

Description

@pieqq

Bug Description

On a device (202408-34247) with a MTK WWAN, there is an issue when the wwan_resource job is launched:

WARNING:plainbox.ctrl:local script com.canonical.certification::wwan_resource returned invalid RFC822 data: Unexpected non-empty line: '0060\n' (line 6)

This is because one of the field is not escaped and runs on multiple lines (see logs below)

To Reproduce

  1. Launch checkbox-cli run com.canonical.certification::wwan_resource
  2. Observe the firmware_revision field runs on two lines instead of one

Environment

Checkbox dev

Relevant log output

wwan_resource outcome:


ubuntu@localhost:~$ checkbox-cli run com.canonical.certification::wwan_resource
Skipped file: /usr/share/checkbox-provider-base/units/camera/README.rst
Skipped file: /usr/share/checkbox-provider-base/units/snapd/README.md
Skipped file: /usr/share/checkbox-provider-base/units/stress/suspend_cycles_reboot.md
===========================[ Running Selected Jobs ]============================
==============[ Running job 1 / 1. Estimated time left: 0:00:03 ]===============
--------------------[ Gather device info about WWAN modems ]--------------------
ID: com.canonical.certification::wwan_resource
Category: com.canonical.certification::wwan
... 8< -------------------------------------------------------------------------
mm_id: 1
hw_id: 357953120018642
manufacturer: mtk
model: MBIM [14C0:4D75]
firmware_revision: RMM-G1.10.00.060_GC
0060
hardware_revision: MTK2

------------------------------------------------------------------------- >8 ---
Outcome: job passed
local script com.canonical.certification::wwan_resource returned invalid RFC822 data: Unexpected non-empty line: '0060\n' (line 6)
Finalizing session that hasn't been submitted anywhere: checkbox-run-2024-09-26T07.12.55
==================================[ Results ]===================================
 ☑ : Gather device info about WWAN modems

MMCLI info:

ubuntu@localhost:~$ mmcli -L
    /org/freedesktop/ModemManager1/Modem/1 [mtk] MBIM [14C0:4D75]


### Additional context

_No response_

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions