Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/modem-manager:fix-exec-log into ~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager:master

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Simon Fels
Approved revision: c3da3fc28a356a1564c909a3cccad29b5f9e434e
Merged at revision: 730050d6c458ad3291b8066defab4cb3fc6978d2
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/modem-manager:fix-exec-log
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager:master
Diff against target: 45 lines (+14/-4)
3 files modified
bin/modemmanager (+1/-4)
spread.yaml (+7/-0)
tests/main/installation/task.yaml (+6/-0)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Simon Fels Approve
Review via email: mp+324732@code.launchpad.net

Commit message

Avoid forking on start and fix log level (LP: #1670815)

Description of the change

Avoid forking on start and fix log level (LP: #1670815)

To post a comment you must log in.
Revision history for this message
Simon Fels (morphis) wrote :

LGTM, a quick spread test would be nice to grep through the journalctl output and ensure that there is no line with "..ModemManager[1646]: <debug> ..".

review: Needs Fixing
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Simon Fels (morphis) :
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/modemmanager b/bin/modemmanager
2index f7d2fce..bafdfbc 100755
3--- a/bin/modemmanager
4+++ b/bin/modemmanager
5@@ -8,7 +8,4 @@ set -x
6 # loader happy and find the plugins at the right location
7 export SNAP_APP_PATH=$SNAP
8
9-$SNAP/usr/sbin/ModemManager \
10- --debug \
11- --log-level=DEBUG \
12- "$@"
13+exec $SNAP/usr/sbin/ModemManager "$@"
14diff --git a/spread.yaml b/spread.yaml
15index 01ad806..1368084 100644
16--- a/spread.yaml
17+++ b/spread.yaml
18@@ -44,6 +44,13 @@ exclude:
19 prepare: |
20 . $TESTSLIB/prepare-all.sh
21
22+prepare-each: |
23+ # Cleanup logs so we can just dump what has happened in the debug-each
24+ # step below after a test case ran.
25+ journalctl --rotate
26+ journalctl --vacuum-time=1ms
27+ dmesg -c > /dev/null
28+
29 suites:
30 tests/main/:
31 summary: Full-system tests for ModemManager
32diff --git a/tests/main/installation/task.yaml b/tests/main/installation/task.yaml
33index acf157b..243f44d 100644
34--- a/tests/main/installation/task.yaml
35+++ b/tests/main/installation/task.yaml
36@@ -11,3 +11,9 @@ execute: |
37
38 # Ensure all necessary plugs/slots are connected
39 snap interfaces | grep -Pzq "modem-manager:service +modem-manager:mmcli"
40+
41+ # Make sure the daemon's parent is PID 1
42+ pgrep -P 1 ModemManager
43+
44+ # Make sure debug log is disabled
45+ ! sudo journalctl --unit=snap.modem-manager.modemmanager.service | MATCH "<debug>"

Subscribers

People subscribed via source and target branches