Skip to content

Commit

Permalink
interfaces/udev: generate rules with deprecated command line (#13882)
Browse files Browse the repository at this point in the history
Snapd from the snap generate udev rules that executes snap-device-helper
from the host. In cases when the snap is newer than the package, the
new command line is rejected by the old snap-device-helper from the
package. Because the new snap-device-helper accepts old command-line,
but just ignores the extra parameters, it is safer for now to generate
rules with the old command line.
  • Loading branch information
valentindavid authored and ernestl committed Apr 24, 2024
1 parent e56b10f commit b32dcdc
Show file tree
Hide file tree
Showing 64 changed files with 91 additions and 91 deletions.
2 changes: 1 addition & 1 deletion interfaces/builtin/acrn_support_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (s *acrnSupportInterfaceSuite) TestUDevSpec(c *C) {
c.Assert(spec.Snippets(), HasLen, 2)
c.Assert(spec.Snippets()[0], Equals, `# acrn-support
KERNEL=="acrn_hsm", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%s/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%s/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *acrnSupportInterfaceSuite) TestStaticInfo(c *C) {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/allegro_vcu_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ SUBSYSTEM=="allegro_encode_class", KERNEL=="allegroIP", TAG+="snap_consumer_app"
c.Assert(spec.Snippets(), testutil.Contains, `# allegro-vcu
SUBSYSTEM=="char", KERNEL=="dmaproxy", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(
`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *AllegroVcuInterfaceSuite) TestStaticInfo(c *C) {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/alsa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (s *AlsaInterfaceSuite) TestUDevpec(c *C) {
c.Assert(spec.Snippets(), HasLen, 8)
c.Assert(spec.Snippets(), testutil.Contains, `# alsa
KERNEL=="pcmC[0-9]*D[0-9]*[cp]", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *AlsaInterfaceSuite) TestStaticInfo(c *C) {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/audio_playback_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ KERNEL=="controlC[0-9]*", TAG+="snap_audio-playback_app1"`)
KERNEL=="pcmC[0-9]*D[0-9]*[cp]", TAG+="snap_audio-playback_app1"`)
c.Assert(spec.Snippets(), testutil.Contains, `# audio-playback
KERNEL=="timer", TAG+="snap_audio-playback_app1"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_audio-playback_app1", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_audio-playback_app1"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_audio-playback_app1", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_audio-playback_app1 $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *AudioPlaybackInterfaceSuite) TestInterfaces(c *C) {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/block_devices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (s *blockDevicesInterfaceSuite) TestUDevSpec(c *C) {
c.Assert(spec.Snippets(), HasLen, 5)
c.Assert(spec.Snippets()[0], Equals, `# block-devices
KERNEL=="megaraid_sas_ioctl_node", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *blockDevicesInterfaceSuite) TestStaticInfo(c *C) {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/bluetooth_control_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (s *BluetoothControlInterfaceSuite) TestUDevSpec(c *C) {
SUBSYSTEM=="bluetooth", TAG+="snap_other_app2"`)
c.Assert(spec.Snippets(), testutil.Contains, `# bluetooth-control
SUBSYSTEM=="BT_chrdev", TAG+="snap_other_app2"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_other_app2", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_other_app2"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_other_app2", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_other_app2 $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *BluetoothControlInterfaceSuite) TestInterfaces(c *C) {
Expand Down
4 changes: 2 additions & 2 deletions interfaces/builtin/bluez_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func (s *BluezInterfaceSuite) TestUDevSpec(c *C) {
c.Assert(spec.Snippets(), HasLen, 2)
c.Assert(spec.Snippets(), testutil.Contains, `# bluez
KERNEL=="rfkill", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))

// on a classic system with bluez slot coming from the core snap.
restore = release.MockOnClassic(true)
Expand All @@ -261,7 +261,7 @@ KERNEL=="rfkill", TAG+="snap_consumer_app"`)
c.Assert(spec.AddConnectedPlug(s.iface, s.plug, s.coreSlot), IsNil)
c.Assert(spec.Snippets(), HasLen, 2)
c.Assert(spec.Snippets()[0], testutil.Contains, `KERNEL=="rfkill", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))

}

Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/broadcom_asic_control_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (s *BroadcomAsicControlSuite) TestUDevSpec(c *C) {
c.Assert(spec.Snippets(), HasLen, 3)
c.Assert(spec.Snippets(), testutil.Contains, `# broadcom-asic-control
SUBSYSTEM=="net", KERNEL=="bcm[0-9]*", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *BroadcomAsicControlSuite) TestKModSpec(c *C) {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/camera_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (s *CameraInterfaceSuite) TestUDevSpec(c *C) {
KERNEL=="video[0-9]*", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, `# camera
KERNEL=="vchiq", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *CameraInterfaceSuite) TestStaticInfo(c *C) {
Expand Down
4 changes: 2 additions & 2 deletions interfaces/builtin/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ slots:
c.Assert(spec.Snippets(), DeepEquals, []string{
`# common
KERNEL=="foo", TAG+="snap_consumer_app-a"`,
fmt.Sprintf(`TAG=="snap_consumer_app-a", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app-a"`, dirs.DistroLibExecDir),
fmt.Sprintf(`TAG=="snap_consumer_app-a", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app-a $devpath $major:$minor"`, dirs.DistroLibExecDir),
// NOTE: app-b is unaffected as it doesn't have a plug reference.
`# common
KERNEL=="foo", TAG+="snap_consumer_app-c"`,
fmt.Sprintf(`TAG=="snap_consumer_app-c", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app-c"`, dirs.DistroLibExecDir),
fmt.Sprintf(`TAG=="snap_consumer_app-c", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app-c $devpath $major:$minor"`, dirs.DistroLibExecDir),
})

// connected plug udev rules are optional
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/device_buttons_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (s *DeviceButtonsInterfaceSuite) TestUDevSpec(c *C) {
KERNEL=="event[0-9]*", SUBSYSTEM=="input", ENV{ID_INPUT_KEY}=="1", ENV{ID_INPUT_KEYBOARD}!="1", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, `# device-buttons
KERNEL=="full", SUBSYSTEM=="mem", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))
c.Assert(spec.TriggeredSubsystems(), DeepEquals, []string{"input/key"})
}

Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/dm_crypt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ KERNEL=="dm-[0-9]", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, `# dm-crypt
SUBSYSTEM=="block", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains,
fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *DmCryptInterfaceSuite) TestSeccompSpec(c *C) {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/dsp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (s *dspSuite) TestUDevConnectedPlugAmbarella(c *C) {
c.Assert(spec.Snippets(), HasLen, 6)
c.Assert(spec.Snippets(), testutil.Contains, `# dsp
KERNEL=="iav", TAG+="snap_my-device_svc"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_my-device_svc", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_my-device_svc"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_my-device_svc", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_my-device_svc $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *dspSuite) TestUDevConnectedPlugNoFlavor(c *C) {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/dvb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (s *DvbInterfaceSuite) TestUDevSpec(c *C) {
c.Assert(spec.Snippets(), HasLen, 2)
c.Assert(spec.Snippets(), testutil.Contains, `# dvb
SUBSYSTEM=="dvb", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *DvbInterfaceSuite) TestStaticInfo(c *C) {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/fpga_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (s *FpgaInterfaceSuite) TestUDevSpec(c *C) {
c.Assert(spec.Snippets(), HasLen, 2)
c.Assert(spec.Snippets(), testutil.Contains, `# fpga
SUBSYSTEM=="misc", KERNEL=="fpga[0-9]*", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *FpgaInterfaceSuite) TestStaticInfo(c *C) {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/framebuffer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (s *FramebufferInterfaceSuite) TestUDevSpec(c *C) {
c.Assert(spec.Snippets(), HasLen, 2)
c.Assert(spec.Snippets()[0], Equals, `# framebuffer
KERNEL=="fb[0-9]*", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *FramebufferInterfaceSuite) TestStaticInfo(c *C) {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/fuse_support_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (s *FuseSupportInterfaceSuite) TestUDevSpec(c *C) {
c.Assert(spec.Snippets(), HasLen, 2)
c.Assert(spec.Snippets(), testutil.Contains, `# fuse-support
KERNEL=="fuse", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *FuseSupportInterfaceSuite) TestStaticInfo(c *C) {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/fwupd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ KERNEL=="wmi/dell-smbios", TAG+="snap_uefi-fw-tools_app2"`)
c.Assert(snippets[11], Equals, `# fwupd
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", TAG+="snap_uefi-fw-tools_app2"`)

expected := fmt.Sprintf(`TAG=="snap_uefi-fw-tools_app2", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_uefi-fw-tools_app2"`, dirs.DistroLibExecDir)
expected := fmt.Sprintf(`TAG=="snap_uefi-fw-tools_app2", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_uefi-fw-tools_app2 $devpath $major:$minor"`, dirs.DistroLibExecDir)
c.Assert(snippets[12], Equals, expected)

// The implicit slot found on classic systems does not generate any rules
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/hardware_random_control_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (s *HardwareRandomControlInterfaceSuite) TestUDevSpec(c *C) {
c.Assert(spec.Snippets(), HasLen, 2)
c.Assert(spec.Snippets(), testutil.Contains, `# hardware-random-control
KERNEL=="hwrng", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *HardwareRandomControlInterfaceSuite) TestStaticInfo(c *C) {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/builtin/hardware_random_observe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (s *HardwareRandomObserveInterfaceSuite) TestUDevSpec(c *C) {
c.Assert(spec.Snippets(), HasLen, 2)
c.Assert(spec.Snippets(), testutil.Contains, `# hardware-random-observe
KERNEL=="hwrng", TAG+="snap_consumer_app"`)
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper snap_consumer_app"`, dirs.DistroLibExecDir))
c.Assert(spec.Snippets(), testutil.Contains, fmt.Sprintf(`TAG=="snap_consumer_app", SUBSYSTEM!="module", SUBSYSTEM!="subsystem", RUN+="%v/snap-device-helper $env{ACTION} snap_consumer_app $devpath $major:$minor"`, dirs.DistroLibExecDir))
}

func (s *HardwareRandomObserveInterfaceSuite) TestStaticInfo(c *C) {
Expand Down
Loading

0 comments on commit b32dcdc

Please sign in to comment.