File: task.yaml

package info (click to toggle)
snapd 2.71-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 79,536 kB
  • sloc: ansic: 16,114; sh: 16,105; python: 9,941; makefile: 1,890; exp: 190; awk: 40; xml: 22
file content (33 lines) | stat: -rw-r--r-- 1,033 bytes parent folder | download | duplicates (2)
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
summary: Check that snaps can use start-timeout

details: |
    Snaps may have forking services, which are expected to call fork() as part
    of start-up and the parent process is then expected to exit when start-up
    is complete.

    A forking service may have a `start-timeout` value set, where if the parent
    process does not exit within the given timeout, the installation fails.

    This test verifies that if a forking service fails to exit within the
    timeout, the installation fails, and if it does exit within the timeout,
    the installation is successful.

# this test is expected to fail once we run the tests for SELinux
# distros in Enforce mode

restore: |
    f=test-snapd-service-start-timeout/forking.sh
    if [ -e "$f.bak" ]; then
        mv -v "$f.bak" "$f"
    fi

execute: |
    dir=test-snapd-service-start-timeout

    # with the 30s sleep, start-timeout stops the snap from working
    not snap try "$dir"

    # drop the 'sleep 30'
    sed -i -e '/@@@/d' "$dir/forking.sh"

    snap try "$dir"