The 14.04 build is using a github.com/mvo5/libseccomp-golang fork, which is even
further behind on fixes, that combined with clang being picky fails the build
like so
../../../../pkg/mod/github.com/mvo5/libseccomp-golang@v0.9.1-0.20180308152521-f4de83b52afb/seccomp_internal.go:404:2: duplicate case _Ciconst_C_ARCH_MIPS (value 4294967295) in switch
previous case at $WORK/b338/_cgo_gotypes.go:75:7
../../../../pkg/mod/github.com/mvo5/libseccomp-golang@v0.9.1-0.20180308152521-f4de83b52afb/seccomp_internal.go:406:2: duplicate case _Ciconst_C_ARCH_MIPS64 (value 4294967295) in switch
previous case at $WORK/b338/_cgo_gotypes.go:75:7
../../../../pkg/mod/github.com/mvo5/libseccomp-golang@v0.9.1-0.20180308152521-f4de83b52afb/seccomp_internal.go:408:2: duplicate case _Ciconst_C_ARCH_MIPS64N32 (value 4294967295) in switch
previous case at $WORK/b338/_cgo_gotypes.go:75:7
../../../../pkg/mod/github.com/mvo5/libseccomp-golang@v0.9.1-0.20180308152521-f4de83b52afb/seccomp_internal.go:410:2: duplicate case _Ciconst_C_ARCH_MIPSEL (value 4294967295) in switch
previous case at $WORK/b338/_cgo_gotypes.go:75:7
../../../../pkg/mod/github.com/mvo5/libseccomp-golang@v0.9.1-0.20180308152521-f4de83b52afb/seccomp_internal.go:412:2: duplicate case _Ciconst_C_ARCH_MIPSEL64 (value 4294967295) in switch
previous case at $WORK/b338/_cgo_gotypes.go:75:7
../../../../pkg/mod/github.com/mvo5/libseccomp-golang@v0.9.1-0.20180308152521-f4de83b52afb/seccomp_internal.go:414:2: duplicate case _Ciconst_C_ARCH_MIPSEL64N32 (value 4294967295) in switch
previous case at $WORK/b338/_cgo_gotypes.go:75:7
../../../../pkg/mod/github.com/mvo5/libseccomp-golang@v0.9.1-0.20180308152521-f4de83b52afb/seccomp_internal.go:416:2: duplicate case _Ciconst_C_ARCH_PPC (value 4294967295) in switch
previous case at $WORK/b338/_cgo_gotypes.go:75:7
../../../../pkg/mod/github.com/mvo5/libseccomp-golang@v0.9.1-0.20180308152521-f4de83b52afb/seccomp_internal.go:418:2: duplicate case _Ciconst_C_ARCH_PPC64 (value 4294967295) in switch
previous case at $WORK/b338/_cgo_gotypes.go:75:7
../../../../pkg/mod/github.com/mvo5/libseccomp-golang@v0.9.1-0.20180308152521-f4de83b52afb/seccomp_internal.go:420:2: duplicate case _Ciconst_C_ARCH_PPC64LE (value 4294967295) in switch
previous case at $WORK/b338/_cgo_gotypes.go:75:7
../../../../pkg/mod/github.com/mvo5/libseccomp-golang@v0.9.1-0.20180308152521-f4de83b52afb/seccomp_internal.go:422:2: duplicate case _Ciconst_C_ARCH_S390 (value 4294967295) in switch
previous case at $WORK/b338/_cgo_gotypes.go:75:7
../../../../pkg/mod/github.com/mvo5/libseccomp-golang@v0.9.1-0.20180308152521-f4de83b52afb/seccomp_internal.go:422:2: too many errors
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Since some parts of the code depend on 3rd party packages which pull in C
support, execute the unit tests with different compilers to catch possible build
issues.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
The change updates the layout of the tests following a proposed order
which should make the test easier to read and understand
The proposed order is:
summary
details
backends
systems
manual
priority
warn-timeout
kill-timeout
environment
prepare
restore
debug
execute
Changes included:
. removed lines used to delete files/dirs in $PWD
. ordered the tests 1. prepare 2. restore 3.debug 4.execute
. new lines added between phases
. removed lines which make snap remove in restore
This is the first part of the change
The tests.session helper requires busctl which is not available on 14.04,
however we still want to run tests on those systems.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
We occasionally see the tests invariant check incorrectly pick up a 'test' user
session dbus:
2021-03-01T08:55:18.3295048Z tests.invariant: root-files-in-home ok
2021-03-01T08:55:18.3296599Z tests.invariant: crashed-snap-confine ok
2021-03-01T08:55:18.3298081Z tests.invariant: lxcfs-mounted ok
2021-03-01T08:55:18.3299546Z tests.invariant: more than one dbus-daemon running
2021-03-01T08:55:18.3301790Z pid:67160 user:test cmdline:/usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
2021-03-01T08:55:18.3303861Z tests.invariant: stray-dbus-daemon not-ok
2021-03-01T08:55:18.3305558Z tests.invariant: leftover-defer-sh ok
2021-03-01T08:55:18.3306643Z tests.invariant: system is corrupted
Use the tests.session wrapper for running things as the 'test' user so that we
can ensure a proper session cleanup afterwards.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Drop a number of TRAVIS_* flags that are no longer used. Skip coverage
collection, since it's not really useful now.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Drop the test, which has become unnecessary and duplicates work. The invocation
so spread-shellcheck is part of run-checks which gets executed in tests/unit/go.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>