File: task.yaml

package info (click to toggle)
snapd 2.74.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 81,428 kB
  • sloc: sh: 16,966; ansic: 16,788; python: 11,332; makefile: 1,897; exp: 190; awk: 58; xml: 22
file content (35 lines) | stat: -rw-r--r-- 1,190 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
summary: Ensure that the basic devpts security rules are in place.

details: |
    Test that a snap which has a plug for the physical-memory-observe interface
    can read /dev/pts, can openpty, and can access the PTY via /dev/ptmx, both
    with and without the physical-memory-observe interface connected.

skip:
    - reason: The systems has "none" debug confinement
      if: |
        [ "$(snap debug confinement)" = none ]

execute: |
    echo "Given a basic snap is installed"
    "$TESTSTOOLS"/snaps-state install-local test-snapd-devpts

    echo "When no plugs are not connected"
    if snap interfaces -i physical-memory-observe | MATCH ":physical-memory-observe .*test-snapd-devpts" ; then
        snap disconnect test-snapd-devpts:physical-memory-observe
    fi

    echo "Then can openpty"
    test-snapd-devpts.openpty | MATCH PASS

    echo "Then can access slave PTY"
    test-snapd-devpts.useptmx | MATCH PASS

    echo "When a udev tagging plug is connected"
    snap connect test-snapd-devpts:physical-memory-observe

    echo "Then can openpty"
    test-snapd-devpts.openpty | MATCH PASS

    echo "Then can access slave PTY"
    test-snapd-devpts.useptmx | MATCH PASS