This is needed because in fedora 37 dns queries are using tcp instead of
udp.
Reading documentation I see both protocols could be used in different
situations.
The idea is to make sure the dns queries are blocked to check the snap
network errors.
The idea of this change is to standarize the debug section of the tests
and also to make them more robust.
Debug is shown when the test has failed, so the preconditions for this
step are undefined, this is why we need to suppose it can fail at any
step.
In case the debug section fails for a test, then the generic debug is
not displayed and no usefull debug information is shown to understand
the problem.
* Fix snap-network-erros on uc16
The test is failing in uc 16 with error:
+ systemd-resolve --flush-caches
systemd-resolve: unrecognized option '--flush-caches'
Also the test is simplified to support all the systems
* fix sheelcheck
Centos 7 doesn't seem to have any local DNS caching, so just skip the part of
the test that flushes the cache.
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
* Testing new fedora 33 image
* packaging/fedora: align with Fedora source tree
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
* Skip tests on f33 due to it uses cgroupv2
* data/selinux: account for s-c unmounting things
The snap-confine helper unmounts some locations which are actually a tmpfs with
a different label. Update the policy to allow that.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
* tests/main: Fedora 33 nsswitch uses resolved first for host resolution
Make sure that we also stop or flush resolved caches when disabling blocking DNS
or clearing resolve.conf.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
* tests/main/snap-network-errors: tweak to account for older systemd versions
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
* spread: Fedora 31 is EOL on 24.11
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Co-authored-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>