Can't run apps named "test" in snap

Bug #1886786 reported by Taiten Peng on 2020-07-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ian Johnson

Bug Description

A Snap provides an app named "test" will lead to an error as following

-- Errors when run app named "test" from a snap

$ test-snap.test
panic: /proc/self/mountinfo must be mocked in tests

goroutine 1 [running]:, 0x0, 0x0, 0x0, 0x0) +0x2bd, 0xc0001108c0, 0xd) +0x39, 0xc000110700, 0xe0) +0x15b, 0xe0, 0x55a477c30c60) +0x36
main.maybeWaitForSecurityProfileRegeneration(0xc000110700, 0xc000257680, 0xd) +0x28
main.(*cmdRun).Execute(0xc000227ee0, 0xc0000321d0, 0x0, 0x1, 0x0, 0x0) +0x16c
main.main() +0x57e

-- Sample snapcraft.yaml for issue reproduce

name: test-snap # you probably want to 'snapcraft register <name>'
base: core18 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
  This is my-snap's description. You have a paragraph or two to tell the
  most important story about your snap. Keep it under 100 words though,
  we live in tweetspace and your description wants to look good in the snap

grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots

    command: echo test

    # See 'snapcraft plugins'
    plugin: nil

Taiten Peng (taitenpeng) on 2020-07-08
description: updated
Changed in snapd:
assignee: nobody → Ian Johnson (anonymouse67)
status: New → Triaged
importance: Undecided → High
Ian Johnson (anonymouse67) wrote :
Changed in snapd:
status: Triaged → In Progress
Changed in snapd:
milestone: none → 2.46
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers