Merge ~kzapalowicz/snappy-hwe-snaps/+git/engineering-tests:fix/udisks2-inform-known-bug into ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master

Proposed by Konrad Zapałowicz
Status: Merged
Approved by: Simon Fels
Approved revision: a66dd1c7cdbc7cd43e9db9d8c32982299dcc92fc
Merged at revision: a7221848d8a24da609b009e777077bb06aae12e0
Proposed branch: ~kzapalowicz/snappy-hwe-snaps/+git/engineering-tests:fix/udisks2-inform-known-bug
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master
Diff against target: 57 lines (+42/-0)
1 file modified
udisks2/units/udisks2.pxu (+42/-0)
Reviewer Review Type Date Requested Status
Simon Fels Approve
System Enablement Bot continuous-integration Approve
Jim Hodapp (community) Approve
Scott Sweeny (community) Needs Fixing
Review via email: mp+317860@code.launchpad.net

Commit message

Improve udisks2 tests

- Inform about known bug of snapd which affects automount test
- Add tests case to verify that the automount feature does not
  mount system devices

Description of the change

Improve udisks2 tests

- Inform about known bug of snapd which affects automount test
- Add tests case to verify that the automount feature does not
  mount system devices

To post a comment you must log in.
Revision history for this message
Scott Sweeny (ssweeny) wrote :

A couple of spelling/grammar fixes.

review: Needs Fixing
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Scott Sweeny (ssweeny) wrote :

Actually come to think of it we should probably link to the bug here so the poor sap who has to run this later can check if it's been fixed.

review: Needs Fixing
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
Simon Fels (morphis) :
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

@Scott, sadly I do not have the bug id and I'm not sure it even exists. It is probably on virtual wishlist.

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

A few typos to fix.

review: Needs Fixing
Revision history for this message
Jim Hodapp (jhodapp) wrote :

A couple more minor changes needed.

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: Approve (continuous-integration)
Revision history for this message
Jim Hodapp (jhodapp) wrote :

LGTM

review: Approve
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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/udisks2/units/udisks2.pxu b/udisks2/units/udisks2.pxu
2index a889427..b3079e8 100644
3--- a/udisks2/units/udisks2.pxu
4+++ b/udisks2/units/udisks2.pxu
5@@ -131,6 +131,13 @@ _steps:
6 $ sudo snap get udisks2 automount.enable
7 _verification:
8 Verify that the returned value is "false"
9+ .
10+ Note that there is a known bug in snapd which preserves the state of the
11+ config options between snap remove and snap install. Therefore, if you have
12+ ever set the automount option to 'true' before, then it will not be 'false'
13+ even if you install the snap fresh. You need to use a fresh image for
14+ testing.
15+ bug url: https://bugs.launchpad.net/snapd/+bug/1636934
16
17 id: udisks2/automount/disabling_works
18 category_id: udisks2
19@@ -164,3 +171,38 @@ _steps:
20 _verification:
21 Verify that the filesystem on the USB device was mounted to
22 /media/root/<filesystem label>, for example /media/root/7C69-3855
23+
24+id: udisks2/automount/automount_does_not_mount_system_devices
25+category_id: udisks2
26+plugin: manual
27+depends: udisks2/automount/automount_works
28+_summary: When enabled, automount does not mount system devices
29+_purpose:
30+ Makes sure that automount is only restricted to pluggable devices, not system
31+_steps:
32+ 1. Make sure that automount is enabled. Run:
33+ .
34+ $ sudo snap set udisks2 automount.enable=true
35+ 3. Reboot the device and wait for it to power on again
36+ 4. Run the following:
37+ .
38+ $ sudo udisks2.udisksctl status
39+ .
40+ and check the names under the "DEVICE" column. It should just contain
41+ thumb drives [if any is plugged-in] and the filesystem. For example,
42+ in case of RaspberryPi it would contain just: mmcblk0.
43+ Make sure that system devices, such as an ESP partition, are
44+ not displayed here.
45+ 5. Examine the mount point:
46+ .
47+ $ sudo -s # You must be root to see the mount point
48+ $ ls /media/root
49+ .
50+ Make sure the contents of that directory match what you expect to see on
51+ the drive.
52+ .
53+ Leave the root shell
54+ $ exit
55+_verification:
56+ Verify that none of the system devices were mounted and their filesystems
57+ are not available /media/root/<filesystem label>

Subscribers

People subscribed via source and target branches