mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
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.
|
|
|
|
execute: |
|
|
if [ "$(snap debug confinement)" = none ] ; then
|
|
exit 0
|
|
fi
|
|
|
|
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
|