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 (35 lines) | stat: -rw-r--r-- 1,270 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
34
35
summary: Ensure that we accounted for all syscalls known to libseccomp

details: |
  The snap-seccomp tool maintains a list of all syscalls supported by
  libseccomp. The test ensures that we catch when the internal list is not in
  sync with upstream anymore, and thus an update is needed. See
  https://forum.snapcraft.io/t/spread-test-failing-due-to-new-syscalls/12018 for
  more details.

# one system is enough
systems: [ubuntu-24.04-64]

# Start early as it takes a long time.
priority: 100

execute: |
    echo "Build a list of syscalls known to libseccomp by using the internal test tool arch-syscall-dump"
    git clone https://github.com/seccomp/libseccomp
    pushd libseccomp
    # so that we know what is the latest revision tried in the test
    git log -1
    ./autogen.sh
    ./configure
    pushd src && make arch-syscall-dump
    for arch in x86 x86_64 s390 ppc64 aarch64 arm; do
        ./arch-syscall-dump -a "$arch" | awk '{print $1}' >> syscalls.list
    done
    sort -u syscalls.list > ../../syscalls.uniq
    cd ../..

    echo "Grab the list snap-seccomp knows about"
    go run listcalls.go > syscalls.known

    echo "Check that both lists are identical, otherwise we need an update in snap-seccomp"
    diff -up syscalls.uniq syscalls.known