diff options
author | netblue30 <netblue30@yahoo.com> | 2015-12-12 09:11:52 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2015-12-12 09:11:52 -0500 |
commit | d9efe384aaff0134b9502c447b92a81dab3dd68e (patch) | |
tree | d7de8163524ef73d8dfb6492b9a8502cdeed490f | |
parent | fixes (diff) | |
download | firejail-d9efe384aaff0134b9502c447b92a81dab3dd68e.tar.gz firejail-d9efe384aaff0134b9502c447b92a81dab3dd68e.tar.zst firejail-d9efe384aaff0134b9502c447b92a81dab3dd68e.zip |
compile test
-rwxr-xr-x | test/compile/compile.sh | 130 | ||||
-rw-r--r-- | todo | 12 |
2 files changed, 135 insertions, 7 deletions
diff --git a/test/compile/compile.sh b/test/compile/compile.sh new file mode 100755 index 000000000..f4440e321 --- /dev/null +++ b/test/compile/compile.sh | |||
@@ -0,0 +1,130 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | arr[1]="TEST 1: standard compilation" | ||
4 | arr[2]="TEST 2: compile seccomp disabled" | ||
5 | arr[3]="TEST 3: compile chroot disabled" | ||
6 | arr[4]="TEST 4: compile bind disabled" | ||
7 | |||
8 | |||
9 | # remove previous reports and output file | ||
10 | cleanup() { | ||
11 | rm -f report* | ||
12 | rm -fr firejail | ||
13 | } | ||
14 | |||
15 | print_title() { | ||
16 | echo | ||
17 | echo | ||
18 | echo | ||
19 | echo "**************************************************" | ||
20 | echo $1 | ||
21 | echo "**************************************************" | ||
22 | } | ||
23 | |||
24 | while [ $# -gt 0 ]; do # Until you run out of parameters . . . | ||
25 | case "$1" in | ||
26 | --clean) | ||
27 | cleanup | ||
28 | exit | ||
29 | ;; | ||
30 | --help) | ||
31 | echo "./autotest.sh [--clean|--help]" | ||
32 | exit | ||
33 | ;; | ||
34 | esac | ||
35 | shift # Check next set of parameters. | ||
36 | done | ||
37 | |||
38 | cleanup | ||
39 | # enable sudo | ||
40 | sudo ls -al | ||
41 | |||
42 | #***************************************************************** | ||
43 | # TEST 1 | ||
44 | #***************************************************************** | ||
45 | # - checkout source code | ||
46 | # - check compilation | ||
47 | # - install | ||
48 | #***************************************************************** | ||
49 | print_title "${arr[1]}" | ||
50 | git clone https://github.com/netblue30/firejail.git | ||
51 | cd firejail | ||
52 | ./configure --prefix=/usr --enable-fatal-warnings 2>&1 | tee ../output-configure | ||
53 | make -j4 2>&1 | tee ../output-make | ||
54 | sudo make install 2>&1 | tee ../output-install | ||
55 | cd .. | ||
56 | grep Warning output-configure output-make output-install > ./report-test1 | ||
57 | grep Error output-configure output-make output-install >> ./report-test1 | ||
58 | rm output-configure output-make output-install | ||
59 | |||
60 | |||
61 | #***************************************************************** | ||
62 | # TEST 2 | ||
63 | #***************************************************************** | ||
64 | # - disable seccomp configuration | ||
65 | # - check compilation | ||
66 | #***************************************************************** | ||
67 | print_title "${arr[2]}" | ||
68 | # seccomp | ||
69 | cd firejail | ||
70 | make distclean | ||
71 | ./configure --prefix=/usr --disable-seccomp --enable-fatal-warnings 2>&1 | tee ../output-configure | ||
72 | make -j4 2>&1 | tee ../output-make | ||
73 | cd .. | ||
74 | grep Warning output-configure output-make > ./report-test2 | ||
75 | grep Error output-configure output-make >> ./report-test2 | ||
76 | rm output-configure output-make | ||
77 | |||
78 | #***************************************************************** | ||
79 | # TEST 3 | ||
80 | #***************************************************************** | ||
81 | # - disable chroot configuration | ||
82 | # - check compilation | ||
83 | #***************************************************************** | ||
84 | print_title "${arr[3]}" | ||
85 | # seccomp | ||
86 | cd firejail | ||
87 | make distclean | ||
88 | ./configure --prefix=/usr --disable-chroot --enable-fatal-warnings 2>&1 | tee ../output-configure | ||
89 | make -j4 2>&1 | tee ../output-make | ||
90 | cd .. | ||
91 | grep Warning output-configure output-make > ./report-test3 | ||
92 | grep Error output-configure output-make >> ./report-test3 | ||
93 | rm output-configure output-make | ||
94 | |||
95 | #***************************************************************** | ||
96 | # TEST 4 | ||
97 | #***************************************************************** | ||
98 | # - disable bindconfiguration | ||
99 | # - check compilation | ||
100 | #***************************************************************** | ||
101 | print_title "${arr[3]}" | ||
102 | # seccomp | ||
103 | cd firejail | ||
104 | make distclean | ||
105 | ./configure --prefix=/usr --disable-bind --enable-fatal-warnings 2>&1 | tee ../output-configure | ||
106 | make -j4 2>&1 | tee ../output-make | ||
107 | cd .. | ||
108 | grep Warning output-configure output-make > ./report-test4 | ||
109 | grep Error output-configure output-make >> ./report-test4 | ||
110 | rm output-configure output-make | ||
111 | |||
112 | |||
113 | #***************************************************************** | ||
114 | # PRINT REPORTS | ||
115 | #***************************************************************** | ||
116 | echo | ||
117 | echo | ||
118 | echo | ||
119 | echo | ||
120 | echo "**********************************************************" | ||
121 | echo "TEST RESULTS" | ||
122 | echo "**********************************************************" | ||
123 | |||
124 | wc -l report-test* | ||
125 | echo | ||
126 | |||
127 | |||
128 | |||
129 | |||
130 | exit | ||
@@ -66,13 +66,6 @@ socat UNIX-LISTEN:/tmp/mysoc,fork ABSTRACT-CONNECT:/tmp/dbus-awBoQTCc & | |||
66 | in sandbox | 66 | in sandbox |
67 | socat ABSTRACT-LISTEN:/tmp/dbus-awBoQTCc,fork UNIX-CONNECT:/tmp/mysock | 67 | socat ABSTRACT-LISTEN:/tmp/dbus-awBoQTCc,fork UNIX-CONNECT:/tmp/mysock |
68 | 68 | ||
69 | 11. autotest for config options: | ||
70 | |||
71 | ./configure --enable-fatal-warnings --prefix=/usr | ||
72 | ./configure --enable-fatal-warnings --disable-seccomp --prefix=/usr | ||
73 | ./configure --enable-fatal-warnings --disable-chroot --prefix=/usr | ||
74 | ./configure --enable-fatal-warnings --disable-bind --prefix=/usr | ||
75 | |||
76 | 12. do not allow symlinks for --bind | 69 | 12. do not allow symlinks for --bind |
77 | 70 | ||
78 | 13. While using --net=eth0 assign the name of the interface inside the sandbox as eth0 | 71 | 13. While using --net=eth0 assign the name of the interface inside the sandbox as eth0 |
@@ -124,3 +117,8 @@ http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_2 | |||
124 | 22. Fix manpage: | 117 | 22. Fix manpage: |
125 | W: firejail: manpage-has-errors-from-man usr/share/man/man5/firejail-profile.5.gz 84: `\ ' is not allowed in an escape name | 118 | W: firejail: manpage-has-errors-from-man usr/share/man/man5/firejail-profile.5.gz 84: `\ ' is not allowed in an escape name |
126 | if building a 32bit package, rename the deb file manually | 119 | if building a 32bit package, rename the deb file manually |
120 | |||
121 | 23. transmission-gtk when using tracelog: | ||
122 | |||
123 | Dec 12 07:32:36 debian kernel: [ 1564.772297] transmission-gt[3680]: segfault at 0 ip 00007f44ba515348 | ||
124 | sp 00007ffee7154288 error 4 in libc-2.13.so[7f44ba400000+ | ||