Split filters tests into isolation-machine test
as they do not work well inside containers that already
set up seccomp.
Reiner Herrmann
4 years ago
0 | 0 |
Tests: simple-tests
|
1 | 1 |
Restrictions: allow-stderr, flaky
|
2 | 2 |
Depends: @, expect, file, sudo, procps, xzdec, cpio, less, strace, csh, zsh, man, iputils-ping, wget, x11-common
|
|
3 |
|
|
4 |
Tests: isolatoin-tests
|
|
5 |
Restrictions: allow-stderr, breaks-testbed, isolation-machine, needs-root, flaky
|
|
6 |
Depends: @, expect
|
3 | 7 |
|
4 | 8 |
Tests: application-tests
|
5 | 9 |
Restrictions: allow-stderr, isolation-machine, flaky
|
|
0 |
#!/bin/bash
|
|
1 |
|
|
2 |
LOGFILE="$AUTOPKGTEST_TMP/test.log"
|
|
3 |
|
|
4 |
sed -i 's/^\(restricted-network .*\)/#\1/' /etc/firejail/firejail.config
|
|
5 |
sed -i 's/^\(cgroup .*\)/#\1/' /etc/firejail/firejail.config
|
|
6 |
|
|
7 |
# copy tests to temporary directory, as current one might be read-only
|
|
8 |
cp -a test "$AUTOPKGTEST_TMP"
|
|
9 |
cd "$AUTOPKGTEST_TMP/test"
|
|
10 |
|
|
11 |
# run tests
|
|
12 |
for dir in filters
|
|
13 |
do
|
|
14 |
pushd $dir
|
|
15 |
bash -x ./$dir.sh | tee -a "$LOGFILE"
|
|
16 |
popd
|
|
17 |
done
|
|
18 |
|
|
19 |
echo "======================================"
|
|
20 |
grep "TESTING" "$LOGFILE"
|
|
21 |
echo "======================================"
|
|
22 |
|
|
23 |
[ $(grep -c "TESTING ERROR" "$LOGFILE") -gt 0 ] && exit 1
|
|
24 |
|
|
25 |
exit 0
|
9 | 9 |
cd "$AUTOPKGTEST_TMP/test"
|
10 | 10 |
|
11 | 11 |
# run tests
|
12 | |
for dir in arguments environment fcopy filters fs profiles sysutils utils;
|
|
12 |
for dir in arguments environment fcopy fs profiles sysutils utils;
|
13 | 13 |
do
|
14 | 14 |
pushd $dir
|
15 | 15 |
bash -x ./$dir.sh | tee -a "$LOGFILE"
|