aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2022-07-10 11:07:46 -0400
committerLibravatar netblue30 <netblue30@protonmail.com>2022-07-10 11:07:46 -0400
commit502b9bbd908ef724f1fa64e29ceb3d430907b9c0 (patch)
tree623913c654c470223dd5295cf663a00362d5f522 /test
parentMerge pull request #5242 from alkim0/master (diff)
downloadfirejail-502b9bbd908ef724f1fa64e29ceb3d430907b9c0.tar.gz
firejail-502b9bbd908ef724f1fa64e29ceb3d430907b9c0.tar.zst
firejail-502b9bbd908ef724f1fa64e29ceb3d430907b9c0.zip
testing fix
Diffstat (limited to 'test')
-rwxr-xr-xtest/profiles/all-profiles.sh47
-rwxr-xr-xtest/profiles/profiles.sh11
2 files changed, 49 insertions, 9 deletions
diff --git a/test/profiles/all-profiles.sh b/test/profiles/all-profiles.sh
new file mode 100755
index 000000000..cc17b6b00
--- /dev/null
+++ b/test/profiles/all-profiles.sh
@@ -0,0 +1,47 @@
1#!/bin/bash
2# This file is part of Firejail project
3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2
5
6export MALLOC_CHECK_=3
7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
8export LC_ALL=C
9
10echo "TESTING: profile comments (test/profiles/profilecomment.exp)"
11./profile_comment.exp
12
13echo "TESTING: profile conditional (test/profiles/conditional.exp)"
14./conditional.exp
15
16echo "TESTING: profile recursivity (test/profiles/profile_recursivity.exp)"
17./profile_recursivity.exp
18
19echo "TESTING: profile application name (test/profiles/profile_appname.exp)"
20./profile_appname.exp
21
22echo "TESTING: profile syntax (test/profiles/profile_syntax.exp)"
23./profile_syntax.exp
24
25echo "TESTING: profile syntax 2 (test/profiles/profile_syntax2.exp)"
26./profile_syntax2.exp
27
28echo "TESTING: ignore command (test/profiles/ignore.exp)"
29./ignore.exp
30
31echo "TESTING: profile read-only (test/profiles/profile_readonly.exp)"
32./profile_readonly.exp
33
34echo "TESTING: profile read-only links (test/profiles/profile_readonly.exp)"
35./profile_followlnk.exp
36
37echo "TESTING: profile no permissions (test/profiles/profile_noperm.exp)"
38./profile_noperm.exp
39
40PROFILES=`ls /etc/firejail/*.profile`
41echo "TESTING: default profiles installed in /etc"
42
43for PROFILE in $PROFILES
44do
45 echo "TESTING: $PROFILE"
46 ./test-profile.exp $PROFILE
47done
diff --git a/test/profiles/profiles.sh b/test/profiles/profiles.sh
index ce2fa32c4..8808bc9d2 100755
--- a/test/profiles/profiles.sh
+++ b/test/profiles/profiles.sh
@@ -37,15 +37,8 @@ echo "TESTING: profile read-only links (test/profiles/profile_readonly.exp)"
37echo "TESTING: profile no permissions (test/profiles/profile_noperm.exp)" 37echo "TESTING: profile no permissions (test/profiles/profile_noperm.exp)"
38./profile_noperm.exp 38./profile_noperm.exp
39 39
40# GitHub CI doesn't have a /run/user/$UID directory. Using it to test a small number of profiles. 40PROFILES=`ls /etc/firejail/transmission*.profile /etc/firejail/fi*.profile /etc/firejail/fl*.profile /etc/firejail/free*.profile`
41UID=`id -u` 41echo "TESTING: small number of default profiles installed in /etc"
42if [ -d "/run/user/$UID" ]; then
43 PROFILES=`ls /etc/firejail/*.profile`
44 echo "TESTING: default profiles installed in /etc"
45else
46 PROFILES=`ls /etc/firejail/transmission*.profile /etc/firejail/fi*.profile /etc/firejail/fl*.profile /etc/firejail/free*.profile`
47 echo "TESTING: small number of default profiles installed in /etc"
48fi
49 42
50for PROFILE in $PROFILES 43for PROFILE in $PROFILES
51do 44do