Using udev tagging for snap interfaces #3587

Closed
wants to merge 0 commits into
from

Conversation

Projects
None yet
5 participants
Contributor

adglkh commented Jul 13, 2017

It's a long-standing bug in snapd.
https://bugs.launchpad.net/snapd/+bug/1675738

We have some interfaces using udev tagging, but quite a few interfaces are still without udev tagging. So when people create a snap which has a combination of udev tagging plugs and none udev tagging plugs, an issue occurs due to device access denied since snap-confine only loads udev rules and creates a device cgroup for the tagged devices, excluding untagged ones.

Please fix the unit tests

interfaces/builtin/alsa.go
@@ -1,7 +1,7 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
/*
- * Copyright (C) 2016 Canonical Ltd
+ * Copyright (C) 2017 Canonical Ltd
@jhodapp

jhodapp Jul 20, 2017

No need to update any of these copyright years. The year is supposed to indicate the first time this file was published publicly.

@jdstrand jdstrand closed this Jul 24, 2017

Codecov Report

Merging #3587 into master will decrease coverage by 0.01%.
The diff coverage is 77.19%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3587      +/-   ##
==========================================
- Coverage   74.98%   74.96%   -0.02%     
==========================================
  Files         382      382              
  Lines       33116    33408     +292     
==========================================
+ Hits        24831    25044     +213     
- Misses       6485     6564      +79     
  Partials     1800     1800
Impacted Files Coverage Δ
interfaces/builtin/serial_port.go 66.07% <0%> (ø) ⬆️
interfaces/builtin/hidraw.go 65.76% <0%> (ø) ⬆️
interfaces/builtin/joystick.go 75% <100%> (+5%) ⬆️
interfaces/builtin/modem_manager.go 57.69% <100%> (+4.5%) ⬆️
interfaces/builtin/framebuffer.go 72.97% <100%> (+24.13%) ⬆️
interfaces/builtin/mir.go 71.79% <100%> (+5.12%) ⬆️
interfaces/builtin/time_control.go 72.97% <100%> (-0.72%) ⬇️
interfaces/builtin/bluez.go 72.09% <100%> (+4.52%) ⬆️
interfaces/builtin/pulseaudio.go 54.05% <100%> (+8.89%) ⬆️
interfaces/builtin/uhid.go 61.76% <100%> (-1.1%) ⬇️
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ee0003...8401774. Read the comment docs.

Contributor

jdstrand commented Jul 24, 2017

@adglkh - I tried to help resolve the conflict in opengl_test.go but messed something up and when undoing it I made it so I could not recommit to the branch. Can you recommit your local changes to this branch to get it back to where it was? You can then grab opengl_test.go from https://github.com/jdstrand/snapd/tree/adglkh.udev_tagging.

Sorry for the trouble. :(

jhodapp commented Jul 24, 2017

@jdstrand I'm curious why you closed this PR, was this intentional or by accident? I didn't see a reason for closing it.

Contributor

jdstrand commented Jul 24, 2017

@jhodapp - github did it as part of my mistake and I couldn't undo it. AIUI, when @adglkh recommits his changes to this PR, it will open again.

jhodapp commented Jul 24, 2017

@jdstrand ok no problem, thanks for the explanation.

Contributor

adglkh commented Jul 25, 2017

@jdstrand It seems to me there's no way to re-open it even after I re-committed my changes.
A new PR can be found here #3617
Please take a look. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment