diff options
author | 2016-11-14 07:53:22 -0500 | |
---|---|---|
committer | 2016-11-14 07:53:22 -0500 | |
commit | 745742f17378cde52591c1aa8e112445022abb2d (patch) | |
tree | efc2e0bd25435a5ba89d6db2d3bd6981270ed6ea /test | |
parent | testing (diff) | |
download | firejail-745742f17378cde52591c1aa8e112445022abb2d.tar.gz firejail-745742f17378cde52591c1aa8e112445022abb2d.tar.zst firejail-745742f17378cde52591c1aa8e112445022abb2d.zip |
cleanup
Diffstat (limited to 'test')
-rwxr-xr-x | test/rlimit/rlimit.sh | 14 | ||||
-rwxr-xr-x | test/root/private.exp | 33 |
2 files changed, 47 insertions, 0 deletions
diff --git a/test/rlimit/rlimit.sh b/test/rlimit/rlimit.sh new file mode 100755 index 000000000..d85497176 --- /dev/null +++ b/test/rlimit/rlimit.sh | |||
@@ -0,0 +1,14 @@ | |||
1 | #!/bin/bash | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | export MALLOC_CHECK_=3 | ||
7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | ||
8 | |||
9 | echo "TESTING: rlimit (test/rlimit/rlimit.exp)" | ||
10 | ./rlimit.exp | ||
11 | |||
12 | echo "TESTING: rlimit profile (test/rlimit/rlimit-profile.exp)" | ||
13 | ./rlimit-profile.exp | ||
14 | |||
diff --git a/test/root/private.exp b/test/root/private.exp new file mode 100755 index 000000000..4040081ee --- /dev/null +++ b/test/root/private.exp | |||
@@ -0,0 +1,33 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --private\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | sleep 2 | ||
16 | |||
17 | send -- "ls -l /home\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 1\n";exit} | ||
20 | "total 0" | ||
21 | } | ||
22 | after 100 | ||
23 | |||
24 | send -- "ls -l /root\r" | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 2\n";exit} | ||
27 | "total 0" | ||
28 | } | ||
29 | after 100 | ||
30 | |||
31 | send -- "exit\r" | ||
32 | after 100 | ||
33 | puts "\nall done\n" | ||